Consider a situation, when you do not have the recent backup of your database. Let me explain a bit.
Suppose you took a backup of the database around 2 or more hours ago but the database is up and running and constantly having frequent transactions. If any disaster occurs at this very moment you will loose all the data of this 2 or more hours.
Now suppose we have the recent archived log backup. How is this gonna help?
So now we have 2 things
1. Old database backup (2 hours old)
2. Recent archived log backup ( Very recent)
We will able to restore and recover our database up to the record of the last archived log backup. And therefore data-loss will be minimum. This is basically called Roll-forward recovery that is to restore a damaged database to the most recent state before a failure occurred.
The restore and recover portion is same as the RMAN backup recovery of the database. Same steps.
Now how do we actually maintain this process of backing up the archived logs. Have a look on the following process.
RMAN> alter system switch logfile;
Basically we force a log switch with this command.
When we fire this, 2 more things happen
1. Checkpoint occurs
2. That currently active redo group is archived
We run this command depending upon the nos of the redo log groups, if we have 3 redo log groups we run this 3 times just to ensure.
Then we take the backup of archived logs using
RMAN> backup archivelog all;
And that's it.
Some companies/organizations take the archived log backup after every 15 mins or so, depending upon the frequency of transactions for that particular database.
P.S. Please keep in mind, that the database needs to be in mode. Well obviously. :)
That's all for now. Do not hesitate to correct or include any points or information that I have mentioned wrongly or missed completely. Your feedback is highly appreciated.
Thanks
Subhajit
Suppose you took a backup of the database around 2 or more hours ago but the database is up and running and constantly having frequent transactions. If any disaster occurs at this very moment you will loose all the data of this 2 or more hours.
Now suppose we have the recent archived log backup. How is this gonna help?
So now we have 2 things
1. Old database backup (2 hours old)
2. Recent archived log backup ( Very recent)
We will able to restore and recover our database up to the record of the last archived log backup. And therefore data-loss will be minimum. This is basically called Roll-forward recovery that is to restore a damaged database to the most recent state before a failure occurred.
The restore and recover portion is same as the RMAN backup recovery of the database. Same steps.
Now how do we actually maintain this process of backing up the archived logs. Have a look on the following process.
RMAN> alter system switch logfile;
Basically we force a log switch with this command.
When we fire this, 2 more things happen
1. Checkpoint occurs
2. That currently active redo group is archived
We run this command depending upon the nos of the redo log groups, if we have 3 redo log groups we run this 3 times just to ensure.
Then we take the backup of archived logs using
RMAN> backup archivelog all;
And that's it.
Some companies/organizations take the archived log backup after every 15 mins or so, depending upon the frequency of transactions for that particular database.
P.S. Please keep in mind, that the database needs to be in mode. Well obviously. :)
That's all for now. Do not hesitate to correct or include any points or information that I have mentioned wrongly or missed completely. Your feedback is highly appreciated.
Thanks
Subhajit