SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 Disaster Recovery
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

jay1
Starting Member

United Kingdom
17 Posts

Posted - 11/02/2012 :  07:09:47  Show Profile  Reply with Quote
Scenario:
I have Databases which are backed up every night (Full Backup); the Backups are saved on a Tape then deleted from the Sever after three days.
1.The Backups are taken at 8pm the previous day and if something goes wrong, for example at 4ppm the next day I would have to Restore the last Backup then rerestorell the Log files since the last Backup (The Log Backups are done every 15 minutes), imagining the Database will need to be Back online as soon as possible; the procedure will take a very long time.

I wanted to know if there is a better way of performing a Disaster Recovery other than the following Procedure:

RESTORE DATABASE DB_TestLSN_Restore
FROM DISK = 'c:\Backup\DB_TestLSN.bak'
WITH MOVE 'DB_TestLSN' TO 'E:\MSSQL\DATADB_TestLSN_Restore.mdf',
MOVE 'DB_TestLSN_log' TO 'F:\MSSQL\LOG\DB_TestLSN_log_Restore.ldf',
NORECOVERY, NOUNLOAD, STATS = 10
GO


RESTORE LOG DB_TestLSN_Restore
FROM DISK = N'C:\Backup\DB_TestLSN_LOG1'
WITH NORECOVERY, NOUNLOAD, STATS = 10
GO


RESTORE LOG DB_TestLSN_Restore
FROM DISK = N'C:\Backup\DB_TestLSN_LOG2'
WITH RECOVERY, NOUNLOAD, STATS = 10
GO

And so on until the last log is Restored.

2. Is there a way, if possible just to restore a single table if for example something gets deleted or if the table becomes corrupted?

Thank you in advance!

nigelrivett
Flowing Fount of Yak Knowledge

United Kingdom
3355 Posts

Posted - 11/02/2012 :  09:47:28  Show Profile  Visit nigelrivett's Homepage  Reply with Quote
I backup databases with file names like
<DBNAME>_<TYPE>_<yyyymmdd_hhmm>.bak

Then it's easy to write a script to restore the latest full followed by latest diff (if later) followed by all the following log backups.

==========================================
Cursors are useful if you don't know sql.
SSIS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000