java.sql.Sqlexception:[Microsoft][SQL Server 2000 Driver for JDBC]Error establishing socket

Posted on 2005-05-09
Last Modified: 2007-12-19
Hello everybody,
       I had been trying to run a JSP project on MS SQL and Apache tomcat 5.0.3 but I'm gettin db problems. The SQL server is running fine so is the Tomcat server. But when I run my code for a DB access I was gettin this error
java.sql.Sqlexception:[Microsoft][SQL Server 2000 Driver for JDBC]Error establishing socket
I installed the updates for SQL server also. My fire walls are disabled. The same code was running fine on an other system but it is not running on this system.
Any kind of help is appreciated.
Thank You in advance.
Question by:sumanshankar
    LVL 2

    Assisted Solution

    do u have put ur jar files provided by Microsoft SQL SERVER 2000 Driver for jdbc in common folder of tomcat
    LVL 29

    Accepted Solution

    The most likely causes are:
    -an incorrect URL for the database (check port number and rest of URL)
    -a firewall blocking the port (especially common with Windows XP sp2)
    -that your SQL Server needs to have at least service pack 3
    -privilege access for the db user/pwd

    For the official Microsoft technical help on this issue:;en-us;313178

    What OS are you running? What are the differences between the machine it was working on and this new machine?

    Author Comment

    What jar files should I put int the common folder of tomcat?
    LVL 3

    Assisted Solution

    U need
    1. sqlserver.jar (90kb) / mssqlserver.jar (68kb)
    2. msbase.jar (295kb)
    3. msutil.jar (63kb)

    in ur lib directory.


    Author Comment

    I had those jar files in the lib directory.
    LVL 3

    Assisted Solution

    Check if u are able to establish a connection first of all atleast once.

    Check ur username/pwd again.
    check ur DBServer configuration
    check ur Drivers

    try to establish a single connection once.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    Run jasper report from servlet 1 202
    Jquery - parsing the results returned from webmethod 1 96
    J2SE 5.0 metadata 1 40
    java cigar challenge 58 199
    This is an issue that we can get adding / removing permissions in the vCSA 6.0. We can also have issues searching for users / groups in the AD (using your identify sources). This is how one of the ways to handle this issues and fix it.
    For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
    Need more eyes on your posted question? Go ahead and follow the quick steps in this video to learn how to Request Attention to your question. *Log into your Experts Exchange account *Find the question you want to Request Attention for *Go to the e…
    In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…

    734 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

    21 Experts available now in Live!

    Get 1:1 Help Now