Difficulty setting package variable from job
Have an ssis package that gathers the same information from different oracle databases.
The connect string to each different oracle database is the same except for the data source.
So I created a variable in the package DBConnect which specifies the data source value.
I then created an oracle connection to one of the databases and modified so it uses an expression:
"Data Source=" + @[User::DBConnect] + ";USER ID=dbread1;Password=goxxxxx!;PERSIST SECURITY INFO=True"
So I have an ado net source with a sql statement in it to extract the data Im looking for.
As I change the value of DBConnect, the statement runs against the different databases like I wanted.
Then I wanted to run this from a job. And this is where things got challenging/frustrating/painful etc..
First I had trouble with the protection level and security on the package.
So in the package I changed the protection level to EncryptSensitiveWithPassword.
Then in the job step setup I had to specify that password.
I seemed to get past that OK. Now I am trying (and trying) to set the value of the variable from the job step .
The command line from my most recent attempt is :
/SQL "\GetDBSpace" /SERVER nstdb3 /DECRYPT /CHECKPOINTING OFF /SET "\Package\GetDBSpace.Variables[User::DBConnect].Value";"""rateprod""" /REPORTING E
With rateprod being the data source I want to connect to.
But when I run that job step, I get:
Message
Executed as user: NSTDB3\SYSTEM. Microsoft (R) SQL Server Execute Package Utility
Version 10.50.1600.1 for 64-bit Copyright (C) Microsoft Corporation 2010. All rights reserved.
Started: 4:01:59 PM DTExec: Could not set \Package\GetDBSpace.Variables[User::DBConnect].Value value to rateprod.
Started: 4:01:59 PM Finished: 4:01:59 PM
Elapsed: 0.156 seconds. The package execution failed.
The step failed.
Any suggestions appreciated.
August 6th, 2012 5:04pm
Since it is a package variable (or make it) change to using this /SQL "\GetDBSpace" /SERVER nstdb3 /DECRYPT /CHECKPOINTING OFF /SET \Package.Variables[User::DBConnect].Properties[Value];"rateprod" /REPORTING E
Arthur My Blog
Free Windows Admin Tool Kit Click here and download it now
August 6th, 2012 7:21pm