cancel
Showing results for 
Search instead for 
Did you mean: 

MS SQL Server JDBC Datasource

michael_voss2
Participant
0 Kudos

Hello everybody!

We need to retrieve data from an MS SQL Server inside a java application running on a SAP NetWeaver 7.3.1 AS (with an underlying Oracle DB). I downloaded the Microsoft-provided JDBC driver from here. After creating a new JDBC driver in NWA and uploading sqljdbc4.jar from the MS archive, I created a new custom JDBC data source using the newly created driver (Vendor SQL, isolation default, driver class "com.microsoft.sqlserver.jdbc.SQLServerConnectionPoolDataSource" and database URL "jdbc:sqlserver://<server_name>\<database_name>:<port>"). I'm quite sure user and password are o. k., but anyway the data source application fails to start.

So I decided to give the Open Source driver jTDS a try, downloaded from here, installed the driver jar (jtds-1.3.1.jar), created a new custom JDBC data source using the jtds driver (Vendor SQL, isolation default, driver class "net.sourceforge.jtds.jdbc.Driver" and database URL "jdbc:jtds:sqlserver://<server_name>:<port>/<database_name>"), but here, the application fails to start, too.

I created lots of custom JDBC data sources for Oracle DBs, using newly deployed JDBC drivers (not the System Driver) and those work fine.

Did anyone ever create a custom JDBC data source for MS SQL Server successfully? Which JDBC Driver jar would I have to use (and whete sould I retrieve it from) and how should I configure the data source ? Do I have to deploy other files, too ? Do I have to restart the server ?

Thanks

Michael

Accepted Solutions (0)

Answers (1)

Answers (1)

former_member188883
Active Contributor
0 Kudos

Hi Michael,

Not sure whether you refer the guidelines described in the blog

Regards,

Deepak Kori

michael_voss2
Participant
0 Kudos

Hi Deepak!

Thanks for you hint.

I went through the documentation for the MS driver and the jTDS driver and finally found out I was using the wrong class for the Microsoft driver. After changing the driver class name to "com.microsoft.sqlserver.jdbc.SQLServerDriver" the data source application finally started o. k.; yet I have to check if we can access the database correctly.

Thanks for your ideas.

Regards

Michael