分类: Oracle
2008-04-24 16:52:52
8、升级9204
9、建库
A、首先创建所需要的LV
mklv -y lv_system datavg 30
mklv -y lv_undo1 datavg 30
mklv -y lv_undo2 datavg 30
mklv -y lv_temp1 datavg 30
mklv -y lv_redo1 datavg 3 hdisk1
mklv -y lv_redo2 datavg 3 hdisk2
mklv -y lv_redo3 datavg 3 hdisk3
mklv -y lv_ctrl1 datavg 2 hdisk1
mklv -y lv_ctrl2 datavg 2 hdisk2
mklv -y lv_ctrl3 datavg 2 hdisk3
B、DBCA建库
略
10、配置srvctl
srvctl add database -test -o /oracle/app/product/db -s /dev/rlv_spfile
srvctl add instace -d test -i test1 -n test1
srvctl add instace -d test -i test2 -n test2
srvctl start database -d test
遇到的问题
-------------------------------------------------------------------------------------------------------------------------------------------
1、在升级9204过程中提示不能写文件$ORACLE_HOME/lib32/libnjni9.so
到该目录一看已经存在有该文件,于是把已经存在的文件改名后retry即OK。
2、$ sqlplus "/as sysdba"
exec(): 0509-036 Cannot load program sqlplus because of the following errors:
0509-130 Symbol resolution failed for /usr/lib/libc.a[aio_64.o] because:
0509-136 Symbol kaio_rdwr64 (number 1) is not exported from
dependent module /unix.
0509-136 Symbol listio64 (number 2) is not exported from
dependent module /unix.
0509-136 Symbol acancel64 (number 3) is not exported from
dependent module /unix.
0509-136 Symbol iosuspend64 (number 4) is not exported from
dependent module /unix.
0509-136 Symbol aio_nwait (number 5) is not exported from
dependent module /unix.
0509-136 Symbol aio_nwait64 (number 6) is not exported from
dependent module /unix.
0509-136 Symbol aio_nwait_timeout (number 7) is not exported from
dependent module /unix.
0509-136 Symbol aio_nwait_timeout64 (number 8) is not exported from
dependent module /unix.
0509-026 System error: Error 0
0509-192 Examine .loader section symbols with the
'dump -Tv' command.
$ lsdev -Cc aio
aio0 Defined Asynchronous I/O (Legacy)
smit aio修改
# lsdev -Cc aio
aio0 Available Asynchronous I/O (Legacy)
# su - oracle
$ sqlplus "/as sysdba"
SQL*Plus: Release
Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
Connected to an idle instance.
SQL>
3、$ netca
Error loading native library: libnjni9.so.
java.lang.UnsatisfiedLinkError: jniGetOracleHome
at oracle.net.common.NetGetEnv.getOracleHome(NetGetEnv.java)
at oracle.net.ca.CmdlineArgs.setOraArgs(CmdlineArgs.java)
at oracle.net.ca.NetCA.
at oracle.net.ca.NetCA.main(NetCA.java)
解决方法:
$ find /oracle -name libnjni9.so -print
/oracle/app/product/db/lib/libnjni9.so
/oracle/app/product/db/lib32/libnjni9.so
$ cd $ORACLE_HOME/lib
$ mv libnjni9.so libnjni9.so.bak
4、$ gsdctl start
Failed to start GSD on local node
把ORACLE用户加到hagsuser组后仍然报错
设置对gsd的跟踪发现之前忘了改lv_ocm的属主,oracle用户无法访问共享磁盘
To Trace GSD:
-------------
A. vi the gsd.sh file in the $ORACLE_HOME/bin directory.
For Windows: Right click on the OraHome\bin\gsd.bat file and choose Edit.
B. At the end of the file, look for the following line:
exec $JRE -classpath $CLASSPATH oracle.ops.mgmt.daemon.OPSMDaemon $MY_OHOME
C. Add the following just before the -classpath in the 'exec $JRE' line:
-DTRACING.ENABLED=true -DTRACING.LEVEL=2
D. At the end of the gsd.sh file, the string should now look like this:
exec $JRE -DTRACING.ENABLED=true -DTRACING.LEVEL=2 -classpath.....
E. Test this by running gsd.sh:
[opcbsol1]/u01/home/usupport> gsd.sh
[main][9:31:8:860] Daemon: argument is /u01/32bit/app/oracle/product/
[main][9:31:8:893] tracing is true; at level 2
[main][9:31:8:893] trace file is /u01/32bit/app/oracle/product/
cont...
5、DBCA建库遇到ORA-27504
这个问题的产生基本是跟UDP_RECVSPACE这个网络参数值有关,oracle是建议把该值改到655360,
在aix中修改该值的方法是基于操作系统是否运行于兼容模式,是否运行于兼容模式用下面命令查看
/usr/sbin/lsattr -E -l sys0 -a pre520tune
返回pre520tune enable Pre-520 tuning compatibility mode True为兼容模式
非兼容模式返回的是disable
兼容模式的修改
no -o udp_recvspace=655360
非兼容模式的修改
no -p -o udp_recvcspace=655360
在这一步花了很多时间。一直报ORA-27504错误,这个错误是跟网络相关的,ORACLE找不到网络进行通信
最后采取在参数文件中设置
test1.cluster_interconnects='192.168.112.11:192.168.1.11'
test2.cluster_interconnects='192.168.112.12:192.168.1.12'
参数才没有这个报错。
后来经过仔细检查发现是由于前面设置网卡没有指定网卡属性是私有还是公有导致。
6、启动数据库时遇到ORA-01618错误
意思是thread 2没有被激活
查看v$log视图 发现没有thread2的日志,于是添加日志
SQL> select * from v$log;
GROUP# THREAD# SEQUENCE# BYTES MEMBERS ARC STATUS FIRST_CHANGE# FIRST_TIM
---------- ---------- ---------- ---------- ---------- --- ---------------- ------------- ---------
1 1 11 99614720 1 NO CURRENT 199160 14-APR-08
2 1 10 99614720 1 NO INACTIVE 179002 11-APR-08
SQL> alter database add logfile thread 2 '/dev/rlv_redo3' size 99614720;
SQL> alter database add logfile thread 2 '/dev/rlv_redo4' size 99614720;
SQL> alter database enable thread 2;
SQL> select thread#,status from gv_$thread;
THREAD# STATUS
---------- ------
1 OPEN
2 CLOSED
再启动即可即可