July 8, 2010 at 3:12 am
Hello,
I wonder if it is possible to run "restore database " without DBCC CHECKDB because when I do a restore, there is always a CHECKDB
RESTORE DATABASE [test]
FROM DISK = N'C:\test_backup.bak'
WITH FILE = 1, NOUNLOAD, REPLACE, STATS = 10
Thx
July 8, 2010 at 3:40 am
I dont think the above restore command will run dbcc checkdb. Also , RESTORE will not run DBCC CHECKDB unless you are using a user built in script / trigger which will run DBCC CHECKDB before restoring the database. This two commands are different from each other.
RESTORE will restore the DB from the Backup while DBCC CHECKDB will do a DB consistency check on a Database.
"More Green More Oxygen !! Plant a tree today"
July 8, 2010 at 4:00 am
Restore never runs a checkDB automatically. What you're likely seeing is a message in the error log that states
CHECKDB for database 'Testing' finished without errors on 2010-05-24 06:44:53.317 (local time).
Do note that the date and time it lists will be sometime in the past. It's telling you when checkDB last ran successfully on that database.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
July 9, 2010 at 7:06 am
Hello,
thank you for these answers.
The initial problem is that the backup takes 18 minutes while the restore takes 50 minutes.
Why so much difference?
Thx
July 10, 2010 at 1:54 am
chauchs (7/9/2010)
The initial problem is that the backup takes 18 minutes while the restore takes 50 minutes.Why so much difference?
Is the backed up database replicated? If so, and you don't specify KEEP_REPLICATION in the RESTORE statement then SQL Server will drop all objects related to replication after the initial RESTORE is completed. This can take a while depending on the number of replicated tables.
You can check the progress of the restore by querying column percent_complete in sys.dm_exec_requests for the session_id performing the restore. Does is use 50 minutes to reach 100%?
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply