请参考rhel7 安装 oracle 18c rac(03 dbca 建立数据库)

  1. 云栖社区>
  2. 博客>
  3. 正文

请参考rhel7 安装 oracle 18c rac(03 dbca 建立数据库)

snowofsummer 2018-08-24 13:23:30 浏览2507
展开阅读全文

rhel7 安装 oracle 18c rac(01 grid软件安装)
https://yq.aliyun.com/articles/627995
rhel7 安装 oracle 18c rac(02 database软件安装)
https://yq.aliyun.com/articles/628872
请参考rhel7 安装 oracle 18c rac(03 dbca 建立数据库)
https://yq.aliyun.com/articles/628876

1 运行dbca

2 选择创建数据库

image

3 选择高级配置

image

4 选择数据库类型,管理类型,模板类型

image

5 节点选择

image

6 确定数据库的名称

image

7 选择存储位置

image

8 配置闪回区,归档模式

image

9 data vault 配置

image

10 内存,连接数,字符集,连接模式配置

内存设置
image

连接数量

image

字符集设置

image

连接模式设置

image

11 EM配置

image

12 密码设置

image

13 自定义脚本

image

14 安装环境检查

image

15 安装预览

image

16 创建数据库

image

17 结束安装,dbca数据库安装完成

image

18 数据库状态检查

设置环境变量:
PROD04

[oracle@prod04 ~]$ cat .bash_profile 
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
    . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/.local/bin:$HOME/bin

export PATH
export ORACLE_HOME=/u01/app/oracle/18c
export PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_SID=cdb1
[oracle@prod04 ~]$ sqlplus / as sysdba

SQL*Plus: Release 18.0.0.0.0 - Production on Fri Aug 24 14:57:34 2018
Version 18.3.0.0.0

Copyright (c) 1982, 2018, Oracle.  All rights reserved.


Connected to:
Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.3.0.0.0

SQL> show pdbs;

    CON_ID CON_NAME              OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
     2 PDB$SEED              READ ONLY  NO
     3 PDB                  READ WRITE NO
SQL> exit
Disconnected from Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.3.0.0.0
[oracle@prod04 ~]$ ps -ef|grep pmon
grid       4575      1  0 14:11 ?        00:00:00 asm_pmon_+ASM1
grid       5452      1  0 14:11 ?        00:00:00 apx_pmon_+APX1
grid       5580      1  0 14:12 ?        00:00:00 mdb_pmon_-MGMTDB
oracle    47569      1  0 14:42 ?        00:00:00 ora_pmon_cdb1
oracle    54134   9360  0 14:57 pts/1    00:00:00 grep --color=auto pmon

PROD05

[oracle@prod05 ~]$ cat .bash_profile 
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
    . ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/.local/bin:$HOME/bin

export PATH
export ORACLE_HOME=/u01/app/oracle/18c
export PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_SID=cdb2
[oracle@prod05 ~]$ sqlplus / as sysdba

SQL*Plus: Release 18.0.0.0.0 - Production on Fri Aug 24 14:56:12 2018
Version 18.3.0.0.0

Copyright (c) 1982, 2018, Oracle.  All rights reserved.


Connected to:
Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.3.0.0.0

SQL> show pdbs;                                    

    CON_ID CON_NAME              OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
     2 PDB$SEED              READ ONLY  NO
     3 PDB                  READ WRITE NO
SQL> exit
Disconnected from Oracle Database 18c Enterprise Edition Release 18.0.0.0.0 - Production
Version 18.3.0.0.0
[oracle@prod05 ~]$ ps -ef|grep pmon
grid       4505      1  0 14:13 ?        00:00:00 asm_pmon_+ASM2
grid       4653      1  0 14:13 ?        00:00:00 apx_pmon_+APX2
oracle    19047      1  0 14:42 ?        00:00:00 ora_pmon_cdb2
oracle    25251  24685  0 14:56 pts/0    00:00:00 grep --color=auto pmon

19 集群状态检测

[grid@prod04 ~]$ crsctl stat res -t
--------------------------------------------------------------------------------
Name           Target  State        Server                   State details       
--------------------------------------------------------------------------------
Local Resources
--------------------------------------------------------------------------------
ora.ASMNET1LSNR_ASM.lsnr
               ONLINE  ONLINE       prod04                   STABLE
               ONLINE  ONLINE       prod05                   STABLE
ora.DATA.GHCHKPT.advm
               OFFLINE OFFLINE      prod04                   STABLE
               OFFLINE OFFLINE      prod05                   STABLE
ora.DATA.dg
               ONLINE  ONLINE       prod04                   STABLE
               ONLINE  ONLINE       prod05                   STABLE
ora.LISTENER.lsnr
               ONLINE  ONLINE       prod04                   STABLE
               ONLINE  ONLINE       prod05                   STABLE
ora.chad
               ONLINE  ONLINE       prod04                   STABLE
               ONLINE  ONLINE       prod05                   STABLE
ora.data.ghchkpt.acfs
               OFFLINE OFFLINE      prod04                   STABLE
               OFFLINE OFFLINE      prod05                   STABLE
ora.helper
               OFFLINE OFFLINE      prod04                   IDLE,STABLE
               OFFLINE OFFLINE      prod05                   IDLE,STABLE
ora.net1.network
               ONLINE  ONLINE       prod04                   STABLE
               ONLINE  ONLINE       prod05                   STABLE
ora.ons
               ONLINE  ONLINE       prod04                   STABLE
               ONLINE  ONLINE       prod05                   STABLE
ora.proxy_advm
               ONLINE  ONLINE       prod04                   STABLE
               ONLINE  ONLINE       prod05                   STABLE
--------------------------------------------------------------------------------
Cluster Resources
--------------------------------------------------------------------------------
ora.LISTENER_SCAN1.lsnr
      1        ONLINE  ONLINE       prod04                   STABLE
ora.MGMTLSNR
      1        ONLINE  ONLINE       prod04                   169.254.14.164 10.16
                                                             8.0.200,STABLE
ora.asm
      1        ONLINE  ONLINE       prod04                   Started,STABLE
      2        ONLINE  ONLINE       prod05                   Started,STABLE
      3        OFFLINE OFFLINE                               STABLE
ora.cdb.db
      1        ONLINE  ONLINE       prod04                   Open,HOME=/u01/app/o
                                                             racle/18c,STABLE
      2        ONLINE  ONLINE       prod05                   Open,HOME=/u01/app/o
                                                             racle/18c,STABLE
ora.cvu
      1        ONLINE  ONLINE       prod04                   STABLE
ora.mgmtdb
      1        ONLINE  ONLINE       prod04                   Open,STABLE
ora.prod04.vip
      1        ONLINE  ONLINE       prod04                   STABLE
ora.prod05.vip
      1        ONLINE  ONLINE       prod05                   STABLE
ora.qosmserver
      1        ONLINE  ONLINE       prod04                   STABLE
ora.rhpserver
      1        OFFLINE OFFLINE                               STABLE
ora.scan1.vip
      1        ONLINE  ONLINE       prod04                   STABLE
--------------------------------------------------------------------------------
[grid@prod04 ~]$ 
[grid@prod04 ~]$ srvctl config database -d cdb
Database unique name: cdb
Database name: cdb
Oracle home: /u01/app/oracle/18c
Oracle user: oracle
Spfile: +DATA/CDB/PARAMETERFILE/spfile.306.985012801
Password file: +DATA/CDB/PASSWORD/pwdcdb.291.985011781
Domain: 
Start options: open
Stop options: immediate
Database role: PRIMARY
Management policy: AUTOMATIC
Server pools: 
Disk Groups: DATA
Mount point paths: 
Services: 
Type: RAC
Start concurrency: 
Stop concurrency: 
OSDBA group: dba
OSOPER group: oper
Database instances: cdb1,cdb2
Configured nodes: prod04,prod05
CSS critical: no
CPU count: 0
Memory target: 0
Maximum memory: 0
Default network number for database services: 
Database is administrator managed

[grid@prod04 ~]$ srvctl status database -d cdb
Instance cdb1 is running on node prod04
Instance cdb2 is running on node prod05

网友评论

登录后评论
0/500
评论
snowofsummer
+ 关注