Database Reference
In-Depth Information
$ env ORACLE_SID=+ASM1 sqlplus / as sysdba
SQL> ORADEBUG SETMYPID
Statement processed.
SQL> ORADEBUG IPC
Information written to trace file.
SQL> ORADEBUG TRACEFILE_NAME
/opt/oracle/obase/admin/+ASM/udump/+asm1_ora_19685.trc
SQL> !grep -A 1 "Semaphore List" /opt/oracle/obase/admin/+ASM/udump/+asm1_ora_19685.
trc
Semaphore List=
884736
$ ipcs -s
------ Semaphore Arrays --------
key semid owner perms nsems
0x2c13c9dc 884736 oracle 640 44
0xcbcd5e70 1146881 oracle 640 154
The smaller semaphore set with identifier 884736 was used by an ASM instance, whereas
the larger set with 154 semaphores was used by an RDBMS instance. 3
In a situation where one out of several instances on a system has failed without cleaning
up shared memory and/or semaphores, ORADEBUG IPC is the ideal tool to gather the information
required to perform cleanup with the command ipcrm . The UNIX IPC identifiers reproduced in
bold in the preceding examples may be used to remove shared memory segments and sema-
phore sets with ipcrm . IPC identifiers are not reused when an ORACLE instance is shut down
and restarted. When resources on a machine are scarce, it may happen that an ORACLE instance
cannot be started due to resources allocated to stale shared memory segments or semaphore
sets left behind by a crashed instance. Under these circumstances, the removal of both types of
IPC structures with ipcrm is the solution.
ORADEBUG SHORT_STACK
A program call stack represents how routines in a program call each other. If a program hangs,
the program call stack shows in which routine it hangs. These are the two ways of obtaining a
program call stack with ORADEBUG :
￿The ERRORSTACK diagnostic dump
￿The SHORT_STACK command
The ERRORSTACK dump results in a large trace file. The command SHORT_STACK is well suited
to quickly determine which routine is currently executed by a server process. The output of this
command is sent to a terminal window and not to a trace file. It is available in Oracle10 g and
subsequent releases. Following is an example:
The number of semaphores allocated depends on the initialization parameter PROCESSES , which had
the values 40 and 150 in the ASM and RDBMS instances, respectively.
3.
 
Search WWH ::




Custom Search