sp_msx_enlist (Transact-SQL)

Adds the current server to the list of target servers available for multiserver operations. Only a SQL Server 2005 server can be enlisted against another SQL Server 2005 server.


sp_msx_enlist edits the registry. Manual editing of the registry is not recommended because inappropriate or incorrect changes can cause serious configuration problems for your system. Therefore, only experienced users should use the Registry Editor program to edit the registry. For more information, see the Microsoft Windows documentation.


sp_msx_enlist [@msx_server_name =] 'msx_server' 
     [, [@location =] 'location']


  • [ @msx_server_name =] 'msx_server'
    The name of the multiserver administration server (master server) to add. msx_server is nvarchar(30), with no default.
  • [ @location =] 'location'
    The location of the target server that is enlisting. location is nvarchar(100), with a default of NULL.

Return Code Values

0 (success) or 1 (failure)

Result Sets



Permissions to execute this procedure default to members of the sysadmin fixed server role.


The following example enlists the current server into the AdventureWorks1 master server. The location for the current server is Building 21, Room 309, Rack 5.

USE msdb ;

EXEC dbo.sp_msx_enlist N'AdventureWorks1', 
    N'Building 21, Room 309, Rack 5' ;

See Also


sp_msx_defect (Transact-SQL)
System Stored Procedures (Transact-SQL)
xp_cmdshell (Transact-SQL)

Other Resources

How to: Make a Master Server (SQL Server Management Studio)
How to: Make a Target Server (SQL Server Management Studio)

Help and Information

Getting SQL Server 2005 Assistance