BCP usage

zhaozj2021-02-08  249

BCP usage:

SELECT 'BCP DATABASE ..' NAME 'OUT' '/ DATA /' NAME '.OUSOBJECTS WHERE TYPE =' u 'will be above Database replaces the name of the database that needs backup, -sservername

Change to the corresponding SQL Server name -pxxx to change XXX to actual SA password, above

The method is used to back up the data, and the OUT in the first line can generate recovery data.

Batch treatment

The above can be executed in the ISQL of Sybase or MS SQL Server (MS SQL

The ISQL in Server 7.0 has changed to query analyzer, and then the results will be performed

After clipboard COPY to Notepad (Note Don't Copy the title of Copy Results), save as

BAT file. When performing the final BAT file, you need to establish a directory where the BAT is located.

Data subdirectory, backup * .out files will be stored in this subdirectory.

转载请注明原文地址:https://www.9cbs.com/read-2038.html

New Post(0)