When I try to drop the publication in this order:
exec sp_dropsubscription @.publication = @.publicName, @.subscriber = @.servName, @.article = N'all'
exec sp_droppublication @.publication = @.publicName
I am getting the following error after dropping the publication
Msg 16943, Level 16, State 4, Procedure sp_MSrepl_changesubstatus, Line 1271
Could not complete cursor operation because the table schema changed after the cursor was declared.
Msg 16943, Level 16, State 4, Procedure sp_MSrepl_changesubstatus, Line 1271
Could not complete cursor operation because the table schema changed after the cursor was declared.
Could anyone give me a suggestion about how to avoid this error?
Thanks!
Which if the above two stored procs is raising the error, and what version of sql server are you running?|||The error is raised when trying to delete the publication with:
exec sp_droppublication @.publication = @.publicName
I am working with SQL Server 2005, service pack 1.
I hope with this information you can help me, or else please let me know.
Thanks!
|||this is a dumb suggestion, rather a shot in the dark, but can you stop/start the sql server service, and then try it again? Something about transactions/cursors that may be stuck/lingering somewhere?|||I tried that already. I finally got to work the deleting of the publication, but the error remains as reported earlier. I am thinking this is a 'MS bug' that has not been totally fixed since SQL Server 7... pretty sad, huh? If still anyone has any idea what to do, please let me know.
Thanks!
|||If you can provide a full repro of the problem, it would help us tremendously. If you can reproduce it from scratch, please post the TSQL code, otherwise this issue has been intermitent throughout the years, nothing solid for us to fix.
Other questions - are you wrapping this in a transaction? What's the db compat level? How many subscriptions are there?
No comments:
Post a Comment