千家信息网

Oracle Study之-AIX6.1构建Oracle 10gR2 RAC(5)

发表于:2025-01-23 作者:千家信息网编辑
千家信息网最后更新 2025年01月23日,Oracle Study之-AIX6.1构建Oracle 10gR2 RAC(5)一、安装Oracle软件以Oracle身份安装:Oracle软件安装完成后,运行"root.sh"脚本,完成Oracl
千家信息网最后更新 2025年01月23日Oracle Study之-AIX6.1构建Oracle 10gR2 RAC(5)

Oracle Study之-AIX6.1构建Oracle 10gR2 RAC(5)


一、安装Oracle软件

以Oracle身份安装:



Oracle软件安装完成后,运行"root.sh"脚本,完成Oracle安装!


二、配置网络(Listener)

通过netca配置网络:



[oracle@aix203 Disk1]$lsnrctl status

LSNRCTL for IBM/AIX RISC System/6000: Version 10.2.0.1.0 - Production on 16-MAR-2016 17:39:24Copyright (c) 1991, 2005, Oracle.  All rights reserved.Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))STATUS of the LISTENER------------------------Alias                     LISTENER_AIX203Version                   TNSLSNR for IBM/AIX RISC System/6000: Version 10.2.0.1.0 - ProductionStart Date                16-MAR-2016 17:06:09Uptime                    0 days 0 hr. 33 min. 14 secTrace Level               offSecurity                  ON: Local OS AuthenticationSNMP                      ONListener Parameter File   /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.oraListener Log File         /u01/app/oracle/product/10.2.0/db_1/network/log/listener_aix203.logListening Endpoints Summary...  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.8.251)(PORT=1521)))  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.8.203)(PORT=1521)))Services Summary...Service "PLSExtProc" has 1 instance(s).  Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...The command completed successfully

三、通过DBCA建库


建库准备工作:

由于DataBase是通过raw存储,在建库时为管理方便需做以下准备工作:


1)建立raw的链接文件

[oracle@aix203 oracle]$mkdir -p oradata/prod
[oracle@aix203 oracle]$ls
oraInventory oradata product
[oracle@aix203 ~]$cat mkln.sh

ln -s /dev/rsystem           /u01/app/oracle/oradata/prod/system01.dbfln -s /dev/rsysaux           /u01/app/oracle/oradata/prod/sysaux01.dbfln -s /dev/rusers            /u01/app/oracle/oradata/prod/users01.dbfln -s /dev/rundotbs1         /u01/app/oracle/oradata/prod/undotbs01.dbf ln -s /dev/rundotbs2         /u01/app/oracle/oradata/prod/undotbs02.dbfln -s /dev/rtemp             /u01/app/oracle/oradata/prod/temp01.dbfln -s /dev/rcontrol1_1         /u01/app/oracle/oradata/prod/control01.ctlln -s /dev/rcontrol2_2         /u01/app/oracle/oradata/prod/control02.ctlln -s /dev/rcontrol3_3         /u01/app/oracle/oradata/prod/control03.ctlln -s /dev/rredo1_1          /u01/app/oracle/oradata/prod/log11.logln -s /dev/rredo1_2          /u01/app/oracle/oradata/prod/log12.logln -s /dev/rredo2_1          /u01/app/oracle/oradata/prod/log21.logln -s /dev/rredo2_2          /u01/app/oracle/oradata/prod/log22.logln -s /dev/rindex            /u01/app/oracle/oradata/prod/index01.dbfln -s /dev/rspfile           /u01/app/oracle/oradata/prod/spfile01ln -s /dev/rexample          /u01/app/oracle/oradata/prod/example01.dbf

[oracle@aix203 ~]$sh mkln.sh

[oracle@aix203 ~]$ls -l /u01/app/oracle/oradata/prod/
total 0
l

rwxrwxrwx    1 oracle   oinstall         16 Mar 16 17:49 control01.ctl -> /dev/rcontrol1_1lrwxrwxrwx    1 oracle   oinstall         16 Mar 16 17:49 control02.ctl -> /dev/rcontrol2_2lrwxrwxrwx    1 oracle   oinstall         16 Mar 16 17:49 control03.ctl -> /dev/rcontrol3_3lrwxrwxrwx    1 oracle   oinstall         13 Mar 16 17:49 example01.dbf -> /dev/rexamplelrwxrwxrwx    1 oracle   oinstall         11 Mar 16 17:49 index01.dbf -> /dev/rindexlrwxrwxrwx    1 oracle   oinstall         13 Mar 16 17:49 log11.log -> /dev/rredo1_1lrwxrwxrwx    1 oracle   oinstall         13 Mar 16 17:49 log12.log -> /dev/rredo1_2lrwxrwxrwx    1 oracle   oinstall         13 Mar 16 17:49 log21.log -> /dev/rredo2_1lrwxrwxrwx    1 oracle   oinstall         13 Mar 16 17:49 log22.log -> /dev/rredo2_2lrwxrwxrwx    1 oracle   oinstall         12 Mar 16 17:49 spfile01 -> /dev/rspfilelrwxrwxrwx    1 oracle   oinstall         12 Mar 16 17:49 sysaux01.dbf -> /dev/rsysauxlrwxrwxrwx    1 oracle   oinstall         12 Mar 16 17:49 system01.dbf -> /dev/rsystemlrwxrwxrwx    1 oracle   oinstall         10 Mar 16 17:49 temp01.dbf -> /dev/rtemplrwxrwxrwx    1 oracle   oinstall         14 Mar 16 17:49 undotbs01.dbf -> /dev/rundotbs1lrwxrwxrwx    1 oracle   oinstall         14 Mar 16 17:49 undotbs02.dbf -> /dev/rundotbs2lrwxrwxrwx    1 oracle   oinstall         11 Mar 16 17:49 users01.dbf -> /dev/rusers

2)建立raw存储映射
[oracle@aix203 ~]$cat map.txt

system=/u01/app/oracle/oradata/prod/system01.dbf      sysaux=/u01/app/oracle/oradata/prod/sysaux01.dbfusers=/u01/app/oracle/oradata/prod/users01.dbf           undotbs1=/u01/app/oracle/oradata/prod/undotbs01.dbf         undotbs2=/u01/app/oracle/oradata/prod/undotbs02.dbf       temp=/u01/app/oracle/oradata/prod/temp01.dbf          control1=/u01/app/oracle/oradata/prod/control01.ctl      control2=/u01/app/oracle/oradata/prod/control02.ctl      control3=/u01/app/oracle/oradata/prod/control03.ctl       redo1_1=/u01/app/oracle/oradata/prod/log11.log       redo1_2=/u01/app/oracle/oradata/prod/log12.log     redo2_1=/u01/app/oracle/oradata/prod/log21.log          redo2_2=/u01/app/oracle/oradata/prod/log22.log       index=/u01/app/oracle/oradata/prod/index01.dbfspfile=/u01/app/oracle/oradata/prod/spfile01       example=/u01/app/oracle/oradata/prod/example01.dbf

在安装时,DataBase选择"裸设备"




四、验证

[oracle@aix203 ~]$crs_stat -t

Name           Type           Target    State     Host        ------------------------------------------------------------ora....03.lsnr application    ONLINE    ONLINE    aix203      ora.aix203.gsd application    ONLINE    ONLINE    aix203      ora.aix203.ons application    ONLINE    ONLINE    aix203      ora.aix203.vip application    ONLINE    ONLINE    aix203      ora....04.lsnr application    ONLINE    ONLINE    aix204      ora.aix204.gsd application    ONLINE    ONLINE    aix204      ora.aix204.ons application    ONLINE    ONLINE    aix204      ora.aix204.vip application    ONLINE    ONLINE    aix204      ora.prod.db    application    ONLINE    ONLINE    aix204      ora....d1.inst application    ONLINE    ONLINE    aix203      ora....d2.inst application    ONLINE    ONLINE    aix204

连接和访问数据库:
[oracle@aix203 ~]$sqlplus '/as sysdba'

SQL*Plus: Release 10.2.0.1.0 - Production on Wed Mar 16 18:12:43 2016
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP and Data Mining options
SQL> select instance_name,status from gv$instance;

INSTANCE_NAME    STATUS---------------- ------------prod1            OPENprod2            OPEN

SQL> select name from v$datafile;

NAME--------------------------------------------------------------------------------/u01/app/oracle/oradata/prod/system01.dbf/u01/app/oracle/oradata/prod/undotbs01.dbf/u01/app/oracle/oradata/prod/sysaux01.dbf/u01/app/oracle/oradata/prod/users01.dbf/u01/app/oracle/oradata/prod/example01.dbf/u01/app/oracle/oradata/prod/undotbs02.dbf6 rows selected.


0