July 16, 2003 at 8:27 am
Hi.
We have two sql enviroments: the developer enviroment and the producer enviroment. When we import the changes from the developer to the producer enviroment, all the connections are incorrectly assigned.
Is there a way to obtain the sql server name in where the DTS resides, to change the data source names with a dynamic properties task in order not to open all the DTS and assign they manually?
July 16, 2003 at 8:47 am
You can declare the connection parameters as global variables within the package. You can assign these global variables at run-time then have a dynanic properties task within the DTS package to assign the connection.
Regards,
Andy Jones
.
July 16, 2003 at 8:49 am
Also, see the following article: -
http://www.sqlservercentral.com/columnists/kfeit/portabledtspackages.asp
Regards,
Andy Jones
.
July 16, 2003 at 8:53 am
Thank's
July 16, 2003 at 9:24 am
We use Global Variables along with a case statement to change the Server and Database information in production. The following code is put into a ActiveX script that is the first task to run:
Select Case DTSGlobalVariables("Environment").Value
Case "Development"
DTSGlobalVariables("Server").Value = "Server1"
DTSGlobalVariables("Database").Value = "Database2"
Case "Production"
DTSGlobalVariables("Server").Value = "Server2"
DTSGlobalVariables("Database").Value = "Database2
Case Else
Main = DTSTaskExecResult_Failure
Exit Function
End Select
Within the dtsrun command we pass in "Development" or "Production" to change the value of the Global Variables.
Diane
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply