When I used sqlmanagestudio to open an SQL script when I imported a database script, I found that the script was too large and sqlmanagestudio was dead for a long time. Because the script has binary data of images, after reaching 2.6m., a senior at the last company gave me a batch processing command to solve this problem.
Set the followingCodeSave it as a bat file and execute it.
Code
1 Rem ======================================
2 Rem website initialization data _ Chongqing edition. SQL
3 Osql / U sa / P Sasa - S 192.168 . 85.23 - D musicclub _ Liaoning Telecom 1 - R - I. Website initialization data _ Chongqing edition. SQL - O website marketing data _shanxi version .txt
4 Pause
The following describes the parameters of the osql command:
Code
1 Osql [ - U logon id] [ - P Password]
2 [ - S server] [ - H host name] [ - E trusted connection]
3 [ - D. Use the database name] [ - L logon timeout value] [ - T query timeout value]
4 [ - H title] [ - S column separator] [ - W column width]
5 [ - A packet size] [ - E echo input] [ - I. The identifier with quotation marks is allowed]
6 [ - L list servers] [ - C command end] [ - D odbc dsn name]
7 [ - Q " Command line query " ] [ - Q " Command line query " And quit]
8 [ - N deletion number method] [ - M error level]
9 [ - Message sent by R to stderr] [ - V severity level]
10 [ - I input file] [ - O output file]
11 [ - P print statistics] [ - B. Abort batch processing when an error occurs]
12 [ - X [ 1 ] Disable the command. [a warning is displayed when you exit]
13 [ - O use the old iSQL to disable the following items]
14 < EOF > Batch Processing
15 Auto Adjust console width
16 Wide message
17 The default error level is - 1 And 1
18 [ -? Show syntax Summary]