dbTalk Databases Forums  

Accessing Instance Name

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


Discuss Accessing Instance Name in the microsoft.public.sqlserver.dts forum.



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

Default Accessing Instance Name - 11-03-2006 , 09:13 AM






I have a DTS package that is used on many servers. I am trying to use
activeX to check which instance I am on and then set my datasource to be that
instance.

Since I have several of these packages I was using a file on the D: drive of
each server to get the value, but alas when the server fails over to the
ModelOffice through clustering, I still have a file on D: but it is pointing
to the wrong instance for the production.

Any ideas how I can step outside of an activeX script and see which instance
I am executing on. I don't need the physical OS server but the SQL Instance.


Reply With Quote
  #2  
Old   
Arnie Rowland
 
Posts: n/a

Default Re: Accessing Instance Name - 11-03-2006 , 10:07 AM






Does @@SERVERNAME not provide the correct value?

--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc

Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous

You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf


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

Quote:
I have a DTS package that is used on many servers. I am trying to use
activeX to check which instance I am on and then set my datasource to be
that
instance.

Since I have several of these packages I was using a file on the D: drive
of
each server to get the value, but alas when the server fails over to the
ModelOffice through clustering, I still have a file on D: but it is
pointing
to the wrong instance for the production.

Any ideas how I can step outside of an activeX script and see which
instance
I am executing on. I don't need the physical OS server but the SQL
Instance.




Reply With Quote
  #3  
Old   
Thom
 
Posts: n/a

Default Re: Accessing Instance Name - 11-03-2006 , 03:55 PM



I am not connected to the server through DTS at this point. I am trying to
ascertain which server I should connect to, based on the instance that
activeX is running on.

After I make a connection then I will know, but I need to ensure I make the
correct connection.

"Arnie Rowland" wrote:

Quote:
Does @@SERVERNAME not provide the correct value?

--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc

Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous

You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf


"Thom" <Thom (AT) discussions (DOT) microsoft.com> wrote in message
news:8C99DF82-EED1-43CB-A632-9095D68A38A8 (AT) microsoft (DOT) com...
I have a DTS package that is used on many servers. I am trying to use
activeX to check which instance I am on and then set my datasource to be
that
instance.

Since I have several of these packages I was using a file on the D: drive
of
each server to get the value, but alas when the server fails over to the
ModelOffice through clustering, I still have a file on D: but it is
pointing
to the wrong instance for the production.

Any ideas how I can step outside of an activeX script and see which
instance
I am executing on. I don't need the physical OS server but the SQL
Instance.





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

Default Re: Accessing Instance Name - 11-04-2006 , 04:31 AM



You cannot get the SQL Server instance name you are running on, because you
are not running on a SQL Server instance. DTS/SSIS are separate "client"
applications. You may choose to store packages in a table within SQL Server,
the msdb (local packages) storage option, but execution is totally
independent.

I suggest you pass in the server\instance from the command line when
executing. If you use a SQL Agent job for example, this becomes a one off
deployment task to ensure this is correct, which could easily be scripted if
you where to use T-SQL to setup the job.


--
Darren
http://wiki.sqlis.com | http://www.sqlis.com | http://www.sqldts.com |
http://www.konesans.com

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

Quote:
I have a DTS package that is used on many servers. I am trying to use
activeX to check which instance I am on and then set my datasource to be
that
instance.

Since I have several of these packages I was using a file on the D: drive
of
each server to get the value, but alas when the server fails over to the
ModelOffice through clustering, I still have a file on D: but it is
pointing
to the wrong instance for the production.

Any ideas how I can step outside of an activeX script and see which
instance
I am executing on. I don't need the physical OS server but the SQL
Instance.




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.