数据库
首页 > 数据库> > 使用DBCA图形界面创建数据库

使用DBCA图形界面创建数据库

作者:互联网

安装

确保PATH中包括$ORACLE_HOME/bin,因为dbca在此目录:

$ echo $PATH | grep $ORACLE_HOME/bin
/u01/app/oracle/product/12.2.0.1/dbhome_1/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/oracle/.local/bin:/home/oracle/bin

输入dbca开始安装。
在这里插入图片描述

  1. 选择数据库操作:
    在这里插入图片描述
    注意其中的模板和可插拔数据库设置。模板是预配置的数据库,可创建自己的模板。后者是12c后支持的。

  2. 选择创建模式:高级或典型
    在这里插入图片描述

  3. 数据库部署类型及模板
    在这里插入图片描述
    上图选择为单实例和OLTP模板。
    选择右边的View details可看到具体的配置。配置可以保存为HTML:
    在这里插入图片描述

  4. 数据库身份信息
    数据库必须有全局数据库名,其由一个必选的数据库名和可选的域名组成。
    域名会对应实例参数文件中的DB_DOMAIN
    在这里插入图片描述
    如果下方的Create as Container Database不选,则创建的是non-CDB。数据库名的长度不要超过12个字符,全部小写。有的版本只支最多持8个字符。
    数据库名在主机上必须唯一,其会对应实例参数文件中的DB_NAME。
    第二个必选的参数是实例名,对应ORACLE_SID参数。可以和数据库名不一致,但通常设为一样。

  5. 存储选项
    在这里插入图片描述
    文件系统还是ASM?文件的位置?

  6. 快速恢复设置
    在这里插入图片描述
    是否开启归档和设置FRA。

  7. 网络配置
    在这里插入图片描述
    是否创建监听,选择默认不创建。

  8. 配置数据库保险箱
    在这里插入图片描述

  9. 数据库配置参数
    在这里插入图片描述
    Memory部分包括内存管理设定,SGA,PGA设定等。
    Sizing部分包括数据块大小,并发进程数。因为选择了固定模板,因此没法修改。
    数据库块大小在数据库创建后无法修改。在这里插入图片描述
    Character Sets部分包括字符集,12c后默认为AL32UTF8:
    在这里插入图片描述
    连接模式:
    是专属模式还是共享模式。在这里插入图片描述
    示例Schema,默认不安装。开发测试培训环境建议安装。
    在这里插入图片描述

  10. 管理选项
    在这里插入图片描述
    是否选择EM集中管理,还是默认使用数据库自带的Database Express管理。

  11. 口令设置
    在这里插入图片描述

  12. 创建选项
    在这里插入图片描述

  13. 安装前回顾
    在这里插入图片描述
    我特意选择了右下的保存响应文件。

  14. 开始安装
    奇怪,到目前都没有看到先决条件检查这一步。
    在这里插入图片描述

  15. 安装完成
    在这里插入图片描述
    在提示中给出了参数文件的位置,即:$ORACLE_HOME/dbs/spfile$ORACLE_SID.ora

验证

oratab中存入了实例信息。

$ cat /etc/oratab
#



# This file is used by ORACLE utilities.  It is created by root.sh
# and updated by either Database Configuration Assistant while creating
# a database or ASM Configuration Assistant while creating ASM instance.

# A colon, ':', is used as the field terminator.  A new line terminates
# the entry.  Lines beginning with a pound sign, '#', are comments.
#
# Entries are of the form:
#   $ORACLE_SID:$ORACLE_HOME:<N|Y>:
#
# The first and second fields are the system identifier and home
# directory of the database respectively.  The third field indicates
# to the dbstart utility that the database should , "Y", or should not,
# "N", be brought up at system boot time.
#
# Multiple entries with the same $ORACLE_SID are not allowed.
#
#
orcl:/u01/app/oracle/product/12.2.0.1/dbhome_1:N

SQL*Plus连接数据库:

$ export ORACLE_SID=orcl
$ sqlplus / as sysdba

SQL*Plus: Release 12.2.0.1.0 Production on Thu Sep 5 09:39:10 2019

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


Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> decs v$version;
SP2-0734: unknown command beginning "decs v$ver..." - rest of line ignored.
SQL> desc v$version;
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 BANNER                                             VARCHAR2(80)
 CON_ID                                             NUMBER

SQL> select banner from v$version;

BANNER
--------------------------------------------------------------------------------
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
PL/SQL Release 12.2.0.1.0 - Production
CORE    12.2.0.1.0      Production
TNS for Linux: Version 12.2.0.1.0 - Production
NLSRTL Version 12.2.0.1.0 - Production

标签:bin,0.1,图形界面,12.2,Production,ORACLE,数据库,DBCA
来源: https://blog.csdn.net/stevensxiao/article/details/100560617