In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains how to use adrci command to manage ADR related logs in oracle. Interested friends may wish to take a look. The method introduced in this paper is simple, fast and practical. Let Xiaobian take you to learn "how to use adrci command in oracle to manage ADR related logs"!
Since Oracle Database 11g Release 1, all traces, incident dumps and packages, alert logs, health monitoring reports, core dumps, and more are stored in ADR, a file-based repository that provides database diagnostic data. It uses a unified catalog structure for multiple instances and multiple products and stores them outside of any database. Its position is set by the DIAGNOSTIC_DEST initialization parameter. If this parameter is omitted or left blank, the database is set DIAGNOSTIC_DEST at startup as follows: DIAGNOSTIC_DEST is set to $ORACLE_BASE if the environment variable ORACLE_BASE is set. If the environment variable ORACLE_BASE is not set, DIAGNOSTIC_DEST is set to $ORACLE_HOME/log.
adrci command can be used to manage ADR related logs,.trc,.trm files no longer need to manually or write scripts to clean up regularly, use adrci to achieve automatic cleaning:
[oracle@prodb ~]$ adrciADRCI: Release 11.2.0.4.0 - Production on Thu May 31 14:32:48 2018Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.ADR base = "/u01"adrci> help HELP [topic] Available Topics: CREATE REPORT ECHO EXIT HELP HOST IPS PURGE RUN SET BASE SET BROWSER SET CONTROL SET ECHO SET EDITOR SET HOMES | HOME | HOMEPATH SET TERMOUT SHOW ALERT SHOW BASE SHOW CONTROL SHOW HM_RUN SHOW HOMES | HOME | HOMEPATH SHOW INCDIR SHOW INCIDENT SHOW PROBLEM SHOW REPORT SHOW TRACEFILE SPOOL There are other commands intended to be used directly by Oracle, type "HELP EXTENDED" to see the listadrci>
1. Show adr_home
adrci> show homesADR Homes: diag/tnslsnr/prodb/listenerdiag/rdbms/prodb/prodbdiag/clients/user_oracle/host_3001804591_80
2. Specify adr_home
adrci> set home diag/rdbms/prodb/prodbadrci> show homesADR Homes: diag/rdbms/prodb/prodb
3. Display alter files
adrci> show alert #press q to exit adrci> show alert -tail 10 #Show last 10 lines adrci> show alert -tail 10 #tail -f alert_sid.logadrci> show alert -p "message_text like '%ORA%'"
3. Display alarm event
adrci> show incidentadrci> show incident -mode detailadrci> show incident -mode detail -p "incident_id=123"
4. display problems
adrci> show problem
5. Delete incident 14400=60min2410 10 days ago
adrci> purge -age 14400 -type incident
6. Generate diagnostic package
Create logical package
adrci> ips create package incident 373adrci> ips add incident 168 package 1
Output Physical Package
adrci>ips generate package 1 in /home/oracle
The generated package can be submitted to SR for diagnosis
7. Set trc, trm log retention days to 5-7 days. hours after equal sign
adrci> set control (SHORTP_POLICY = 120); adrci> set control (LONGP_POLICY = 168); At this point, I believe that everyone has a deeper understanding of "how to use adrci command in oracle to manage ADR related logs", so let's actually operate it! Here is the website, more related content can enter the relevant channels for inquiry, pay attention to us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.