March 2, 2004 at 1:36 pm
Is there a way to determine the local sql server at runtime? In our enviroment "knowing" which server is running the dts job/package would enable us to dynamically set most other connection/logging variables.
March 2, 2004 at 1:53 pm
I use: SELECT @@ServerName
March 2, 2004 at 2:03 pm
But don't you need to already have a connection with the server to then query the serve for the @@servername?
Yeah, this didn't work when I switched environments because the connection used to get the @@servername was still set to the dev server.
March 3, 2004 at 2:59 am
what method do you use to run the package? I use global variables to hold the details and set the connection first, if you run the package from dtsrun in a stored procedure you can pass the global settings in.
March 3, 2004 at 11:32 am
Actually what I am trying now is to use an Environmental variables (COMPUTERNAME which equates to the @@servername in our environments) to change the Data Source property of my SQL Server connection me in a Dynamic Properties task. Then I have an ActiveX script that modifies Global Variables according, then another DP Task to make the changes. It seems to work pretty slick...
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply