SQL Server High version demotion

Source: Internet
Author: User

A problem has been encountered in recent projects:

The system a database version is 2014, while the other 4-5 systems in the project have a database version of 2012.

Then you need to reduce the version of 2014 to 2012.

Attached: How do I query the database version? SELECT @ @version execute the SQL statement.

Try the method of comparing many scripts on the net, the steps are as follows:

1. Open the original database

2. Database-task-Generate script

3. Set scripting options: Changes required

1) file path and filename

2) Advanced-database version

3) Advanced-script data type (whether you want the data to be determined by itself)

And then there's no brains. The next step is to finish, so we have a filename.sql file.

Congratulations, you can find the lower version of the database to execute SQL, if your. sql file is relatively small only 10M or so direct execution is OK.

But my. sql file is very large and nearly 10G, so I always error when I execute SQL

It's okay, I found a solution! import execution with sqlcmd! only two steps are required:

1.win+r-cmd

2. Execute the following command: Sqlcmd-s servername-u username-p password-i filename.sql

(parameter naming:-s server address-u user name-p password-I script file path)

It's done.

If there is a better way, welcome to discuss the message

SQL Server High version demotion

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.