Wednesday, July 31, 2013

Oracle 11g: Delete archive log

Case:
Database Instance cannot startup

 SQL> startup
ORACLE instance started.

Total System Global Area 1570009088 bytes
Fixed Size                  2228704 bytes
Variable Size            1291849248 bytes
Database Buffers          268435456 bytes
Redo Buffers                7495680 bytes
Database mounted.                      
ORA-03113: end-of-file on communication channel
Process ID: 13150                            
Session ID: 191 Serial number: 3             

check alter_<instance anme>.log

ORA-19815: WARNING: db_recovery_file_dest_size of 10737418240 bytes is 100.00% used, and has 0 remaining bytes available.

Startup DB instance in restrict mode

$ sqlplus / as sysdba
SQL> startup mount exclusive restrict

SQL> show parameter db_recovery_file%

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest                string      /usr2/app/oracle/fast_recovery_area
db_recovery_file_dest_size           big integer 10G

Open another console, and check the file size in /usr2/app/oracle/fast_recovery_area

Run RMAN to clean up archive logs
 RMAN nocatalog target / < <EOF
crosscheck backup;
crosscheck archivelog all;
delete noprompt expired archivelog all;
delete noprompt expired backup;
delete noprompt obsolete;
EOF
project.class.path
to force to delete archivelog
RMAN> delete noprompt force archivelog all;

Restart Databaes Instance
SQL> shutdown
SQL> startup







No comments:

Post a Comment