Linux平台 Oracle 10gR2(10.2.0.5)RAC安装 Part3:db安装和升级

Linux平台 Oracle 10gR2(10.2.0.5)RAC安装 Part3:db安装和升级

环境:OEL 5.7 + Oracle 10.2.0.5 RAC

5.安装Database软件

6.升级Database软件

7.创建数据库

Linux平台 Oracle 10gR2 RAC安装指导:

Part1:Linux平台 Oracle 10gR2(10.2.0.5)RAC安装 Part1:准备工作

Part2:Linux平台 Oracle 10gR2(10.2.0.5)RAC安装 Part2:clusterware安装和升级

Part3:Linux平台 Oracle 10gR2(10.2.0.5)RAC安装 Part3:db安装和升级

5.安装Database软件

5.1 解压安装介质

[oracle@oradb27 ~]$ cd /u01/media/
[oracle@oradb27 media]$ gunzip 10201_database_linux_x86_64.cpio.gz
[oracle@oradb27 media]$ cpio -idmv < 10201_database_linux_x86_64.cpio
[oracle@oradb27 media]$ cd database/
[oracle@oradb27 database]$ ls
doc install response runInstaller stage welcome.html
[oracle@oradb27 database]$ cd install/
[oracle@oradb27 install]$ ls
addLangs.sh addNode.sh images lsnodes oneclick.properties oraparam.ini oraparamsilent.ini resource response unzip
[oracle@oradb27 install]$ vi oraparam.ini
#找到“[Certified Versions]”这里,行尾添加redhat-5,保存退出
[Certified Versions]
Linux=redhat-3,SuSE-9,redhat-4,UnitedLinux-1.0,asianux-1,asianux-2,redhat-5

5.2 开始安装db软件

使用xquartz连接到节点1,开始调用图形安装db软件。

[oracle@oradb27 database]$ pwd
/u01/media/database
[oracle@oradb27 database]$ ls
doc install response runInstaller stage welcome.html
[oracle@oradb27 database]$ ./runInstaller

5.3 root用户执行脚本

root用户按照提示执行脚本@all nodes

/u01/app/oracle/product/10.2.0.5/dbhome_1/root.sh

然后继续下一步,提示完成安装:

The following J2EE Applications have been deployed and are accessible at the URLs listed below.

iSQL*Plus URL:
http://oradb27:5561/isqlplus iSQL*Plus DBA URL:
http://oradb27:5561/isqlplus/dba

到这里,就完成db 10.2.0.1的软件安装。

6.升级Database软件

6.1 升级db软件

[oracle@oradb27 Disk1]$ pwd
/u01/media/Disk1
[oracle@oradb27 Disk1]$ ls
install patch_note.htm response runInstaller stage
[oracle@oradb27 Disk1]$ ./runInstaller

6.2 root用户执行脚本@all nodes

root用户执行脚本@all nodes

/u01/app/oracle/product/10.2.0.5/dbhome_1/root.sh

执行完成后,返回图形界面完成安装:

The iSQL*Plus URL is:
http://oradb27:5560/isqlplus The iSQL*Plus DBA URL is:
http://oradb27:5560/isqlplus/dba

到这里,成功升级db软件到10.2.0.5版本。

7.创建数据库

7.1 创建监听

netca创建监听。

成功后查看集群资源,已经多了监听资源:

[oracle@oradb27 Disk1]$ crs_stat -t -v
Name Type R/RA F/FT Target State Host
----------------------------------------------------------------------
ora....27.lsnr application 0/5 0/0 ONLINE ONLINE oradb27
ora....b27.gsd application 0/5 0/0 ONLINE ONLINE oradb27
ora....b27.ons application 0/3 0/0 ONLINE ONLINE oradb27
ora....b27.vip application 0/0 0/0 ONLINE ONLINE oradb27
ora....28.lsnr application 0/5 0/0 ONLINE ONLINE oradb28
ora....b28.gsd application 0/5 0/0 ONLINE ONLINE oradb28
ora....b28.ons application 0/3 0/0 ONLINE ONLINE oradb28
ora....b28.vip application 0/0 0/0 ONLINE ONLINE oradb28
[oracle@oradb27 Disk1]$

7.2 创建ASM

dbca 配置ASM磁盘组,添加DATA,FRA磁盘组。

配置ASM磁盘组的过程中会创建ASM实例,成功后,查看集群资源,已经多了asm实例资源:

[oracle@oradb27 Disk1]$ crs_stat -t -v
Name Type R/RA F/FT Target State Host
----------------------------------------------------------------------
ora....SM1.asm application 0/5 0/0 ONLINE ONLINE oradb27
ora....27.lsnr application 0/5 0/0 ONLINE ONLINE oradb27
ora....b27.gsd application 0/5 0/0 ONLINE ONLINE oradb27
ora....b27.ons application 0/3 0/0 ONLINE ONLINE oradb27
ora....b27.vip application 0/0 0/0 ONLINE ONLINE oradb27
ora....SM2.asm application 0/5 0/0 ONLINE ONLINE oradb28
ora....28.lsnr application 0/5 0/0 ONLINE ONLINE oradb28
ora....b28.gsd application 0/5 0/0 ONLINE ONLINE oradb28
ora....b28.ons application 0/3 0/0 ONLINE ONLINE oradb28
ora....b28.vip application 0/0 0/0 ONLINE ONLINE oradb28

7.3 创建数据库

dbca 创建数据库。

创建完成后,查看集群资源,多了数据库实例资源和数据库资源:

[oracle@oradb27 Disk1]$ crs_stat -t -v
Name Type R/RA F/FT Target State Host
----------------------------------------------------------------------
ora.jyrac.db application 0/0 0/1 ONLINE ONLINE oradb28
ora....c1.inst application 0/5 0/0 ONLINE ONLINE oradb27
ora....c2.inst application 0/5 0/0 ONLINE ONLINE oradb28
ora....SM1.asm application 0/5 0/0 ONLINE ONLINE oradb27
ora....27.lsnr application 0/5 0/0 ONLINE ONLINE oradb27
ora....b27.gsd application 0/5 0/0 ONLINE ONLINE oradb27
ora....b27.ons application 0/3 0/0 ONLINE ONLINE oradb27
ora....b27.vip application 0/0 0/0 ONLINE ONLINE oradb27
ora....SM2.asm application 0/5 0/0 ONLINE ONLINE oradb28
ora....28.lsnr application 0/5 0/0 ONLINE ONLINE oradb28
ora....b28.gsd application 0/5 0/0 ONLINE ONLINE oradb28
ora....b28.ons application 0/3 0/0 ONLINE ONLINE oradb28
ora....b28.vip application 0/0 0/0 ONLINE ONLINE oradb28
[oracle@oradb27 Disk1]$

验证当前数据库版本和可用性:

[oracle@oradb27 Disk1]$ sqlplus / as sysdba

SQL*Plus: Release 10.2.0.5.0 - Production on Tue Jan 3 20:59:21 2017

Copyright (c) 1982, 2010, Oracle.  All Rights Reserved.

Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options SQL> select open_mode from v$database; OPEN_MODE
----------
READ WRITE SQL>
SQL> col comp_name for a45
SQL> set linesize 120
SQL> select comp_name, status, version from dba_registry; COMP_NAME STATUS VERSION
--------------------------------------------- ---------------------- ------------------------------
Spatial VALID 10.2.0.5.0
Oracle interMedia VALID 10.2.0.5.0
OLAP Catalog VALID 10.2.0.5.0
Oracle Enterprise Manager VALID 10.2.0.5.0
Oracle XML Database VALID 10.2.0.5.0
Oracle Text VALID 10.2.0.5.0
Oracle Expression Filter VALID 10.2.0.5.0
Oracle Rules Manager VALID 10.2.0.5.0
Oracle Workspace Manager VALID 10.2.0.5.0
Oracle Data Mining VALID 10.2.0.5.0
Oracle Database Catalog Views VALID 10.2.0.5.0 COMP_NAME STATUS VERSION
--------------------------------------------- ---------------------- ------------------------------
Oracle Database Packages and Types VALID 10.2.0.5.0
JServer JAVA Virtual Machine VALID 10.2.0.5.0
Oracle XDK VALID 10.2.0.5.0
Oracle Database Java Packages VALID 10.2.0.5.0
OLAP Analytic Workspace VALID 10.2.0.5.0
Oracle OLAP API VALID 10.2.0.5.0
Oracle Real Application Clusters VALID 10.2.0.5.0 18 rows selected.

至此,Linux平台 Oracle 10gR2(10.2.0.5)RAC安装系列已全部完成。

上一篇:细说UI线程和Windows消息队列


下一篇:Java 冒泡排序法