Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Import/Export (DTS) and Replication (2000)
 DTS finding which server package is saved on

Author  Topic 

rollinsa
Starting Member

1 Post

Posted - 2004-05-17 : 08:15:57
Fairly new to Sql Server and DTS so excuse me if there is a simple solution.

We have some packages that then use VB script to create another package object and then execute it. The same packages need to exist on several servers but one of the parameters to the LoadFromSQLServer method is the server name which I don't want to hardcode (and therefore have to alter on each server).

Is there a way of determining which server the DTS package is stored within?

Thanks, Andy

nr
SQLTeam MVY

12543 Posts

Posted - 2004-05-17 : 12:18:31
How do you load the package?
You can use an ini file to hold the name of the server and read it in a dynamic properties task.
You could set a global variable from the loader.

I would suggest savung it in a global variable whatever you do as it makes testing and logging easier.

I usually create a loader for all dts packages which does this sort of thing and also logs info about what has run.

Just noticed you are using LoadFromSQLServer (I prefer holding the packages in files as it makses things simpler).
As you need a connection to the server to run it you can get the server name and set the global variable before the exec.



==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
   

- Advertisement -