sp_removedbreplication fails after SQL upgrade
I had the bright idea to upgrade SQL 2000 to 2005 by detaching and uninstalling SQL 2000 and resintalling SQL 2005 to get a "clean install". The database had both a publication and a subscription (transactional replications). This was a couple of hour mistake. But was fixed easily enough with one post I found in newsgroups.
I tried to run this command:
sp_removedbreplication 'DBNameHere'
But got this error: Msg 207, Level 16, State 1, Procedure sp_MSremovedbreplication, Line 135
Invalid column name 'job_step_uid'.
To fix this issue run these procs:
DBNameHere.sys.sp_vupgrade_replication
master.sys.sp_vupgrade_replsecurity_metadata
DBNameHere.sys.sp_vupgrade_mergetables
Hopefully that will save you some time if you encounter.
This is the SSMS error when trying to delete the subscription:
Could not delete the subscription.
------------------------------
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
------------------------------
Invalid column name 'job_step_uid'. (Microsoft SQL Server, Error: 207)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.3186&EvtSrc=MSSQLServer&EvtID=207&LinkId=20476
