In order to enlist a new SQL Server into a multi-server administration scenario, it needs a few things done first.
- SQL Server Agent needs to be running. If this is not the case, you will see the following error:
MSX enlist failed for Job Server <servername>.
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
SQL Server Agent is not currently running so it cannot be notified of this action. (Microsoft SQL Server: Error: 22022)
- SQL Server Agent needs to be running using a qualified network account. So the 'LocalSystem' account will not work:
Create failed for login 'LocalSystem'.
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
'LocalSystem' is not a valid Windows NT name. Give the complete name: <domain\username>. (Microsoft SQL Server. Error: 15407) - The server needs to have the option "Agent XPs" enabled.
- Sql Server Agent should be configured to either support encrypted connections, or to disable SQ Server Agent to use use encrypted connections.
MSX enlist failed for Job Server <server name>.
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
The enlist operation failed (reason: SQLServerAgent Error: The target server cannot establish an encrypted connection to the master server <server name>. Make sure that the MsxEncryptChannelOptions registry subkey is set correctly on the target server). (Microsoft SQL Server, error 22026)