今天一台Linux服务器扩展了一下内存达到G开发的人自己修改了一下SGA结果数据库无法启动了
启动不了时出的错误是这个样子的:
[oracle@neirong oracle]$ sqlplus / as sysdba
SQL*Plus: Release Production on Fri Nov ::
Copyright (c) Oracle CorporationAll rights reserved
Connected to an idle instance
SQL> startup
ORA: unable to attach to shared memory segment
Linux Error: : Invalid argument
Additional information:
Additional information:
SQL> exit
Disconnected
在位平台上缺省的SGA最大只能扩展到G如果需要支持更大的内存就需要降低mapped_base重新Link Oracle软件
俺的平台为:
[oracle@neirong bdump]$ cat /etc/redhatrelease
Red Hat Enterprise Linux AS release (Taroon Update )
简单操作如下:
cd $ORACLE_HOME/rdbms/lib
cp ksmss ksmssbak
genksms s x > ksmss
make f ins_rdbmsmk ksmso
make f ins_rdbmsmk ioracle
此处先备份ksmss文件如果编译过程中出现错误保证操作可以被恢复:
恢复步骤大致如下:
cd $ORACLE_HOME/rdbms/lib
cp ksmssbak ksmss
genksms > ksmss
make f ins_rdbmsmk ksmso
make f ins_rdbmsmk ioracle
以下是操作日志:
[oracle@neirong dbs]$ cd $ORACLE_HOME/rdbms/lib
[oracle@neirong lib]$ genksms s x > ksmss
[oracle@neirong lib]$ make f ins_rdbmsmk ksmso
[oracle@neirong lib]$ make f ins_rdbmsmk ioracle
Linking Oracle
rm f /opt/oracle/product//rdbms/lib/oracle
gcco /opt/oracle/product//rdbms/lib/oracle L/opt/oracle/product//rdbms/lib/
L/opt/oracle/product//lib/ L/opt/oracle/product//lib/stubs/
WlE `test f /opt/oracle/product//rdbms/lib/skgaioio && echo
/opt/oracle/product//rdbms/lib/skgaioio` /opt/oracle/product//rdbms/lib/opimaio
/opt/oracle/product//rdbms/lib/ssoraedo /opt/oracle/product//rdbms/lib/ttcsoio
/opt/oracle/product//lib/nautabo /opt/oracle/product//lib/naeeto
/opt/oracle/product//lib/naecto /opt/oracle/product//lib/naedhso
/opt/oracle/product//rdbms/lib/configolserver lodm lskgxp lskgxn lclient
lvsn lwtcserver lcommon lgeneric /opt/oracle/product//rdbms/lib/defopto
lknlopt `if /usr/bin/ar tv /opt/oracle/product//rdbms/lib/libknlopta | grep
xsyeolapo > /dev/null >& ; then echo loraolap ; fi`
lslax lplslplp lserver lclientlvsn lwtcserver lcommon lgeneric
lknlopt lslax lplslplp ljox lserver locijdbcst lwwg
`cat /opt/oracle/product//lib/ldflags`lnsslb lncrypt lnsgr lnzjs
ln lnl lnro `cat /opt/oracle/product//lib/ldflags`lnsslb lncrypt
mv f /opt/oracle/product//bin/oracle /opt/oracle/product//bin/oracleO
mv /opt/oracle/product//rdbms/lib/oracle /opt/oracle/product//bin/oracle
chmod /opt/oracle/product//bin/oracle
此后数据库可以以超过G的SGA区设置启动:
SQL> startup
ORACLE instance started
Total System Global Area bytes
Fixed Size bytes
Variable Size bytes
Database Buffers bytes
Redo Buffers bytes
Database mounted
Database opened