Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

Free Oracle Tips

HTML Text

 Home
 E-mail Us
 Oracle Articles


 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog


 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

 Applications
 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB   


 

 

 


 

 

 
 


Managing UNIX memory with IPCS

Expert Oracle Tips by Burleson Consulting

March 22, 2011

UNIX and Linux Shared Memory and Oracle

The UNIX and LINUX operating systems allocate memory based on an interprocess communication model (IPC) to manage memory segments for Oracle database environments.

To obtain details on shared memory for UNIX and LINUX, make use of the ipcs command. Details on syntax are illustrated below from within the UNIX and LINUX man pages:

NAME

ipcs :  provide information on ipc facilities

SYNOPSIS

ipcs [ -asmq ] [ -tclup ]

ipcs [ -smq ] -i id

ipcs -h

DESCRIPTION

ipcs  provides information on the ipc facilities for which the calling process has read access

The -i option allows a specific resource ID to be specified.   Only information on this id will be printed.

Resources may be specified as follows:

-m     shared memory segments

 -q     message queues

Determine what Oracle database has a semaphore set

As we have noted, when an Oracle database hangs, you may have leftover background processes, held RAM memory segment and held semaphore sets. When you have multiple instances on a UNIX server and need to release a semaphore set for an Oracle database, you must first determine which semaphore set belongs to your crippled instance.

Unfortunately, you cannot tell with the ipcs –sa command which semaphore set belongs to each Oracle database.  Here is the Oracle procedure for determining the semaphore set number for an individual Oracle database so that you can remove the semaphores with the ipcs command.

root> svrmgrl

Oracle Server Manager Release 2.3.2.0.0 - Production

Copyright (c) Oracle Corporation 1994, 1995. All rights reserved.

Oracle7 Server Release 7.3.2.3.0 - Production Release
With the distributed and replication options
PL/SQL Release 2.3.2.3.0 - Production

SVRMGR> connect internal
Connected.
SVRMGR> oradebug ipc
-------------- Shared memory --------------
Seg Id     Address   Size
24064      c1739000  28975104
Total: # of segments = 1, size = 28975104
-------------- Semaphores ----------------
Total number of semaphores = 400
Number of semaphores per set = 400
Number of semaphore sets = 1
Semaphore identifiers:   
In Oracle8i and beyond, you can use SQL*Plus to perform the same function.
root> sqlplus /nologin

SQL*Plus: Release 3.3.2.0.0 - Production on Mon Sep 10 17:27:04 2001

Copyright (c) Oracle Corporation 1979, 1994.  All rights reserved.

SQL> connect system/manager as sysdba;

Connected.

Since we cannot get the semaphore set number for the crippled database, we must determine the semaphore set using the process of elimination.  We issues the above commands for each live database on the server, and the un-claimed semaphore set will belong to the crippled instance.

Once identified, you can use the following procedure for removing the semaphore set.

Removing a semaphore set for Oracle

We start by issuing the ipcs –sb command to display details of the semaphore set.

root> ipcs -sb|grep oracle

s      67 0x00000000 --ra-r-----    oracle       dba   400 
s     223 0x00000000 --ra-r-----    oracle       dba   400
s     334 0x00000000 --ra-r-----    oracle       dba   300

Now, we can remove the semaphores from the locked-up database. In this example, we assume that set 223 is the one for the crippled database.

root> ipcrm -s 223

Now we can confirm that the semaphores are deleted.

root> ipcs -sb|grep oracle

s      67 0x00000000 --ra-r-----    oracle       dba   400 
s     334 0x00000000 --ra-r-----    oracle       dba   300

 

 
 
 
Frustrated by the Hidden or Undocumented Features of Oracle? 

The landmark book "Exploring Oracle Internals: Tips and Tricks for the Oracle DBA"  will take you far beyond the standard features of the Oracle database into the hidden and undocumented realms formerly reserved for Oracle insiders.  You will discover valuable tips and tricks for mastering your Oracle database, and you can buy it for 30% off directly from the publisher.
 


 

 

Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  and include the URL for the page.


                    









Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


 

Copyright © 1996 -  2012 

All rights reserved.

Oracle © is the registered trademark of Oracle Corporation.


 

  
 

 
 
 
 
Oracle performance tuning software
 
 

 

 
 
 
Oracle performance Tuning 10g reference poster
 
 
 
Oracle training in Linux commands
 
Oracle training Excel
 
Oracle training & performance tuning books