Hello Friends,

I am new to .NET and to this forum too.
I need to move approx 2K rows from an oracle to SQL server table every week. I am planning to develop a C# console application to achieve this.

Any ideas how to start and what is the best approach with in C# to complete the task at hand? Any code sample will be helpful as I am very new to .NET framework.

Thanks,
Aaron

Do you already have create database in Sql Server? Which sql server will you be using exactly?

We have SQL 2005 (09.00.0427). The table (and data) already exists in Oracle.
I have created a similar table in SQL server. (Same column names and types)
The .Net app will be scheduled using windows scheduler and is expected to move data from oracle to sql server at scheduled time every week.
I was suggested to use the DataTable to get data from oracle and then insert into sql but as I said I am new to .NET and want to find out what is the best approach.

SqlBulkCopy is probably the fastest (and fairly easy) method to use.

Bulkcopy looks interesting. Can I get the data from Oracle and copy to Sql using this method?

Bulkcopy looks interesting. Can I get the data from Oracle and copy to Sql using this method?

As long as the data can be placed in a DataTable (which pretty much means any data at all) you can use SqlBulkCopy.

As long as the data can be placed in a DataTable (which pretty much means any data at all) you can use SqlBulkCopy.

It worked very well. Thanks a lot for your help.

This article has been dead for over six months. Start a new discussion instead.