May 10, 2002 at 1:27 pm
I am trying to run the following query:
BEGIN
DECLARE @Job varchar(200)
SET @Job = DB_Name()+' - p_Execute'
EXEC msdb..sp_start_job @Job
END
and got the following error:
Server: Msg 14262, Level 16, State 1, Procedure sp_verify_job_identifiers, Line 61
The specified @job_name ('chemsyslive - p_Execute') does not exist.
Anybody can get me some help on this?
Thank you.
May 10, 2002 at 2:37 pm
It appears that the variable you are building does not match the name of the job you are trying to run. Is that the valid name?
David
David
@SQLTentmaker“He is no fool who gives what he cannot keep to gain that which he cannot lose” - Jim Elliot
May 10, 2002 at 3:11 pm
What do you mean "does not match the name of the job you are trying to run"? Where can I find the name of jobs?
May 10, 2002 at 3:37 pm
msdb..sp_start_job is to start a SQLAgednt job to running. These can be found by using EM to drill thru the server to Management/SQLServerAgent/Jobs (or something like, sorry no EM in front of me right now). However what are you expecting to happen when you exect this query?
"Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)
May 21, 2002 at 5:15 pm
Thank you all. Now I know how to create and execute a job in SQL Server.
However, I encounter another problem: when a job fails, I can't re-start it using "Start Job". The way I am doing now is to delete and re-create a same job. Anyone has smarter idea than mine?
Thank you.
May 21, 2002 at 5:28 pm
Should not matter, in fact I have two processes like this that purposely fail and start job never gives me an issue. What error do you get?
"Don't roll your eyes at me. I will tape them in place." (Teacher on Boston Public)
Viewing 6 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply