dbTalk Databases Forums  

Referencing objects on linked server

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


Discuss Referencing objects on linked server in the microsoft.public.sqlserver.dts forum.



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

Default Referencing objects on linked server - 12-16-2004 , 02:15 AM






Hi,

I have many dts packages that references a db on a linked server. I often
use the db on the linked server as a source for fetching data. When I do this
I must use the four part naming method, specifying server, db, owner and
object (table).

The problem is that I am now in the developing phase and I have no clue to
what the database on the linked db will be called in the end (not the server
either).

The servername is just a logical name, created by me when I am linking the
server, so that isn't a problem. The database on the other hand is causing me
a problem. I would like to find a way so I don't have to rename all instances
of the db name in all dts packages manually when done. Is this possible
through the use of global variables or something?

What would be great is if I could use the 'initial catalog' property of the
linked server to avoid specifying the db name in the first place. What I am
thinking of is something like 'SELECT * FROM server..owner.table', where the
db name is left out, because it is implied. Is this possible?
--
/ ScubaD

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

Default Re: Referencing objects on linked server - 12-16-2004 , 07:30 AM






ScubaD,

Would ODBC or link file be better in this situation?

Ilya

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

Quote:
Hi,

I have many dts packages that references a db on a linked server. I often
use the db on the linked server as a source for fetching data. When I do
this
I must use the four part naming method, specifying server, db, owner and
object (table).

The problem is that I am now in the developing phase and I have no clue to
what the database on the linked db will be called in the end (not the
server
either).

The servername is just a logical name, created by me when I am linking the
server, so that isn't a problem. The database on the other hand is causing
me
a problem. I would like to find a way so I don't have to rename all
instances
of the db name in all dts packages manually when done. Is this possible
through the use of global variables or something?

What would be great is if I could use the 'initial catalog' property of
the
linked server to avoid specifying the db name in the first place. What I
am
thinking of is something like 'SELECT * FROM server..owner.table', where
the
db name is left out, because it is implied. Is this possible?
--
/ ScubaD



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.