Anand B
Anand B

Reputation: 3085

Named Pipes Provider: Could not open a connection to SQL Server [53]

I am trying to connect mssql server 2008 using jdbc connection. My connection url is like

jdbc:jtds:sqlserver://localhost:1433/dbname;user=username;password=password

However I get the above mentioned exception when I try to execute a stored procedure through prepared statement

I have enabled TCP/IP and Named pipes. I have disabled firewall.

What could be the issue.

I found out it was because the following error occurs "ole/db provider returned message login timeout expired"...

but not sure why this happens

Upvotes: 3

Views: 28764

Answers (2)

George
George

Reputation: 31

I had the same problem, maybe the problem is related with DNS.
I fixed the problem creating the linked server with the IP Address instead of the server's name.

Upvotes: 1

Anand B
Anand B

Reputation: 3085

The linked server was configured with wrong authentication values. Hence when I tried to connect to the linked server it threw authentication exception which in turn throws above mentioned exception.

Creating a linked server with proper authentication values fixed the issue.

Upvotes: 4

Related Questions