Tag: ora-01081: "Cannot start already-running Oracle-shut it down first"
applies to: oracle server - enterprise edition - version: 8.1.7.4 to 11.2.0.2.0 - Release: 8.1.7 to 11.2Generic UNIX when checking for Oracle instance background process does not exist then start database error: ora-01081: "cannot start Already-running oracle - shut it down first " caused this cause to be orphaned shared memory segments and semaphores did not get cleared properly from the last instance Shutdown. At the time of the last shutdown of an Oracle instance, an isolated shared memory segment and signal was not cleaned up solution can use IPCS to find shared memory segments or signals, use IPCRM to manually clear orphaned shared memory segments (Isolated shared memory segment) and semaphores (semaphore) [[Email protected] ~]# ipcs -a ------ Shared Memory Segments --------key shmid owner perms bytes nattch status 0x4e44b264 557069 oracle 640 287309824 25 0xd06e774c 524302 oracle 640 132120576 16 ------ Semaphore Arrays --------key semid owner perms nsems&Nbsp; 0x000000a7 0 root 600 1 0x2e7fd0cc 131073 oracle 640 44 0x334b5294 262146 oracle 640 154 [[email protected] ~]# ipcs -m ------ Shared Memory Segments --------key shmid owner perms bytes nattch status 0x4e44b264 557069 oracle 640 287309824 25 0xd06e774c 524302 oracle 640 132120576 16 ipcs: Check allocated Shared memory Ipcrm: Manually free the shared memory segment to obtain IPC information:ipcs [-m|-q|-s]-m output about shared memory ( shared memory) Information-q output information about the queue (Message queue)-s output information about "semaphores" (semaphore)-a Use all print options . (for  -B, -C, -O, -P,&NBsp;and -t shorthand symbol) example: ipcrm -m shmid - No. for shared memory ipcrm -s semid - for semaphores ORShutdown all the instances belonging to the user. next, run "Ipcs -b" to find the Remaining ipc facilities, owned by the same user, and remove them. however, if you ' Re running multiple production instances, this may not be acceptable. in the case of multiple instances 1. run SQL*Plus for ipcs -a > /tmp/ipcs_before.out 2. Connect all instances to make a simple query select * from dual; 3. Run &nbs againp; ipcs -a > /tmp/ipcs_after.out 4. contrast "/ Tmp/ipcs_before.out " and "/tmp/ipcs_after.out " files find the shared memory segments that have not changed in LPID these are the orphaned shared memory segments you are looking for: LPID Shows the process of attaching or separating shared memory segments in the last procedure ID because, by executing queries in each live instance, you involve shared memory segments belonging to their respective instances, But the shared memory segments that are not covered will become an isolated 5. after identifying the orphaned shared memory segments, you can find the orphaned semaphores by locating the semaphores with the same value of ctime in "Ipcs -a" output as the value of Ctime for the orphaned shared memory segments: ctime shows the time When the associated entry was created or changed. after identifying isolated shared memory segments, you can identify isolated shared memory segments with the output of the ipcs -a by identifying signals with the same CTime value As the value of the associated orphaned shared memory segment note: this step may not be necessary on the platforms implementing post-wait kernel extension (At&t unix, aix), when semaphores are not used by Oracle at all.
This article is from the "O Record" blog, so be sure to keep this source http://evils798.blog.51cto.com/8983296/1420943