Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Slow performance when using Linked Server on Oracle

Posted on 2010-11-13
9
Medium Priority
?
2,686 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 52

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 52

Expert Comment

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

Assisted Solution

by:manukapoor
manukapoor earned 400 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 52

Accepted Solution

by:
Vitor Montalvão earned 1600 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
When it comes to protecting Oracle Database servers and systems, there are a ton of myths out there. Here are the most common.
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

636 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