X hits on this document

658 views

0 shares

0 downloads

0 comments

195 / 200

Sample batch files Sample 12 - Using environment variables to exclude instances and databases from backup

RESTOREOPTION REPLACE RECOVEREDSTATE NOTRECOVERED ENDOPER TRUE

OPERATION RESTORE OBJECTTYPE TRXLOG DATABASE "DatabaseR"

  • #

    The following image is type: transaction log

NBIMAGE "cadoo.MSSQL7.CADOO\SECOND.trx.DatabaseR.~.7.001of001.20060701110015..C" SQLHOST "CADOO" SQLINSTANCE "SECOND" NBSERVER "BOW" BROWSECLIENT "CADOO" MAXTRANSFERSIZE 0 BLOCKSIZE 7 RESTOREOPTION REPLACE RECOVEREDSTATE RECOVERED ENDOPER TRUE

Sample 12 - Using environment variables to exclude instances and databases from backup

You can use SQLINSTANCE $ALL in your batch file to designate that all SQL Server instances on your host be backed up. For example, the following batch file would back up the master, model, and msdb databases. These databases are backed up on all instances of SQL Server on the host on which the batch file is run.

SQLINSTANCE $ALL OPERATION BACKUP DATABASE "master" NBSERVER "BEARING" MAXTRANSFERSIZE 6 BLOCKSIZE 7 NUMBUFS 2 ENDOPER TRUE

OPERATION BACKUP DATABASE "msdb" NBSERVER "BEARING" MAXTRANSFERSIZE 6 BLOCKSIZE 7 NUMBUFS 2 ENDOPER TRUE

OPERATION BACKUP DATABASE "model"

195

Document info
Document views658
Page views658
Page last viewedFri Jan 20 08:16:55 UTC 2017
Pages200
Paragraphs4189
Words49499

Comments