Get the App
SLTechnology News&Howtos  ›  Database  › 

Oracle cleanup, cleaning of some simple log files without downtime

Shulou Source: shulou.com Published: 2022-06-01 13:17:28 11月13日 Update

① cleanup / u01/app/oracle/diag/rdbms/orcl/orcl/incident

# su-oracle

$cd / u01/app/oracle/product/11.2.0/db_1/bin

$adrci

Show home

/ / multiple records were found *

Set homepath / diag/rdbms/orcl/orcl// forcibly sets the homepath* of the cleanup directory

Show home// confirms that home has only one record *

Show incident// checked the incident file and found that there were too many *

Purge-age 1440-type incident//24h70m=1440min in minutes *

Exit

② cleans up the adump directory

$sqlplus / as sysdba / / Link Library as dba *

SQL > show parameter audit_file_dest

/ / View the path where aud files are stored *

$find / u01/app/oracle/admin/orcl/adump-mtime + 3-name "* .aud" | xargs rm-f

③ cleans up trace files

$sqlplus / as sysdba SQL > show parameter background_dump_dest$find / u01/app/oracle/diag/rdbms/orcl/orcl/trace-mtime + 3-name "* .trc" | xargs rm-f$find / u01/app/oracle/diag/rdbms/orcl/orcl/trace-mtime + 3-name "* .trm" | xargs rm-f

④ cleans up xml logs

$find / u01/app/oracle/diag/rdbms/orcl/orcl/alert-mtime + 3-name "log_*.xml" | xargs rm-f

Tags: File directory log only multiple path identity mandatory Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Information Linux Docker Shulou Technology Xiaomi