August 17, 2010 at 5:26 am
Hi,
I am new for DBA. I have some doubt in backup and restore. I have full backup job which will take full backup of my database every week. I have differential backup job which will take differential backup of my database every day. I have transactional job which will take transaction backup of my database every 30 minutes.
But my database get crashed at 5.45 AM. If i restore all the full, differential, transactional backup i will get the datas till 5.30 AM only. How can i get the 0.15 minutes datas?
---
August 17, 2010 at 5:38 am
Depending on how the database crashed. If SQL is still running and the transaction log is still available you can do a tail-log backup and back up right to the last transaction.
If the crash was such that SQL cannot start or that the server itself can't start or the transaction log is lost, then that last 15 min data is lost and cannot be recovered.
This is why the interval between log backups should be the maximum allowable data loss for the database.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
August 17, 2010 at 6:02 am
Great! Thanks Gail Shaw. You are saying tail-log backup which means that transaction log backup or else some other one?
August 17, 2010 at 6:16 am
Google is your friend
http://msdn.microsoft.com/en-us/library/ms179314.aspx
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
August 17, 2010 at 6:51 am
GilaMonster (8/17/2010)
Depending on how the database crashed. If SQL is still running and the transaction log is still available you can do a tail-log backup and back up right to the last transaction.If the crash was such that SQL cannot start or that the server itself can't start or the transaction log is lost, then that last 15 min data is lost and cannot be recovered.
This is why the interval between log backups should be the maximum allowable data loss for the database.
See sometimes it happens that when you file are on different physical drives and one of the drive crashed which is holding data but you log drive is working fine then you can take tail-log backup..... sql services shud be running for this... if your complete server is crashed then..... as Gail said.... you'll loose 15 mins of the data.
August 17, 2010 at 7:02 am
Thanks Ramji29. In this case, if some thing is in a transaction that transaction data will be rolled back rt? I don't know exactly. Please explain.
August 17, 2010 at 7:21 am
sqlusers (8/17/2010)
In this case, if some thing is in a transaction that transaction data will be rolled back rt? I don't know exactly.
In what case? If the DB crashes and you manage to take a tail-log backup? If the DB crashes and you can't take a tail-log backup (restoring to last normal log backup)?
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
August 17, 2010 at 7:33 am
opps.. if i can able to take tail backup.
August 17, 2010 at 7:39 am
As with restoring any backup, the DB will be transactionally consistent once restored. If a transaction did not commit by the time the backup finished, that transaction will not reflect in the restored database
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
August 17, 2010 at 7:43 am
Thanks Gail sharing all good info. 🙂
August 17, 2010 at 7:44 am
sqlusers (8/17/2010)
Thanks Ramji29. In this case, if some thing is in a transaction that transaction data will be rolled back rt? I don't know exactly. Please explain.
its more like whatever commited transactions are there in backup they will be roll forward and incomplete tran like what Gail said will be rollbacked and will reflect in the next log backup...
Hope this clears your doubt.
Rohit
August 17, 2010 at 7:49 am
its more like whatever commited transactions are there in backup they will be roll forward and incomplete tran like what Gail said will be rollbacked and will reflect in the next log backup...
Hope this clears your doubt.
Rohit
Yes.. Thanks Rohit.
Viewing 12 posts - 1 through 11 (of 11 total)
You must be logged in to reply to this topic. Login to reply