As DBA We all know backups play an important role in business operations but in some case backup also get corporate than we can not make database alive. To solve this kind of issue Oracle recommends us to keep a database in archive log mode.

To preserve redo information, create archived copies of redo log files by performing the following steps.

We have to work on three steps to know more about the archive redo log.

  • Specify archive log file naming conventions.
  • Specify one or more archive log file locations.
  • Switch the database to archive log mode/  noarchive log mode.

Note: – By default Oracle database is in no archive log mode.

There are some conditions in which archive redo log generates.

  • commit
  • 1/3 redolog
  • Log switch
  • Manually log switch

 

  • Switch the database to archive log mode.

Connect with database with “sysdba”

Confirm the status of the instance with the help of command.

First, check the status of the instance.

If the database is running or up. We must first shut down it with the given command.

  • Specify archive log file naming conventions.

To know the format of archivelog

To set format of archive

%s log sequence number

%S log sequence number, zero filled

%t thread number

%T thread number, zero filled

%a  activation ID

%d  database ID

%r  resetlogs ID that ensures unique names are constructed for the archived log files across multiple incarnations of the database

Note: – All static parameters apply on next instance startup.

  • Specify one or more archive log file locations.

Leave a Reply

Your email address will not be published. Required fields are marked *