4

Hi I am new to Oracle Database . Using Oracle 11g R2

I want to know the purpose of archive logs created at archive log destination, how they are helpful in database backup.

Suppose I am having backup of Production database till "15-sept-14" and I want to restore on Development Database data till "20-sept-14" , how to restore data using backup files and archive logs.

  • Check if the database is in archivelogmode. In ARCHIVELOG mode, the database will make copies of all online redo logs after they are filled. Well by default database created in Oracle is in NOARCHIVELOG. Read some tips:- dba-oracle.com/concepts/archivelog_archived_redo_logs.htm – Enrique Oct 6 '14 at 7:33
  • Are you using rman to do your backups? – Philᵀᴹ Oct 6 '14 at 11:01
  • yes i am using rman for backup and restore process, please explain the second half of the question, i got the first part. – tanuj shrivastava Oct 6 '14 at 12:07
4

Seems like a good reason to visit the Oracle Documentation site. The 2-day dba documents are very good.

If your database is running in ARCHIVELOG mode, it copies all transactions to the archivelog destination. The transactions are always written to the redolog files but when they are full, they are only saved when running in archivelog mode. This enables you to restore your database to any point in time. This restore operation starts with restoring a full backup where you can apply the archives until you reach the point in time where you want to stop the recovery. For example, close before a table was dropped.

Normally production backups are made with the database online. Again, a reason to run your databases in archivelog mode. IF not running archivelog mode, in a disaster scenario you might loose all transactions made since the last backup. If your transactions are really important it could be smart to copy the archivedlog files to a second DC on a very regularly basis. How regularly depends on the cost of loosing transactions. If you can handle loosing one day, you copy daily, most sites copy a few times/hour or even use standby databases that receive the transactions in a near sync way.

In general you start restoring the database and perform a recovery until time. Normally we use rman to do this, something like

    rman
    run 
    {
    set until time to_date('20140914 14:22','yyyymmdd hh24:mi');
    restore database;
    recover database;
    }

when ready and not done a full media recovery, open the database with a reset logs option.

alter database open resetlogs;

To prevent nightmares from happening, it might be smarter to get involvement from a dba.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.