Solved

Slow performance when using Linked Server on Oracle

Posted on 2010-11-13
9
2,068 Views
Last Modified: 2012-08-13
Hi,

To do a short story, I setup a linked server to an Oracle database in MSSQL 2008 using the ODBC driver provided by the Oracle client installation. Connection is good and I can browse table and data.

When I insert data using the query:
INSERT INTO [Oracle]..[SAPLQP].[ZMARKPACK] .....
it takes between 3-14 seconds to executes. Which is, of course, unacceptable, I can't stall the whole process for 3-14 sec while it writes into Oracle.

SELECT * FROM [Oracle]..[SAPLQP].[ZMARKPACK] takes around 3-6 sec.
Oracle server is oversea in Europe. Ping time is around 15-30 ms.

I wanted to replace an existing program written in VB6 installed in the MSSQL server that read the SQL table and write into Oracle using the same ODBC driver (ADODB connection). Throught this program, I can write 3-4 rows in Oracle per seconds.

Why is it so bad when I use Linked Server? It's the very same ODBC driver, pointing to the very same Oracle listener..

thanks for your time and help
0
Comment
Question by:Dominic34
9 Comments
 
LVL 2

Expert Comment

by:prhowe
ID: 34130040
If you don't use OpenQuery your linked server connection will be extremely slow.

Read this:  http://social.msdn.microsoft.com/Forums/en-US/sqldatabaseengine/thread/d7057388-231b-47f6-b232-b8fcd5fa634e

0
 
LVL 15

Expert Comment

by:AmmarR
ID: 34130073
What driver are you using in your linked server

is it MSDAORA or MSDASQL

try using ORAOLEDB.Oracle, its much faster

check

http://www.sqlmonster.com/Uwe/Forum.aspx/sql-server-connect/4772/Linked-Server-to-Oracle-10g-and-INSERT-performance

setup linked server using ORAOLEDB
http://www.mssqltips.com/tip.asp?tip=1433
0
 

Author Comment

by:Dominic34
ID: 34136523
thanks for the replies. We use Oracle 9i with OraHome9 ODBC driver installed from the Oracle setup program.

Why performance are really bad when I use that ODBC driver on a linked server, but is really good when used from a VB6 program ? is it the Linked Server architecture by itself?

I thought about building a SSIS to "fix" this performance problem. It will to the bridge between MSSQL and Oracle. Rows have to be inserted in Oracle (SAP) at every 2-3 seconds, so I'm wondering if a SSIS will help me in this case...
0
NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

 
LVL 47

Expert Comment

by:Vitor Montalvão
ID: 34143789
ODBC it's old technology so should be always slower than others solution. Why don't you create a Linked Server without ODBC solution? Use Oracle Client directly.

Good luck
0
 

Author Comment

by:Dominic34
ID: 34145191
How can I setup a linked server directly with Oracle client ???
0
 
LVL 47

Expert Comment

by:Vitor Montalvão
ID: 34146042
Check my screenshot please.
OracleOLEDB.bmp
0
 
LVL 2

Assisted Solution

by:manukapoor
manukapoor earned 100 total points
ID: 34153613
Yes, OLDDB provider has huge performance gains than ODBC driver but My best advice will be to use SSIS as it has several performance enhancements than any other transformation tool whether custom made or third-party.

SSIS is multi-threaded, fast and will give you between 20-25 times faster performance than other options. I will be happy to offer you more help on this, if you are willing to use SSIS, as i have some great experiences using them.

Thanks
0
 

Author Comment

by:Dominic34
ID: 34154512
thanks for reply

I thought about creating a SSIS that will read a table (2 minutes scheduled), get rows to be treated and insert them in the Oracle database. How can I setup destination connection to Oracle, if I'm not to use ODBC driver?
0
 
LVL 47

Accepted Solution

by:
Vitor Montalvão earned 400 total points
ID: 34155533
In SSIS you have connection objects. You only need to configure them to use OLEDB instead of ODBC (almost like in Linked Server).
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

816 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now