To obtain the shared memory id and semaphore id for 8.1.X you can do
either of the following:
$ORACLE_HOME/bin/sysresv
IPC Resources for ORACLE_SID “V817” :
Shared Memory:
ID KEY
14851 0x8a85a74c
Semaphores:
ID KEY
11206656 0x4bd4814c
Oracle Instance alive for sid “V817”
OR
%sqlplus internal
SQL> oradebug ipc
Information written to trace file.
Trace file is written to USER_DUMP_DEST.
The shared memory segment id can be found by looking in the trace file for
Shmid:
The shared memory segment id in the following is 2007.
Area Subarea Shmid Stable Addr Actual Addr
0 0 2007 0000000080000000 0000000080000000
To find the semaphore id look for Semaphore List=
In the following example the semaphore id is 1245189.
Semaphore List=
1245189
Example of trace file:
/u02/app/oracle/product/8.1.6/admin/R816/udump/r816_ora_975.trc
Oracle8i Enterprise Edition Release 8.1.6.2.0 – Production
With the Partitioning option
JServer Release 8.1.6.2.0 – Production
ORACLE_HOME = /u02/app/oracle/product/8.1.6
System name: SunOS
Node name: sandbox1
Release: 5.6
Version: Generic_105181-16
Machine: sun4u
Instance name: R816
Redo thread mounted by this instance: 1
Oracle process number: 12
Unix process pid: 975, image: oracle@sandbox1 (TNS V1-V3)
*** SESSION ID:(14.4287) 2000-08-31 10:47:44.542
Dump of unix-generic skgm context
areaflags 00000037
realmflags 0000000f
mapsize 00002000
protectsize 00002000
lcmsize 00002000
seglen 00002000
largestsize 00000000f8000000
smallestsize 0000000000400000
stacklimit ef87eebf
stackdir -1
mode 640
magic acc01ade
Handle: 177b8c8 `/u02/app/oracle/product/8.1.6R816′
Dump of unix-generic realm handle `/u02/app/oracle/product/8.1.6R816′, flags = 0
0000000
Area #0 `Fixed Size’ containing Subareas 0-0
Total size 0000000000010ff0 Minimum Subarea size 00000000
Area Subarea Shmid Stable Addr Actual Addr
0 0 2007 0000000080000000 0000000080000000
Subarea size Segment size
0000000000012000 00000000039d4000
Area #1 `Variable Size’ containing Subareas 1-1
Total size 00000000025a2000 Minimum Subarea size 00100000
Area Subarea Shmid Stable Addr Actual Addr
1 1 2007 0000000080012000 0000000080012000
Subarea size Segment size
0000000002600000 00000000039d4000
Area #2 `Database Buffers’ containing Subareas 2-2
Total size 0000000001388000 Minimum Subarea size 00002000
Area Subarea Shmid Stable Addr Actual Addr
2 2 2007 0000000082612000 0000000082612000
Subarea size Segment size
Area #2 `Database Buffers’ containing Subareas 2-2
Total size 0000000001388000 Minimum Subarea size 00002000
Area Subarea Shmid Stable Addr Actual Addr
2 2 2007 0000000082612000 0000000082612000
Subarea size Segment size
0000000001388000 00000000039d4000
Area #3 `Redo Buffers’ containing Subareas 3-3
Total size 000000000002c000 Minimum Subarea size 00000000
Area Subarea Shmid Stable Addr Actual Addr
3 3 2007 000000008399a000 000000008399a000
Subarea size Segment size
000000000002c000 00000000039d4000
Area #4 `Lock Manager’ containing Subareas 5-5
Total size 0000000000004000 Minimum Subarea size 00000000
Area Subarea Shmid Stable Addr Actual Addr
4 5 2007 00000000839ce000 00000000839ce000
Subarea size Segment size
0000000000004000 00000000039d4000
Area #5 `Java’ containing Subareas 4-4
Total size 0000000000008000 Minimum Subarea size 00000000
Area Subarea Shmid Stable Addr Actual Addr
5 4 2007 00000000839c6000 00000000839c6000
Subarea size Segment size
0000000000008000 00000000039d4000
Area #6 `skgm overhead’ containing Subareas 6-6
Total size 0000000000002000 Minimum Subarea size 00000000
Area Subarea Shmid Stable Addr Actual Addr
6 6 2007 00000000839d2000 00000000839d2000
Subarea size Segment size
0000000000002000 00000000039d4000
Dump of Solaris-specific skgm context
sharedmmu 00000001
shareddec 0
used region 0: start 0000000080000000 length 0000000004000000
Maximum processes: = 50
Number of semaphores per set: = 54
Semaphores key overhead per set: = 4
User Semaphores per set: = 50
Number of semaphore sets: = 1
Semaphore identifiers: = 1
Semaphore List=
1245189
————– system semaphore information ————-
IPC status from
T ID KEY MODE OWNER GROUP CREATOR CGROUP NSEMS
OTIME CTIME
Semaphores:
s 1 0x55535253 –ra-ra-ra- root root root root 1
20:15:27 6:21:03
s 458755 00000000 –ra-r—– rsupport rdba rsupport rdba 50 9
:49:07 9:38:57
s 196612 0x0a248eb5 –ra-r—– rsupport rdba rsupport rdba 54
9:45:23 10:15:16
s 1245189 0x09d48eb6 –ra-r—– rsupport rdba rsupport rdba 54
9:17:49 10:55:00
s 131078 00000000 –ra-r—– rsupport rdba rsupport rdba 50 9
:56:45 14:20:27
s 65543 00000000 –ra-r—– rsupport rdba rsupport rdba 50 10
:47:41 14:39:14
s 196616 00000000 –ra-r—– rsupport rdba rsupport rdba 50 9
:06:22 9:06:16
s 65545 00000000 –ra——- rsupport rdba rsupport rdba 2 9
:11:57 9:09:05
s 262154 00000000 –ra-r—– rsupport rdba rsupport rdba 50 9
:39:30 9:32:49
s 327691 0x09d48b46 –ra-r—– oracle rdba oracle rdba 54
10:40:05 7:21:02
s 196620 0x06148c55 –ra-r—– oracle rdba oracle rdba 54
10:40:22 7:41:50
s 131085 00000000 –ra-r—– rsupport rdba rsupport rdba 50 2
:29:13 14:24:04
Once again the command syntax to remove the shared memory segments or
semaphores is as follows:
% ipcrm -m
% ipcrm -s