Fix agent_type 2 do not form a valid pair

 

Fix agent_type 2 do not form a valid pair

There is always a story behind a blog post for me. This week’s blog post is not an exception. A good friend of mine and a colleague, called me 3 days back. He wanted to setup a DR site where he copy the backups overnight and restore it onto another server which can be treated as a DR server. A friend of mine is a developer basically and haven’t heard much about the existing HA and DR features available to us. After speaking to him I suggested him to use Log Shipping feature. I have explained him what and how to configure log shipping. But, at the end, he end up with failing Log Shipping. This blog post will explain about the error and how he has Fix agent_type 2 do not form a valid pair for log shipping monitoring processing.

The entire error message from looks like below from the restore job on the secondary server, I did checked the internal table log_shipping_monitor_secondary in MSDB and found that the Agent_ID/Secondary_ID value wasn’t matching. I asked my friend if he has renamed the server after he complete the installation, and his answer was yes.

Date		07-03-2018 03:30:00 AM
Log		Job History (LSRestore_SERVER_WEBPACESMS)

Step ID		1
Server		SERVER1
Job Name		LSRestore_SERVER_WEBPACESMS
Step Name		Log shipping restore log job step.
Duration		00:00:00
Sql Severity		0
Sql Message ID		0
Operator Emailed		
Operator Net sent		
Operator Paged		
Retries Attempted		0

Message
2018-03-07 03:30:00.59	*** Error: Could not retrieve restore settings.(Microsoft.SqlServer.Management.LogShipping) ***
2018-03-07 03:30:00.59	*** Error: The specified agent_id BF46A2B1-C8F6-4657-8A38-A0BCA872FE20 or agent_type 2 do not form a valid pair for log shipping monitoring processing.(.Net SqlClient Data Provider) ***
2018-03-07 03:30:00.60	*** Error: Could not log history/error message.(Microsoft.SqlServer.Management.LogShipping) ***
2018-03-07 03:30:00.60	*** Error: The specified agent_id BF46A2B1-C8F6-4657-8A38-A0BCA872FE20 or agent_type 2 do not form a valid pair for log shipping monitoring processing.(.Net SqlClient Data Provider) ***
2018-03-07 03:30:00.60	*** Error: Could not cleanup history.(Microsoft.SqlServer.Management.LogShipping) ***
2018-03-07 03:30:00.60	*** Error: The specified agent_id BF46A2B1-C8F6-4657-8A38-A0BCA872FE20 or agent_type 2 do not form a valid pair for log shipping monitoring processing.(.Net SqlClient Data Provider) ***
2018-03-07 03:30:00.60	----- END OF TRANSACTION LOG RESTORE     -----

Exit Status: 1 (Error)

He was currently running his production and Secondary server on SQL Server 2008 R2 on RTM. I have suggested him 2 things and he was able to fix the log shipping error agent_type 2 do not form a valid pair for log shipping monitoring processing. Here what was happened is, the secondary_id which we are seeing in error message belongs to the old server (NetBIOS) name and that is why the job was failing at the secondary.

Fix agent_type 2 do not form a valid pair

Step 1: Upgrade the server with latest Serviec Pack, both servers – Primary and Secondary

Step 2: Edit the copy and restore job on secondary and add a server name at the end

After making above two changes, the job started to work like a charm anf has fix agent_type 2 do not form a valid pair issue.

Let me know how do you find this tip in the comment section below. In case it interest you to read more of troubeshooting and HA&DR tips I would encourage you to read some browse through Troubleshooting and HA&DR category.

photo credit: Portland Bureau of Transportation 1st and Main Fixing Our Streets Project via photopin (license)