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!

JDBC, Java Stored Procedures, and SQL Server - Oh My!

kleeJan 31 2008 — edited Nov 20 2014
Here is the mess that I am trying to sort out. For the most part, everything our organization does is Oracle, but there are those few applications that are "must haves" that use MS SQL Server, and I have to interface with them.

What I what is to be able to: select * from table(mySQLServerData())

mySQLServerData() is a PL/SQL Stub pointing to a Java Stored Procedure

The Java Stored Procedure fetches the data from MS SQL Server and returns the ref Cursor (or whatever that will work).

Seems simple, but I can't figure this out. Any help. I googled, searched the forum, but didn't find a solution that seemed close to what I am looking for.

I can get a java.sql.ResultSet from SQL Server. What are ways that I can return this so that I have something I can run a select against in SQL to create some transparancy. (We already use Oracle's gateway, but I am also calling several stored procedures and Functions in MS SQL Server.

What would be really awesome, is if someone had a solution that demonstrated how to have a function on the SQL Server machine return a result set, that I could then use as a return value in a Java Stored Procedure, that I could then call from SQL in Oracle. That would be awesome!

Thanks for any help, Ken
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 29 2008
Added on Jan 31 2008
2 comments
1,334 views