ORA-01078: failure in processing system parameters
来源:互联网 发布:win7如何添加网络连接 编辑:程序博客网 时间:2024/05/21 14:59
在ORACLE 11g 数据库静默安装完成后,启动数据库时报错了
[oracle@localhost app]$ sqlplus /nologSQL*Plus: Release 11.2.0.3.0 Production on Mon Feb 2 09:36:50 2015Copyright (c) 1982, 2011, Oracle. All rights reserved.SQL> conn sys/oracle as sysdbaConnected to an idle instance.SQL> startupORA-01078: failure in processing system parametersLRM-00109: could not open parameter file '/u01/app/oracle/dbs/initorcl.ora'SQL> exit
在oracle 11g中,数据库默认将使用spfile启动数据库,如果spfile不存在,则就会出现上述错误。
-- 进入dbs目录[oracle@localhost dbs]$ pwd/u01/app/oracle/dbs[oracle@localhost dbs]$ lshc_orcl11g.dat init.ora lkORCL orapworcl11g spfileorcl11g.ora
发现没有 initorcl.ora(orcl为我的oracle_sid), 于是将 /u01/app/admin/orcl/pfile/init.ora.12201591938 复制到 /u01/app/oracle/dbs/initorcl.ora
[oracle@localhost dbs]$ cp init.ora.12201591938 /u01/app/oracle/dbs/initorcl.ora
再次重启数据库
[oracle@localhost dbs]$ sqlplus / as sysdbaSQL*Plus: Release 11.2.0.3.0 Production on Mon Feb 2 10:02:01 2015Copyright (c) 1982, 2011, Oracle. All rights reserved.Connected to an idle instance.SQL> startupORACLE instance started.Total System Global Area 534462464 bytesFixed Size 2230072 bytesVariable Size 163580104 bytesDatabase Buffers 360710144 bytesRedo Buffers 7942144 bytesORA-01102: cannot mount database in EXCLUSIVE mode
又报“不能挂载数据库中独占模式”了这个错误 ORA-01102: cannot mount database in EXCLUSIVE mode ,于是关掉数据 shutdown immediate,
SQL> shutdown immediateORA-01507: database not mountedORACLE instance shut down.SQL> exit
<pre name="code" class="sql">
网上搜索了一下相关的文章,下面是网址http://www.itpub.net/thread-1573387-1-1.html 的具体解决方案<span style="font-family: Arial, Helvetica, sans-serif;">ORA-01102 cannot mount database in EXCLUSIVE mode</span>
出现1102错误可能有以下几种可能:
一、在HA系统中,已经有其他节点启动了实例,将双机共享的资源(如磁盘阵列上的裸设备)占用了;二、说明 oracle 被异常关闭时,有资源没有被释放,一般有以下几种可能,1、 oracle 的共享内存段或信号量没有被释放;2、 oracle 的后台进程(如SMON、PMON、DBWn等)没有被关闭;3、 用于锁内存的文件lk<sid>和sgadef<sid>.dbf文件没有被删除。首先,虽然我们的系统是HA系统,但是备节点的实例始终处在关闭状态,这点通过在备节点上查数据库状态可以证实。其次、是因系统掉电引起数据库宕机的,系统在接电后被重启,因此我们排除了第二种可能种的1、2点。最可疑的就是第3点了。查$ORACLE_HOME/dbs目录:$ cd $ORACLE_HOME/dbs$ ls sgadef*sgadef* not found$ ls lk*lkORA92果然,lk<sid>文件没有被删除。将它删除掉$ rm lk*再启动数据库,成功。如果怀疑是共享内存没有被释放,可以用以下命令查看:$ipcs -mopIPC status from /dev/kmem as of Thu Jul 6 14:41:43 2006T ID KEY MODE OWNER GROUP NATTCH CPID LPIDShared Memory:m 0 0×411c29d6 –rw-rw-rw- root root 0 899 899m 1 0×4e0c0002 –rw-rw-rw- root root 2 899 901m 2 0×4120007a –rw-rw-rw- root root 2 899 901m 458755 0×0c6629c9 –rw-r—– root sys 2 9113 17065m 4 0×06347849 –rw-rw-rw- root root 1 1661 9150m 65541 0xffffffff –rw-r–r– root root 0 1659 1659m 524294 0×5e100011 –rw——- root root 1 1811 1811m 851975 0×5fe48aa4 –rw-r—– oracle oinstall 66 2017 25076然后它ID号清除共享内存段:$ipcrm –m 851975对于信号量,可以用以下命令查看:$ ipcs -sopIPC status from /dev/kmem as of Thu Jul 6 14:44:16 2006T ID KEY MODE OWNER GROUPSemaphores:s 0 0×4f1c0139 –ra——- root root… …s 14 0×6c200ad8 –ra-ra-ra- root roots 15 0×6d200ad8 –ra-ra-ra- root roots 16 0×6f200ad8 –ra-ra-ra- root roots 17 0xffffffff –ra-r–r– root roots 18 0×410c05c7 –ra-ra-ra- root roots 19 0×00446f6e –ra-r–r– root roots 20 0×00446f6d –ra-r–r– root roots 21 0×00000001 –ra-ra-ra- root roots 45078 0×67e72b58 –ra-r—– oracle oinstall根据信号量ID,用以下命令清除信号量:$ipcrm -s 45078如果是 oracle 进程没有关闭,用以下命令查出存在的 oracle 进程:$ ps -ef|grep oraoracle 29976 1 0 Jun 22 ? 0:52 ora_dbw0_ora92oracle 29978 1 0 Jun 22 ? 0:51 ora_dbw1_ora92oracle 5128 1 0 Jul 5 ? 0:00 oracleora92 (LOCAL=NO)… …然后用kill -9命令杀掉进程$kill -9 <PID>总结:当发生1102错误时,可以按照以下流程检查、排错:1.如果是HA系统,检查其他节点是否已经启动实例;2.检查 oracle 进程是否存在,如果存在则杀掉进程;3.检查信号量是否存在,如果存在,则清除信号量;4.检查共享内存段是否存在,如果存在,则清除共享内存段;5.检查锁内存文件lk<sid>和sgadef<sid>.dbf是否存在,如果存在,则删除。
根据上面的解决方案,查看了一下本机的相关的oracle进程
<pre name="code" class="html">[root@localhost response]# ps -ef|grep oraroot 1770 1734 0 2014 ? 01:10:39 hald-addon-storage: polling /dev/sr0 (every 2 sec)root 2504 15374 0 09:00 ? 00:00:00 sshd: oracle [priv]oracle 2508 2504 0 09:00 ? 00:00:00 sshd: oracle@nottyoracle 2509 2508 0 09:00 ? 00:00:00 /usr/libexec/openssh/sftp-serverroot 2634 15374 0 09:07 ? 00:00:00 sshd: oracle [priv]oracle 2638 2634 0 09:07 ? 00:00:00 sshd: oracle@nottyoracle 2639 2638 0 09:07 ? 00:00:00 /usr/libexec/openssh/sftp-serveroracle 3167 1 0 09:20 ? 00:00:00 ora_pmon_orcl11goracle 3169 1 0 09:20 ? 00:00:00 ora_psp0_orcl11goracle 3171 1 0 09:20 ? 00:00:31 ora_vktm_orcl11goracle 3175 1 0 09:20 ? 00:00:00 ora_gen0_orcl11goracle 3177 1 0 09:20 ? 00:00:00 ora_diag_orcl11goracle 3179 1 0 09:20 ? 00:00:00 ora_dbrm_orcl11goracle 3181 1 0 09:20 ? 00:00:02 ora_dia0_orcl11goracle 3183 1 0 09:20 ? 00:00:00 ora_mman_orcl11goracle 3185 1 0 09:20 ? 00:00:00 ora_dbw0_orcl11goracle 3187 1 0 09:20 ? 00:00:00 ora_lgwr_orcl11goracle 3189 1 0 09:20 ? 00:00:00 ora_ckpt_orcl11goracle 3191 1 0 09:20 ? 00:00:01 ora_smon_orcl11goracle 3193 1 0 09:20 ? 00:00:00 ora_reco_orcl11goracle 3195 1 0 09:20 ? 00:00:01 ora_mmon_orcl11goracle 3197 1 0 09:20 ? 00:00:01 ora_mmnl_orcl11goracle 3199 1 0 09:20 ? 00:00:00 ora_d000_orcl11goracle 3201 1 0 09:20 ? 00:00:00 ora_s000_orcl11goracle 3209 1 0 09:20 ? 00:00:00 ora_qmnc_orcl11goracle 3224 1 0 09:20 ? 00:00:01 ora_cjq0_orcl11goracle 3226 1 0 09:20 ? 00:00:00 ora_q000_orcl11goracle 3228 1 0 09:20 ? 00:00:00 ora_q001_orcl11goracle 3408 1 0 09:30 ? 00:00:00 ora_smco_orcl11goracle 3984 1 0 09:50 ? 00:00:00 ora_w000_orcl11goracle 4303 1 0 10:05 ? 00:00:00 ora_w003_orcl11goracle 4481 1 0 10:16 ? 00:00:00 ora_j000_orcl11goracle 4483 1 0 10:16 ? 00:00:00 ora_j001_orcl11groot 4485 19827 0 10:16 pts/0 00:00:00 grep oraroot 18929 15374 0 Feb01 ? 00:00:00 sshd: oracle [priv]oracle 18933 18929 0 Feb01 ? 00:00:01 sshd: oracle@pts/0oracle 18934 18933 0 Feb01 pts/0 00:00:00 -bashroot 21126 15374 0 Feb01 ? 00:00:00 sshd: oracle [priv]oracle 21130 21126 0 Feb01 ? 00:00:00 sshd: oracle@pts/1oracle 21131 21130 0 Feb01 pts/1 00:00:00 -bashroot 21445 15374 0 Feb01 ? 00:00:00 sshd: oracle [priv]oracle 21449 21445 0 Feb01 ? 00:01:33 sshd: oracle@pts/2oracle 21450 21449 0 Feb01 pts/2 00:00:00 -bashoracle 26054 1 0 Feb01 ? 00:00:03 /u01/app/oracle/bin/tnslsnr LISTENER -inherit
数据库关闭了,竟然后台进程都还在,先关闭后台进程,再查看相关的信息
<pre name="code" class="html">-- 这里直接关掉系统监控进程,其他的后台进程就没了[root@localhost response]# kill -9 3191[root@localhost response]# [root@localhost response]# ps -ef|grep oraroot 1770 1734 0 2014 ? 01:10:39 hald-addon-storage: polling /dev/sr0 (every 2 sec)root 2504 15374 0 09:00 ? 00:00:00 sshd: oracle [priv]oracle 2508 2504 0 09:00 ? 00:00:00 sshd: oracle@nottyoracle 2509 2508 0 09:00 ? 00:00:00 /usr/libexec/openssh/sftp-serverroot 2634 15374 0 09:07 ? 00:00:00 sshd: oracle [priv]oracle 2638 2634 0 09:07 ? 00:00:00 sshd: oracle@nottyoracle 2639 2638 0 09:07 ? 00:00:00 /usr/libexec/openssh/sftp-serverroot 4527 19827 0 10:20 pts/0 00:00:00 grep oraroot 18929 15374 0 Feb01 ? 00:00:00 sshd: oracle [priv]oracle 18933 18929 0 Feb01 ? 00:00:01 sshd: oracle@pts/0oracle 18934 18933 0 Feb01 pts/0 00:00:00 -bashroot 21126 15374 0 Feb01 ? 00:00:00 sshd: oracle [priv]oracle 21130 21126 0 Feb01 ? 00:00:00 sshd: oracle@pts/1oracle 21131 21130 0 Feb01 pts/1 00:00:00 -bashroot 21445 15374 0 Feb01 ? 00:00:00 sshd: oracle [priv]oracle 21449 21445 0 Feb01 ? 00:01:33 sshd: oracle@pts/2oracle 21450 21449 0 Feb01 pts/2 00:00:00 -bashoracle 26054 1 0 Feb01 ? 00:00:03 /u01/app/oracle/bin/tnslsnr LISTENER -inherit按照上面的说法,就是还有一个文件 /u01/app/oracle/dbs/lkORCL ,将该文件删掉,于是再次启动数据
<span style="font-family:Arial, Helvetica, sans-serif;"></span><pre name="code" class="sql">[oracle@localhost dbs]$ sqlplus / as sysdbaSQL*Plus: Release 11.2.0.3.0 Production on Mon Feb 2 10:26:46 2015Copyright (c) 1982, 2011, Oracle. All rights reserved.Connected to an idle instance.SQL> startupORACLE instance started.Total System Global Area 534462464 bytesFixed Size 2230072 bytesVariable Size 163580104 bytesDatabase Buffers 360710144 bytesRedo Buffers 7942144 bytesDatabase mounted.Database opened.SQL> show parameter instance
OK数据库启动成功
附: 关于 $ORACLE_HOME/dbs目录下面的文件的作用,在网上找到一个图片
0 0
- ORA-01078: failure in processing system parameters
- ORA-01078: failure in processing system parameters
- ORA-01078: failure in processing system parameters
- ORA-01078: failure in processing system parameters
- ORA-01078: failure in processing system parameters
- ORA-01078: failure in processing system parameters
- ORA-01078: failure in processing system parameters LRM-00109:
- [Oracle]ORA-01078: failure in processing system parameters解决
- oracle ORA-01078: failure in processing system parameters
- 处理 ORA-01078: failure in processing system parameters
- 连接数据库时提示ORA-01078: failure in processing system parameters
- 解决oracle 11g 问题之ORA-01078: failure in processing system parameters
- ORA-01078: failure in processing system parameters 启动oracle数据库时报错
- ORA-01078: failure in processing system parameters 问题的解决方法(oracle 11g)
- ORA-01078: failure in processing system parameters LRM-00109: could not open parameter file '/oracle
- oracle数据库启动失败--- failure in processing system parameters
- ORA-01078: failure in processing system parameters_flying
- ERROR: Failure processing PNG image in Android
- 编写C++中的两个类 一个只能在栈中分配空间 一个只能在堆中分配。
- rhel6.6替换到centos6.6源(163源)
- android 优化布局的三种形式
- 新建基于Git和Cocoapods的IOS项目(MVC模式),单身猿教你敲代码之新建项目
- Microsoft API 和参考目录
- ORA-01078: failure in processing system parameters
- IOS开发之通过官网系统学习UIKit
- IOS 第三方管理库管理 CocoaPods
- JavaScript中正则表达式test()、exec()、match() 方法区别
- java 对象转xml出错
- Redis客户端之Spring整合Jedis
- php使用cookie实现购物车
- LeetCode --- 26. Remove Duplicates from Sorted Array
- php sqlite分页。