sp_delete_jobserver
Removes the specified target server.
Syntax
sp_delete_jobserver [ @job_id = ] job_id , | [ @job_name = ] 'job_name' ,
[ @server_name = ] 'server'
Arguments
[@job_id =] job_id
Is the identification number of the job from which the specified target server will be removed. job_id is uniqueidentifier, with a default of NULL.
[@job_name =] 'job_name'
Is the name of the job from which the specified target server will be removed. job_name is sysname, with a default of NULL.
Note Either job_id or job_name must be specified; both cannot be specified.
[@server_name =] 'server'
Is the name of the target server to remove from the specified job. server is nvarchar(30), with no default. server can be (LOCAL) or the name of a remote target server.
Return Code Values
0 (success) or 1 (failure)
Result Sets
None
Permissions
Execute permissions default to the public role.
Examples
This example removes the server LONDON1 from processing the Backup Customer Information job.
Note This example assumes that the Backup Customer Information job was created earlier.
USE msdb
EXEC sp_delete_jobserver
@job_name = 'Backup Customer Information',
@server_name = 'LONDON1'