November 23, 2009 at 6:03 pm
What's the COMMAND syntax to execute a stored procedure from a job step. The stored procedure is alredy saved in the database.
Looks like it needs to know the server name, database name, user. etc..
This is what I'm doing from the only step that I have in my job:
EXEC p_test_cmd /Uuser /Sserver
Thanks.
November 23, 2009 at 7:07 pm
In the Job Step,
Give a Step Name,
Then under type select Transact SQL
Under database choose the database name where the stored proc exists,
Under Command have this code..
EXEC p_test_cmd
Regarding the User, right click on the job, under owner choose the owner.
You need not specify a Server Name if you are executing the SQL Job on the same server where database exists.
Blog -- LearnSQLWithBru
Join on Facebook Page Facebook.comLearnSQLWithBru
Twitter -- BruMedishetty
November 23, 2009 at 8:07 pm
Works now. Thanks.!
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply