[Last Call] Learn how to a build a cloud-first strategyRegister Now


JDBC Connectivity SQL SERVER 2005 Fails

Posted on 2008-11-07
Medium Priority
Last Modified: 2012-05-05
I'm trying conect to my local SQL SERVER EXPRESS 2005 I'm using the JDBC DRIVER SQL SERVER 2005 1.1 (DBVisualizer and Java Code) with the following conecction data:


When i trying the connection in Microsoft SQL Server Management Studio Express it's correct !!!

The error in java code and  DBVisualizer is:

An error occurred while establishing the connection:
   Type: com.microsoft.sqlserver.jdbc.SQLServerException   Error Code: 4060   SQL State: S0001
   Cannot open database "MiExamenOnline" requested by the login. The login failed.
Question by:vcaravantes2008
  • 2
LVL 15

Expert Comment

ID: 22911056
As per the message, it is login failure issue...
It could be incorrect password or login doesn't have the access to default database...
Try connectiong through ssms and make sure you connect to the database and able to run th queries...

Author Comment

ID: 22911063
The SQL Server Connection in Management Studio (Enterprise Manager) is correct with this user and password (vision,vision)


Expert Comment

ID: 23205598
I'm having the exact same issue.  I notice that you're using an instance name as well.  Could that have something to do with it??

Accepted Solution

gandalf2041 earned 500 total points
ID: 23205644
SOLUTION:  I found the solution on MSDN.  Change the connection string as follows:


Look here for further information: http://msdn.microsoft.com/en-us/library/ms378428(SQL.90).aspx

Hope this helps

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
MSSQL DB-maintenance also needs implementation of multiple activities. However, unprecedented errors can hamper the database management. In that case, deploying Stellar SQL Database Toolkit ensures fast and accurate database and backup repair as wel…
The viewer will learn how to implement Singleton Design Pattern in Java.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month17 days, 23 hours left to enroll

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question