问题
There are many ways to transfer databases from server to another. Some wizard and other programmatic as SMO That have Backup And Restore Classes That can help to take backup from server and restore to destination.
If there are way to copy database directly without backup and restore Programmatic ?
Where I determine the source that need to take copy of database and Destination that need to send database to it . (I know the wizard way of sql server But i need it programmatic ).
please help .
回答1:
To do it programmatic way you need to: 1. Somehow get script or information about database structure including DB metadata, DB files, tables, table columns, indexes, etc 2. Create empty DB on destination server 3. Read data from source db and copy to destination db.
This is initial thoughts
来源:https://stackoverflow.com/questions/51180034/copy-database-from-sql-server-management-to-another-instance-directely