Copy database from SQL server management to another instance Directely

时光怂恿深爱的人放手 提交于 2020-01-24 23:11:21

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!