Transferring Data Between Oracle and SQL Server

Posted by Daniel on Monday, July 9, 2007 at 3:23 pm

Categorized under ,

There are lots of “how to” articles on sharing data between Oracle and SQL Server. Most of these involve installing Oracle's code base on the SQL Server machine, then using that instance to link tables within Oracle. This technique does not require that, thanks to a product from Oracle called Oracle Instant Client.

To set up the Oracle piece, download the packages for “Basic” and “ODBC Supplement”, and follow the instructions for installation, on the machine with SQL Server. (This is not an “install” per se - it's basically an unzip.) Next, you'll need to provide a TNSNAMES.ORA file - this can be any valid file, including a simple shell with an “ifile=” statement pointing to a common TNSNAMES.ORA file. Finally, set the environment variable TNS_ADMIN to point to the directory where this TNSNAMES.ORA file resides.

Now, you can easily create a DTS script through SQL Server to push or pull data however you'd like. Oracle Instant Client will appear in the drop-down list of providers, and you'll be able to specify your connection the way you normally do (i.e., “DB01.WORLD”).

Happy migrating!