Use scripts to migrate SQL Server databases

Source: Internet
Author: User
Tags management studio server hosting

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!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.