Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Restore without Checkdb Expand / Collapse
Author
Message
Posted Thursday, July 8, 2010 3:12 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Tuesday, September 9, 2014 9:29 AM
Points: 54, Visits: 228
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
Post #949109
Posted Thursday, July 8, 2010 3:40 AM


Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Tuesday, March 11, 2014 3:34 AM
Points: 549, Visits: 1,554

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"
Post #949123
Posted Thursday, July 8, 2010 4:00 AM


SSC-Forever

SSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-ForeverSSC-Forever

Group: General Forum Members
Last Login: Today @ 12:15 PM
Points: 43,017, Visits: 36,179
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 2008, MVP
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

Post #949130
Posted Friday, July 9, 2010 7:06 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Tuesday, September 9, 2014 9:29 AM
Points: 54, Visits: 228
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
Post #949934
Posted Saturday, July 10, 2010 1:54 AM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Today @ 2:30 AM
Points: 1,855, Visits: 3,454
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%?
Post #950324
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse