9 Replies Latest reply on May 23, 2019 7:01 PM by Trevor Shintaku

    Microsoft SQL Server Connectivity issue

    Vinay R

      Hi,

      I'm getting the following error while connecting to Microsoft SQL Server 2014.

       

       

      Unable to connect to the server. Check that the server is running and that you have access privileges to the requested database.

      [Microsoft][ODBC Driver 13 for SQL Server]Named Pipes Provider: Could not open a connection to SQL Server [2].

      [Microsoft][ODBC Driver 13 for SQL Server]Login timeout expired

      [Microsoft][ODBC Driver 13 for SQL Server]A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.

      Unable to connect to the server "IP Address". Check that the server is running and that you have access privileges to the requested database.

       

       

      Do i need to install Drivers again?

      I'm on Tableau Desktop 2018.1

      Post Tableau 9.3 this SQL Driver is installed by default.

      Please suggest.

      I'm the developer and Admin for this.

      Patrick Byrne Can anyone assist me on this?

        • 1. Re: Microsoft SQL Server Connectivity issue
          Ken Flerlage

          This doesn't appear to be a Tableau issue. This actually seems to be an issue connecting to the SQL Server. In my experience, this is usually due to some sort of firewall that is blocking connectivity. My suggestion would be to try to connect to the SQL Server via SQL Server Management Studio to see if that works. Then come back and let us know if you were able to connect that way. That will help us to determine where to go from here.

          1 of 1 people found this helpful
          • 2. Re: Microsoft SQL Server Connectivity issue
            patrick.byrne.0

            I agree with Ken. I believe this is not an issue with Tableau but the SQL Server itself. Were you able to test the connection as Ken mentioned?

             

            Cheers,

            Byrne, Patrick

            Community Manager

            Tableau Software

            • 3. Re: Microsoft SQL Server Connectivity issue
              Indra Pramono

              I have the same problem too. I can connect using SQL Client (Jetbrains Datagrip), but unable to connect with Tableau.

              It doesn't give me the error message yet, but it has been trying to connect for more than 7 minutes.

               

              From the logs, I found this. dbname and table are purposely renamed to <hidden>:

               

              {"ts":"2019-04-30T11:21:48.675","pid":2464,"tid":"2cc8","sev":"info","req":"-","sess":"-","site":"-","user":"-","k":"msg","v":"QueryCacheServiceMruEnabled: false;"}

              {"ts":"2019-04-30T11:21:48.680","pid":2464,"tid":"2cc8","sev":"info","req":"-","sess":"-","site":"-","user":"-","k":"msg","v":"Setting EssBase path environment variables: \"C:\\Program Files\\Tableau\\Tableau 2019.1\\bin\""}

              {"ts":"2019-04-30T11:21:48.692","pid":2464,"tid":"924","sev":"info","req":"-","sess":"-","site":"-","user":"-","k":"msg","v":"ExternalProtocol::Dispatcher::AdminTask running."}

              {"ts":"2019-04-30T11:21:48.693","pid":2464,"tid":"2cc8","sev":"info","req":"-","sess":"-","site":"-","user":"-","k":"construct-protocol-group","v":{"attributes":{":protocol-clone-parent":"",":protocol-customizations":"","IsolationLevel":"","authentication":"sqlserver","class":"sqlserver","dbname":"<hidden>","minimum-driver-version":"","odbc-connect-string-extras":"","odbc-native-protocol":"","one-time-sql":"","password":"********","server":"<hidden>.nordstrom.net","sslmode":"","username":"<hidden>"},"closed-protocols-count":"0","connection-limit":"1","group-id":"0","in-construction-count":"0","protocols-count":"0","this":"0x000002aac0c3d780"},"ctx":{"client-type":"desktop","procid":"7516","tid":"9688","version":"20191.19.0417.1429"}}

              {"ts":"2019-04-30T11:21:48.693","pid":2464,"tid":"2cc8","sev":"info","req":"-","sess":"-","site":"-","user":"-","k":"protocolpool-incrementcacheclock-elapsed","v":{"elapsed":0},"ctx":{"client-type":"desktop","procid":"7516","tid":"9688","version":"20191.19.0417.1429"}}

              {"ts":"2019-04-30T11:21:48.694","pid":2464,"tid":"105c","sev":"info","req":"-","sess":"-","site":"-","user":"-","k":"protocolpool-incrementcacheclock-async-connections-elapsed","v":{"elapsed":0},"ctx":{"client-type":"desktop","procid":"7516","tid":"9688","version":"20191.19.0417.1429"}}

              {"ts":"2019-04-30T11:21:48.737","pid":2464,"tid":"27b8","sev":"info","req":"-","sess":"-","site":"-","user":"-","k":"connection-info","v":{"info":"ODBCProtocolImpl::Connect: Set ODBC sign-in timeout to 30s"},"ctx":{"client-type":"desktop","procid":"7516","tid":"9688","version":"20191.19.0417.1429"}}

              • 4. Re: Microsoft SQL Server Connectivity issue
                Alan Carpenter

                I have the same issues on 2019.1 and SSMS connects just fine to the database from the Windows Server with Tableau Server on it.

                • 5. Re: Microsoft SQL Server Connectivity issue
                  Mohammed Ihtesham

                  Hi Alan!

                   

                  Did you find solution for this? I am using Tableau Desktop 2018.3 and recently installed Microsoft SQL Server Management 18 and I am receiving error like

                   

                  An error occurred while communicating with Microsoft SQL Server.

                  Unable to connect to the server. Check that the server is running and that you have access privileges to the requested database.

                  [Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle on SQL_HANDLE_ENV failed

                  Unable to connect to the Microsoft SQL Server server "XXXXXXXXXXXX". Check that the server is running and that you have access privileges to the requested database.

                   

                  Let me know if you any solution worked for you.

                  • 6. Re: Microsoft SQL Server Connectivity issue
                    Emily Tarng

                    I got the same error too! I'm using 2019.1.2 and SSMS 17, while I have no issue connecting to SSMS at the same time I keep getting errors and can't connect on Tableu:

                     

                    [Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle on SQL_HANDLE_ENV failed

                    Unable to connect to the Microsoft SQL Server server "XXXXXXXXXXXX". Check that the server is running and that you have access privileges to the requested database.

                     

                    Hope someone can provide a solution! It's a huge issue to me it's not connecting

                    • 7. Re: Microsoft SQL Server Connectivity issue
                      Trevor Shintaku

                      encountering the same issue. wondering if anyone found a fix yet.

                       

                      SQL server connecting just fine, but tableau gives the same error.

                      • 8. Re: Microsoft SQL Server Connectivity issue
                        Ken Flerlage

                        This doesn't appear to be a Tableau issue. This actually seems to be an issue connecting to the SQL Server. In my experience, this is usually due to some sort of firewall that is blocking connectivity. My suggestion would be to try to connect to the SQL Server via SQL Server Management Studio to see if that works. Then come back and let us know if you were able to connect that way. That will help us to determine where to go from here.

                        • 9. Re: Microsoft SQL Server Connectivity issue
                          Trevor Shintaku

                          Eureka! I found a fix!

                           

                          Tableau Error Message:

                          "An error occurred while communicating with Microsoft SQL Server.

                          Unable to connect to the server. Check that the server is running and that you have access privileges to the requested database.

                          [Microsoft][ODBC Driver Manager] Driver's SQLAllocHandle on SQL_HANDLE_ENV failed

                          Unable to connect to the Microsoft SQL Server server "XX.XXX.X.XX". Check that the server is running and that you have access privileges to the requested database."

                           

                          Troubleshooting:

                          SSMS (v15.0.18118.0) is able to connect to a 2016 SQL Server database perfectly.

                          I can also ping the server with a response.

                          Tableau continues to return the error message.

                          I tried multiple restarts and contacting our networking guys to no avail.

                          Specifically searching for "SQLAllocHandle on SQL_HANDLE_ENV failed" (excluding any mention of tableau), I found articles that stated to delete and reinstall the ODBC driver. (Control Panel\Programs\Programs and Features > Uninstall Microsoft ODBC Driver 17 for SQL Server)

                           

                          Fix:

                          I had Microsoft ODBC Driver for SQL Server (version 17.3.1.1) installed which was the newest version, but apparently I needed to delete and reinstall which corrected the issue.

                          Here's the microsoft link to the ODBC driver.

                          Download Microsoft® ODBC Driver 17 for SQL Server® - Windows, Linux, & macOS from Official Microsoft Download Center

                           

                          I after this, I found another article from Tableau knowledge base with a similar fix

                          https://kb.tableau.com/articles/issue/error-driver-s-sqlallochandle-on-sql-handle-env-failed

                          1 of 1 people found this helpful