Defect a Target Server from a Master Server
Applies to: SQL Server Azure SQL Managed Instance
Important
On Azure SQL Managed Instance, most, but not all SQL Server Agent features are currently supported. See Azure SQL Managed Instance T-SQL differences from SQL Server for details.
This topic describes how to defect a target server from a master server in SQL Server by using SQL Server Management Studio, Transact-SQL, or SQL Server Management Objects (SMO). Run this procedure from the target server.
Before You Begin
Security
Permissions
To execute this stored procedure, a user must be a member of the sysadmin fixed server role.
Using SQL Server Management Studio
To defect a target server from a master server
In Object Explorer, expand a server that is configured as a target server.
Right-click SQL Server Agent, point to Multi Server Administration, and then click Defect.
Click Yes to confirm that you want to defect this target server from a master server.
Using Transact-SQL
To defect a target server from a master server
Connect to the Database Engine.
From the Standard bar, click New Query.
Copy and paste the following example into the query window and click Execute.
sp_msx_defect ;
For more information, see sp_msx_defect (Transact-SQL).
Using SQL Server Management Objects (SMO)
Use the MsxDefect Method.
See Also
Create a Multiserver Environment
Automated Administration Across an Enterprise
Defect Multiple Target Servers from a Master Server