Microsoft® SQL Server® 2012 Bible

(Ben Green) #1

577


Chapter 21: Backup and Recovery Planning


21


Go
INSERT T1 VALUES ('Full');
go
BACKUP DATABASE Plan2Recover
TO DISK = 'e:\P2R.bak'
WITH
NAME = 'P2R_Full',
INIT;

Result:

(1 row(s) affected)
Processed 168 pages for database 'Plan2Recover', file 'Plan2Recover'
on file 1.
Processed 6 pages for database 'Plan2Recover', file 'Plan2Recover_
log' on file 1.
BACKUP DATABASE successfully processed 174 pages in 0.800 seconds
(1.690 MB/sec).

Continuing:

INSERT T1 VALUES ('Log 1');
go
BACKUP Log Plan2Recover
TO DISK = 'e:\P2R.bak'
WITH
NAME = 'P2R_Log';

Result:

(1 row(s) affected)
Processed 6 pages for database 'Plan2Recover', file 'Plan2Recover_
log' on file 2.
BACKUP LOG successfully processed 6 pages in 0.113 seconds (0.393
MB/sec).

Continuing:

INSERT T1 VALUES ('Log 2');
go
BACKUP Log Plan2Recover
TO DISK = 'e:\P2R.bak'
WITH
NAME = 'P2R_Log';

Result:

(1 row(s) affected)
Processed 1 pages for database 'Plan2Recover', file 'Plan2Recover_
log' on file 3.

c21.indd 577c21.indd 577 7/31/2012 9:22:53 AM7/31/2012 9:22:53 AM


http://www.it-ebooks.info
Free download pdf