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.

Comments

Popular posts from this blog

Installing DBMS_JAVA package in Oracle and calling UTL_DBWS web services through Oracle database

Starting background process GTX4 and GLOBAL_TXN_PROCESSES

upgrade database oracle 10g to oracle 11g