Sto copiando le tabelle dal database Destination_Test del database Source_Test.Come copiare le tabelle in base al nome dello schema in Microsoft.SqlServer.Management.Smo.Transfer
Utilizzo di Microsoft.SqlServer.Management.Smo.Transfer
.
copie di esso tutte le tabelle from Source_Test to Destination_Test
ma voglio avere tabelle schema 'TestSchema'.
Il problema principale è che copia tutta la tabella con dbo schema
. Anche io ho impostato this.CopyAllTables = false;
ancora lo copia. Come restringerlo. Avevo provato seguente:
public class CopyTable : Transfer, ISchemaCopy
{
private void CopyTables()
{
this.CopyAllTables = false;
var server = new Server(new ServerConnection(connection));
var script = this.ScriptTransfer().Cast<string>();
}
}