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;
精彩评论