Re: SQL Server To Oracle

From: Kim Berg Hansen <kibeha_at_gmail.com>
Date: Fri, 11 Mar 2022 13:08:02 +0100
Message-ID: <CA+S=qd2EQS3Y9xrPKo5XRV4ZpWKxfJXGNRVgT1aBwgiiKa4SOQ_at_mail.gmail.com>



I've used 3 methods to exchange data between Oracle and SQL server.

1.

Create a Linked Server on SQL Server side - allows me from SQL Server to read or write Oracle (kind of like a database link.) Mostly works fine - had a few issues with datatypes that sometimes required me Oracle-side to create views with CAST of columns in order to have it appear as correct datatype when used SQL Server side.

2.

The other way around - use Oracle Gateway on Oracle side to get a database link to the SQL Server.
I've only used the free Oracle Gateway for ODBC, not the cost-option for SQL Server.
Mostly worked fine too - again in certain circumstances I have had a couple datatype issues (can't recall exactly what.)

3.

Using .NET classes in either C# or Powershell to do BulkCopy. Both SQL Server classes as well as Oracle ODP.NET classes have some BulkCopy classes to do direct-path insert from a source. That source can be any ODBC or OLEDB or SQL Server or other data source provider class.
Using these bulkcopy classes I have not yet encountered datatype issues. Another advantage (in some cases) is that it doesn't require anything created in the two databases - a small Powershell script that contains connection strings to both will suffice. Just need to execute the Powershell in an environment that has access to both databases.
And with the direct-path insert and setting up a stream in Powershell from the source Reader object to the target BulkCopy object, it can migrate data quite fast.

Cheerio
/Kim

Regards

Kim Berg Hansen
Senior Consultant at Trivadis
Oracle ACE Director

Author of Practical Oracle SQL
<https://www.apress.com/gp/book/9781484256169> http://www.kibeha.dk
kibeha_at_kibeha.dk
_at_kibeha <http://twitter.com/kibeha>

On Fri, Mar 11, 2022 at 11:23 AM Noveljic Nenad <nenad.noveljic_at_vontobel.com> wrote:

> Jonathan,
>
>
>
> It’s a pull from the Oracle side.
>
>
>
> Gateway is a separate service, which can be installed on any machine.
> Gateway connects to the configured SQL Server database. The Gateway service
> is registered with a listener (not the Oracle database listener). Then, on
> the Oracle database you create a database link pointing to the Gateway
> service to select data from SQL Server.
>
>
>
> There’s also a free Oracle Gateway for ODBC, which should also be able to
> connect to SQL Server, but it’s not self-contained - it requires an ODBC
> driver setup. In the past, I used ODBC configurations for Sybase to connect
> to SQL Server from Unix as they both use the same protocol (TDS).
>
>
>
> We also tried the “push from SQL Server” approach. We created a linked
> server (=database link) to the Oracle database. It basically worked, but
> the performance was unsatisfactory for large tables. Notice that you don’t
> need Oracle Gateway for that approach. Oracle and ODBC Clients are
> sufficient.
>
>
>
> Two things to pay attention to when migrating with Gateway for MS SQL
> Server:
>
> - nvarchar(max) is mapped to long – you’d need to edit DDLs before
> creating affected tables.
> - The table names are truncated to 30 characters.
>
>
>
> Best regards,
>
>
>
> Nenad
>
>
>
> *From:* oracle-l-bounce_at_freelists.org <oracle-l-bounce_at_freelists.org> *On
> Behalf Of *Jonathan Lewis
> *Sent:* Freitag, 11. März 2022 10:10
> *To:* oracle-l_at_freelists.org
> *Subject:* Re: SQL Server To Oracle
>
>
>
>
>
> Nenad,
>
>
>
> Does that require a pull from the Oracle end, or can it do a push from the
> SQL Server end ?
>
>
>
> Regards
>
> Jonathan Lewis
>
>
>
>
>
> ____________________________________________________
>
> Please consider the environment before printing this e-mail.
>
> Bitte denken Sie an die Umwelt, bevor Sie dieses E-Mail drucken.
>
>
> Important Notice
>
> This message is intended only for the individual named. It may contain
> confidential or privileged information. If you are not the named addressee
> you should in particular not disseminate, distribute, modify or copy this
> e-mail. Please notify the sender immediately by e-mail, if you have
> received this message by mistake and delete it from your system.
> Without prejudice to any contractual agreements between you and us which
> shall prevail in any case, we take it as your authorization to correspond
> with you by e-mail if you send us messages by e-mail. However, we reserve
> the right not to execute orders and instructions transmitted by e-mail at
> any time and without further explanation.
> E-mail transmission may not be secure or error-free as information could
> be intercepted, corrupted, lost, destroyed, arrive late or incomplete. Also
> processing of incoming e-mails cannot be guaranteed. All liability of
> Vontobel Holding Ltd. and any of its affiliates (hereinafter collectively
> referred to as "Vontobel Group") for any damages resulting from e-mail use
> is excluded. You are advised that urgent and time sensitive messages should
> not be sent by e-mail and if verification is required please request a
> printed version.
> Please note that all e-mail communications to and from the Vontobel Group
> are subject to electronic storage and review by Vontobel Group. Unless
> stated to the contrary and without prejudice to any contractual agreements
> between you and Vontobel Group which shall prevail in any case,
> e-mail-communication is for informational purposes only and is not intended
> as an offer or solicitation for the purchase or sale of any financial
> instrument or as an official confirmation of any transaction.
> The legal basis for the processing of your personal data is the legitimate
> interest to develop a commercial relationship with you, as well as your
> consent to forward you commercial communications. You can exercise, at any
> time and under the terms established under current regulation, your rights.
> If you prefer not to receive any further communications, please contact
> your client relationship manager if you are a client of Vontobel Group or
> notify the sender. Please note for an exact reference to the affected group
> entity the corporate e-mail signature. For further information about data
> privacy at Vontobel Group please consult www.vontobel.com.
>

--
http://www.freelists.org/webpage/oracle-l
Received on Fri Mar 11 2022 - 13:08:02 CET

Original text of this message