sp_post_msx_operation (T-SQL)

Inserts operations (rows) into the sysdownloadlist system table for target servers to download and execute.

Syntax

sp_post_msx_operation [@operation =] 'operation'
    
[,[@object_type =] 'object']
    {, [@job_id =] job_id }
    
[,[@specific_target_server =] 'target_server']
    [,[@value =] value]

Arguments
[@operation =] 'operation'
Is the type of operation for the posted operation. operation is varchar(64), with no default. Valid operations depend upon object_type.

 

Object type Operation
JOB INSERT
UPDATE
DELETE
START
STOP
SERVER RE-ENLIST
DEFECT
SYNC-TIME
SET-POLL

[@object_type =] 'object'
Is the type of object for which to post an operation. Valid types are JOB and SERVER. object is varchar(64), with a default of JOB.
[@job_id =] job_id
Is the job identification number of the job to which the operation applies. job_id is uniqueidentifier, with no default. 0x00 indicates ALL jobs. If object is SERVER, then job_id is not required.
[@specific_target_server =] 'target_server'
Is the name of the target server for which the specified operation applies. If job_id is specified, but target_server is not specified, the operations are posted for all job servers of the job. target_server is varchar(30), with a default of NULL.
[@value =] value
Is the polling interval, in seconds. value is int, with a default of NULL. Specify this parameter only if operation is SET-POLL.
Return Code Values

0 (success) or 1 (failure)

Result Sets

None

Remarks

sp_post_msx_operation must be run from the msdb database.

sp_post_msx_operation can always be called safely because it first determines if the current server is a multiserver SQL Server Agent and, if so, whether object is a multiserver job.

After an operation has been posted, it appears in the sysdownloadlist table. After a job has been created and posted, subsequent changes to that job must also be communicated to the target servers (TSX). This is also accomplished using the download list.

It is highly recommended that the download list be managed by using the SQL Server Enterprise Manager. For more information, see Modifying and Viewing Jobs.

Permissions

Anyone can execute this procedure, but the procedure will only have an effect if it is executed by a member of the sysadmin fixed server role.

See Also
sp_add_jobserver sp_start_job
sp_delete_job sp_stop_job
sp_delete_jobserver sp_update_job
sp_delete_targetserver sp_update_operator
sp_resync_targetserver System Stored Procedures

  


(c) 1988-98 Microsoft Corporation. All Rights Reserved.