13 Replies Latest reply on Mar 1, 2016 6:54 AM by Toby Erkson

    ODBC Connection Settings

    Shamsul Hassan

      Hi All,

       

      I am trying to customise the ODBC connection settings while connecting to MySql as by default Tableau is making 8-10 connections on every refresh of a "Live Connections".

       

      Till now I have taken below steps but no success --

       

      1) Opened the .twb file in text editor

       

      2) Added the below customisation

       

                <connection-customization class='mysql' enabled='true' version='9.0'>

                <vendor name='mysql' />

                <driver name='mysql' />

                <customizations>

                  <customization name='CAP_MULTIPLE_CONNECTIONS_FROM_SAME_IP' value='no' />

                </customizations>

              </connection-customization>

       

      I have referred the link - Customizing and Tuning ODBC Connections | Tableau Software

       

      Any help here to restrict the number of connections Tableau made to MySql?

        • 1. Re: ODBC Connection Settings
          Yuriy Fal

          Hi Shamsul,

           

          Please try to save your customization XML code

          as a distinct Tableau data connection file named say   "mysql-single.tdc"

          and place it to your .../My Tableau Repository/Datasources folder.

           

          One could then see in logs if Tableau read and use the TDC file.

           

          Hope it could help.

           

          Yours,

          Yuri

          1 of 1 people found this helpful
          • 2. Re: ODBC Connection Settings
            Shamsul Hassan

            Hi Yuriy,

             

            Yes , i followed the above steps as well but still it is making multiple connections to MySql.

             

            I have noticed one thing is that , the number of connections made are equal to the number of filters on dashboard. So if i had 10 quick filters then its showing 10 connections on MySql side.

             

            Also even i will make it work , how will i make it work after publishing the workbook , as I don't have any access on the server side. Can i publish the tweaked ".twb" file as I mentioned earlier.

             

            Thanks

            • 3. Re: ODBC Connection Settings
              Toby Erkson

              Shamsul Hassan wrote:

               

              Hi Yuriy,

               

              Yes , i followed the above steps as well but still it is making multiple connections to MySql.

               

              I have noticed one thing is that , the number of connections made are equal to the number of filters on dashboard. So if i had 10 quick filters then its showing 10 connections on MySql side.

               

              Also even i will make it work , how will i make it work after publishing the workbook , as I don't have any access on the server side. Can i publish the tweaked ".twb" file as I mentioned earlier.

               

              Thanks

              The multiple connections may be necessary (just a guess).

               

              As for the Tableau Server side, the .tdc file can be saved in the Tableau Server folder at ...\Tableau Server\data\tabsvc\vizqlserver\Datasources

              This info is stated in the KB article you referenced.

              Re: Is there additional information regarding query isolation levels for DB2 (via .tdc)?

              • 4. Re: ODBC Connection Settings
                Toby Erkson

                Why do you care about the number of connections?  Is it drastically affecting the db in a negative way? 

                • 5. Re: ODBC Connection Settings
                  Teresa Whitman

                  the more the connections the performance would be down.

                  • 6. Re: ODBC Connection Settings
                    Toby Erkson

                    That is not necessarily true with asynchronous transactions and parallel processing is being performed.

                     

                    We need to know exactly why this is a concern and as not just looking for a solution to a problem that doesn't exist.

                    • 7. Re: ODBC Connection Settings
                      Shamsul Hassan

                      We don't care about the performance much for the queries . Our main concern is the number of connections as we have some hard limit on this --

                       

                      I am using the below .tdc file but its creating connections as the number of quick filters in dashboard

                       

                      <?xml version='1.0' encoding='utf-8' ?>

                      <connection-customization class='mysql' version='9.0' enabled='true'>

                      <vendor name='mysql' />

                      <driver name='mysql' />

                      <customizations>

                        <customization name='CAP_MULTIPLE_CONNECTIONS_FROM_SAME_IP' value='no' />

                      </customizations>

                      </connection-customization>

                      • 8. Re: ODBC Connection Settings
                        Toby Erkson

                        Shamsul Hassan wrote:

                         

                        We don't care about the performance much for the queries . Our main concern is the number of connections as we have some hard limit on this --

                         

                        ...

                        Okay, this reason is what I'm looking for.

                         

                        Explain your case to the dba and see if you can get an exception.  You may need management to back you up so talk with your manager as well.

                        My next suggestion is to contact Tableau Support.  While .tdc is not officially supported they do a pretty good job trying to help!

                        • 9. Re: ODBC Connection Settings
                          Mark Pesce

                          Shamsul, I also connect to Tableau using a generic ODBC connection. Now this is my own personal experience so I'm not 100% sure how much of this would apply to you. My company uses the ERP A+ and I have it setup as a DSN.

                           

                          In previous versions, I was having connectivity versions and had noticed that Tableau had not been adding some extra coding in the "Tableau String Extras" portion. As soon as I recovered these Tableau String Extras, I had no connectivity issues.

                           

                          It might be helpful to see the error message you are receiving.

                           

                          On another note, I do not have any dashboards connected through a live ODBC connection as I have noticed performance is substantially bogged down by the live connection.

                           

                          Just my two cents...Mark

                          • 10. Re: ODBC Connection Settings
                            Shamsul Hassan

                            Hi Mark,

                             

                            Mark Pesce wrote:

                             

                            In previous versions, I was having connectivity versions and had noticed that Tableau had not been adding some extra coding in the "Tableau String Extras" portion. As soon as I recovered these Tableau String Extras, I had no connectivity issues.

                             

                            Could you please elaborate on this statement. I can't see any reference of "Tableau String Extras" . Are you referring to "odbc-connect-string-extras" ? If yes then what all values you can pass here in terms if number of connections?

                             

                            Also I am not getting any Error message on Tableau side . It is successfully getting the data but my only concern is the number of connections it is making to MySql. In test system it is ok but I have hard limit on number of connections in Production . Also we are expecting large number of users for this dashboard I am working on and definitely that will end up in making numbers connections on Production MySql machine.

                             

                            Also am i using the right customisation here to restrict he number of connections ?

                             

                            <customization name='CAP_MULTIPLE_CONNECTIONS_FROM_SAME_IP' value='no' />

                             

                            Thanks

                            • 11. Re: ODBC Connection Settings
                              Toby Erkson

                              Can you use an extract instead of a live connection?

                              • 12. Re: ODBC Connection Settings
                                Shamsul Hassan

                                Hi Toby,

                                 

                                No I don't want to extract . My requirement is the Live connection and I don't want Tableau to make multiple connections to MySql.

                                Currently it is making almost same number of connections as the number of quick filters on dashboard.

                                 

                                Thanks

                                • 13. Re: ODBC Connection Settings
                                  Toby Erkson

                                  Moved to the Server Admin forum for improved opportunity to get server/dba inputs.