Oracle delete archive log operation

How does Oracle delete archived logs? ORA-00257

If the archived logs of the Oracle database are full, the database instance will be automatically shut down, and the database cannot be used normally. What should I do if the archived logs are full?

Tools/Materials

  • Oracle

method/step

  1. When the Oracle database archive space is full, when logging in to the database, an error as shown in the figure below will be displayed. If the error shown in the figure below occurs, the archive log must be full and the archive log needs to be deleted or moved.

  1. Connect to the database server, and log in to the database.

statement:

1):su - oracle

2):sqlplus / as sysdba

  1. First query the usage of Oracle archive space, the statement is as follows:

select * from V$FLASH_RECOVERY_AREA_USAGE;

As shown in the figure, if it shows more than 99%, it proves that the archive space is full and needs to be cleared.

  1. Enter oracle's rman mode: rman target / 

  1. 5

Use the delete statement to delete: delete archivelog until time 'sysdate-7';

Among them, sysdate-7 means to keep the archived logs for nearly seven days. If you want to keep the archived logs for nearly ten days, you need to change sysdate-7 to sysdate-10.

Delete all archived logs:

             delete archivelog all

Guess you like

Origin blog.csdn.net/qq_23135259/article/details/128847302