Migrate MSSQL database files from local machines to remote servers (including primary keys, default values, and table data)

Source: Internet
Author: User
The following methods may still be inappropriate for your reference only:

Step 1:Select the name of the database to be migrated, select "tool"> "generate SQL script"> "show all"> select "write all object scripts"> "options"> "Write primary key, foreign key, default value, and check constraint script "", click "OK" to save the SQL script file.

Step 2:Log on to the remote database, create a table, and select it. Select "SQL query analyzer"> "load SQL script" and find the saved SQL script file. -- Execution (green triangle)

After completing the preceding two steps, the MSSQL database is successfully migrated to a remote server (including the primary key and default value)
Next, migrate the local data to the remote server through step 3.

Step 3:Open the local MSSQL database, double-click "Data Conversion service"> "local package"> "Create local package"> "Copy sqlserver object task" (in the left-side taskbar) -- set "Source", "purpose", and "copy" -- "OK" and run the command (the green triangle above)

Migration complete ~!

A few memo maps are attached:


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.