Tuesday, October 11, 2005

Show The Progress of an SQL Database Restore

Add the STATS option below, the numeric being a percentage value. The following restore command will display a progress after each 1% of the database restored.
Brilliant!

RESTORE DATABASE Bla
FROM DISK='D:\DB Backup\BLA'
WITH
MOVE 'Bla' TO 'D:\Data\Bla.mdf',
MOVE 'Bla_Log' TO 'D:\Data\Bla.ldf',
STATS = 1

No comments: