07-10-2014 12:59 AM
Hi
What is the exact requirement of a log backup(log backup policy) in Sql and Oracle ?
Is that only required for truncate the logs or any role in the database restore ?
Solved! Go to Solution.
07-10-2014 02:40 AM
Hi Ajith,
In the field of databases in computer science, a transaction log (also transaction journal, database log, binary log or audit trail) is a history of actions executed by a database management system to guarantee consistency over crashes or hardware failures.
Physically, a log is a file of updates done to the database, stored in stable storage. If, after a start, the database is found in an inconsistent state or not been shut down properly, the database management system reviews the database logs for uncommitted transactions and rolls back the changes made by these transactions. Additionally, all transactions that are already committed but whose changes were not yet materialized in the database are re-applied. Both are done to ensure consistency of transactions.
So you'll see that the log is a journal of all the transactions that should be contained in the database. By backing up these logs along with the database it is possible to restore the database to previous states.
Your full backup might be run at 8pm every night, but if you have transaction log backup running every hours in between it possible to restore your database to any hourly increment. You could restore to
And yes, it is used to truncate logs if configured.
I hope that helps.
07-10-2014 01:14 AM
log backup are used for ensuring consistency of a database when using online backups.
Depending on the database, a worst case scenario is a stop of operation, if the archive log grow to large. It therefor important to archive the log files periodically. The is no recommended frequency for the archive to run, it a estimate that need to be done based on business requirement and service level agreement.
07-10-2014 02:40 AM
Hi Ajith,
In the field of databases in computer science, a transaction log (also transaction journal, database log, binary log or audit trail) is a history of actions executed by a database management system to guarantee consistency over crashes or hardware failures.
Physically, a log is a file of updates done to the database, stored in stable storage. If, after a start, the database is found in an inconsistent state or not been shut down properly, the database management system reviews the database logs for uncommitted transactions and rolls back the changes made by these transactions. Additionally, all transactions that are already committed but whose changes were not yet materialized in the database are re-applied. Both are done to ensure consistency of transactions.
So you'll see that the log is a journal of all the transactions that should be contained in the database. By backing up these logs along with the database it is possible to restore the database to previous states.
Your full backup might be run at 8pm every night, but if you have transaction log backup running every hours in between it possible to restore your database to any hourly increment. You could restore to
And yes, it is used to truncate logs if configured.
I hope that helps.
07-10-2014 11:25 PM
Thanks Rian. Your post is very much informative.
07-11-2014 05:36 AM
Hi Ajith, please mark the solution, not your own post.
Thanks