JDBC Connectivity SQL SERVER 2005 Fails

Posted on 2008-11-07
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:   Error Code: 4060   SQL State: S0001
   Cannot open database "MiExamenOnline" requested by the login. The login failed.
Question by:vcaravantes2008
    LVL 15

    Expert Comment

    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

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


    Expert Comment

    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

    SOLUTION:  I found the solution on MSDN.  Change the connection string as follows:


    Look here for further information:

    Hope this helps

    Featured Post

    How to improve team productivity

    Quip adds documents, spreadsheets, and tasklists to your Slack experience
    - Elevate ideas to Quip docs
    - Share Quip docs in Slack
    - Get notified of changes to your docs
    - Available on iOS/Android/Desktop/Web
    - Online/Offline

    Join & Write a Comment

    In this article I will describe the Backup & Restore method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
    Load balancing is the method of dividing the total amount of work performed by one computer between two or more computers. Its aim is to get more work done in the same amount of time, ensuring that all the users get served faster.
    This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
    This video teaches viewers about errors in exception handling.

    731 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

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now