oracle 执行netca 时报错ORA-01078 & LRM-00109,ORA-01102,ORA-12541,ORA-12528,ORA-01033和ORA-28547等错误解决方法

 

oracle 执行netca 时报错 An unexpected exception has been detected in native code outside the VM 的解决方案

安装好oracle 10后,配置网络监听,执行 netca ,报错如下:

Oracle Net Services Configuration:   An unexpected exception has been detected in native code outside the VM. Unexpected Signal : 11 occurred at PC=0xB7E52093 Function=index+0x63

Library=/lib/tls/libc.so.6   Current Java thread: at oracle.net.common.NetGetEnv.getDNSDomain(Native Method) at oracle.net.ca.ConfigureProfile.setDefaultProfileParams(Unknown Source) at oracle.net.ca.InitialSetup.setupConfigObjects(Unknown Source) at oracle.net.ca.InitialSetup.<init>(Unknown Source) at oracle.net.ca.NetCA.main(Unknown Source)   Dynamic libraries: 08048000-08056000 r-xp 00000000 03:06 263311 /u01/oracle/product/10.2.0/db/jdk/jre/bin/java 08056000-08059000 rwxp 0000d000 03:06 263311 /u01/oracle/product/10.2.0/db/jdk/jre/bin/java 08059000-08365000 rwxp 08059000 00:00 0 [heap] a90b4000-a90c3000 r-xp 00000000 03:06 15511 /lib/tls/libresolv-2.3.2.so a90c3000-a90c4000 rwxp 0000f000 03:06 15511 /lib/tls/libresolv-2.3.2.so   [...]   b7f28000-b7f30000 r-xp 00000000 03:06 263228 /u01/oracle/product/10.2.0/db/jdk/jre/lib/i386/native_threads/libhpi.so b7f30000-b7f31000 rwxp 00007000 03:06 263228 /u01/oracle/product/10.2.0/db/jdk/jre/lib/i386/native_threads/libhpi.so b7f32000-b7f48000 r-xp 00000000 03:06 15468 /lib/ld-2.3.2.so b7f48000-b7f49000 rwxp 00015000 03:06 15468 /lib/ld-2.3.2.so bf833000-bf848000 rwxp bf833000 00:00 0 [stack] ffffe000-fffff000 ---p 00000000 00:00 0 [vdso]   Heap at VM Abort: Heap def new generation total 576K, used 345K [0xab7b0000, 0xab850000, 0xabc90000) eden space 512K, 60% used [0xab7b0000, 0xab7fd228, 0xab830000) from space 64K, 58% used [0xab840000, 0xab849508, 0xab850000) to space 64K, 0% used [0xab830000, 0xab830000, 0xab840000) tenured generation total 1408K, used 544K [0xabc90000, 0xabdf0000, 0xaf7b0000) the space 1408K, 38% used [0xabc90000, 0xabd18148, 0xabd18200, 0xabdf0000) compacting perm gen total 4096K, used 3573K [0xaf7b0000, 0xafbb0000, 0xb37b0000) the space 4096K, 87% used [0xaf7b0000, 0xafb2d678, 0xafb2d800, 0xafbb0000)   Local Time = Tue Oct 23 21:36:23 2007 Elapsed Time = 6 # # The exception above was detected in native code outside the VM # # Java VM: Java HotSpot™ Client VM (1.4.2_08-b03 mixed mode) # # An error report file has been saved as hs_err_pid9698.log. # Please refer to the file for further information. #


错误的原因是未在 /etc/hosts 文件中添加hostname对应的ip地址。
解决:

查看主机名shell下执行 hostname    譬如  hostnameAAA
查看IP地址,执行ifconfig                    譬如  XXX.XXX.X.XXX

vi /etc/hosts
在 127.0.0.1 这一行的下面添加一行:
XXX.XXX.X.XXX  hostnameAAA

保存即可。

 

怎样解决ORA-01078 & LRM-00109错误

SQL> startup
ORA-01078: failure in processing system parameters
LRM-00109: could not open parameter file '/opt/oracle/products/10.1.0.3/db_1/dbs/initrawdb.ora'


解决办法:

cp $ORACLE_BASE/admin/$ORACLE_SID/pfile/init.ora /opt/oracle/products/10.1.0.3/db_1/dbs/initrawdb.ora


> sqlplus /nolog

SQL*Plus: Release 10.1.0.3.0 - Production on Thu Jun 8 13:16:00 2006

Copyright (c) 1982, 2004, Oracle. All rights reserved.

SQL> conn / as sysdba
Connected to an idle instance.
SQL> startup
ORACLE instance started.

Total System Global Area 167772160 bytes
Fixed Size 778212 bytes
Variable Size 57679900 bytes
Database Buffers 109051904 bytes
Redo Buffers 262144 bytes
Database mounted.
Database opened.
SQL>

问题解决!

注:Oracle在启动过程中,需要读取参数文件(pfile/spfile)来创建实例.Oracle在启动过程中,寻找参数文件的顺序为:spfile<sid>.ora,spfile.ora,init<sid>.ora.

问题补充:错误信息:
SQL> conn sys/oracle@xzomc as sysdba
Connected to an idle instance.
SQL> startup pfile=/oracleapp/u01/app/oracle/admin/xzomc/pfile/initgomcr.ora
LRM-00109: could not open parameter file '/oracleapp/u01/app/oracle/admin/xzomc/pfile/initgomcr.ora'
ORA-01078: failure in processing system parameters

解决办法:
$ cp $ORACLE_BASE/admin/xzomc/pfile/init.ora.728200794421 /oracleapp/u01/app/oracle/product/10.2.0/dbs/initrawdb.ora

SQL> conn sys/oracle@xzomc as sysdba;
Connected to an idle instance.
SQL> startup pfile=$ORACLE_BASE/admin/xzomc/pfile/init.ora.728200794421
ORACLE instance started.

Total System Global Area 2550136832 bytes
Fixed Size 1980808 bytes
Variable Size 536872568 bytes
Database Buffers 1996488704 bytes
Redo Buffers 14794752 bytes
Database mounted.
Database opened.

也可能是ORACLE_SID的问题,问题出在设置oracle用户.bash_profile文件的ORACLE_SID变量时,写为了 ORACLE_SID=wilson ,在startup的时候报错,其实真正的数据库实例名称是venus。

 

ORA-01102 cannot mount database in EXCLUSIVE mode
出现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 -mop
IPC status 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-rw-rw- root root 0 899 899
m 1 0×4e0c0002 –rw-rw-rw- root root 2 899 901
m 2 0×4120007a –rw-rw-rw- root root 2 899 901
m 458755 0×0c6629c9 –rw-r—– root sys 2 9113 17065
m 4 0×06347849 –rw-rw-rw- root root 1 1661 9150
m 65541 0xffffffff –rw-r–r– root root 0 1659 1659
m 524294 0×5e100011 –rw——- root root 1 1811 1811
m 851975 0×5fe48aa4 –rw-r—– oracle oinstall 66 2017 25076
然后它ID号清除共享内存段:

$ipcrm –m 851975
对于信号量,可以用以下命令查看:

$ ipcs -sop
IPC status 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 root
… …
s 14 0×6c200ad8 –ra-ra-ra- root root
s 15 0×6d200ad8 –ra-ra-ra- root root
s 16 0×6f200ad8 –ra-ra-ra- root root
s 17 0xffffffff –ra-r–r– root root
s 18 0×410c05c7 –ra-ra-ra- root root
s 19 0×00446f6e –ra-r–r– root root
s 20 0×00446f6d –ra-r–r– root root
s 21 0×00000001 –ra-ra-ra- root root
s 45078 0×67e72b58 –ra-r—– oracle oinstall
根据信号量ID,用以下命令清除信号量:

$ipcrm -s 45078
如果是 oracle 进程没有关闭,用以下命令查出存在的 oracle 进程:

$ 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)
… …
然后用kill -9命令杀掉进程

$kill -9 <PID>
总结:

当发生1102错误时,可以按照以下流程检查、排错:

1.如果是HA系统,检查其他节点是否已经启动实例;
2.检查 oracle 进程是否存在,如果存在则杀掉进程;
3.检查信号量是否存在,如果存在,则清除信号量;
4.检查共享内存段是否存在,如果存在,则清除共享内存段;
5.检查锁内存文件lk<sid>和sgadef<sid>.dbf是否存在,如果存在,则删除。

 

Oracle数据库】ORA-12541: TNS:no listener 的详细解决方案

 

解决ORA-12528

lsnrctl status
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=lypch)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=//./pipe/EXTPROCipc)))
Services Summary...
Service " LSExtProc" has 1 instance(s).
  Instance " LSExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "ammicly" has 1 instance(s).
  Instance "ammicly", status BLOCKED, has 1 handler(s) for this service...
The command completed successfully

这个问题说明数据库没有Mount
连接数据库,发现:
ORA-12528: TNS:listener: all appropriate instances are blocking new connections
用sqlplus /nolog
sql>connect [email=sys/ammic@amicly]sys/ammic@amicly [/email] as sysdba
ORA-12528: TNS:listener: all appropriate instances are blocking new connections

连接的问题可以通过修改listener.ora的参数,把动态的参数设置为静态的参数,红色标注部分,然后从新启动监听,就OK
SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = C:/oracle/product/10.1.0/db_1)
      (PROGRAM = extproc)
    )
    (SID_DESC =
      (GLOBAL_DBNAME = ammicly)
      (ORACLE_HOME = c:/oracle/product/10.1.0/db_1)
      (SID_NAME = ammicly)
    )
  )
LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = TCP)(HOST = lypch )(PORT = 1521))
      )
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
      )
    )
  )

通过修改tnsnames.ora的参数,红色表注部分
# tnsnames.ora Network Configuration File: C:/oracle/product/10.1.0/db_1
/network/admin/tnsnames.ora
# Generated by Oracle configuration tools.
AMMICLY =
  (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = lypch )(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = ammicly)
      (UR=A)
    )
  )
EXTPROC_CONNECTION_DATA =
  (DESCRIPTION =
    (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
    )
    (CONNECT_DATA =
      (SID = PLSExtProc)
      (PRESENTATION = RO)
    )
  )

然后 sqlplus /nolog
SQL>alter database mount;
SQL>alter database open;

 

ORA-01033和ORA-28547

   数据库重启以后,一连接就跳出ORA-28547的错误,在网上遍寻解决之道,屡次试过后,此方法有效:将listener.ora中的(PROGRAM = extproc)这句注释掉就可以了。去网上找过,extproc是一个扩展的程序调用接口协议,  连接和调用外部的操作系统程序或进程用时会用到。

错误,

ORA-01033: ORACLE initialization or shutdown in progress 

原因

删除SID时,删除了一个表空间的数据文件

处理过程

Microsoft Windows XP [Version 5.1.2600]

(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\xxxx>sqlplus system/yang@ora

 

SQL*Plus: Release 10.1.0.2.0 - Production on 火 1月 15 12:19:18 2008

 

Copyright (c) 1982, 2004, Oracle. All rights reserved.

 

ERROR:

ORA-01033: ORACLE initialization or shutdown in progress

 

NOLOG登录数据库

C:\Documents and Settings\xxxx>sqlplus /nolog

 

SQL*Plus: Release 10.1.0.2.0 - Production on 火 1月 15 12:35:54 2008

 

Copyright (c) 1982, 2004, Oracle. All rights reserved.

 

使用SYSDBA连接数据库

SQL> connect sys/yang as sysdba

Connected.

关闭数据库

SQL> shutdown normal

ORA-01109: database not open

 

Database dismounted.

ORACLE instance shut down.

 

重启到MOUNT状态

SQL> startup mount

ORACLE instance started.

 

Total System Global Area 171966464 bytes

Fixed Size                   787988 bytes

Variable Size             145488364 bytes

Database Buffers           25165824 bytes

Redo Buffers                 524288 bytes

Database mounted.

 

ALTER 数据库 OPEN状态

SQL> alter database open;

alter database open

*

ERROR at line 1:

ORA-01147: SYSTEM tablespace file 1 is offline

ORA-01110: data file 1: 'D:\ORACLE\PRODUCT\10.1.0\ORADATA\ORA\SYSTEM01.DBF'

显示出 datafile 1发生错误 

 

修改datafile 1的状态

SQL> alter database datafile 1 online;

 

Database altered.

 

数据库状态

SQL> alter database open; 

Database altered.

数据库正常

SQL> conn system/yang@ora

Connected.

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值