I recently migrated an Oracle database to SQL Server 2005 database. It was an good experience thought I should share it.
This is not comprehensive guide on migrating data from Oracle to SQL Server 2005, but describing my experience in doing it.
Source
Oracle 9i
No of databases/schema(Oracle name I guess) = 1
No of tables in the database = 35
Destination
SQL Server 2005
No of database = 1
No of tables in database = 0
In Part 1, I’ll start with establishing connection between these two database server
Adding Linked Server
In order to connect the Oracle server from SQL Server 2005 you need to create a linked server. If you are wondering what’s a linked server is, that link has a good picture, and a picture is worth a thousand words.
You can add a linked server from the Management Studio as below
Step 1. Go to Server Objects in Objects explorer, expand the tree, on Linked Server right to add new.
Step 2. Select other datasource and choose Oracle Provider for OLE DB as the provider.
The details on data source, provider string etc are available here (on MSDN, and I am not repeating here to avoid data redundancy :) )
If you don't like the GUI way you can use the script way as described on the MSDN article above (I used the script method)
Remember you need to install Oracle Client software on the SQL Server machine to do the above mentioned steps.
To check if the linked server a added correctly, you can use the management studio or run a sample query
Something similar to
SELECT * FROM OPEQUERY(OracleLinkServer, ‘Select * From <any table in Oracle> ‘)
I found the following links helpful while creating linked server.
1. How to set up and troubleshoot a linked server to an Oracle database in SQL Server
http://support.microsoft.com/kb/280106
2. Allow inprocess tick box
http://social.msdn.microsoft.com/Forums/en-US/sqldataaccess/thread/b9caa913-3935-4ddb-8c56-33c26b4edd32
3. Limitations of Microsoft Oracle ODBC Driver and OLEDB Provider
http://support.microsoft.com/kb/244661
4. http://social.msdn.microsoft.com/Forums/en-US/sqlexpress/thread/e64476a9-4182-4f89-98ca-f2e489d815b2
Part 2 will contain preparing migration of tables from Oracle to SQL Server 2005.