ORACLE_ recording operation of some common instructions

## ORACLE restart
`
sqlplus / AS sysdba;
the shutdown load immediate;
the Startup Mount;
the ALTER Database Open;
`
## start and stop listening
`
lsnctl STOP / Start
`
## ORACLE log cleaning
### archive log purge
`
RMAN
Connect target /
CROSSCHECK ARCHIVELOG All;
the delete expired The ARCHIVELOG All;
dELETE ARCHIVELOG ALL COMPLETED the BEFORE 'SYSDATE-7';
`

### cleanup adump directory (audit files, you can not delete a limited role, occupy less space)
#### file catalog
`
Show the Parameter the AUDIT_FILE_DEST
`
#### delete
`
cd / u01 / App / the Oracle / ADMIN / duanxindb / adump
. +7 -mtime the Find -name "* .aud" | xargs RM -f
`
### cleanup trace file
#### file catalog
`
Show the Parameter the BACKGROUND_DUMP_DEST
`
#### to delete the file
`
the Find -mtime +7 -name" * .trc "| xargs RM -f.
The Find -mtime +7 -. name "* .trm" | xargs RM -f
`
### clean up XML log file
#### file catalog
`
$ ORACLE_BASE / diag / the RDBMS / $ the DB_UNIQUE_NAME / the ORACLE_SID / Alert
`
#### to delete the file
`
the Find. +7 -name -mtime "log _ * xml." | xargs RM -f
`
### clean up XML log file
#### file catalog
`
$ ORACLE_BASE / diag / tnslsnr / NODE_NAME / listener / Alert
`
#### delete files
`
. +7 -mtime the Find -name" * _ log xml. "| xargs -f RM

Guess you like

Origin blog.csdn.net/u011420410/article/details/93900247