我们的 SQL 2000 服务器中有两个数据库实例,数据库“A”中的大约 10 个表被复制到数据库“B”中。无论我们在数据库“A”表中进行什么更改,都会复制到数据库“B”表。我们已向数据库“A”中的一个表添加了一列。我们是否还需要更改数据库“B”中的表?或者这取决于复制的设置方式(我不知道,因为它是由其他人设置的)?复制数据的时候会报错吗?
最佳答案
这取决于您设置复制时发布的订阅 Pane 中的“复制架构更改”选项是 True 还是 False。默认情况下为 True,这意味着会复制架构更改。
有关更多详细信息、限制和异常(exception),包括合并和事务复制之间的差异,请参阅 Making Schema Changes on Publication Databases 。不要错过这个小金 block :
Schema changes to tables must be made by using Transact-SQL or SQL Server Management Objects (SMO). When schema changes are made in SQL Server Management Studio, Management Studio attempts to drop and re-create the table. You cannot drop published objects, therefore the schema change fails.
关于sql-server - 复制对象的架构更改会影响复制吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2210217/