首页 > 数据库 > Oracle > Oracle RAC搭建(三)






















[oracle@rac2 ~]$ export ORACLE_SID=+ASM2
[oracle@rac2 ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.4.0 - Production on Wed May 14 20:52:15 2014
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
SQL> select inst_id,name,state from gv$asm_diskgroup;
INST_ID NAME STATE
---------- ------------------------------ -----------
1 RAC_GROUP MOUNTED
2 RAC_GROUP DISMOUNTED
SQL> show parameter asm;
NAME TYPE VALUE
------------------------------------ ----------- ------------------------------
asm_diskgroups string RAC_GROUP
asm_diskstring string
asm_power_limit integer 1
SQL> alter system set asm_diskstring='/dev/raw/raw2,/dev/raw/raw3';
System altered.
SQL> alter diskgroup RAC_GROUP mount;
alter diskgroup RAC_GROUP mount
*
ERROR at line 1:
ORA-15032: not all alterations performed
ORA-15063: ASM discovered an insufficient number of disks for diskgroup
"RAC_GROUP" #出现挂载不了的情况
重启节点rac2,查看是否能够挂载:
[oracle@rac2 ~]$ export ORACLE_SID=+ASM2
[oracle@rac2 ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.4.0 - Production on Wed May 14 21:13:01 2014
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
SQL> select inst_id,state,name from gv$asm_diskgroup;
INST_ID STATE NAME
---------- ----------- ------------------------------
1 MOUNTED RAC_GROUP
2 MOUNTED RAC_GROUP #是不是很邪乎,ASM是oracle10g出来的产品,可能存在一些需要改进的地方,此处不再敖述
3)创建数据库实例
[oracle@rac1 ~]$ dbca
指定创建的是集群数据库:

创建数据库实例:

选中两个节点:

此处选择一般用途:

指定全局数据库名:

禁用企业管理器:

设置数据库管理员的密码:

采用ASM自动存储管理方式:

输入之前设置的磁盘组的密码:

查看磁盘组挂载情况,此处需要两个节点都要挂载:

数据库文件管理方式采用磁盘组模式:

此处对恢复区先不做配置:

数据库内容,此处选择默认,继续下一步:

数据库服务,此处选择默认,继续下一步:

安装成功界面:

[oracle@rac1 ~]$ export ORACLE_SID=orcl1
[oracle@rac1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.4.0 - Production on Thu May 15 11:47:03 2014
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
SQL> select instance_name,status from v$instance;
INSTANCE_NAME STATUS
---------------- ------------
orcl1 OPEN
[oracle@rac2 ~]$ export ORACLE_SID=orcl2
[oracle@rac2 ~]$ sqlplus / as sysdba
SQL*Plus: Release 10.2.0.4.0 - Production on Thu May 15 11:48:20 2014
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Connected to:
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
SQL> select instance_name,status from v$instance;
INSTANCE_NAME STATUS
---------------- ------------
orcl2 OPEN
补充:对于已经创建了数据库,想从低版本升级到高版本,要先对原有数据库进行备份,然后删除数据库,先对crs进行升级,然后对数据库进行升级。
注意,在对数据库进行的升级的时候lsnrctl和ASM要处于offline状态,否则无法完成数据库的升级,这是笔者亲身经历过得事情。
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/14288937/viewspace-1264002/ ,如需转载,请注明出处,否则将追究法律责任。