dbTalk Databases Forums  

retrieving an instance name

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


Discuss retrieving an instance name in the microsoft.public.sqlserver.dts forum.



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

Default retrieving an instance name - 02-23-2005 , 05:40 AM






In an DTS ActiveX I need to open an ADODB connection whose Data Source shoud
be the SQLServer instance where the DTS is located.
How can I retrive the instance name?

Thnx

Kyky




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

Default Re: retrieving an instance name - 02-23-2005 , 09:47 AM






DTS is a basically COM object, and as such not related to a SQL Server. You
can store DTS inside a SQL server table, but then you can store an image in
a table, and once it has been retrieved there is no link back to the SQL it
was stored in, same applies to DTS. DTS packages are not running inside SQL
server nor are they regular SQL objects.

You would need to pass in the instance name before you execute the package.

For example I run packages via SQL Agent jobs, and wish to read some config
data stored in a SQL table. I do this by manually setting the job command to
be a DTSRUN command which includes /A to set a global variable. The package
now knows where to get its config from, and whilst in practice this is
always the same as the instance where it is stored, and where it is called
from via SQL Agent, it does not need to be.

--
Darren Green
http://www.sqldts.com
http://www.sqlis.com


"Kyky" <kyky_az (AT) yahoo (DOT) it> wrote

Quote:
In an DTS ActiveX I need to open an ADODB connection whose Data Source
shoud
be the SQLServer instance where the DTS is located.
How can I retrive the instance name?

Thnx

Kyky






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.