Monday, April 18, 2005

Backup database to disk 'NUL'

Backup database to disk 'NUL'

--Make sure the tlog file doesn't auto-truncate
BACKUP DATABASE shrink_test TO DISK = 'NUL'

Result

Processed 10128 pages for database 'shrink_test', file 'shrink_test_data' on file 1.Processed 1 pages for database 'shrink_test', file 'shrink_test_log' on file 1.BACKUP DATABASE successfully processed 10129 pages in 28.287 seconds (2.933 MB/sec).

Database backed up: Database: shrink_test, creation date(time): 2005/04/15(08:13:12), pages dumped: 16603, first LSN: 302:422:1, last LSN: 302:567:1, number of dump devices: 1, device information: (FILE=1, TYPE=DISK: {'d:\sqldata\MSSQL\BACKUP\NUL'}).

No comments: