Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Restore without Checkdb


Restore without Checkdb

Author
Message
tutupouet
tutupouet
Valued Member
Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)

Group: General Forum Members
Points: 56 Visits: 278
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
Minaz Amin
Minaz Amin
Mr or Mrs. 500
Mr or Mrs. 500 (592 reputation)Mr or Mrs. 500 (592 reputation)Mr or Mrs. 500 (592 reputation)Mr or Mrs. 500 (592 reputation)Mr or Mrs. 500 (592 reputation)Mr or Mrs. 500 (592 reputation)Mr or Mrs. 500 (592 reputation)Mr or Mrs. 500 (592 reputation)

Group: General Forum Members
Points: 592 Visits: 1750
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"
GilaMonster
GilaMonster
SSC-Forever
SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)SSC-Forever (47K reputation)

Group: General Forum Members
Points: 47415 Visits: 44405
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

We walk in the dark places no others will enter
We stand on the bridge and no one may pass


tutupouet
tutupouet
Valued Member
Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)Valued Member (56 reputation)

Group: General Forum Members
Points: 56 Visits: 278
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
Nils Gustav Stråbø
Nils Gustav Stråbø
SSCrazy
SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)SSCrazy (2K reputation)

Group: General Forum Members
Points: 2015 Visits: 3575
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%?
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search