![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi, I have created a simple package that returns success or failure based of the existance of a file. The package accepts uses 2 variables varPath and varFileName. When I use an XML config file to set the values everything is hunky dory (that means good ;-)). What I would LIKE to do is to use this package as the first step in a series of SQL Server Agent jobs, testing for a specific file for each job. I figure that would mean that I would get rid of the XML file and populate the variables via the command line. I am trying to use the 'Set Value' tab to do this but I seem to be missing something because I keep on getting the error: The command line parameters are invalid. The step failed. Here is an example of the command line being generated by the agent: /DTS "\MSDB\TestForFile" /SERVER MYSERVER /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /SET "\Package.Variables[varPath].Value";"c:\temp\" /SET "\Package.Variables[varFileName].Value";"ian.txt" I sure would appreciate a point in the right direction. This may be blindingly obvious but I am just not seeing it. Thanks, Ian. |
#3
| |||
| |||
|
|
I just had a quick play and using syntax like the following works for me /SET "\Package.Variables[User::Variable].Properties[Value]";3 Allan "Doownai" <Doownai (AT) discussions (DOT) microsoft.com> wrote in message news 373ADF8-E47D-4B5F-97C8-0D0FEAD7E633 (AT) microsoft (DOT) com...Hi, I have created a simple package that returns success or failure based of the existance of a file. The package accepts uses 2 variables varPath and varFileName. When I use an XML config file to set the values everything is hunky dory (that means good ;-)). What I would LIKE to do is to use this package as the first step in a series of SQL Server Agent jobs, testing for a specific file for each job. I figure that would mean that I would get rid of the XML file and populate the variables via the command line. I am trying to use the 'Set Value' tab to do this but I seem to be missing something because I keep on getting the error: The command line parameters are invalid. The step failed. Here is an example of the command line being generated by the agent: /DTS "\MSDB\TestForFile" /SERVER MYSERVER /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /SET "\Package.Variables[varPath].Value";"c:\temp\" /SET "\Package.Variables[varFileName].Value";"ian.txt" I sure would appreciate a point in the right direction. This may be blindingly obvious but I am just not seeing it. Thanks, Ian. |
#4
| |||
| |||
|
|
Curious, I am sure that is what I started with before I started chopping bits out. I dropped and recreated package and job from scratch (used your format) and all is well this time. Many thanks. "Allan Mitchell" wrote: I just had a quick play and using syntax like the following works for me /SET "\Package.Variables[User::Variable].Properties[Value]";3 Allan "Doownai" <Doownai (AT) discussions (DOT) microsoft.com> wrote in message news 373ADF8-E47D-4B5F-97C8-0D0FEAD7E633 (AT) microsoft (DOT) com...Hi, I have created a simple package that returns success or failure based of the existance of a file. The package accepts uses 2 variables varPath and varFileName. When I use an XML config file to set the values everything is hunky dory (that means good ;-)). What I would LIKE to do is to use this package as the first step in a series of SQL Server Agent jobs, testing for a specific file for each job. I figure that would mean that I would get rid of the XML file and populate the variables via the command line. I am trying to use the 'Set Value' tab to do this but I seem to be missing something because I keep on getting the error: The command line parameters are invalid. The step failed. Here is an example of the command line being generated by the agent: /DTS "\MSDB\TestForFile" /SERVER MYSERVER /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /SET "\Package.Variables[varPath].Value";"c:\temp\" /SET "\Package.Variables[varFileName].Value";"ian.txt" I sure would appreciate a point in the right direction. This may be blindingly obvious but I am just not seeing it. Thanks, Ian. |
![]() |
| Thread Tools | |
| Display Modes | |
| |