Oracle ORA-01102 failure: Cannot mount database in exclusive mode

Source: Internet
Author: User

SQL> Conn/As sysdba
Connected to an idle instance.
SQL> startup
Oracle instance started.

Total system global area 276824064 bytes
Fixed size 778736 bytes
Variable Size 137371152 bytes
Database buffers 138412032 bytes
Redo buffers 262144 bytes
ORA-01102: Cannot mount database in exclusive mode

This problem may occur due to power failure. The solution is

Error 1102 may be caused by the following possibilities:

1. In the HA system, other nodes have started the instance, occupying resources shared by the two servers (such as bare devices on the disk array;

II. It indicates that some resources are not released when oracle is shut down abnormally. There are several possible causes,

1. Oracle shared memory segments or semaphores are not released;

2. Oracle background processes (such as SMON, pmon, and dbwn) are not disabled;

3. The files LK <Sid> and sgadef <Sid>. DBF used to lock the memory are not deleted.

First, although our system is an ha system, the instance of the slave node is always closed. This can be confirmed by checking the database status on the slave node.

Second, because the system power is down, the database is down, and the system is restarted after power is connected. Therefore, we have ruled out the second possible one or two points. The most suspicious is the 3rd point.

Check the $ ORACLE_HOME/DBS directory:

$ CD $ ORACLE_HOME/dbs
$ Ls sgadef *
Sgadef * not found
$ Ls LK *
Lkora92
Sure enough, the LK <Sid> file is not deleted. Delete it

$ Rm lk *
Restart the database.

If you suspect that the shared memory is not released, run the following command:

$ IPCS-mop
Ipstatus from/dev/kmem as of Thu Jul 6 14:41:43 2006
T ID key mode owner group nattch CPID LPID
Shared Memory:
M 0 0 × 411c29d6-RW-Root 0 899 899
M 1 0 × 4e0c0002-RW-Root 2 899 901
M 2 0 × 4120007a-RW-Root 2 899 901
M 458755 0 × 0c6629c9-RW-r -- root sys 2 9113 17065
M 4 0 × 06347849-RW-Root 1 1661 9150
M 65541 0 xffffffff-RW-r-Root 0 1659 1659
M 524294 0x5e100011-RW --- Root 1 1811 1811
M 851975 0 × 5fe48aa4-RW-r -- Oracle oinstall 66 2017 25076
Then, its ID number clears the shared memory segment:

$ Ipcrm-M 851975
For semaphores, run the following command:

$ IPCS-sop
Ipstatus from/dev/kmem as of Thu Jul 6 14:44:16 2006
T ID key mode owner Group
Semaphores:
S 0 0 × 4f1c0139-ra --- Root
... ...
S 14 0 × 6c200ad8-ra-Root
S 15 0 × 6d200ad8-ra-Root
S 16 0 × 6f200ad8-ra-Root
S 17 0 xffffffff-ra-r-Root
S 18 0 × running c05c7-ra-Root
S 19 0 × 00446f6e-ra-r-Root
S 20 0 × 00446f6d-ra-r-Root
S 21 0 × 00000001-ra-Root
S 45078 0 × 67e72b58-ra-r -- Oracle oinstall
Based on the semaphore ID, run the following command to clear the semaphore:

$ Ipcrm-s 45078
If the Oracle process is not closed, run the following command to find the existing Oracle process:

$ PS-Ef | grep ora
Oracle 29976 1 0 Jun 22? 0: 52 ora_dbw0_ora92
Oracle 29978 1 0 Jun 22? 0: 51 ora_dbw1_ora92
Oracle 5128 1 0 Jul 5? 0: 00 oracleora92 (local = No)
... ...
Run the kill-9 command to kill the process.

$ Kill-9 <pid>
Summary:

When a 1102 error occurs, check and troubleshoot the error as follows:

1. In the HA system, check whether instances have been started on other nodes;
2. Check whether the Oracle process exists. If so, kill the process;
3. Check whether the semaphore exists. If yes, clear the semaphore;
4. Check whether the shared memory segment exists. If yes, clear the shared memory segment;
5. Check whether the lock memory files LK <Sid> and sgadef <Sid>. DBF exist. If yes, delete

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.