今天在AIX 5.3平台上创建ORACLE数据库实例时,执行的创建脚本未出现报错,但是alertlog出现报错信息:
Wed Aug 3 13:32:32 2011
Completed: CREATE DATABASE "MS"
MAXINSTANCES 8
MAXLOGHISTORY 500
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 500
DATAFILE '/dev/vx/rdsk/oradgMS/lv_ms_system' SIZE 1995M REUSE
EXTENT MANAGEMENT LOCAL
SYSAUX DATAFILE '/dev/vx/rdsk/oradgMS/lv_ms_sysaux' SIZE 3995M REUSE
SMALLFILE DEFAULT TEMPORARY TABLESPACE TEMP TEMPFILE '/dev/vx/rdsk/oradgMS/lv_ms_temp' SIZE 29990M REUSE
SMALLFILE UNDO TABLESPACE "UNDOTBS1" DATAFILE '/dev/vx/rdsk/oradgMS/lv_ms_undo' SIZE 29990M REUSE
CHARACTER SET ZHS16GBK
NATIONAL CHARACTER SET AL16UTF16
LOGFILE GROUP 1 ('/dev/vx/rdsk/oradgMS/lv_ms_log1') SIZE 995M,
GROUP 2 ('/dev/vx/rdsk/oradgMS/lv_ms_log2') SIZE 995M,
GROUP 3 ('/dev/vx/rdsk/oradgMS/lv_ms_log3') SIZE 995M,
GROUP 4 ('/dev/vx/rdsk/oradgMS/lv_ms_log4') SIZE 995M,
GROUP 5 ('/dev/vx/rdsk/oradgMS/lv_ms_log5') SIZE 995M
USER SYS IDENTIFIED BY *USER SYSTEM IDENTIFIED BY
Wed Aug 3 13:38:34 2011
Errors in file /oracle/product/10.2.0/admin/MS/udump/ms_ora_197368.trc:
ORA-00600: internal error code, arguments: [kksCallPopCallback], [], [], [], [], [], [], []
ORA-04030: out of process memory when trying to allocate 88 bytes (kxs-heap-c,kxscomp)
Wed Aug 3 13:38:35 2011
Errors in file /oracle/product/10.2.0/admin/MS/udump/ms_ora_197368.trc:
ORA-04030: out of process memory when trying to allocate 72 bytes (kxs-heap-c,kdbmal allocation)
ORA-00600: internal error code, arguments: [kksCallPopCallback], [], [], [], [], [], [], []
ORA-04030: out of process memory when trying to allocate 88 bytes (kxs-heap-c,kxscomp)
Wed Aug 3 13:38:35 2011
Errors in file /oracle/product/10.2.0/admin/MS/udump/ms_ora_197368.trc:
ORA-00603: ORACLE server session terminated by fatal error
ORA-04030: out of process memory when trying to allocate 72 bytes (kxs-heap-c,kcbtmal allocation)
ORA-04030: out of process memory when trying to allocate 72 bytes (kxs-heap-c,kdbmal allocation)
ORA-04030: out of process memory when trying to allocate 72 bytes (kxs-heap-c,kdbmal allocation)
ORA-00600: internal error code, arguments: [kksCallPopCallback], [], [], [], [], [], [], []
ORA-04030: out of process memory when trying to allocate 88 bytes (kxs-heap-c,kxscomp)
Wed Aug 3 13:38:36 2011
Doing block recovery for file 1 block 13665
Wed Aug 3 13:38:40 2011
Doing block recovery for file 1 block 13665
Block recovery from logseq 1, block 690401 to scn 147326
Wed Aug 3 13:38:40 2011
Recovery of Online Redo Log: Thread 1 Group 1 Seq 1 Reading mem 0
Mem# 0: /dev/vx/rdsk/oradgMS/lv_ms_log1
Block recovery completed at rba 1.705519.16, scn 0.147327
由于是用脚本创建的,没有及时发现这个报错,之后又创建的数据字典等相关对象。在脚本执行结束后,我打算重启数据库,但是发现实例被直接终止。
oracle@/oracle>sqlplus / as sysdba
SQL*Plus: Release 10.2.0.3.0 - Production on Wed Aug 3 14:33:30 2011
Copyright (c) 1982, 2006, Oracle. All Rights Reserved.
Connected to an idle instance.
SQL> startup
ORACLE instance started.
Total System Global Area 6442450944 bytes
Fixed Size 2082480 bytes
Variable Size 1174407504 bytes
Database Buffers 5251268608 bytes
Redo Buffers 14692352 bytes
Database mounted.
ORA-01092: ORACLE instance terminated. Disconnection forced
同时alertlog出现ORA-00704: bootstrap process failure报错:
Wed Aug 3 13:44:50 2011
Starting ORACLE instance (normal)
LICENSE_MAX_SESSION = 0
LICENSE_SESSIONS_WARNING = 0
Picked latch-free SCN scheme 3
Autotune of undo retention is turned on.
IMODE=BR
ILAT =97
LICENSE_MAX_USERS = 0
SYS auditing is enabled
ksdpec: called for event 13740 prior to event group initialization
Starting up ORACLE RDBMS Version: 10.2.0.3.0.
System parameters with non-default values:
processes = 800
sessions = 885
sga_max_size = 6442450944
shared_pool_size = 536870912
large_pool_size = 536870912
java_pool_size = 0
streams_pool_size = 67108864
spfile = /dev/vx/rdsk/oradgMS/lv_ms_spfile
control_files = /dev/vx/rdsk/oradgMS/lv_ms_ctl1, /dev/vx/rdsk/oradgMS/lv_ms_ctl2, /dev/vx/rdsk/oradgMS/lv_ms_ctl3
db_block_size = 8192
db_cache_size = 5251268608
compatible = 10.2.0.3.0
log_archive_dest = /arch/MS
log_archive_format = MS_T%tS%sR%r.ARC
log_buffer = 14246912
db_files = 500
db_file_multiblock_read_count= 16
dml_locks = 1200
undo_management = AUTO
recyclebin = OFF
remote_login_passwordfile= EXCLUSIVE
audit_sys_operations = TRUE
db_domain =
utl_file_dir = /oracle/product/10.2.0/admin/MS
job_queue_processes = 10
parallel_max_servers = 64
background_dump_dest = /oracle/product/10.2.0/admin/MS/bdump
user_dump_dest = /oracle/product/10.2.0/admin/MS/udump
max_dump_file_size = 10240
core_dump_dest = /oracle/product/10.2.0/admin/MS/cdump
audit_file_dest = /oracle/product/10.2.0/admin/MS/adump
audit_trail = DB
db_name = MS
open_cursors = 600
optimizer_mode = RULE
pga_aggregate_target = 1048576000
PMON started with pid=2, OS id=204910
PSP0 started with pid=3, OS id=131942
MMAN started with pid=4, OS id=172168
DBW0 started with pid=5, OS id=115622
DBW1 started with pid=6, OS id=208902
LGWR started with pid=7, OS id=209574
CKPT started with pid=8, OS id=237820
SMON started with pid=9, OS id=213642
RECO started with pid=10, OS id=180448
CJQ0 started with pid=11, OS id=147728
MMON started with pid=12, OS id=217312
MMNL started with pid=13, OS id=176578
Wed Aug 3 13:44:51 2011
ALTER DATABASE MOUNT
Wed Aug 3 13:44:55 2011
Setting recovery target incarnation to 1
Wed Aug 3 13:44:55 2011
Successful mount of redo thread 1, with mount id 2788291475
Wed Aug 3 13:44:55 2011
Database mounted in Exclusive Mode
Completed: ALTER DATABASE MOUNT
Wed Aug 3 13:44:55 2011
ALTER DATABASE OPEN
Wed Aug 3 13:44:55 2011
Thread 1 opened at log sequence 1
Current log# 1 seq# 1 mem# 0: /dev/vx/rdsk/oradgMS/lv_ms_log1
Successful open of redo thread 1
Wed Aug 3 13:44:55 2011
MTTR advisory is disabled because FAST_START_MTTR_TARGET is not set
Wed Aug 3 13:44:55 2011
SMON: enabling cache recovery
Wed Aug 3 13:44:55 2011
Errors in file /oracle/product/10.2.0/admin/MS/udump/ms_ora_135880.trc:
ORA-00704: bootstrap process failure
ORA-39700: database must be opened with UPGRADE option
Wed Aug 3 13:44:55 2011
Error 704 happened during db open, shutting down database
USER: terminating instance due to error 704
Instance terminated by USER, pid = 135880
ORA-1092 signalled during: ALTER DATABASE OPEN...
尝试多次启动数据库实例,但是都无法启动。由于在一开始CREATE DATABASE时其实就已经出现了报错,所以把焦点放在了ORA-600和ORA-4030报错上。报错其实已经把问题现象描述得很清楚了:
ORA-04030: out of process memory when trying to allocate 88 bytes (kxs-heap-c,kxscomp)
在尝试给process分配内存的时候无法分配,从这里联想到了可能与系统资源限制有关:
oracle@/oracle>ulimit -a
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) 131072
stack(kbytes) 32768
memory(kbytes) 32768
coredump(blocks) 2097151
nofiles(descriptors) 2000
使用以下方法修改资源限制:
1. root用户登录系统,执行smit chuser
2. 在USER NAME项,输入oracle
3. 将Soft DATA segment和Soft STACK size设置为-1(unlimited),同时确认Soft FILE size和Soft CPU time设置也为-1(这两个默认为-1)
顺便修改了系统配置参数:
1. root用户登录系统,执行smit chgsys
2. 将Maximum number of PROCESSES allowed per user修改到2048或以上
修改后的资源限制信息:
oracle@/oracle >ulimit -a
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) unlimited
stack(kbytes) 4194304
memory(kbytes) 32768
coredump(blocks) 2097151
nofiles(descriptors) 2000
此时数据库实例可以正常启动
SQL> startup
ORACLE instance started.
Total System Global Area 6442450944 bytes
Fixed Size 2082480 bytes
Variable Size 1174407504 bytes
Database Buffers 5251268608 bytes
Redo Buffers 14692352 bytes
Database mounted.
Database opened.
本次的ORACLE PRODUCT安装由于我没有经手,而同事又没有严格按照Oracle官方的Database Installation Guide进行安装,这才导致了创建实例时出现的报错。
所以在安装ORACLE数据库时,一定要按照官方的Database Installation Guide进行安装,这也是为了避免日后不必要的麻烦。