Harman Veer Kaur
Harman Veer Kaur

Reputation: 29

Connection failed: SQLState: '01000' SQL Server Error: 53

I'm trying to create odbc connection to SQL Server but it returns following error:


Microsoft SQL Server Login

Connection failed: SQLState: '01000' SQL Server Error: 53 [Microsoft][ODBC SQL Server Driver][DBNETLIB]ConnectionOpen (Connect()). Connection failed: SQLState: '08001' SQL Server Error: 17 [Microsoft][ODBC SQL Server Driver][DBNETLIB]SQL Server does not exist or access denied.


OK

I have verified the server name and credentials. But i am not able to make connection.

Please suggest.

Upvotes: 0

Views: 19438

Answers (2)

thomiel
thomiel

Reputation: 2955

If the server name and credentials are correct, maybe you were using the wrong driver?...

In my case I used the wrong odbcad32.exe to connect to a MySQL server via a 32-bit driver. The confusing thing is, that the 64-bit odbcad32.exe shows other 32-bit MySQL datasources. After I clicked 'Add', two SQL driver entries showed up (I have two MySQL driver versions installed) and it took me a minute to realize that these are just preinstalled MS SQL drivers after it returned the error in the question.

If you need a 32-bit ODBC connection, make sure to use C:\windows\SysWoW64\odbcad32.exe -- another everlasting source of confusion, if you don't know that on a 64-bit Windows the 32-bit binaries are located in SysWoW64 and the 64-bit ones are in System32.

After the ODBC Administration Tool is no longer available from the Computer Management GUI in Windows 10/11, I suspect that this problem might have become more common in recent years, when people fall for the 64-bit version, using Windows key + 'R' and just type odbcad32.exe even if they want to establish a 32-bit driver connection for a legacy ODBC-using application.

Upvotes: 0

Srikar mogaliraju
Srikar mogaliraju

Reputation: 215

  1. Check if TCP/UDP ports for Sql Server are present in Windows Firewalls. If not , then you have create new incoming rules with (Sql Server Defaults) TCP port 1433 and UDP port 1434 . These are the main things which allows you to establish a connection to Sql server from ODBC or any other external.

  2. If you are using the named instance server(Server\Instance Name) in ODBC Connection String, You have to enable the UDP port (1434) in Windows Firewall along with TCP Port(1433) created in the above step.

  3. Restart the SQL SERVER and SQL Browser Services from SQL Server Configuration Manager.

Upvotes: 0

Related Questions