Aw: Re: copy large amounts of data to MSSQL

From: <rogel_at_web.de>
Date: Sat, 7 Nov 2020 09:36:54 +0100
Message-ID: <trinity-a7e39283-38e2-498d-818f-2b6bd9d32694-1604738214580_at_3c-app-webde-bs28>


Hi Jeff,
 
Heterogenous Gateway has some restrictions which can be overcome by using a feature we have available since 8i (as far as I remember): java in the database.
You can just load an MSSQL-jdbc-driver into your DB so that you are able to connect to MSSQL.
Then, just write small java-method which bulk-fetches the data from Oracle and bulk-inserts it into MSSQL (using CallableStatement.executeBatch()).
Call that from PL/SQL and you are done.
 
Regards,
Matthias
 
 
 
 
Gesendet: Freitag, 06. November 2020 um 13:38 Uhr
Von: "Jeff Chirco" <backseatdba_at_gmail.com>
An: "Frank Gordon" <frankagordon_at_gmail.com>, "Mladen Gogala" <gogala.mladen_at_gmail.com>
Cc: "oracle-l-freelist" <oracle-l_at_freelists.org>
Betreff: Re: copy large amounts of data to MSSQL
Thanks for the ideas. We want to avoid having the Cloud instance have a direct connection to our database, hence why we want to push instead. Plus that works out better for our users, when they are done processing orders they initiate the send to the cloud vendor. This will be a multi day event to push to MSSQL.
I've been testng with 5000 rows, right now it is taking 2.5 minutes before it was  6-8 minutes.  I believe the latency to OCI is fluctuating, currently I am getting 14ms ping times, however it is early in the morning here in California as I am working on a 19c upgrade.  We've had ping latency in the upper 60ms ranges and we've experience a lot worse around 8:30am with packet loss. 
 
I was thinking the same thing about a Perl or Python script "might" be faster.  Any one happen to have a sample of that?
 
 
On Fri, Nov 6, 2020 at 1:35 AM Frank Gordon <frankagordon_at_gmail.com> wrote:
Hello,
 
Have you tried doing a pull from the MS-SQL-Server side?
How much data in the table?
How "far" apart are the Oracle and MS sides?
How you tried sending one row and timing that?
Look at the MS-SQL-Server funtion OPENQUERY.
 
Regards,
Frank
 
 
On Fri, Nov 6, 2020 at 12:31 AM Jeff Chirco <backseatdba_at_gmail.com> wrote:
We have a new project where we need to copy a large dataset from Oracle (on prem) to SQL Server (cloud).
 
I found that just a
insert into table_at_mssql
select * from table;
 
Returns ORA-02025: all tables in the SQL statement must be at the remote database
 
I am trying out the SQL Server Gateway driver from Oracle because the documentation looks like it would work with the Remote Insert Rowsource
 
However I get the same error. Does anyone know if this should work?
 
We've converted it to a PL/SQL loop inserting row by row but 5000 rows is taking 8 minutes. Oh and the funny thing is that this SQL Server instance is running on Oracle Cloud Infrastructure.
 
Any other ways you can think of to do this quick? 8 minutes is killer.
 
Thanks,
Jeff
 
 
--
+353-86-0695383
-- http://www.freelists.org/webpage/oracle-l Received on Sat Nov 07 2020 - 09:36:54 CET

Original text of this message