Oracle 11g ADRCI Tool

Source: Internet
Author: User

In Oracle, various components (listeners, database instances, and various configuration tools) are installed and run with Log and Trace files generated. Before Oracle 11g, the information was scattered in the Oracle component directory. At 11g, Oracle introduced the concept of ADR (Automatic Diagnostic Repository), which included the information in the management.
 
1. ADRCI
 
The ADR_HOME directory is provided in the 11g, in which various types of logs and tracing information are stored in a centralized manner.
 
 
[Oracle @ bspdev app] $ ls-l
Total 24
Drwxrwxr-x. 3 oracle oinstall 4096 Mar 25 2011 11.2.0
Drwxr-x ---. 3 oracle oinstall 4096 Apr 1 2011 admin
Drwxr-x ---. 5 oracle oinstall 4096 Apr 1 2011 runtime toollogs
Drwxr-xr-x. 2 oracle oinstall 4096 Mar 31 2011 checkpoints
Drwxrwxr-x. 6 oracle asmadmin 4096 Apr 1 2011 diag
Drwxrwxr-x. 76 oracle oinstall 4096 Feb 23 oracle
 
[Oracle @ bspdev diag] $ ls
Asm asmtool rdbms tnslsnr
[Oracle @ bspdev diag] $ cd rdbms
[Oracle @ bspdev rdbms] $ ls
Ora11g
[Oracle @ bspdev rdbms] $ cd ora11g
[Oracle @ bspdev ora11g] $ ls
I _1.mif ora11g
[Oracle @ bspdev ora11g] $ cd ora11g
[Oracle @ bspdev ora11g] $ ls
Alert cdump hm incident incpkg ir lck metadata stage sweep trace
 
 
There is a diag folder under the $ ORACLE_BASE Directory, which stores logs of important components such as asm, asmtool, rdbms, and TNS listener. Each component is organized by alarm files, tracking files, dump, and other categories.
 
The Diag directory actually forms an output log information database, where all diagnostic information and log information are classified and saved. In addition, Oracle has released an ADRCI tool that allows you to use unified interface commands to check logs and manage diagnostic information.
 
 
Ora11g:/home/ora11g> adrci
 
ADRCI: Release 11.2.0.1.0-Production on Mon May 21 13:56:53 2012
 
Copyright (c) 1982,200 9, Oracle and/or its affiliates. All rights reserved.
 
ADR base = "/nbsdu01/app/oracle"
Adrci>
 
 
Through the command line adrci, we can manage diagnostic information in a unified command line.
 
 
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 list
 
 
2. view log information
 
When using adrci, pay attention to the current homepath problem. Each Oracle component has a diagnostic information directory.
 
 
ADR base = "/nbstu01/app/oracle"
Adrci> show homepath
ADR Homes:
Diag/rdbms/nbstest/NBSTEST
Diag/tnslsnr/P550_05_LC/listener
 
 
Note that if you want to go to the specific component to view the log information and diagnostic information, you must first set the homepath to a component directory. The preceding two ADR home components are the Oracle database and listener components. If you want to view the database logs, you need the following configuration.
 
 
Adrci> set homepath diag/rdbms/nbstest/NBSTEST
 
Adrci> show alert-TAIL 10
15:37:59. 861000 + 08: 00
Thread 1 cannot allocate new log, sequence 2319
Private strand flush not complete
Current log #2 seq #2318 mem #0:/nbstdata01/oradata/NBSTEST/redo02a. log
Current log #2 seq #2318 mem #1:/nbstdata02/oradata/NBSTEST/redo02b. log
15:38:02. 931000 + 08: 00
Thread 1 advanced to log sequence 2319 (LGWR switch)
Current log #1 seq #2319 mem #0:/nbstdata01/oradata/NBSTEST/redo01a. log
Current log #1 seq #2319 mem #1:/nbstdata02/oradata/NBSTEST/redo01b. log
15:49:34. 382000 + 08: 00
Thread 1 cannot allocate new log, sequence 2320
Private strand flush not complete
Current log #1 seq #2319 mem #0:/nbstdata01/oradata/NBSTEST/redo01a. log
Current log #1 seq #2319 mem #1:/nbstdata02/oradata/NBSTEST/redo01b. log
15:49:37. 420000 + 08: 00
Thread 1 advanced to log sequence 2320 (LGWR switch)
Current log #3 seq #2320 mem #0:/nbstdata01/oradata/NBSTEST/redo03a. log
Current log #3 seq #2320 mem #1:/nbstdata02/oradata/NBSTEST/redo03b. log
16:03:48. 579000 + 08: 00
Thread 1 cannot allocate new log, sequence 2321
Private strand flush not complete
Current log #3 seq #2320 mem #0:/nbstdata01/oradata/NBSTEST/redo03a. log
Current log #3 seq #2320 mem #1:/nbstdata02/oradata/NBSTEST/redo03b. log
16:03:51. 656000 + 08: 00
Thread 1 advanced to log sequence 2321 (LGWR switch)
Current log #2 seq #2321 mem #0:/nbstdata01/oradata/NBSTEST/redo02a. log
Current log #2 seq #2321 mem #1:/nbstdata02/oradata/NBSTEST/redo02b. log
 
 
The above command show alert shows the alert information of the database component log. Note: here we can also use the tail-n command, but the following number indicates the number of log entries, rather than the number of log lines!

  • 1
  • 2
  • Next Page

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.