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