hwcloud上的Oracle-RAC-12cR2安装手册(4)--数据库实例的创建

node01上,oracle用户,执行dbca,如下:

1
[oracle@node01 ~]$ dbca

安装过程如下:

创建一个数据库 高级配置 安装RAC,选择自定义数据库 选择所有节点 设置全局数据库名和SID前缀,选择创建空白容器数据库

注:
此处的SID前缀需要与环境变量里的ORACLE_SID对应:
例如,SID前缀设置orcl,ORACLE_SID需要设置为orcl1和orcl2。

选择ASM存储类型并选择DATA磁盘组 启用快速闪回去,并选择DATA磁盘组,大小根据实际需求设置,忽略提示,直接确定 默认 选择自动共享内存管理,并设置MEMORY_TARGET,建议物理内存的80% 块大小设置为32768B,进程数设置为1500 字符集选择AL32UTF8 选择专用服务器模式 不启用EM 使用统一密码 创建数据库 忽略警告,确认 检查 忽略 确认 配置完成 安装进行中 安装完成,关闭

node01、node02上,oracle用户,执行lsnrctl status查看实例运行状态

node01:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
[oracle@node01 ~]$ lsnrctl status
LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 30-NOV-2017 17:27:08
Copyright (c) 1991, 2016, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 12.2.0.1.0 - Production
Start Date 29-NOV-2017 18:45:30
Uptime 0 days 22 hr. 41 min. 37 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/12.2.0/grid/network/admin/listener.ora
Listener Log File /u01/app/grid/diag/tnslsnr/node01/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.14)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.17)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM1", status READY, has 1 handler(s) for this service...
Service "+ASM_DATA" has 1 instance(s).
Instance "+ASM1", status READY, has 1 handler(s) for this service...
Service "+ASM_OCR_VOT_GIMR" has 1 instance(s).
Instance "+ASM1", status READY, has 1 handler(s) for this service...
Service "orcl.myCluster.com" has 1 instance(s).
Instance "orcl1", status READY, has 1 handler(s) for this service...
Service "orclXDB.myCluster.com" has 1 instance(s).
Instance "orcl1", status READY, has 1 handler(s) for this service...
The command completed successfully

node02:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
[oracle@node02 ~]$ lsnrctl status
LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 30-NOV-2017 17:29:46
Copyright (c) 1991, 2016, Oracle. All rights reserved.
Connecting to (ADDRESS=(PROTOCOL=tcp)(HOST=)(PORT=1521))
STATUS of the LISTENER
------------------------
Alias LISTENER
Version TNSLSNR for Linux: Version 12.2.0.1.0 - Production
Start Date 29-NOV-2017 18:57:02
Uptime 0 days 22 hr. 32 min. 43 sec
Trace Level off
Security ON: Local OS Authentication
SNMP OFF
Listener Parameter File /u01/app/12.2.0/grid/network/admin/listener.ora
Listener Log File /u01/app/grid/diag/tnslsnr/node02/listener/alert/log.xml
Listening Endpoints Summary...
(DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=LISTENER)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.15)(PORT=1521)))
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=192.168.1.18)(PORT=1521)))
Services Summary...
Service "+ASM" has 1 instance(s).
Instance "+ASM2", status READY, has 1 handler(s) for this service...
Service "+ASM_DATA" has 1 instance(s).
Instance "+ASM2", status READY, has 1 handler(s) for this service...
Service "+ASM_OCR_VOT_GIMR" has 1 instance(s).
Instance "+ASM2", status READY, has 1 handler(s) for this service...
Service "orcl.myCluster.com" has 1 instance(s).
Instance "orcl2", status READY, has 1 handler(s) for this service...
Service "orclXDB.myCluster.com" has 1 instance(s).
Instance "orcl2", status READY, has 1 handler(s) for this service...
The command completed successfully

node01、node02上,oracle用户,执行sqlplus / as sysdba尝试登录数据库,并执行show pdbs;查看pdb状态

node01:

1
2
3
4
5
6
7
8
9
10
[oracle@node01 ~]$ sqlplus / as sysdba
SQL*Plus: Release 12.2.0.1.0 Production on Thu Nov 30 17:37:41 2017
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
SQL> show pdbs;
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
SQL>

node02:

1
2
3
4
5
6
7
8
9
10
[oracle@node02 ~]$ sqlplus / as sysdba
SQL*Plus: Release 12.2.0.1.0 Production on Thu Nov 30 17:39:15 2017
Copyright (c) 1982, 2016, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
SQL> show pdbs;
CON_ID CON_NAME OPEN MODE RESTRICTED
---------- ------------------------------ ---------- ----------
2 PDB$SEED READ ONLY NO
SQL>

至此,完成了数据库实例的创建,ORACLE RAC安装完成,后面测试ORACLE RAC个节点分开调整服务器配置,敬请期待。