The techie in me RSS 2.0
 Friday, December 04, 2009

ADO.NET data provider for Oracle is dying. ADO.NET team has decided to kill(deprecate) it in .NET 4.0. How sad isn’t it? Read more about the story on ADO.NET team blog

Though sometimes I feel its unnecessary to have a duplicate copy of Oracle data provider. Most of the people use ODP.NET or some other third party client. Nice comparison here (and that is why people don’t use .NET Oracle client :))

One very bad thing I noticed about these providers is both of them need Oracle client installed. For the MS provider(System.Data.OracleClient) the minimum requirement is Oracle 8i Release 3 (8.1.7) Client or later. Check the requirement in detail here System Requirements (Oracle).
For the ODP.NET Oracle client version 9.2 or later.

Its not always possible to install a large application like Oracle client in some scenario, so there is an alternative without installing the Oracle client, use Oracle Database Instant Client. Just put Oracle Instant Client in the same folder as your executable file.

-Rujith

Friday, December 04, 2009 3:58:00 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] -
Coding | Database
 Sunday, September 20, 2009

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.

Sunday, September 20, 2009 10:01:00 PM (GMT Standard Time, UTC+00:00)  #    Comments [0] -
Database
About me
Name : Rujith Anand
Occupation : Eating, drinking, sleeping and Yes ofcourse coding.
Location : Reading, UK
Archive
<March 2010>
SunMonTueWedThuFriSat
28123456
78910111213
14151617181920
21222324252627
28293031123
45678910
Blogs I read
Disclaimer

Disclaimer
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.

© Copyright 2010
Rujith Anand

Statistics
Follow me on Twitter
All Content © 2010, Rujith Anand