Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

ADRCI

2025-04-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

ADRCI tool is a new tool just introduced by Oracle11g, which is mainly used to manage alert files, trace files, dump files, health supervisor reports and so on.

This article provides a brief introduction to ADRCI tools.

Anyone who has used 11g will find that the location of alert files and trace files in 11g has changed. Changed from the original ORACLE_BASE/admin/INSTANCE_NAME directory to the ORACLE_BASE/diag/rdbms/DBNAME/INSTANCE_NAME directory.

Oracle modified this parameter setting that has not been modified across multiple versions because Oracle introduced ADRCI in 11g. This tool can manage alert files, background trace files, user trace files, dump files and so on for ASM instances and multiple database instances.

And this tool can quickly query all trace files related to errors and package these files into a zip file to provide problem-related information to Oracle technical support.

Take a look at the simple commands of the ADRCI tool:

C:Documents and Settingsytk > adrci

ADRCI: Release 11.1.0.6.0-Beta on Sunday March 29 21:23:57 2009

Copyright (c) 1982, 2007, Oracle. All rights reserved.

ADR base = "e:oracle"

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

HELP lists all the commands of the ADRCI tool, and you can also list the specific syntax of this command by adding individual commands to HELP, such as:

Adrci > HELP IPS

HELP IPS [topic]

Available Topics:

ADD

ADD FILE

ADD NEW INCIDENTS

CHECK REMOTE KEYS

COPY IN FILE

COPY OUT FILE

CREATE PACKAGE

DELETE PACKAGE

FINALIZE PACKAGE

GENERATE PACKAGE

GET MANIFEST

GET METADATA

GET REMOTE KEYS

PACK

REMOVE

REMOVE FILE

SET CONFIGURATION

SHOW CONFIGURATION

SHOW FILES

SHOW INCIDENTS

UNPACK FILE

USE REMOTE KEYS

Adrci > HELP IPS ADD

Usage: IPS ADD

[INCIDENT | PROBLEM | PROBLEMKEY |

SECONDS | TIME TO]

PACKAGE

Purpose: Add incidents to an existing package.

Arguments:

: ID of incident to add to package contents.

: ID of problem to add to package contents.

: Problem key to add to package contents.

: Number of seconds before now for adding package contents.

: Start of time range to look for incidents in.

: End of time range to look for incidents in.

Example:

Ips add incident 22 package 12

Adrci > HELP SHOW PROBLEM

Usage: SHOW PROBLEM [- p]

[- last |-all]

[- orderby (field1, field2,...) [ASC | DSC]]

Purpose: Show the problem information. By default, this command will

Only show the last 50 problems.

Options:

[- p]: The predicate string must be double-quoted.

The field names that users can specify in the predicate are:

PROBLEM_ID number

PROBLEM_KEY text (5505)

FIRST_INCIDENT number

FIRSTINC_TIME timestamp

LAST_INCIDENT number

LASTINC_TIME timestamp

IMPACT1 number

IMPACT2 number

IMPACT3 number

IMPACT4 number

SERVICE_REQUEST text (64)

BUG_NUMBER text (64)

[- last |-all]: This option allows users to either select

The last of qualified problems to show or to show all the

Qualified problems. If this option is not specified, this command

Will only show 50 incidents.

[- orderby (field1, field2,...) [ASC | DSC]]: If specified, the results

Will be ordered by the specified fields' values. By default, it will be

In the ascending order unless "DSC" is specified. Note that the field

Names that can be specified here are from the "PROBLEM" relation.

Examples:

Show problem

Show problem-p "problem_id > 123"

Here are a few small examples of errors in the query database:

Adrci > show base

ADR base is "e:oracle"

Adrci > show home

ADR Homes:

Diagclientsuser_systemhost_3414944083_11

Diagclientsuser_unknownhost_3414944083_11

Diagclientsuser_unknownhost_411310321_11

Diagclientsuser_ytkhost_3414944083_11

Diagrdbmsytk1110ytk1110

Diagtnslsnrytk-thinkpadlistener

Adrci > set home diagrdbmsytk1110ytk1110

Adrci > show alert-tail 5

2009-02-25 22 purl 51purl 17.640000 + 08:00

Completed: alter database open

2009-02-25 22 purl 55 purl 26.171000 + 08:00

Starting background process CJQ0

CJQ0 started with pid=7, OS id=14428

2009-02-25 22 purl 55 purl 49.796000 + 08:00

Errors in file e:oraclediagrdbmsytk1110ytk1110traceytk1110_j008_15220.trc

:

ORA-12012: error in automatic execution of job 11689

ORA-01403: no data found

2009-02-25 23 purl 20 purl 39.828000 + 08:00

Thread 1 advanced to log sequence 75

Current log# 3 seq# 75 mem# 0: E:ORACLEORADATAYTK111REDO03.LOG

2009-02-26 08 purl 31purl 51.296000 + 08:00

*

Fatal NI connect error 12638, connecting to:

(DESCRIPTION= (LOCAL=YES) (ADDRESS= (PROTOCOL=beq)

VERSION INFORMATION:

TNS for 32-bit Windows: Version 11.1.0.6.0-Production

Oracle Bequeath NT Protocol Adapter for 32-bit Windows: Version 11.1.0.6.0-Pro

Duction

Time: 26-February-2009 08:31:51

Tracing not turned on.

Tns error struct:

Ns main err code: 12638

TNS-12638: * clear search failed

Ns secondary err code: 0

Nt main err code: 0

Nt secondary err code: 0

Nt OS err code: 0

In addition to the above interactive approach, you can also invoke scripts or specify a series of commands to execute commands in batches:

C:Documents and Settingsytk > adrci-help

Syntax:

Adrci [- help] [script=script_filename]

[exec = "one_command [; one_command;...]"]

Options Description (Default)

-

Script script file name (None)

Help help on the command options (None)

Exec exec a set of commands (None)

-

For example:

C:Documents and Settingsytk > adrci exec= "show base;show home;set home diagrdb

Msytk1110ytk1110;show home "

ADR base is "e:oracle"

ADR Homes:

Diagclientsuser_systemhost_3414944083_11

Diagclientsuser_unknownhost_3414944083_11

Diagclientsuser_unknownhost_411310321_11

Diagclientsuser_ytkhost_3414944083_11

Diagrdbmsytk1110ytk1110

Diagtnslsnrytk-thinkpadlistener

ADR Homes:

Diagrdbmsytk1110ytk1110

Among the many commands in ADRCI, the more commonly used commands include SHOW INCIDENT and SHOW PROBLEM.

Look at the use of these two commands:

[oracle@yangtk ~] $adrci

ADRCI: Release 11.1.0.6.0-Beta on Sat Feb 14 07:40:14 2009

Copyright (c) 1982, 2007, Oracle. All rights reserved.

ADR base = "/ data/oracle"

Adrci > show home

ADR Homes:

Diag/tnslsnr/yangtk/listener

Diag/clients/user_oracle/host_1761010651_11

Diag/rdbms/ora11g_p/ora11g

Diag/rdbms/ora11g/ora11g

Adrci > set home diag/rdbms/ora11g_p/ora11g

Adrci > show incident

ADR Home = / data/oracle/diag/rdbms/ora11g_p/ora11g:

*

INCIDENT_ID PROBLEM_KEY CREATE_TIME

-

178263 ORA 4031 2008-08-06 071822.545029 + 08:00

178247 ORA 4031 2008-08-06 07 18 purl 34.820273 + 08:00

178239 ORA 4031 2008-08-06 07 18 purl 22.504526 + 08:00

178223 ORA 4031 2008-08-06 0718purl 24.815544 + 08:00

178143 ORA 4031 2008-08-06 07 purl 18 purl 35.246630 + 08:00

177075 ORA 4031 2008-08-05 1458 purl 35.377256 + 08:00

177067 ORA 4031 2008-08-05 1458 purl 58.782595 + 08:00

177051 ORA 4031 2008-08-05 1458 purl 35.422671 + 08:00

177043 ORA 4031 2008-08-05 1458 purl 35.402265 + 08:00

176939 ORA 4031 2008-08-05 1458 purl 54.864399 + 08:00

175859 ORA 4031 2008-08-05 13 58 purl 50.980910 + 08:00

175858 ORA 4031 2008-08-05 13 58 purse 41.125870 + 08:00

175826 ORA 4031 2008-08-05 13 58 purl 42.802084 + 08:00

175738 ORA 4031 2008-08-05 13 58 purl 44.351160 + 08:00

174657 ORA 4031 2008-08-05 13 46 purl 41.399981 + 08:00

174656 ORA 4031 2008-08-05 1346 purl 38.378564 + 08:00

172231 ORA 7445 [ksldclt_cln () + 08:00] 2008-08-04 22 07 purl 06.387781 + 08:00

172212 ORA 4031 2008-08-04 22 purl 03purl 46.338443 + 08:00

172211 ORA 4031 2008-08-04 22 purl 03purl 40.771874 + 08:00

172204 ORA 4031 2008-08-04 22 purl 03purl 46.546782 + 08:00

172203 ORA 4031 2008-08-04 22 purl 03purl 38.053562 + 08:00

172187 ORA 4031 2008-08-04 22 purl 03purl 42.360428 + 08:00

169786 ORA 4031 2008-07-30 02 36 18.482753 + 08:00

169785 ORA 4031 2008-07-30 02Groupe 36 ORA 15.666044 + 08:00

166151 ORA 603 2008-07-27 17 21 purl 42.556972 + 08:00

166129 ORA 603 2008-07-27 15 purl 35 purl 11.931255 + 08:00

166039 ORA 4031 2008-07-27 15 15 21 purl 42.574517 + 08:00

166011 ORA 600 [kebm_mmon_main_1] 2008-07-27 17 52purl 24.860044 + 08:00

166009 ORA 4031 2008-07-27 15 15 21 purl 51.290947 + 08:00

166008 ORA 4031 2008-07-27 15 15 21 purl 45.393293 + 08:00

166007 ORA 4031 2008-07-27 15 15 21 purl 42.666587 + 08:00

165999 ORA 4031 2008-07-27 15 15 21 purl 52.049840 + 08:00

161323 ORA 4031 2008-07-01 15 20 purl 51.038193 + 08:00

161322 ORA 4031 2008-07-01 15 20 purl 50.132755 + 08:00

161321 ORA 4031 2008-07-01 15 20 purl 44.286697 + 08:00

161257 ORA 4031 2008-07-01 15 20 purl 48.717581 + 08:00

161185 ORA 4031 2008-07-01 15 20 purl 44.285834 + 08:00

160110 ORA 4031 2008-06-26 04 Fringe 1527.704828 + 08:00

160102 ORA 4031 2008-06-26 04 Suzhou 1525.346548 + 08:00

160086 ORA 4031 2008-06-26 04 purge 15 purl 28.601534 + 08:00

160070 ORA 4031 2008-06-26 04 Virgo 15 purl 26.756150 + 08:00

159974 ORA 4031 2008-06-26 04 purl 1515 24.147550 + 08:00

156469 ORA 4031 2008-05-17 0555 purl 11.601467 + 08:00

156453 ORA 4031 2008-05-17 0555 purl 21.028975 + 08:00

156366 ORA 600 [qerghFetch:inc] 2008-05-17 08 purl 10 purl 01.178942 + 08:00

156365 ORA 600 [qerghFetch:inc] 2008-05-17 0515 02purl 50.616159 + 08:00

156334 ORA 4031 2008-05-17 05 purl 55 purl 15.819541 + 08:00

156333 ORA 4031 2008-05-17 05 purl 55 purl 14.628802 + 08:00

156317 ORA 4031 2008-05-17 05! 55 purl! 11.642549 + 08:00

153748 ORA 7445 [kokacau () + 683] 2008-02-28 05 purl 10 purl 44.389655 + 08:00

50 rows fetched

Adrci > show problem

ADR Home = / data/oracle/diag/rdbms/ora11g_p/ora11g:

*

PROBLEM_ID PROBLEM_KEY LAST_INCIDENT LASTINC_TIME

-

7 ORA 4031 178240 2008-08-06 07 purl 1815 43.590263 + 08:00

12 ORA 7445 [ksldclt_cln () + 08:00] 172231 2008-08-04 22 purl 07 purl 06.387781 + 08:00

11 ORA 600 [kebm_mmon_main_1] 166011 2008-07-27 17 purl 52purl 24.860044 + 08:00

5 ORA 603 166151 2008-07-27 17 21 purl 42.556972 + 08:00

10 ORA 600 [qerghFetch:inc] 156366 2008-05-17 08 10 purl 01.178942 + 08:00

9 ORA 600 [qmxiUnpPacked2] 152793 2008-02-28 06 purl 08 purl 31.659320 + 08:00

8 ORA 7445 [kokacau () + 683] 153748 2008-02-28 05 purl 10 purl 44.389655 + 08:00

6 ORA 1578 123833 2007-11-24 02 purl 49 purl 43.837675 + 08:00

4 ORA 600 [krhpfh_03-1208] 117944 2007-11-09 00purl 48purl 49.678494 + 08:00

3 ORA 600 [prssptoa2] 96380 2007-10-18 00 purl 53 purl 25.480274 + 08:00

2 ORA 600 [kkdcacr: ptn_kxcp] 85602 2007-10-11 22 purl 01purl 08.539854 + 08:00

1 ORA 7445 [koioapm () + 254] 14503 2007-09-06 02 purl 50 purl 52.122404 + 08:00

12 rows fetched

Oracle regards each error message as an INCIDENT. Through SHOW INCIDENT, you can easily understand all the error messages contained in the alert file, as well as the time at which they occurred.

The result of SHOW PROBLEM is clearer, merging the same error messages according to the error number of Oracle. With this result, you can see what different error messages have occurred in the database.

Whether it is a SHOW PROBLEM, SHOW INCIDENT, or SHOW ALERT command, Oracle supports customizing query results, such as PROBLEM that returns only ORA-600 errors:

Adrci > show problem-p "problem_key like'% 600%'"

ADR Home = / data/oracle/diag/rdbms/ora11g_p/ora11g:

*

PROBLEM_ID PROBLEM_KEY LAST_INCIDENT LASTINC_TIME

-

11 ORA 600 [kebm_mmon_main_1] 166011 2008-07-27 17 purl 52purl 24.860044 + 08:00

10 ORA 600 [qerghFetch:inc] 156366 2008-05-17 08 10 purl 01.178942 + 08:00

9 ORA 600 [qmxiUnpPacked2] 152793 2008-02-28 06 purl 08 purl 31.659320 + 08:00

4 ORA 600 [krhpfh_03-1208] 117944 2007-11-09 00purl 48purl 49.678494 + 08:00

3 ORA 600 [prssptoa2] 96380 2007-10-18 00 purl 53 purl 25.480274 + 08:00

2 ORA 600 [kkdcacr: ptn_kxcp] 85602 2007-10-11 22 purl 01purl 08.539854 + 08:00

6 rows fetched

SHOW INCIDENT also supports more detailed display, such as:

Adrci > show incident-mode detail-p "incident_id=166011"

ADR Home = / data/oracle/diag/rdbms/ora11g_p/ora11g:

*

* * *

INCIDENT INFO RECORD 1

* * *

INCIDENT_ID 166011

STATUS ready

CREATE_TIME 2008-07-27 17 52V 24.860044 + 08:00

PROBLEM_ID 11

CLOSE_TIME

FLOOD_CONTROLLED none

ERROR_FACILITY ORA

ERROR_NUMBER 600

ERROR_ARG1 kebm_mmon_main_1

ERROR_ARG2 36

ERROR_ARG3

ERROR_ARG4

ERROR_ARG5

ERROR_ARG6

ERROR_ARG7

ERROR_ARG8

SIGNALLING_COMPONENT

SIGNALLING_SUBCOMPONENT

SUSPECT_COMPONENT

SUSPECT_SUBCOMPONENT

ECID

IMPACTS 0

PROBLEM_KEY ORA 600 [kebm_mmon_main_1]

FIRST_INCIDENT 166011

FIRSTINC_TIME 2008-07-27 17 52V 24.860044 + 08:00

LAST_INCIDENT 166011

LASTINC_TIME 2008-07-27 17 52V 24.860044 + 08:00

IMPACT1 0

IMPACT2 0

IMPACT3 0

IMPACT4 0

KEY_NAME SID

KEY_VALUE 157.1

KEY_NAME Client ProcId

KEY_VALUE oracle@yangtk.ytk-thinkpad (MMON). 2774 million 13056208

KEY_NAME ProcId

KEY_VALUE 14.1

OWNER_ID 1

INCIDENT_FILE / data/oracle/diag/rdbms/ora11g_p/ora11g/trace/ora11g_mmon_2774.trc

OWNER_ID 1

INCIDENT_FILE / data/oracle/diag/rdbms/ora11g_p/ora11g/incident/incdir_166011/ora11g_mmon_2774_i166011.trc

1 rows fetched

Using the IPS command of ADRCI, you can package the trace file related to the problem into a zip file to provide to the Oracle support staff.

Adrci > help ips

HELP IPS [topic]

Available Topics:

ADD

ADD FILE

ADD NEW INCIDENTS

CHECK REMOTE KEYS

COPY IN FILE

COPY OUT FILE

CREATE PACKAGE

DELETE PACKAGE

FINALIZE PACKAGE

GENERATE PACKAGE

GET MANIFEST

GET METADATA

GET REMOTE KEYS

PACK

REMOVE

REMOVE FILE

SET CONFIGURATION

SHOW CONFIGURATION

SHOW FILES

SHOW INCIDENTS

UNPACK FILE

USE REMOTE KEYS

IPS includes many commands, and introduces two common packaging methods.

The easiest way is to use the PACK command directly:

Adrci > set home diag/rdbms/ora11g_p/ora11g

Adrci > show problem-p "problem_id = 1"

ADR Home = / data/oracle/diag/rdbms/ora11g_p/ora11g:

*

PROBLEM_ID PROBLEM_KEY LAST_INCIDENT LASTINC_TIME

-

1 ORA 7445 [koioapm () + 254] 14503 2007-09-06 02 purl 50 purl 52.122404 + 08:00

1 rows fetched

Adrci > ips pack problem 1

Generated package1 infile / home/oracle/IPSPKG_20090215012523_COM_1.zip, mode complete

Another way is to take advantage of the CREATE PACKAGE command, then add the relevant INCIDENT, and finally generate the PACKAGE through the GENERATE PACKAGE command.

Adrci > ips create package

Created package 2 without any contents, correlation level typical

Adrci > ips create package problemkey "ORA 7445 [koioapm () + 254]"

Created package 3 based on problem key ORA 7445 [koioapm () + 254], correlation level typical

Adrci > ips add incident 172231 package 3

Added incident 172231 to package 3

Adrci > ips add file / trace/ora11g_ora_4582.trc package 3

Added file / trace/ora11g_ora_4582.trc to package 3

Adrci > ips generate package 3

Generated package3 infile / home/oracle/IPSPKG_20090215013006_COM_1.zip, mode complete

You can also append files to PACKAGE 3:

Adrci > ips add new incidents package 3

Added new incidents to package 3

Adrci > ips add problem 12 package 3

Added problem 12 to package 3

Adrci > ips generate package 3

Generated package3 infile / home/oracle/IPSPKG_20090215013006_COM_2.zip, mode complete

Finally, let's briefly introduce the UNPACK command, which decompresses the resulting zip file to a specified directory:

Adrci > ips get metadata from file / home/oracle/IPSPKG_20090215012523_COM_1.zip

IPS metadata from file / home/oracle/IPSPKG_20090215012523_COM_1.zip:

one

IPSPKG_20090215012523

Complete

one

one

2009-02-15 01 purl 25 purl 27.179103 + 08:00

/ data/oracle

/ data/oracle/diag/rdbms/ora11g_p/ora11g

Rdbms

Ora11g_p

Ora11g

Adrci > ips unpack file / home/oracle/IPSPKG_20090215012523_COM_1.zip into / home/oracle

Unpacking file / home/oracle/IPSPKG_20090215012523_COM_1.zip into target / home/oracle

Adrci > host

[oracle@yangtk ~] $cd / home/oracle/diag/rdbms/ora11g_p/ora11g/

[oracle@yangtk ora11g] $ls-l

Total 44

Drwxr-xr-x 2 oracle oinstall 4096 Feb 15 02:21 alert

Drwxr-xr-x 2 oracle oinstall 4096 Feb 15 02:21 cdump

Drwxr-xr-x 2 oracle oinstall 4096 Feb 15 02:21 hm

Drwxr-xr-x 2 oracle oinstall 4096 Feb 15 02:21 incident

Drwxr-xr-x 3 oracle oinstall 4096 Feb 15 02:21 incpkg

Drwxr-xr-x 2 oracle oinstall 4096 Feb 15 02:21 ir

Drwxr-xr-x 2 oracle oinstall 4096 Feb 15 02:21 lck

Drwxr-xr-x 2 oracle oinstall 4096 Feb 15 02:21 metadata

Drwxr-xr-x 2 oracle oinstall 4096 Feb 15 02:21 stage

Drwxr-xr-x 2 oracle oinstall 4096 Feb 15 02:21 sweep

Drwxr-xr-x 2 oracle oinstall 4096 Feb 15 02:21 trace

[oracle@yangtk ora11g] $ls trace/

Alert_ora11g.log

[oracle@yangtk ora11g] $ls alert

Log.xml

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.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report