configuring archive and backup

1. Log on the target server and find out database is in archive log or not :-

Export ORACLE_SID=<database_name>
Sqlplus / as sysdba
SQL> archive log list;
Database log mode              No Archive Mode
Automatic archival             Disabled

2. Create respective directories for backup in the name of database on the backup location and grant permission on it .

mkdir –P /backup/$ORACLE_SID/flash_recovery_area

chmod –R 777 /backup/$ORACLE_SID/flash_recovery_area

chown –R oracle:oinstall /backup/$ORACLE_SID/flash_recovery_area

3. Configure database in archive log, recovery area ,recovery location  :-

SQL>create pfile from spfile;
(take backup of pfile)

SQL> select * from v$recovery_file;
(Here none of the datafile should be there)

SQL> show parameter recovery_file_dest;

SQL> alter system set log_archive_dest_1='LOCATION=/backup/$ORACLE_SID/flash_recovery_area' scope = both;

SQL> alter system set db_recovery_file_dest_size=(db_size+archivelog+20%);

SQL>shutdown immediate;

SQL> startup mount;

SQL>alter database archivelog;

SQL> alter database open;

check , your database is in archive log mode.

SQL> archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled

4.     Configure auto backup through crontab.


Popular posts from this blog

finding fragmentation at table level and tablespace level in Oracle and steps to remove them

ORA-01153: an incompatible media recovery is active standby database oracle

ORA-16191: Primary log shipping client not logged on standby