• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Techgoeasy

Techgoeasy

Learn Oracle, PHP, HTML,CSS,Perl,UNIX shell scripts

  • Home
  • Oracle
    • Oracle database
    • Oracle Ebusiness Suite
    • Oracle weblogic
    • Oracle Performance Tuning
    • Oracle Hyperion
    • Oracle Cloud Tutorials
  • SQL
  • interview questions
  • Linux
  • PHP and HTML
  • Downloads
  • General
Home » Oracle » Oracle Database » how to find the semaphore for the Database instance

how to find the semaphore for the Database instance

November 10, 2017 by techgoeasy Leave a Comment

how to find the semaphore for the Database instance

Table of Contents

  • When Oracle Instance is not running
  • When Oracle Instance is running
  • Removing IPC resources
  • If you need to remove memory segments, and Oracle detects the instance is alive through sysresv
  • If you need to remove semaphores, and Oracle detects the instance is alive through sysresv

When Oracle Instance is not running

/u01/app/oracle/product> sysresv
 IPC Resources for ORACLE_SID “TEST″ :
 Shared Memory
 ID KEY
 No shared memory segments used
 Semaphores:
 ID KEY
 No semaphore resources used
 Oracle Instance not alive for sid “TEST″

When Oracle Instance is running

/u01/app/oracle/product> sysresv
 IPC Resources for ORACLE_SID “TEST″ :
 Shared Memory:
 ID KEY
 14437 0xe4efa8324dc
 Semaphores:
 ID KEY
 1232330802 0x09d48331246
 Oracle Instance alive for sid “TEST″

Removing IPC resources

Suppose you try to start the instance and it complains about its running due to orphan semaphore and sysresv also determine the instance is not active. Then the following command could be used to remove the shared memory and semaphores

/u01/app/oracle/product> sysresv -i
 IPC Resources for ORACLE_SID "TEST" :
    Shared Memory:
    ID              KEY
    16837           0xe4efa8dc
    Semaphores:
    ID              KEY
    12714018        0x09d48346
    Oracle Instance not alive for sid "TEST" 
 Remove ipc resources for sid “TEST″ (y/n)?y
 Done removing ipc resources for sid “TEST″

Verify the resources were removed

/u01/app/oracle/product> sysresv
 IPC Resources for ORACLE_SID “TEST″ :
 Shared Memory
 ID KEY
 No shared memory segments used
 Semaphores:
 ID KEY
 No semaphore resources used
 Oracle Instance not alive for sid “TEST″

If you need to remove memory segments, and Oracle detects the instance is alive through sysresv

% ipcrm -m <mem-id>
 Where is the memory id shown in the sysresv output.
 Example:    
% ipcrm -m 12333 

If you need to remove semaphores, and Oracle detects the instance is alive through sysresv

% ipcrm -s  <sem-id>
 where is the semaphore id shown in the sysresv output.

Related Articles
Step by Step Oracle 12c Database Installation on Linux
Flashback PDB in Oracle Database 12c Release 2
How to perform Database cloning
Oracle Database Recovery various cases and solution

Filed Under: Oracle, Oracle Database Tagged With: semaphore, sysresv

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar



Subscribe to our mailing list

Enter your email address to subscribe to this blog and receive notifications of new posts by email

Recent Posts

  • How to use sed replace string in file
  • Password Version in oracle
  • How to login as user without changing the password in Oracle database(alter user identified by values)
  • How to check encrypted tablespace in the Database
  • How To Export -Import TDE Master Encryption Key

Copyright © 2023 : TechGoEasy

  • Hire me
  • Privacy Policy
  • Contact Us
  • New? Start Here
  • About Us