dbTalk Databases Forums  

Help - Linked Servers vs. ???

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Help - Linked Servers vs. ??? in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Tom
 
Posts: n/a

Default Help - Linked Servers vs. ??? - 02-16-2004 , 01:16 PM






Hello All,

I have a SQL Server Database (2000) that pulls data from Oracle (9i). Currently I am using a 'Linked Server' for Oracle, as I am passing values from SQL Server to Oracle in a 'Where Clause' to retrieve the data that is of interest. The problem with this is that the package is taking over 2 hours to run, whereas if I just 'hard-coded' the values in the SQL Statment getting passed to Oracle (without the use of Linked Servers), the entire package runs in under 15 minutes.

Here is the environment:
SQL Server has a table called Emp_Data, which has a primary key field called EMP_NBR, and an additional field called EMP_ACTIVE.

Oracle has a table called HR_TABLE which also has a field called EMP_NBR.

The thing is, I am only interested in the records that are in (or have recently been added in) the EMP_DATA where the EMP_ACTIVE field = 'YES', and those values (EMP_NBR) are what I am interested in passing into and receiving from Oracle.

Is there a better way of implementing this, without the use of 'Linked Servers'?

Any help would be great!!!

Thanks,

Tom.

Reply With Quote
  #2  
Old   
Ilya Margolin
 
Posts: n/a

Default Re: Help - Linked Servers vs. ??? - 02-17-2004 , 09:40 AM






Is this possible to use OPENROWSET or OPENQUERY statements?

"Tom" <anonymous (AT) discussions (DOT) microsoft.com> wrote

Quote:
Hello All,

I have a SQL Server Database (2000) that pulls data from Oracle (9i).
Currently I am using a 'Linked Server' for Oracle, as I am passing values
from SQL Server to Oracle in a 'Where Clause' to retrieve the data that is
of interest. The problem with this is that the package is taking over 2
hours to run, whereas if I just 'hard-coded' the values in the SQL Statment
getting passed to Oracle (without the use of Linked Servers), the entire
package runs in under 15 minutes.
Quote:
Here is the environment:
SQL Server has a table called Emp_Data, which has a primary key field
called EMP_NBR, and an additional field called EMP_ACTIVE.

Oracle has a table called HR_TABLE which also has a field called EMP_NBR.

The thing is, I am only interested in the records that are in (or have
recently been added in) the EMP_DATA where the EMP_ACTIVE field = 'YES', and
those values (EMP_NBR) are what I am interested in passing into and
receiving from Oracle.
Quote:
Is there a better way of implementing this, without the use of 'Linked
Servers'?

Any help would be great!!!

Thanks,

Tom.



Reply With Quote
  #3  
Old   
Darren Green
 
Posts: n/a

Default Re: Help - Linked Servers vs. ??? - 02-17-2004 , 11:47 AM



Do mean that you do not know what OPENROWSET and OPENQUERY are?

Of so, try looking them up in the index of SQL Server Books Online, and
this should give you a start, including examples.


In message <9343B13F-A221-48D9-84A4-A6802A1E8909 (AT) microsoft (DOT) com>, Tom
<anonymous (AT) discussions (DOT) microsoft.com> writes
Quote:
Honestly - I am not sure of what that is, or what that encompasses.

----- Ilya Margolin wrote: -----

Is this possible to use OPENROWSET or OPENQUERY statements?

"Tom" <anonymous (AT) discussions (DOT) microsoft.com> wrote in message
news:98797955-2126-4918-A80A-A8785F2BA54C (AT) microsoft (DOT) com...
Hello All,
I have a SQL Server Database (2000) that pulls data from Oracle
(9i).
Currently I am using a 'Linked Server' for Oracle, as I am passing
values
from SQL Server to Oracle in a 'Where Clause' to retrieve the data
that is
of interest. The problem with this is that the package is taking
over 2
hours to run, whereas if I just 'hard-coded' the values in the SQL
Statment
getting passed to Oracle (without the use of Linked Servers), the
entire
package runs in under 15 minutes.
Quote:
Here is the environment:
SQL Server has a table called Emp_Data, which has a primary key
field
called EMP_NBR, and an additional field called EMP_ACTIVE.
Quote:
Oracle has a table called HR_TABLE which also has a field called
EMP_NBR.
The thing is, I am only interested in the records that are in
(or have
recently been added in) the EMP_DATA where the EMP_ACTIVE field =
'YES', and
those values (EMP_NBR) are what I am interested in passing into and
receiving from Oracle.
Quote:
Is there a better way of implementing this, without the use of
'Linked
Servers'?
Quote:
Any help would be great!!!
Thanks,
Tom.



--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org



Reply With Quote
  #4  
Old   
Jay Grubb
 
Posts: n/a

Default Re: Help - Linked Servers vs. ??? - 02-17-2004 , 02:34 PM



What is the driver you are using to connect? Choosing either the MS
or Oracle provided is sigificantly slower than a 3rd party one.
(Disclaimer: I work for a vendor that supplies ODBC drivers). MS
linked servers (and the oracle equivalent Heterogenous Services)
spend a lot of time querying the drivers and parse and restructuring
the statements. This can result in many trips between the DB's and
wasted cycles

2 suggestions:

1) Test some newer drivers. Openlink has a free 30 day trial

2) Make sure that you are not sending too many seperate SQL
Statements. Try 'batch' them if possible.

If you have any questions, Feel free to contact me


"Ilya Margolin" <ilya (AT) unapen (DOT) com> wrote

Quote:
Is this possible to use OPENROWSET or OPENQUERY statements?

"Tom" <anonymous (AT) discussions (DOT) microsoft.com> wrote in message
news:98797955-2126-4918-A80A-A8785F2BA54C (AT) microsoft (DOT) com...
Hello All,

I have a SQL Server Database (2000) that pulls data from Oracle (9i).
Currently I am using a 'Linked Server' for Oracle, as I am passing values
from SQL Server to Oracle in a 'Where Clause' to retrieve the data that is
of interest. The problem with this is that the package is taking over 2
hours to run, whereas if I just 'hard-coded' the values in the SQL Statment
getting passed to Oracle (without the use of Linked Servers), the entire
package runs in under 15 minutes.

Here is the environment:
SQL Server has a table called Emp_Data, which has a primary key field
called EMP_NBR, and an additional field called EMP_ACTIVE.

Oracle has a table called HR_TABLE which also has a field called EMP_NBR.

The thing is, I am only interested in the records that are in (or have
recently been added in) the EMP_DATA where the EMP_ACTIVE field = 'YES', and
those values (EMP_NBR) are what I am interested in passing into and
receiving from Oracle.

Is there a better way of implementing this, without the use of 'Linked
Servers'?

Any help would be great!!!

Thanks,

Tom.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.