[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2827
  • Last Modified:

Slow performance when using Linked Server on Oracle

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
Dominic34
Asked:
Dominic34
2 Solutions
 
prhoweCommented:
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
 
AmmarRCommented:
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
 
Dominic34Author Commented:
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
Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

 
Vitor MontalvãoMSSQL Senior EngineerCommented:
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
 
Dominic34Author Commented:
How can I setup a linked server directly with Oracle client ???
0
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
Check my screenshot please.
OracleOLEDB.bmp
0
 
manukapoorCommented:
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
 
Dominic34Author Commented:
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
 
Vitor MontalvãoMSSQL Senior EngineerCommented:
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

Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now