Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Establish JDBC connection from Oracle 12C to MSSQL 2008

User_GVSRZJan 31 2018 — edited Feb 1 2018

Hello,

We have an Oracle system which currently uses Oracle Gateways to retrieve data from a remote MSSQL database directly back into Oracle. Going forward we are looking at maybe replacing Gateways by implementing a Java stored procedure which connects to the target MSSQL database using JDBC. We are currently undertaking a Proof of Concept exercise and have already hit some issues when running a simple Java program to attempt to connect to a MSSQL database. I'm wondering if the problem has anything to do with the versions of drivers and JRE used so any advice on what we may be doing wrong here would be greatly appreciated.

Some background info

The Oracle environment from where we are executing the Java program to connect to MSSQL is as follows :-

Oracle 12.1.0.2

JRE is 1.6.1

We've loaded the Microsoft JDBC Driver for SQL Server 6.2 into a DB Schema

Here is our test Java code to connect to MSSQL:-

jdbc.PNG

The error we're getting when we execute the above code is :-

java.sql.SQLException: No suitable driver found jdbc:sqlserver

Clearly our code isn't even getting as far as actually attempting to connect to MSSQL. Apologies in advance if this is frequent 'newbie' issue seen before, but my team don't have much experience of coding with Java so we're finding our way slowly at the moment.

Thanks,

Shaun.

This post has been answered by unknown-7404 on Jan 31 2018
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 1 2018
Added on Jan 31 2018
3 comments
692 views