Invalid column name in last_local_recgen in Merge Agent Vs sp_vupgrade_replication
In one of my replication environment i got the below error in Merge agent on a Merge publication.
The error message showing as "Invalid column name showing as last_local_recgen"
This error occurs in my environment after we upgrade SQL Server environment from SQL Server 2014 SP1 to SQL Server 2014 SP2.
And whatever the Merge publications are already configured in this environment all those Merge publications went into error mode.
We followed the below steps to resolve this issue.
Work Around:
1) Capture .mdf and .ldf of all the user and system databases.
2) Take the backup of all user databases along with system databases including distribution database
3) Take backup of all the publication by generating script for those(Right click on publication -->Generate script)
4) Next run the below command
USE master
GO
EXEC sp_configure 'allow updates',1
RECONFIGURE WITH OVERRIDE
5) Run the below system stored procedure in the master databases.
USE master
GO
EXEC sp_vupgrade_replication
5) No need to provide any input parameter values to this simply run
6) It will modify all the subscription properties information in all the databases. Now you can see the message like below
"Upgrading publication settings and system objects in database"
7) After running this also you can see the errors. Don't frustrate here. Just run the MergeAgent job manually in all the publications. After that issue will get resolve.
8) No need of stop and restarting the services. And no need to do the same in Subscriber server also.
The error message showing as "Invalid column name showing as last_local_recgen"
This error occurs in my environment after we upgrade SQL Server environment from SQL Server 2014 SP1 to SQL Server 2014 SP2.
And whatever the Merge publications are already configured in this environment all those Merge publications went into error mode.
We followed the below steps to resolve this issue.
Work Around:
1) Capture .mdf and .ldf of all the user and system databases.
2) Take the backup of all user databases along with system databases including distribution database
3) Take backup of all the publication by generating script for those(Right click on publication -->Generate script)
4) Next run the below command
USE master
GO
EXEC sp_configure 'allow updates',1
RECONFIGURE WITH OVERRIDE
5) Run the below system stored procedure in the master databases.
USE master
GO
EXEC sp_vupgrade_replication
5) No need to provide any input parameter values to this simply run
6) It will modify all the subscription properties information in all the databases. Now you can see the message like below
"Upgrading publication settings and system objects in database"
7) After running this also you can see the errors. Don't frustrate here. Just run the MergeAgent job manually in all the publications. After that issue will get resolve.
8) No need of stop and restarting the services. And no need to do the same in Subscriber server also.
Comments