开发者

Microsoft.SqlServer.Management.Smo.Transfer() losing contraints

I'm trying to copy SQL database from one server to another.

Ple开发者_开发知识库ase tell me how to use Transfer() method without loosing constraints in the target database.

I've tried different parameters including

 CopySchema = true;     // and 
 CopyAllSchemas = true; //and even 
 CopyAllObjects = true;

and still this damn thing is losing all the constraints.

Help me, pls!


Ok...

 transfer.Options.DriAll = true;

helped. But now It's leaving all triggers behind


In options some flags for select the object to copy

  transfer.Options.Triggers = true;
  transfer.Options.Indexes = true;
  transfer.Options.Statistics = true;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜