Wednesday, April 15, 2009

Common Connectivity issues/exceptions with SQL server [Express] 2005

1] Exception com.microsoft.sqlserver.jdbc.SQLServerException: Login failed for user 'abc'. The user is not associated with a trusted SQL Server connection.
This will normally come when the Authentication is set to Windows only.
So change the server authentication to both Windows and sql server authentication

2] Exception com.microsoft.sqlserver.jdbc.SQLServerException: The server SSEXPRESS is not configured to listen with TCP/IP.
This will occur when the tcp/ip protocol is disabled in the SQL Server Configuration Manager.
So go to SQL Server Configuration Manager and enable TCP/IP protocol

3] Exception com.microsoft.sqlserver.jdbc.SQLServerException: The connection to the named instance has failed. Error: java.net.SocketTimeoutException: Receive timed out.
This will occur when the connection URL doesn't mention the port number of the server and when JDBC driver is trying to find the port of the server based on the instance name.

...Trying to find the solution for this....

4] java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]The incoming tabular data stream (TDS) remote procedure call (RPC) protocol stream is incorrect. Parameter 1 (""): Data type 0x38 is unknown.
This will occur when sql server 2000 JDBC driver is used to talk to sqlserver 2005 database

1 comment:

Chandima said...

Thanks man.. You saved my day