Databases often need to be migrated in projects. The management studio script generation tool only obtains the schema of the database. (Fortunately, there are many third-party tools on the Internet. I would like to recommend one to you: the SQL server hosting toolkit is a project on codeplex (no source code is available at present, and we hope it will be available in the future ). this project is ambitious and will be integrated into Visual Studio and Management studio after being written on the project roadmap :)
Although it is only a consoleProgramFor example, to migrate the local database test to another server:
First, convert test to a script (including schema and data) and execute the following command:
Sqlpubwiz script-d test C: \ test. SQL
Execute the generated script file on the SQL Server to be migrated, And the whole database is over, :) simple is beautiful!