When configuring log shipping, copy and restore jobs fail. The error is as follows:
*
*
*
Error: Could
not
retrieve copy settings
for
secondary ID
'[removed]'
.
(
Microsoft.SqlServer.Management.LogShipping
)
*
*
*
*
*
*
Error: The specified agent_id
BECBBCC0
-
6867
-
4398
-
BD96
-
830D62D88558
or
agent_type
1 do
not
form a valid pair
for
log
shipping monitoring processing.
(
.Net SqlClient
Data
Provider
)
*
*
*
After reading the command for a long time, I did not know what the problem was. Then I checked sqllogship to run the command and found that the command generated by the system was wrong,
"C:\Program Files\Microsoft SQL Server\90\Tools\Binn\sqllogship.exe"-
Copy BECBBCC0
-
6867
-
4398
-
BD96
-
830D62D88558
-
server
SERVER01,1433
-Copy or restore. The server name should be secondery server, but it is found to be the primary server. After the server name is changed correctly, the job will run normally.
I thought this was a bug, but I didn't see kb on Microsoft's website. Later, I suddenly remembered that this machine was p2v, and then changed the server name, resulting in a different instance name and server name, resulting in this problem.
Run the following command to solve the problem:
Exec sp_dropserver 'your _ old_computer_name'
Go
Exec sp_addserver 'your _ new_computer_name ', 'local'
Go