【发布时间】:2010-06-17 19:37:13
【问题描述】:
我正在尝试将 SQL 数据库从一台服务器复制到另一台服务器。
请告诉我如何在不丢失目标数据库约束的情况下使用 Transfer() 方法。
我尝试了不同的参数,包括
CopySchema = true; // and
CopyAllSchemas = true; //and even
CopyAllObjects = true;
这该死的东西仍然失去了所有的约束。
请帮帮我!
【问题讨论】:
我正在尝试将 SQL 数据库从一台服务器复制到另一台服务器。
请告诉我如何在不丢失目标数据库约束的情况下使用 Transfer() 方法。
我尝试了不同的参数,包括
CopySchema = true; // and
CopyAllSchemas = true; //and even
CopyAllObjects = true;
这该死的东西仍然失去了所有的约束。
请帮帮我!
【问题讨论】:
好的……
transfer.Options.DriAll = true;
帮助。但是现在它把所有的触发器都抛在了脑后
【讨论】:
在选项中选择要复制的对象的一些标志
transfer.Options.Triggers = true;
transfer.Options.Indexes = true;
transfer.Options.Statistics = true;
【讨论】: