What options are available for connecting to a Microsoft SQL Server database from an Oracle database?

StackOverflow https://stackoverflow.com/questions/186443

Question

At the moment I pull data from remote MS SQL Server databases using custom-built JDBC connectors. This works fine but doesn't feel like the way to do it.

I feel I should be able to put a JDBC connection string into tnsnames on the server and have it "just work". I've looked around a little for this functionality but it doesn't seem to be there.

In this way I could connect to pretty much any database just using a database link.

Have I missed something?


It looks like the two options are Generic Connectivity and Oracle Gateways but I'm surprised that's all there is. Generic Connectivity comes with the database license and Oracle Gateways is an add-on. For Generic Connectivity, if you're running on Linux (like me) you need to get hold of an ODBC driver as it isn't bundled with the database.

However... with Oracle being such keen Java fans, and with a JVM built-in to the database I'd have thought a JDBC-based linking technology would have been a no-brainer. It seems a natural extension to have a JDBC connection string in TNSNAMES and everything would "just work".

Anyone any ideas why this isn't available?

Was it helpful?

Solution

Generic Connectivity is what you are after, it will let you setup a remote database link against MS SQL Server, so you can do queries like

select * from mytable@my_ms_sql_server;

I've only used it in Oracle 9i against mysql, and found, that in our cases, it didn't work very well, as it ended up using up MASSIVE amounts of ram, we still use it, but now just use it for syncing to a local table rather than doing 'live' queries against it. BUT, it might be completely different against MS SQL Server, and in 10g/11g

OTHER TIPS

Another product to look at is Oracle Gateways.

Have a look at:

http://www.oracle.com/technology/documentation/gateways10g.html

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top