Performs a database transfer by copying specified objects and data to the destination database. Set the properties of a created Transfer object as desired, pass that Transfer object to the ScriptTransfer method with tScriptMode set to SQLOLEXfrFile_SummaryFiles to create the script files, and then pass the same Transfer object to the Transfer method to perform the database transfer.
If the ScriptTransfer method is not called first, the Transfer method will call ScriptTransfer with tScriptMode set to SQLOLEXfrFile_SummaryFiles and strFile set to the current directory to create the summary script files.
Database.Transfer ( [TransferSpec :=] Transfer )
HRESULT pDatabase->Transfer ( LPSQLOLETRANSFER pTransfer );
Element | Type | Description |
---|
Transfer | Transfer | Created Transfer object that specifies how to execute the database transfer |
The Transfer method does not remove objects or data from the source database.
The Transfer method creates three types of error log files:
source_server.source_database.LOG
where source_server is the name of the SQL Server that contains the source database, and source_database is the name of the source database.
destination_server.destination_database.LOG
where destination_server is the name of the SQL Server that contains the destination database, and destination_database is the name of the destination database.
owner.table.BCP
where owner is the username of the object owner, and table is the name of the table.