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... Expand / Collapse
Author
Message
Posted Monday, December 16, 2013 4:40 AM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, August 27, 2014 2:46 AM
Points: 215, Visits: 861
Is there any difference between RESTORE DATABASE and RESTORE LOG?

Actually let me rephrase that!!

If I specify a transaction log file I can use both commands, is there any difference in what occurs?

D


'Only he who wanders finds new paths'
Post #1523152
Posted Monday, December 16, 2013 6:28 AM


SSCoach

SSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoachSSCoach

Group: General Forum Members
Last Login: Yesterday @ 3:34 PM
Points: 15,661, Visits: 28,051
A database backup consists of all the committed pages of the database and enough of the log roll forward or roll back active transactions at the time of the backup. A log backup consists of all the committed transactions currently in the log and any active transactions that are needed to roll forward or roll back the log.

So, a restore of database moves all those data pages and then, if you're doing it WITH RECOVERY (the default) it rolls forward or rolls back the logs. But, if you do it WITH NO_RECOVERY, it completes any transactions (roll forward) and then stops. You can then apply a log restore which will walk through all it's transactions committing them to the data pages that were already restored by the database restore operation as defined by the transactions in question.

So, yeah, they're a little different. To a degree you can think of a database restore as both a data and a log restore (again, to a degree) while a log restore is just a log restore.


----------------------------------------------------
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood..." Theodore Roosevelt
The Scary DBA
Author of: SQL Server 2012 Query Performance Tuning
SQL Server 2008 Query Performance Tuning Distilled
and
SQL Server Execution Plans

Product Evangelist for Red Gate Software
Post #1523186
Posted Monday, December 16, 2013 6:31 AM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Wednesday, August 27, 2014 2:46 AM
Points: 215, Visits: 861
Outstanding answer sir thank you very much, clears that up!

D


'Only he who wanders finds new paths'
Post #1523188
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse