• 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