Monday 17 July 2017

DELETE Archive Logs using RMAN

In DC and DR environment where RAC and Data Guard implemented. Delete old / applied archive logs files to create space on archive log mount point.

Steps to delete archive files. 
1. Check archive log sequence on Primary Database.

On DC Machine:-
===========

SQL> archive log list;
Database log mode              Archive Mode
Automatic archival             Enabled
Archive destination            +ORA_ARCH
Oldest online log sequence     28006
Next log sequence to archive   28008
Current log sequence           28008




2. Check applied archive log sequence on DR database. 

ON DR Machine:
===========

SQL> select thread#,max(sequence#) from gv$archived_log where applied='YES' group by thread#;
   THREAD# MAX(SEQUENCE#)
---------- --------------
         1          28006
         2          23353


3. Connect RMAN on DC Database Machine.

rman target /


4. Here, We are deleting archive log till 1 days back from current date time. This command will release space on DC database.

delete noprompt archivelog until time 'SYSDATE - 1';

5. Repeat the above step on DR database as well to release space.

rman target /

delete noprompt archivelog until time 'SYSDATE - 1';




No comments:

Post a Comment

Jenkins Startup and Configuration

Steps to setup jenkins on ubuntu:- -After installation. check the jenkins services running on not on the server. sudo service jenk...