Select ' bcp database ... ' + name + ' out ' +
'/data/' + name + '. Out ' +
'-n-sservername-usa-pxxx '
From database.. sysobjects
where type = ' U '
Replace the database above with the name of the databases that you want to back up,-sservername
Change to SQL Server name-pxxx replace xxx with the actual sa password, above
method is used to back up the data, and the first row of out is changed in to generate the recovery data
Batch processing of
The above can be performed in the isql of Sybase or MS SQL Server (MS SQL
ISQL has changed to query Analyzer in Server 7.0, and then the execution results pass
Clipboard Copy to Notepad (note Do not copy the title of the result set), Save As
BAT file. When executing the last BAT file, you need to set up the directory where the bat resides
Data subdirectory, the backed-up *.out files will be stored in this subdirectory.
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.