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();
}
How to copy SQL table to oracle?
-
- Devart Team
- Posts: 2420
- Joined: Wed 02 Nov 2011 09:44
Re: How to copy SQL table to oracle?
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 ... oader.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 ... yBind.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 ... yBind.html
-
- Posts: 2
- Joined: Thu 10 Jan 2013 12:58
Re: How to copy SQL table to oracle?
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.
Is there any easiar way to implement altogether? as I have lot of tables and each table has lot of data.
-
- Devart Team
- Posts: 2420
- Joined: Wed 02 Nov 2011 09:44
Re: How to copy SQL table to oracle?
dotConnect for Oracle doesn't have another functionality for loading data block to the database, except for array binding and the OracleLoader class.