Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JDBC login failed for SQL Server

843859May 17 2006
I have a Java app that connects to a MS SQL Server using com.microsoft.sqlserver.jdbc. Yesterday they deleted the server instance that I was using, and it returned an error message. I changed my code to reference the new instance but I am still receiving the same error message.
com.microsoft.sqlserver.jdbc.SQLServerException: Cannot open user default database. Login failed. 
  at java.lang.Throwable.<init>(Throwable.java:195)                                                
  at java.lang.Exception.<init>(Exception.java:41)                                                 
  at java.sql.SQLException.<init>(SQLException.java:40)                                            
  at com.microsoft.sqlserver.jdbc.SQLServerException.<init>(Unknown Source)                        
  at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unknown Source)         
  at com.microsoft.sqlserver.jdbc.IOBuffer.processPackets(Unknown Source)                          
  at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(Unknown Source)                        
  at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(Unknown Source)                      
  at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(Unknown Source)                          
  at java.sql.DriverManager.getConnection(DriverManager.java:512)                                  
  at java.sql.DriverManager.getConnection(DriverManager.java:193)                                  
  at SQL.sqlQuery(SQL.java:108)                                                                    
  at SQL.main(SQL.java:23)      
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 14 2006
Added on May 17 2006
0 comments
381 views