171102 mysql_Oracle数据库报错 ORA-01102 ORA-1102 signalled during....

博客详细记录了一位用户在启动Oracle数据库时遇到ORA-01102错误的过程。该错误通常表示数据库已处于独占模式,但通过检查alert日志、分析进程和资源占用,发现是进程间通信争用导致。解决方案包括关闭实例、删除lk文件并重新启动数据库,最终成功解决问题。
摘要由CSDN通过智能技术生成

昨天刚装完的一个数据库在启动的时候,报错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.dbf" file in the "ORACLE_HOME/dbs"

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" file

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.dbf" file in the directory

"ORACLE_HOME/dbs".

% ls $ORACLE_HOME/dbs/sgadef.dbf

If this file does exist, remove it.

% rm $ORACLE_HOME/dbs/sgadef.dbf

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" file does not exist

5. Startup the instance

Solution Explanation:

=====================

The "lk" and "sgadef.dbf" files are used for locking shared memory. It seems that even though no memory is allocated, Oracle thinks memory is still locked. By removing the "sgadef" and "lk" files you remove any knowledge oracle has of shared memory that is in use. Now the database can start.

logo.gif

本文原创发布php中文网,转载请注明出处,感谢您的尊重!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值