1、 首先查看当前 sga 大" name="description" />
前面介绍了在solaris上设置oracle sga的时候,经常被2g的限制搞得很是郁闷,今天特意做了一个测试,修改sga从1.6g到2.2g
DB:8.1.7.4
OS:Sun Os 5.8
Host:Sun880
MILY: "Courier New"; mso-fareast-font-family: 'Courier New'">1、 首先查看当前sga大小
SQL> show sga;
Total System Global Area 1768890528 bytes
Fixed Size 73888 bytes
Variable Size 775274496 bytes
Database Buffers 983040000 bytes
Redo Buffers 10502144 bytes
2、 修改sga参数使得sga大于2G
3、 重新启动数据库,错误如下:
SQL> startup nomount
ORA-27123: unable to attach to shared memory segment
SVR4 Error: 22: Invalid argument
Additional information: 1
Additional information: 29200
SQL>
4、
$ cd $ORACLE_HOME/lib
$ cp libserver8.a libserver8.a.orig(备份这个文件)
5、cd $ORACLE_HOME/rdbms/lib
生成ksms.s文件
$$ORACLE_HOME/bin/genksms -b 0x60000000 >ksms.s(增至2.25g)
6、生成ksms.o文件
$ make -f ins_rdbms.mk ksms.o
$ ls -l ksms.o;ls -l ksms.s
-rw-r--r-- 1 oratest dba 77396 Aug 12 ksms.o
-rw-r--r-- 1 oratest dba 274901 Aug 12 ksms.s
$
7、归档ksms.o文件至libserver8.a文件
$ pwd
/T3/TEST/ora/testdb/8.1.7/rdbms/lib
$ ar -r $ORACLE_HOME/lib/libserver8.a ksms.o
$ ls *.mk
env_rdbms.mk ins_rdbms.mk
9、重新链接
$ make -f ins_rdbms.mk ioracle
- Linking Oracle
rm -f /T3/TEST/ora/testdb/8.1.7/rdbms/lib/oracle
/usr/clearcase/" target="_blank" >ccs/bin/ld -o /T3/TEST/ora/testdb/8.1.7/rdbms/lib/oracle -L/T3/TEST/ora/testdb/8.1.7/rdbms/lib/ -L/T3/TEST/ora/testdb/8.1.7/li
ld: fatal: file /data/TEST/ora/testdb/8.1.7/rdbms/lib/skgxns.o: open failed: No such file or directory
ld: fatal: File processing errors. No output written to /T3/TEST/ora/testdb/8.1.7/rdbms/lib/oracle
*** Error code 1
make: Fatal error: Command failed for target `/T3/TEST/ora/testdb/8.1.7/rdbms/lib/oracle'
开来一些配置文件的路径是不正确的,正确的应该是/T3/TEST/ora…………
10、根据出错信息‘/data/TEST/ora/testdb/8.1.7/rdbms/lib/skgxns.o: open failed:‘利用关键词查找包含这个路径的文件
$ grep skgxns.o *
nmliblist:/data/TEST/ora/testdb/8.1.7/rdbms/lib/skgxns.o
$
呵呵,看来就是这个文件在作怪,修改为T3/data/TEST/ora/testdb/8.1.7/rdbms/lib/skgxns.o即可
11、再次重新链接
$ make -f ins_rdbms.mk ioracle
- Linking Oracle
rm -f /T3/TEST/ora/testdb/8.1.7/rdbms/lib/oracle
/usr/ccs/bin/ld -o /T3/TEST/ora/testdb/8.1.7/rdbms/lib/oracle -L/T3/TEST/ora/testdb/8.1.7/rdbms/lib/ -L/T3/TEST/ora/testdb/8.1.7/li
mv -f /T3/TEST/ora/testdb/8.1.7/bin/oracle /T3/TEST/ora/testdb/8.1.7/bin/oracleO
mv /T3/TEST/ora/testdb/8.1.7/rdbms/lib/oracle /T3/TEST/ora/testdb/8.1.7/bin/oracle
chmod 6751 /T3/TEST/ora/testdb/8.1.7/bin/oracle
$
12、尝试启动数据库
$ su - oratest
Password:
Sun Microsystems Inc. SunOS 5.8 Generic Patch October 2001
$ sqlplus "/as sysdba"
SQL*Plus: Release 8.1.7.0.0 - Production on Fri Aug 12 2005
(c) Copyright 2000 Oracle Corporation. All rights reserved.
Connected to an idle instance.
SQL> startup nomount
ORACLE instance started.
Total System Global Area 2269659296 bytes
Fixed Size 73888 bytes
Variable Size 784523264 bytes
Database Buffers 1474560000 bytes
Redo Buffers 10502144 bytes
SQL>
Ok,搞定……….
Roman
2005.8.12
…………………………………………………………………………………………………………………………………………………………………………………………..