I am copying tables from the Destination_Test database of the Source_Test database.
Using Microsoft.SqlServer.Management.Smo.Transfer .
It copies all tables from Source_Test to Destination_Test
But I want the tables to have the "TestSchema" schema.
The main problem is that it copies the entire table with dbo schema . Even I set this.CopyAllTables = false; but he copies it. How to limit it. I tried the following:
public class CopyTable : Transfer, ISchemaCopy { private void CopyTables() { this.CopyAllTables = false; var server = new Server(new ServerConnection(connection)); var script = this.ScriptTransfer().Cast<string>(); } }
source share