Export (0) Print
Expand All
Expand Minimize
0 out of 1 rated this helpful - Rate this topic

sp_delete_jobserver (Transact-SQL)

Removes the specified target server.


sp_delete_jobserver { [ @job_id = ] job_id | [ @job_name = ] 'job_name' } , 
     [ @server_name = ] 'server'
[ @job_id = ] job_id

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'

The name of the job from which the specified target server will be removed. job_name is sysname, with a default of NULL.

ms182016.note(en-US,SQL.90).gifNote:
Either job_id or job_name must be specified; both cannot be specified.

[ @server_name = ] 'server'

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.

0 (success) or 1 (failure)

To run this stored procedure, users must be members of the sysadmin fixed server role.

The following example removes the server SEATTLE2 from processing the Weekly Sales Backups job.

ms182016.note(en-US,SQL.90).gifNote:
This example assumes that the Weekly Sales Backups job was created earlier.

USE msdb ;
GO

EXEC sp_delete_jobserver
    @job_name = N'Weekly Sales Backups',
    @server_name = N'SEATTLE2' ;
GO
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.