dbTalk Databases Forums  

SSIS - SQL Server Agent - Set Value?

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss SSIS - SQL Server Agent - Set Value? in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Doownai
 
Posts: n/a

Default SSIS - SQL Server Agent - Set Value? - 07-25-2006 , 12:48 PM






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.


Reply With Quote
  #2  
Old   
Allan Mitchell
 
Posts: n/a

Default Re: SSIS - SQL Server Agent - Set Value? - 07-25-2006 , 01:12 PM






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

Quote:
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.




Reply With Quote
  #3  
Old   
Doownai
 
Posts: n/a

Default Re: SSIS - SQL Server Agent - Set Value? - 07-25-2006 , 01:49 PM



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:

Quote:
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
news373ADF8-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.





Reply With Quote
  #4  
Old   
Doownai
 
Posts: n/a

Default Re: SSIS - SQL Server Agent - Set Value? - 07-25-2006 , 02:04 PM



Doh, I just realized what I did different...

Whilst setting up the SQL Agent job, in the Set Values Tab, I did not use an
escape character when I was setting the varPath parameter.

so
\Package.Variables[User::varPath].Properties[Value] = c:\temp\
should have been
\Package.Variables[User::varPath].Properties[Value] = c:\\temp\\

Thanks again.



"Doownai" wrote:

Quote:
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
news373ADF8-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.





Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.