all groups > sql server dts > february 2004 >
You're in the

sql server dts

group:

Passing Arguments to a SQL Server Job


Passing Arguments to a SQL Server Job John Barr
2/20/2004 3:45:33 PM
sql server dts: I am trying to create an alert that will execute a job and
pass arguments to it to perform certain tasks. Does anyone
Re: Passing Arguments to a SQL Server Job Narayana Vyas Kondreddi
2/20/2004 11:55:44 PM
One way to achieve this would be to write the parameters to a table, and
then kick off the job using sp_start_job. The job step knows where to read
the parameters from, and acts accordingly.
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
Is .NET important for a database professional?
http://vyaskn.tripod.com/poll.htm




[quoted text, click to view]
I am trying to create an alert that will execute a job and
pass arguments to it to perform certain tasks. Does anyone
know if this is possible?

RE: Passing Arguments to a SQL Server Job v-yshao NO[at]SPAM online.microsoft.com (
2/21/2004 4:32:36 AM
Hi John,

My name is Michael and I would like to thank you for using Microsoft
newsgroup.

As far as I know, it seems there is no way to pass arguments like global
variable mechanism in DTS package. However, you can try to use other ways
to meet your requirements.

For example:
a. Storing the arguments in certain table and using stored procedure to get
them from tables in job.
b. Using VB script in job to get arguments from files or other things.

Thank you for using Microsoft newsgroup.

Regards,

Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
RE: Passing Arguments to a SQL Server Job v-yshao NO[at]SPAM online.microsoft.com (
3/5/2004 8:45:51 AM
Hi John,

How is the issue going on your side? Please feel free to post in the group
if you need further assistance on this issue. I am happy to be of
assistance.

Based on my further research, unfortunately, I am afraid that SQL Server is
unable to meet your requirements passing a parameter to a job that is
executed in response to an alert. As I have mentioned in my previous
message, you may pass the parameter to a stored procedure that they can
call from within the job but there is no concept of sending a parameter to
a job. A parameter can be passed to a stored procedure or a function and
not to a job.

Thanks for posting in community.

Regards,

Michael Shao
Microsoft Online Partner Support
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
AddThis Social Bookmark Button