question

MSPSDBA avatar image
MSPSDBA asked

Cannot modify SP of restored database because source database had replication running.

I have restored the database from backup of production in DEV Server. Prod Server has multiple replications running on the database. But I have neither configured any replication in the DEV nor have any plan to do so. But when I modify a stored procedure on DEV database, I get following error: ***Msg 21531, Level 16, State 1, Procedure sp_MSmerge_alterschemaonly, Line 50*** ***The data definition language (DDL) command cannot be executed at the Subscriber. DDL commands can only be executed at the Publisher. In a republishing hierarchy, DDL commands can only be executed at the root Publisher, not at any of the republishing Subscribers.*** ***Msg 21530, Level 16, State 1, Procedure sp_MSmerge_ddldispatcher, Line 191*** ***The schema change failed during execution of an internal replication procedure. For corrective action, see the other error messages that accompany this error message.*** ***Msg 3609, Level 16, State 2, Procedure sp_MyName_Get, Line 37*** ***The transaction ended in the trigger. The batch has been aborted.****** I would be gratefule if someone informs me the solution to this problem. Thanks!
replicationsql server 2008 r2
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

KenJ avatar image KenJ commented ·
Give this a try (run it within the DEV database) and let us know if it did the trick: sp_removedbreplication https://msdn.microsoft.com/en-us/library/ms188734.aspx
0 Likes 0 ·

0 Answers

·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.