• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 818
  • Last Modified:

a question about DDL trigger

I'm trying to change a view on a testing database. I got message:

Msg 21531, Level 16, State 1, Procedure sp_MSmerge_alterschemaonly, Line 45
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 182
The schema change failed during execution of an internal replication procedure. For corrective action, see the other error messages that accompany this error message.

I think it is because DDL trigger was there to provent db objects changes.

I want to change a view to test my report. What would be a good way to make myself being able to make changes to my store procedures? Thanks.
  • 2
1 Solution
George HirstCommented:
Sounds like you have replication and you are trying to make changes to the structure on the Subscriber database.

Any structure changes must be made on the Publisher.

Also for any changes to be re-plicated you need to set @replicate_ddl to false in sp_addmergepublication
minglelinchAuthor Commented:
Thanks for the solution.
George HirstCommented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now