Use C # to copy table data from oracle to SQL Server?

Could you tell me if there is the most convenient way to copy table data from oracle to SQL Server?

My only idea is to iterate over all the lines and insert the operation. This means that I have to write a lot of code.

I want to know if I can use a DataSet/DataAdapter or other convenient C # methods for migration?

PS. under C # /. NET2.0 env.

Thanks, really.

+4
source share
1 answer

It really will depend on how much data you work and what you want to achieve.

If there is not much data, you can do something very quickly and dirty and read the entire set into memory via the DataSet, and then simply insert the write-by-write into SQL Server. This will work until you have a lot of data to move around.

Now, if you have more data, you can go a little more optimized to avoid getting into memory and do something with DataReaders and read only line by line, a little more code, but not so much, maybe 20- 30 lines.

Now, depending on your needs, SQL Server Edition, etc., you can also use SSIS to pull it out and not write code. This is a post that shows some information about the performance of this process .

+2
source

All Articles