|
本帖最后由 jiawang 于 2018-8-14 18:03 编辑
OS:rhel 7.3 64bit
db:11.2.0.4 64bit
问题现象:
[oracle@localhost ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Tue Aug 14 16:39:32 2018
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup;
ORACLE instance started.
Total System Global Area 1235959808 bytes
Fixed Size 2252784 bytes
Variable Size 788529168 bytes
Database Buffers 436207616 bytes
Redo Buffers 8970240 bytes
ORA-01102: cannot mount database in EXCLUSIVE mode
查看later日志
[oracle@localhost trace]$ cd /u01/app/diag/rdbms/orcl/orcl/trace
[oracle@localhost trace]$ tail -100 alert_orcl.log
报错如下:
starting up 1 dispatcher(s) for network address '(ADDRESS=(PARTIAL=YES)(PROTOCOL=TCP))'...
starting up 1 shared server(s) ...
ORACLE_BASE from environment = /u01/app/
Tue Aug 14 16:46:04 2018
ALTER DATABASE MOUNT
sculkget: failed to lock /u01/app//product/11.2.0/db_1/dbs/lkORCL exclusive
sculkget: lock held by PID: 16503
ORA-09968: unable to lock file
Linux-x86_64 Error: 11: Resource temporarily unavailable
Additional information: 16503
ORA-1102 signalled during: ALTER DATABASE MOUNT...
大概意思为文件被占用,无法锁定(最后发现报错关系到一个文件和一个进程,就是日志里标出的两行)
解决办法:
[oracle@localhost ~]$ cd $ORACLE_HOME/dbs
[oracle@localhost dbs]$ ll
total 20
-rw-rw----. 1 oracle dba 1544 Aug 14 16:55 hc_orcl.dat
-rw-r--r--. 1 oracle dba 2851 May 15 2009 init.ora
-rw-r-----. 1 oracle dba 24 Aug 14 16:35 lkORCL
-rw-r-----. 1 oracle dba 1536 Aug 14 16:36 orapworcl
-rw-r-----. 1 oracle dba 2560 Aug 14 16:39 spfileorcl.ora
SQL> shutdown immediate;
ORA-01507: database not mounted
ORACLE instance shut down。
SQL>
查看进程
[oracle@localhost ~]$ ps -ef |grep ora_
oracle 16485 1 0 16:37 ? 00:00:00 ora_pmon_orcl
oracle 16487 1 0 16:37 ? 00:00:00 ora_psp0_orcl
oracle 16489 1 1 16:37 ? 00:00:19 ora_vktm_orcl
oracle 16493 1 0 16:37 ? 00:00:00 ora_gen0_orcl
oracle 16495 1 0 16:37 ? 00:00:00 ora_diag_orcl
oracle 16497 1 0 16:37 ? 00:00:00 ora_dbrm_orcl
oracle 16499 1 0 16:37 ? 00:00:00 ora_dia0_orcl
oracle 16501 1 0 16:37 ? 00:00:00 ora_mman_orcl
oracle 16503 1 0 16:37 ? 00:00:00 ora_dbw0_orcl
oracle 16505 1 0 16:37 ? 00:00:00 ora_lgwr_orcl
oracle 16507 1 0 16:37 ? 00:00:00 ora_ckpt_orcl
oracle 16509 1 0 16:37 ? 00:00:00 ora_smon_orcl
oracle 16511 1 0 16:37 ? 00:00:00 ora_reco_orcl
oracle 16513 1 0 16:37 ? 00:00:00 ora_mmon_orcl
oracle 16515 1 0 16:37 ? 00:00:00 ora_mmnl_orcl
oracle 16517 1 0 16:37 ? 00:00:00 ora_d000_orcl
oracle 16519 1 0 16:37 ? 00:00:00 ora_s000_orcl
oracle 16527 1 0 16:37 ? 00:00:00 ora_qmnc_orcl
oracle 16542 1 0 16:37 ? 00:00:00 ora_cjq0_orcl
oracle 16544 1 0 16:37 ? 00:00:00 ora_q000_orcl
oracle 16546 1 0 16:37 ? 00:00:00 ora_q001_orcl
oracle 16643 1 0 16:42 ? 00:00:00 ora_smco_orcl
oracle 18814 1 0 16:52 ? 00:00:00 ora_w000_orcl
oracle 19052 9693 0 17:03 pts/4 00:00:00 grep --color=auto ora_
[oracle@localhost ~]$ kill -9 16503
再次启动数据库
[oracle@localhost ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.4.0 Production on Tue Aug 14 17:04:06 2018
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to an idle instance.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 1235959808 bytes
Fixed Size 2252784 bytes
Variable Size 788529168 bytes
Database Buffers 436207616 bytes
Redo Buffers 8970240 bytes
Database mounted.
SQL> alter database open;
Database altered.
SQL>
|
|