5

Could you kindly tell me whether there is a most convenient way to copy table data from oracle to SQL Server?

My only idea is iterate all rows and do insert operation. That means i should write lots of code.

I want to know may I use DataSet/DataAdapter or other convenient C# methods to do migration?

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

Thanks indeed.

1 Answer 1

2

This is really going to depend on how much data you are working with and what you want to accomplish.

If there isn't a lot of data, you can do things the really quick and dirty way and read the entire set into memory via a DataSet, then simply insert record by record into SQL Server. That will work as long as you don't have a massive amount of data to move.

Now, if you have more data, you can go a bit more streamlined to avoid the "in memory" hit and do things using a DataReaders and only read in line by line, a bit more code, but not all that much, maybe 20-30 lines.

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

Sign up to request clarification or add additional context in comments.

1 Comment

I know. Thanks very much. The amount of records is not huge. Because the backup operation is a part of the entire logic. So i will write c# code to do so, will not use outer tools. As you say, I will do this through iterating the dataSet. Thanks again for your rapid and awesome answer. Yours, jay.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.