Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
jay1
Starting Member
17 Posts |
Posted - 2012-11-02 : 07:09:47
|
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_RestoreFROM 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 = 10GORESTORE LOG DB_TestLSN_RestoreFROM DISK = N'C:\Backup\DB_TestLSN_LOG1'WITH NORECOVERY, NOUNLOAD, STATS = 10GORESTORE LOG DB_TestLSN_RestoreFROM DISK = N'C:\Backup\DB_TestLSN_LOG2'WITH RECOVERY, NOUNLOAD, STATS = 10GOAnd 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
Master Smack Fu Yak Hacker
3385 Posts |
Posted - 2012-11-02 : 09:47:28
|
I backup databases with file names like<DBNAME>_<TYPE>_<yyyymmdd_hhmm>.bakThen 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. |
|
|
|
|
|