![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Howdy all. My goal here is to be able to be able to move a DTS Package from one box to another and not have to specify the new box name in the DB connections. I know I can do it in the Global Variables under Package properties, but that's not all that great either. Therefore I try to assign the value of @@ServerName to a GV, but it's not working as expected. I have a GV named gvBoxName, and in the Dynamic Properties Task I use the Query option and assign the Data Source value(under the DB connection) to "select @@ServerName". All seems good as the Package works with success. But then I "save as" to save the Package to another box. I then exec the Package from the new box but it's still running against the old box. Is there a way to either make this work or something that will accomplish the same goal? |
#3
| |||
| |||
|
|
Howdy all. My goal here is to be able to be able to move a DTS Package from one box to another and not have to specify the new box name in the DB connections. I know I can do it in the Global Variables under Package properties, but that's not all that great either. Therefore I try to assign the value of @@ServerName to a GV, but it's not working as expected. I have a GV named gvBoxName, and in the Dynamic Properties Task I use the Query option and assign the Data Source value(under the DB connection) to "select @@ServerName". All seems good as the Package works with success. But then I "save as" to save the Package to another box. I then exec the Package from the new box but it's still running against the old box. Is there a way to either make this work or something that will accomplish the same goal? -- TIA, ChrisR |
#4
| |||
| |||
|
|
ChrisR wrote: Howdy all. My goal here is to be able to be able to move a DTS Package from one box to another and not have to specify the new box name in the DB connections. I know I can do it in the Global Variables under Package properties, but that's not all that great either. Therefore I try to assign the value of @@ServerName to a GV, but it's not working as expected. I have a GV named gvBoxName, and in the Dynamic Properties Task I use the Query option and assign the Data Source value(under the DB connection) to "select @@ServerName". All seems good as the Package works with success. But then I "save as" to save the Package to another box. I then exec the Package from the new box but it's still running against the old box. Is there a way to either make this work or something that will accomplish the same goal? To run the query "SELECT @@SERVERNAME", you need a SQL connection, so using that to change the connection, which is required to run the query in the first place does not make much sense. Perhaps you could use the name localhost. Realisitically if you have machines with named instances and such like you can expect to have to set this from outside the package. I do this with my packages. They run as scheduled jobs, and the job passes in the server name through DTSRUN and /A to set a global variable. |
#5
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |