Transactional Replication Questions

亡梦爱人 提交于 2020-01-04 03:33:12

问题


I have the following questions about how transactional replication handles the following. For the sake of example, assume database 'A' is being replicated (via transactional replication) to database 'B'.

  1. If a table in database ‘A’ is dropped, will the table get dropped in ‘B’?
  2. If a table in ‘A’ is renamed, what happens to the table in ‘B’?
  3. If we drop a column in a table in database ‘A’, what will happen to the column in the same table in database ‘B’?
  4. If we rename a column in a table in database ‘A’, what will happen to the column in the same table in database ‘B’?
  5. Is replicating stored procs, views and UDF’s are optional?
  6. Is there any way to avoid all the stored process being created in database ‘B’ as a result of it being the subscriber of a replication? a. If not, can we at least dictate what schema they are created in?

回答1:


Most of your questions are answered here: Frequently asked questions for Replication Administrators

  1. You cannot drop a table that is replicated. You have to first drop the article.
  2. You cannot rename a table that is replicated. You have to first drop the article.
  3. Issuing ALTER TABLE … DROP COLUMN at the Publisher, will result in the command being replicated to the Subscriber.
  4. You cannot rename a column "whilst" it is being replicated. You need to remove it from replication first.
  5. Yes, it's optional.
  6. What do you mean by created?

All of these items can be tested very easily by creating a very simple Replication topology on a test server. I suggest you do so in order to both plan for and practice your changes.



来源:https://stackoverflow.com/questions/4316701/transactional-replication-questions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!