Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
AgaK
Yak Posting Veteran
86 Posts |
Posted - 2010-01-04 : 11:07:58
|
Hi,I am creating a job with sp_creat_job. How do I set the Target Local server automatically?Thank youAK |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
AgaK
Yak Posting Veteran
86 Posts |
Posted - 2010-01-04 : 14:20:02
|
HiThank you for your reply!This is exactly what I did, I scripted the job. The sp_add_job contains the following parameter: @category_name=N'[Uncategorized (Local)]' but for some reason 'Target local server' remains unchecked. The [Uncategorized (Local)] category exists.Cheers!AK |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
AgaK
Yak Posting Veteran
86 Posts |
Posted - 2010-01-04 : 15:39:58
|
The radio button on the Targets tab in the job is unchecked. I can't run the job until I check it. Thank you! |
 |
|
vijayisonly
Master Smack Fu Yak Hacker
1836 Posts |
Posted - 2010-01-04 : 15:46:34
|
Did you also do sp_add_jobserver?http://msdn.microsoft.com/en-us/library/ms178625.aspx |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
Peter99
Constraint Violating Yak Guru
498 Posts |
Posted - 2010-01-06 : 16:47:08
|
EXEC @ReturnCode = msdb.dbo.sp_add_jobserver @job_id = @jobId, @server_name = N'(local)' |
 |
|
AgaK
Yak Posting Veteran
86 Posts |
Posted - 2010-01-07 : 18:47:17
|
That works! Thank you very much! |
 |
|
|
|
|