Search code examples
sql-server-2005websphere-7

How to change sqljdbc.jar file to sqljdbc4.jar in JDBC provider?


How to change sqljdbc.jar file to sqljdbc4.jar in JDBC provider in WebSphere Appliction Server? Because I'm putting that file in application, but where should I put it in Websphere to be visible by classpath in jdbc provider?


Solution

  • You should not put sqljdbc4.jar with your application. Create directory on file system where WebSphere Application Server is installed e.g. /drivers/mssql. Put your sqljdbc4.jar there.

    Create new JDBC provider for MSSQL Server, if you don't already have one. If you have, can see its details in console via Resouces > JDBC > JDBC Providers. In the provider classpath you should see entry like this: ${MICROSOFT_JDBC_DRIVER_PATH}/sqljdbc4.jar. If you see sqljdbc.jar you might created DataDirect driver provider instead of MS SQL Server provider (in that case create new provider).

    Then check your ${MICROSOFT_JDBC_DRIVER_PATH} variable via Environment > WebSphere variables and edit this variable to point to your /drivers/mssql folder.

    If you had incorrect provider, you will need to recreate DataSources under your new provider.