locked
SQL server 2005 JDBC driver RRS feed

  • Question

  • Hi

     

    Do we have to use SQL server 2005 JDBC driver to connect the sql server 2005? I got  sql server 2000 driver for JDBC, it works fine to connect the database. But when I use sql server migration assistant for oracle, i got an error saying: [sql server 2000 driver for JDBC] Error establishing socket. Do I have to download SQL server 2005 driver for JDBC or I miss something else?

     

    Thanks

     

    Li

    Sunday, April 1, 2007 5:43 AM

Answers

  • Li,

     

    Yes, you do need the SQL Server 2005 JDBC driver to connect to SQL Server 2005.  The Microsoft SQL Server 2005 JDBC driver supports both SQL Server 2000 and SQL Server 2005 and is available for download at http://msdn2.microsoft.com/en-us/data/aa937724.aspx.  The SQL Server 2000 JDBC driver is not supported for connectivity with SQL Server 2005.

     

    Jimmy

    Tuesday, April 3, 2007 7:09 PM

All replies

  • You might want to try SQL Server 2005 JDBC driver and see if you succeed.
    Sunday, April 1, 2007 1:11 PM
  • Li,

     

    Yes, you do need the SQL Server 2005 JDBC driver to connect to SQL Server 2005.  The Microsoft SQL Server 2005 JDBC driver supports both SQL Server 2000 and SQL Server 2005 and is available for download at http://msdn2.microsoft.com/en-us/data/aa937724.aspx.  The SQL Server 2000 JDBC driver is not supported for connectivity with SQL Server 2005.

     

    Jimmy

    Tuesday, April 3, 2007 7:09 PM
  • Hi,

     

    got the same problem.

    But it seems to be that the migration assistent from oracle to sql-server needs the 2000 Driver.

    When i do the sqljdbc.jar from 2005 driver into the classpath the problem is still there.

     

    when i remove the mssqlserver.jar from the classpath it says Driver not found.

     

    hmmm, how can i make the migration assistent work with the new driver?

    Tuesday, April 10, 2007 1:54 PM
  • Sounds like the connection URL specified is still using the 2000 driver instead of the 2005 driver.

    Please double check to make sure it looks like "jdbcTongue Tiedqlserver://yourServerName;..." instead of "jdbc:microsoftTongue Tiedqlserver://yourServerName;..."

     

    For additional information, please see http://msdn2.microsoft.com/en-us/library/ms378428.aspx

     

    Jimmy

    Tuesday, April 10, 2007 8:23 PM
  • Hi Li  ,

    Recently I downloaded version 1.2 release of the Microsoft SQL Server 2005 JDBC Driver. Thanks a ton to Microsoft
    for providing many new features such as Adaptive Buffering , SSL Encryption , Tightly Coupled XA Transactions etc.

    I am mainly concerned about SSL part of it and would be grateful if you can solve my queries or forward it to app-
    ropriate forum.

    1 ) I tried connecting to SSL enabled SQL Server 2005 through a sample program provided by Microsoft along with this
        package ( Version 1.2 ) and I succeeded whereas in previous versions I use to get an exception as "The SQL Server
        login requires an SSL connection." My connection string is as follows "jdbcTongue Tiedqlserver://Ip adress of dataserver
        machine:1433;databaseName=master;user=sa;password=sapassword" .

        Ideally we should only get an SSL connection when we request it else an error message should be thrown informing
        the user that dataserver requires an SSL connection. This would help in choosing between type of communication
        a user needs with dataserver.

        The scenario now is like forcing a user to have SSL communication if dataserver forces it. A flag may be added
        as ssl should be mandatory or auto .


    2 ) Current driver 1.2 is not capable of communicating with  MS SQL Server 2000 both in case of SSL and Non - SSL
        cases , The error which we receive in both cases is :

        Oct 18, 2007 4:57:17 PM com.microsoft.sqlserver.jdbc.SQLServerConnection Prelogin
        WARNING:  ConnectionID:1 TransactionID:0x0000000000000000 Prelogin response packet not marked as EOM
        The TDS protocol stream is not valid.

        To communicate with both MS SQL Server 2000 and 2005 a user will have to maintain both the drivers which may
        increase complexity of the application , like loading both driver in a single process , etc etc . . .

        If version 1.2 id  built on top of Sql server 2000 JDBC drive then it should be able to handle following 4 cases :

        i   ) SQL Server 2005 - SSL  ,
        ii  ) SQL Server 2005 - Non - SSL  ,
        iii ) SQL Server 2000 - SSL  ,
        iv  ) SQL Server 2000 - Non - SSL  .

        If this single driver handles all above 4 cases , life of a developer and application developed by him/her would
        become less complex.

    3 ) Last but not the least , the SQL Server 2000 JDBC driver connects with both kind of SQL Server 2000 instances i.e.
        SSL and Non - SSL without any certificate of flags specified. I was able to establish non - SSL connection with SQL
        Server 2000 using two third party JDBC drivers which I think is not appropriate behaviour.

    4 ) I have also noticed that when SQL Server 2005 is running in Non - SSL mode i.e. "ForecEncryption=No" and our Client
        application requests SSL communication , we are not warned about server is not runnning in SSL mode , could you please
        explain this ?

    Kindly correct me I am wrong anywhere as I am just a beginner and don't have much knowledge on this subject .

    Thanks a lot.

    Sincerly ,

    Sudhansu Tiwari
    Thursday, October 18, 2007 12:39 PM
  • Hi llluke ,

    You may try following to load your driver :

    driver = (Driver) Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver").newInstance();

    Hope it helps.
    Thursday, October 18, 2007 12:43 PM