As we known,sql database high version to low version restore is unlikely but often encountered, today measured a method
Step: Task-"Generate script-"
Next-Advanced, select the database version and script the data type as schema and data, you can preserve the data.
Proceed to the next step to complete.
Eventually get a huge SQL script file
-The next step is to create a new target database in the lower version of the database and then run the SQL script file to
General SQL file we are directly executed in the query window of SQL Server, but this huge SQL file is too big, SQL Server or even Notepad can not open ...
So I have the following command.
Sqlcmd-s. \sql2008-u sa-p sql2008-d backamsdata_nd-r-I C:\Users\LYD\Documents\script.sql
After the execution of the command is a long wait, after all, 1.5 g files ...
Note that if the script is too large, you can close the STDERR message (without adding the-R parameter) to speed up execution.
。。。。 Friendship tip: So the data speed is very slow and slow, it is best to try to eliminate garbage data, reduce the amount of data ... In this way, there is no need for this method ........ .....
Take someone else's picture to illustrate
The command parameters for SQLCMD are as follows:
1 [-u login ID] [-p password]
2 [-s server] [-h host name] [-E Trusted Connection]
3 [-D using Database name] [-L login timeout] [-t query timeout value]
4 [-H title] [-S column delimiter] [-w width]
5 [-A packet size] [-e echo input] [-I allow quoted identifiers]
6 [-l list Server] [-C command end] [-D ODBC DSN name]
7 [-Q "Command-line Query"] [-Q "Command-line Query" and exit]
8 [-N Delete Numbering method] [-m error level]
9 [-R message sent to stderr] [-V severity level]
Ten [-I input file] [-o output FILE]
[-P print statistics] [-B Abort batch On ERROR]
[-x[1] Disable the command, [exit with warning displayed]]
[-O use old ISQL behavior to disable the following items]
<EOF> Batch Processing
15 automatic adjustment of the console width
16 Wide Message
17 Default Error level is-1 and 1
Https://www.cnblogs.com/lyd2016/p/6491284.html?utm_source=itdadao&utm_medium=referral
Troubleshoot problems with SQL script files that are too large to open