Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

restore one full backup(need to move), 1 differential backup,2 transaction log backup

$
0
0

Is following script correct? I don't need to add "move" when do restore differential, log later. Correct?

RESTORE DATABASE AdventureWorks FROM DISK = 'C:\AdventureWorks.BAK'

WITHMOVE'Adventureworks_DB'TO'C:\test\Adventureworks.mdf',

MOVE'AdventureWorks_Log'TO'C:\Adventureworks_Log.ldf',

WITH NORECOVERY
GO

RESTORE DATABASE AdventureWorks FROM DISK = 'C:\AdventureWorks.DIF'
WITH NORECOVERY
GO

RESTORE LOG AdventureWorks FROM DISK = 'C:\AdventureWorks.TRN'
WITH NORECOVERY
GO

RESTORE LOG AdventureWorks FROM DISK = 'C:\AdventureWorks2.TRN'
WITH RECOVERY
GO


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>