Removes the current server from multiserver operations.
|Applies to: SQL Server (SQL Server 2008 through current version).|
sp_msx_defect [@forced_defection =] forced_defection
[ @forced_defection =] forced_defection
Specifies whether or not to force the defection to occur if the Master SQLServerAgent has been permanently lost due to an irreversibly corrupt msdb database, or no msdb database backup. forced_defectionis bit, with a default of 0, which indicates that no forced defection should occur. A value of 1 forces defection.
After forcing a defection by executing sp_msx_defect, a member of the sysadmin fixed server role at the Master SQLServerAgent must run the following command to complete the defection:
EXECUTE msdb.dbo.sp_delete_targetserver @server_name = 'tsx-server', @post_defection = 0;
0 (success) or 1 (failure)
When sp_msx_defect properly completes, a message is returned.
To execute this stored procedure, a user must be a member of the sysadmin fixed server role.