一 某系统数据库后台报ORA-600错误
Fri Dec 05 22:00:09 2014
Errors in file /oracle/app/diag/rdbms/test/test2/trace/test2_j002_344438.trc (incident=322196):
ORA-00600: internal error code, arguments: [unable to load XDB library], [], [], [], [], [], [], [], [], [], [], []
Incident details in: /oracle/app/diag/rdbms/test/test2/incident/incdir_322196/test2_j002_344438_i322196.trc:
二 查询步骤:
1 查询数据库实例的进程号
$ ps -ef|grep smon
oracle 667750 1 0 Feb 18 - 0:13 asm_smon_+ASM
oracle 1007852 1 0 Feb 18 - 0:46 ora_smon_instance1
2 查询监听是否有继承性
$ ps -ef|grep lsn
---以下为查询结果
oracle 630852 1 0 Feb 18 - 10:06 /db01/app/oracle/product/11.2.0/grid2/bin/tnslsnr LISTENER -inherit
3 查询对应的数据库实例的环境变量是否设置:
$ ps eauwww 1007852
---以下为查询结果
USER PID %CPU %MEM SZ RSS TTY STAT STIME TIME COMMAND
oracle 1007852 0.0 1.0 199752 90152 - A Feb 18 0:46 ora_smon_instance1 _=/db01/app/oracle/product/11.2.0/grid2/bin/oraagent.bin
LANG=en_US LOGIN=oracle __CLSAGENT_INCARNATION=2
[...]
ORA_CRS_HOME=/db01/app/oracle/product/11.2.0/grid2
ORACLE_HOME=/db01/app/oracle/product/11.2.0/db2
LIBPATH= ---此处证明此环境变量未设置
LD_LIBRARY_PATH=
经过查询,发现LIBPATH、LD_LIBRARY_PATH环境变量未设置。以下为官方解决方法。
参考的Oracle官方文档:ORA-00600 [Unable To Load XDB Library] On AIX Even If LIBPATH And LD_LIBRARY_PATH are set (文档 ID 1424739.1)
In this Document
|
|
Symptoms |
|
|
Cause |
|
|
Solution |
|
|
References |
Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Database Exadata Express Cloud Service - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Cloud Exadata Service - Version N/A and later
Information in this document applies to any platform.
***** Checked for Relevance on 04-Jan-2016 *****
Several trace files are created for the error
ORA-00600: internal error code, arguments: [unable to load XDB library], [], [], [], [], [], [], [], [], [], [], []
- Call Stack Trace is
skdstdst ksedst1 ksedst dbkedDefDump ksedmp qm_init_uga_helper rpiswu2 qm_run_as_ksys qm_init_uga psdnopInit
psdnop piinadgha spefcpfa spefmccallstd pextproc peftrusted psdexsp rpiswu2 psdextp pefccal
pefcal pevm_FCAL pfrinstr_FCAL pfrrun_no_tool pfrrun plsql_run peicnt kkxexe opiexe kpoal8
opiodr kpoodr upirtrc kpurcsc kpuexec OCIStmtExecute jslvec_execcb jslvswu jslve_execute0 jslve_execute
rpiswu2 kkjex1e kkjsexe kkjrdp opirip opidrv sou2o opimai_real ssthrdmain main start
The main cause for the error ORA-00600 [Unable to load XDB library] is when LIBPATH is not set, or incorrectly set, however
LIBPATH environment variable was set correctly before the database and the listener were started up.
The database was started with the
srvctl start database
command and the result of 'ps eauwww <smon_pid> OS command, as in the follow example:
$ ps -ef|grep smon
oracle 667750 1 0 Feb 18 - 0:13 asm_smon_+ASM
oracle 987364 1 0 Feb 18 - 0:34 ora_smon_pdmt1
oracle 995558 1 0 Feb 18 - 0:36 ora_smon_wqst1
oracle 1003754 1 0 Feb 18 - 0:27 ora_smon_mgt1
oracle 1007852 1 0 Feb 18 - 0:46 ora_smon_pdmc1
oracle 2314332 2289748 0 09:08:12 pts/0 0:00 grep smon
$ ps -ef|grep lsn
oracle 630852 1 0 Feb 18 - 10:06 /db01/app/oracle/product/11.2.0/grid2/bin/tnslsnr LISTENER -inherit
oracle 2101326 2289748 0 09:08:44 pts/0 0:00 grep lsn
$ ps eauwww 1007852
USER PID %CPU %MEM SZ RSS TTY STAT STIME TIME COMMAND
oracle 1007852 0.0 1.0 199752 90152 - A Feb 18 0:46 ora_smon_pdmc1 _=/db01/app/oracle/product/11.2.0/grid2/bin/oraagent.bin
LANG=en_US LOGIN=oracle __CLSAGENT_INCARNATION=2
[...]
ORA_CRS_HOME=/db01/app/oracle/product/11.2.0/grid2
ORACLE_HOME=/db01/app/oracle/product/11.2.0/db2
LIBPATH=
LD_LIBRARY_PATH=
$ ps eauwww 630852
USER PID %CPU %MEM SZ RSS TTY STAT STIME TIME COMMAND
oracle 630852 0.0 0.0 17576 5388 - A Feb 18 10:07 /db01/app/oracle/product/11.2.0/grid2/bin/tnslsnr LISTENER -inherit _=/db01/app/oracle/product/11.2.0/grid2/bin/oraagent.bin
LANG=en_US
LOGIN=oracle
[....]
ORA_CRS_HOME=/db01/app/oracle/product/11.2.0/grid2
ORACLE_HOME=/db01/app/oracle/product/11.2.0/grid2
LIBPATH=/db01/app/oracle/product/11.2.0/grid2/lib:/opt/ORCLcluster/lib:/usr/lib
LD_LIBRARY_PATH=/db01/app/oracle/product/11.2.0/grid2/lib:/opt/ORCLcluster/lib:/usr/lib:/db01/app/oracle/product/11.2.0/grid2/lib:/opt/ORCLcluster/lib:/usr/lib:/db01/app/oracle/product/11.2.0/grid2/lib:/opt/ORCLcluster/lib:/usr/lib:
shows that the LIBPATH was not inherited by the smon process:
LIBPATH=
while it was inherited for the listener:
LIBPATH=/db01/app/oracle/product/11.2.0/grid2/lib:/opt/ORCLcluster/lib:/usr/lib.
Running
srvctl getenv database -d <dbname>
shows that there is no environment variable set at grid control level
If the database starts via srvctl command, variables need to be set using the 'svrctl setenv' as in the following commands
srvctl setenv database -d <dbname> -t 'LIBPATH=<replace with full ORACLE_HOME Path>/lib'
srvctl setenv listener -t 'LIBPATH=<replace with full ORACLE_HOME Path>/lib'
Example:
srvctl setenv database -d v1122a32 -t 'LIBPATH=/u01/oracle/product/11.2.0.2/db_home1/lib'
and both the listener and the database must be restarted using again the srvctl command.
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/69996316/viewspace-2787033/ ,如需转载,请注明出处,否则将追究法律责任。