时间:2021-07-01 10:21:17 帮助过:63人阅读
昨天刚装完的一个数据库在启动的时候,报错ORA-01102,而且安装的时候也没有看到哪里有报错信息,一路都比较顺利,而且这也是第一
昨天刚装完的一个数据库在启动的时候,报错ORA-01102,而且安装的时候也没有看到哪里有报错信息,一路都比较顺利,而且这也是第一次我碰到这个问题,当时我首先就检查了alert日志文件,并把相关的错误信息在metalink上查看过了,经过分析后判断是由于进程间通信被争用导致,以下是我处理该问题的一个思路,并在最后附上了metalink原文以及朋友对该问题的一个理解和处理办法。
为什么会发生如下错误,原因是多个用户同时去访问同一个资源就会发生独占模式,因为在Linux里面默认一个进程只被一个用户访问,要避免这个问题,在创建用户的时候指定默认去指定不同于其它用户的优先级就可以避免此类问题的发生。
sculkget: failed to lock /orasoft/product/10.2.0/db_1/dbs/lkWWL exclusive 同一个进程被多个用户访问发生了独占模式
sculkget: lock held by PID: 26312 发生独占模式的进程号为pid:26312
ORA-09968: Message 9968 not found; No message file for product=RDBMS, facility=ORA 并且没有找到9968的数据信号,,同时了我们该信号的类型
Linux Error: 11: Resource temporarily unavailable 导致资源无法被正常利用
Additional information: 26312
Thu Nov 17 15:51:16 2011
ORA-1102 signalled during: ALTER DATABASE MOUNT...
解决如上错误过程如下:
1、我们可以通过如下命令查看到发生独占的进程名称为ora_dbw0_wwl
[Oracle@ora10g dbs]$ ps -ef|grep 26312
oracle 26312 1 0 15:43 ? 00:00:02 ora_dbw0_wwl
oracle 26663 26574 0 17:39 pts/1 00:00:00 grep 26312
2、进入数据库,先关闭实例
[oracle@ora10g ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Thu Nov 17 17:45:56 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
SQL> shutdown immediate
ORA-01507: database not mounted
ORACLE instance shut down.
SQL> exit
Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
进入到 $ORACLE_HOME/dbs,查看到一个名为lkWWL的文件,正常情况下是没有这个文件的
[oracle@ora10g ~]$ cd $ORACLE_HOME/dbs
[oracle@ora10g dbs]$ ls
hc_wwl.dat initdw.ora init.ora lkWWL orapwwwl spfilewwl.ora
[oracle@ora10g dbs]$ su - root
口令:
通过fuser -u lkWWL 命令一看,果然果然进程没有被释放
[root@ora10g ~]# cd /orasoft/product/10.2.0/db_1/dbs
[root@ora10g dbs]# fuser -u lkWWL
lkWWL: 26306 26308 26310 26312 26314 26316 26318 26320 26322 26324 26326 26334 26336 26340 26354 26356
[root@ora10g dbs]# fuser -k lkWWL
lkWWL: 26306 26308 26310 26312 26314 26316 26318 26320 26322 26324 26326 26334 26336 26340 26354 26356
[root@ora10g dbs]# fuser -u lkWWL
重新启动数据库看看,这个时候数据库没有报错了,能正常起来。
[root@ora10g dbs]# su - oracle
[oracle@ora10g ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.1.0 - Production on Thu Nov 17 17:47:50 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 285212672 bytes
Fixed Size 1218992 bytes
Variable Size 92276304 bytes
Database Buffers 188743680 bytes
Redo Buffers 2973696 bytes
Database mounted.
Database opened.
SQL> col host_name format a20
SQL> select host_name,instance_name,status from v$instance
HOST_NAME INSTANCE_NAME STATUS
-------------------- ---------------- ------------
ora10g.localdomain wwl OPEN
SQL>
Metalink 原文如下:
analysis:
Problem Description:
====================
You are trying to startup the database and you receive the following error:
ORA-01102: cannot mount database in EXCLUSIVE mode
Cause: Some other instance has the database mounted exclusive
or shared.
Action: Shutdown other instance or mount in a compatible mode.
Problem Explanation:
====================
A database is started in EXCLUSIVE mode by default. Therefore, the
ORA-01102 error is misleading and may have occurred due to one of the
following reasons:
- there is still an "sgadef
directory
- the processes for Oracle (pmon, smon, lgwr and dbwr) still exist
- shared memory segments and semaphores still exist even though the
database has been shutdown
- there is a "ORACLE_HOME/dbs/lk
Search Words:
=============
ORA-1102, crash, immediate, abort, fail, fails, migration
Solution Description:
=====================
Verify that the database was shutdown cleanly by doing the following:
1. Verify that there is not a "sgadef
"ORACLE_HOME/dbs".
% ls $ORACLE_HOME/dbs/sgadef
If this file does exist, remove it.
% rm $ORACLE_HOME/dbs/sgadef
2. Verify that there are no background processes owned by "oracle"
% ps -ef | grep ora_ | grep $ORACLE_SID
If background processes exist, remove them by using the Unix
command "kill". For example:
% kill -9
3. Verify that no shared memory segments and semaphores that are owned
by "oracle" still exist
% ipcs -b
If there are shared memory segments and semaphores owned by "oracle",
remove the shared memory segments
% ipcrm -m
and remove the semaphores
% ipcrm -s
NOTE: The example shown above assumes that you only have one
database on this machine. If you have more than one
database, you will need to shutdown all other databases
before proceeding with Step 4.
4. Verify that the "$ORACLE_HOME/dbs/lk
5. Startup the instance
Solution Explanation:
=====================
The "lk