I am running an SSIS package in a SQL Server agent job. I have several variables I need to set for production as I develop with development settings and example of this is a log variable which passes a path to use for a text file connection string. I used the “Set Values” UI dialog to set this value and the resulting Command Line for this job step looks like this …
/SQL "\MyFolderInMSDB\MyPackage" /SERVER "mw-test" /CHECKPOINTING OFF /SET "\package.variables[log].Value";"C:\Logs\Imports\mylog.log" /REPORTING E
There does not seem to be an error trying to set the variable but when I run the job it is logging to the variable defined in the task when I developed it and not the path I am sending in as a variable above. Anyone seen something like this?
Assuming you have pasted your SQL Agent job step information and not retyped it, the problem is most likely due to case sensitivity. Stuff in SSIS is case sensitive so variable names of “log” is different from “Log”.
@Bill’s example above also runs into a case sensitivity with the provided path.