How to copy SQL table to oracle?

How to copy SQL table to oracle?

Postby manojgahiwal » Thu 10 Jan 2013 13:07

Hi,

I want to copy a SQL data to oracle. Just like SqlBulkCopy copies data to the table. I have tried by using OracleLoader however no luck. It throws data type error that it does not found varchar2 etc. below is the code that I am using for oracleloader.

Do anybody have idea how to copy sql data to oracle table?

using (var connection = new OracleConnection(connection String)
{
connection.Open();
var loader = new OracleLoader("MyTable", connection);
loader.Open();
loader.LoadTable(table);
loader.Close();
}
manojgahiwal
 
Posts: 2
Joined: Thu 10 Jan 2013 12:58

Re: How to copy SQL table to oracle?

Postby Pinturiccio » Tue 15 Jan 2013 15:59

OracleLoader does not support the NVARCHAR2 and NCLOB types. For information on data types supported by the OracleLoader class please refer to http://www.devart.com/dotconnect/oracle/docs/?Devart.Data.Oracle~Devart.Data.Oracle.OracleLoader.html

To insert data into a table having types that are not supported by the OracleLoader class, it is better to use the ExecuteArray method. Herewith, you should add the 'Unicode=true;' parameter for OracleConnection.
For more information, please refer to http://www.devart.com/dotconnect/oracle/docs/?ArrayBind.html
Pinturiccio
Devart Team
 
Posts: 1951
Joined: Wed 02 Nov 2011 09:44

Re: How to copy SQL table to oracle?

Postby manojgahiwal » Wed 16 Jan 2013 06:53

Thanks for the update. I read the ArrayBinding, It needs to iterate each and every record of the source data base table (in my case SQL CE table) and go ahead with the row by row insert in oracle. Also I need check each SQL column with oracle column.

Is there any easiar way to implement altogether? as I have lot of tables and each table has lot of data.
manojgahiwal
 
Posts: 2
Joined: Thu 10 Jan 2013 12:58

Re: How to copy SQL table to oracle?

Postby Pinturiccio » Fri 18 Jan 2013 15:53

dotConnect for Oracle doesn't have another functionality for loading data block to the database, except for array binding and the OracleLoader class.
Pinturiccio
Devart Team
 
Posts: 1951
Joined: Wed 02 Nov 2011 09:44


Return to dotConnect for Oracle