DBCA静默安装数据库

Oracle数据库的常用安装方法分为两种,一种是基于GUI界面的安装方式,一种是基于命令行终端的安装方式。最初使用Oracle数据库时,总是习惯于使用GUI模式的安装方式,因为刚开始了解Oracle的时候,图形化所需要了解的内容总是比终端命令行的方式要少。

不过,基于图形化方式的安装尽管使用起来方便,但安装一个数据库大概需要30~40分钟的时间,从配置到安装,整个过程还是显得比较繁琐,而且耗时。

而这种情况在使用终端方式安装时则不存在,终端模式安装时仅需要提前配置好一个 .rsp 文件,安装时通过指定应答文件即可完成对数据库的安装、卸载、配置等操作。而唯一麻烦的在于,对于应答文件中的配置需要额外的精力去了解。

通过终端方式安装时,需要指定 -silent 参数,也即是 静默安装。而安装前,首先需要了解的则是应答文件的配置。Oracle安装包解压后,Oracle提供了一个默认的应答文件模版。可以使用 find $ORACLE_HOME/ -name dbca.rsp

dbca.rsp 应答文件模版

以下是基于 19.3.0.0 版本Oracle提供的默认的应答文件模板

##############################################################################
##                                                                          ##
##                            DBCA response file                            ##
##                            ------------------                            ##
## Copyright(c) Oracle Corporation 1998,2019. All rights reserved.         ##
##                                                                          ##
## Specify values for the variables listed below to customize            ##
## your installation.                                                    ##
##                                                                       ##
## Each variable is associated with a comment. The comment               ##
## can help to populate the variables with the appropriate               ##
## values.                                                               ##
##                                                                      ##
## IMPORTANT NOTE: This file contains plain text passwords and          ##
## should be secured to have read permission only by oracle user        ##
## or db administrator who owns this installation.                      ##
##############################################################################
#-------------------------------------------------------------------------------
# Do not change the following system generated value.
#-------------------------------------------------------------------------------
responseFileVersion=/oracle/assistants/rspfmt_dbca_response_schema_v19.0.0

#-----------------------------------------------------------------------------
# Name          : gdbName
# Datatype      : String
# Description   : Global database name of the database
# Valid values  : <db_name>.<db_domain> - when database domain isn't NULL
#                 <db_name>             - when database domain is NULL
# Default value : None
# Mandatory     : Yes
#-----------------------------------------------------------------------------
gdbName=

#-----------------------------------------------------------------------------
# Name          : sid
# Datatype      : String
# Description   : System identifier (SID) of the database
# Valid values  : Check Oracle19c Administrator's Guide
# Default value : <db_name> specified in GDBNAME
# Mandatory     : No
#-----------------------------------------------------------------------------
sid=

#-----------------------------------------------------------------------------
# Name          : databaseConfigType
# Datatype      : String
# Description   : database conf type as Single Instance, Real Application Cluster or Real Application Cluster One Nodes database
# Valid values  : SI\RAC\RACONENODE
# Default value : SI
# Mandatory     : No
#-----------------------------------------------------------------------------
databaseConfigType=

#-----------------------------------------------------------------------------
# Name          : RACOneNodeServiceName
# Datatype      : String
# Description   : Service is required by application to connect to RAC One
#       Node Database
# Valid values  : Service Name
# Default value : None
# Mandatory     : No [required in case DATABASECONFTYPE is set to RACONENODE ]
#-----------------------------------------------------------------------------
RACOneNodeServiceName=

#-----------------------------------------------------------------------------
# Name          : policyManaged
# Datatype      : Boolean
# Description   : Set to true if Database is policy managed and
#       set to false if  Database is admin managed
# Valid values  : TRUE\FALSE
# Default value : FALSE
# Mandatory     : No
#-----------------------------------------------------------------------------
policyManaged=


#-----------------------------------------------------------------------------
# Name          : createServerPool
# Datatype      : Boolean
# Description   : Set to true if new server pool need to be created for database
#       if this option is specified then the newly created database
#       will use this newly created serverpool.
#       Multiple serverpoolname can not be specified for database
# Valid values  : TRUE\FALSE
# Default value : FALSE
# Mandatory     : No
#-----------------------------------------------------------------------------
createServerPool=

#-----------------------------------------------------------------------------
# Name          : serverPoolName
# Datatype      : String
# Description   : Only one serverpool name need to be specified
#        if Create Server Pool option is specified.
#        Comma-separated list of Serverpool names if db need to use
#        multiple Server pool
# Valid values  : ServerPool name

# Default value : None
# Mandatory     : No [required in case of RAC service centric database]
#-----------------------------------------------------------------------------
serverPoolName=

#-----------------------------------------------------------------------------
# Name          : cardinality
# Datatype      : Number
# Description   : Specify Cardinality for create server pool operation

# Valid values  : any positive Integer value
# Default value : Number of qualified nodes on cluster
# Mandatory     : No [Required when a new serverpool need to be created]
#-----------------------------------------------------------------------------
cardinality=

#-----------------------------------------------------------------------------
# Name          : force
# Datatype      : Boolean
# Description   : Set to true if new server pool need to be created by force
#       if this option is specified then the newly created serverpool
#       will be assigned server even if no free servers are available.
#       This may affect already running database.
#       This flag can be specified for Admin managed as well as policy managed db.
# Valid values  : TRUE\FALSE
# Default value : FALSE
# Mandatory     : No
#-----------------------------------------------------------------------------
force=

#-----------------------------------------------------------------------------
# Name          : pqPoolName
# Datatype      : String
# Description   : Only one serverpool name needs to be specified
#        if create server pool option is specified.
#        Comma-separated list of serverpool names if use
#        server pool. This is required to
#                  create Parallel Query (PQ) database. Applicable to Big Cluster
# Valid values  :  Parallel Query (PQ) pool name
# Default value : None
# Mandatory     : No [required in case of RAC service centric database]
#-----------------------------------------------------------------------------
pqPoolName=

#-----------------------------------------------------------------------------
# Name          : pqCardinality
# Datatype      : Number
# Description   : Specify Cardinality for create server pool operation.
#                 Applicable to Big Cluster
# Valid values  : any positive Integer value
# Default value : Number of qualified nodes on cluster
# Mandatory     : No [Required when a new serverpool need to be created]
#-----------------------------------------------------------------------------
pqCardinality=

#-----------------------------------------------------------------------------
# Name          : createAsContainerDatabase
# Datatype      : boolean
# Description   : flag to create database as container database
# Valid values  : Check Oracle19c Administrator's Guide
# Default value : false
# Mandatory     : No
#-----------------------------------------------------------------------------
createAsContainerDatabase=

#-----------------------------------------------------------------------------
# Name          : numberOfPDBs
# Datatype      : Number
# Description   : Specify the number of pdb to be created
# Valid values  : 0 to 4094
# Default value : 0
# Mandatory     : No
#-----------------------------------------------------------------------------
numberOfPDBs=

#-----------------------------------------------------------------------------
# Name          : pdbName
# Datatype      : String
# Description   : Specify the pdbname/pdbanme prefix if one or more pdb need to be created
# Valid values  : Check Oracle19c Administrator's Guide
# Default value : None
# Mandatory     : No
#-----------------------------------------------------------------------------
pdbName=

#-----------------------------------------------------------------------------
# Name          : useLocalUndoForPDBs
# Datatype      : boolean
# Description   : Flag to create local undo tablespace for all PDB's.
# Valid values  : TRUE\FALSE
# Default value : TRUE
# Mandatory     : No
#-----------------------------------------------------------------------------
useLocalUndoForPDBs=

#-----------------------------------------------------------------------------
# Name          : pdbAdminPassword
# Datatype      : String
# Description   : PDB Administrator user password
# Valid values  : Check Oracle19c Administrator's Guide
# Default value : None
# Mandatory     : No
#-----------------------------------------------------------------------------

pdbAdminPassword=

#-----------------------------------------------------------------------------
# Name          : nodelist
# Datatype      : String
# Description   : Comma-separated list of cluster nodes
# Valid values  : Cluster node names
# Default value : None
# Mandatory     : No (Yes for RAC database-centric database )
#-----------------------------------------------------------------------------
nodelist=

#-----------------------------------------------------------------------------
# Name          : templateName
# Datatype      : String
# Description   : Name of the template
# Valid values  : Template file name
# Default value : None
# Mandatory     : Yes
#-----------------------------------------------------------------------------
templateName=

#-----------------------------------------------------------------------------
# Name          : sysPassword
# Datatype      : String
# Description   : Password for SYS user
# Valid values  : Check Oracle19c Administrator's Guide
# Default value : None
# Mandatory     : Yes
#-----------------------------------------------------------------------------
sysPassword=

#-----------------------------------------------------------------------------
# Name          : systemPassword
# Datatype      : String
# Description   : Password for SYSTEM user
# Valid values  : Check Oracle19c Administrator's Guide
# Default value : None
# Mandatory     : Yes
#-----------------------------------------------------------------------------
systemPassword=

#-----------------------------------------------------------------------------
# Name          : oracleHomeUserPassword
# Datatype      : String
# Description   : Password for Windows Service user
# Default value : None
# Mandatory     : If Oracle home is installed with windows service user
#-----------------------------------------------------------------------------
oracleHomeUserPassword=

#-----------------------------------------------------------------------------
# Name          : emConfiguration
# Datatype      : String
# Description   : Enterprise Manager Configuration Type
# Valid values  : CENTRAL|DBEXPRESS|BOTH|NONE
# Default value : NONE
# Mandatory     : No
#-----------------------------------------------------------------------------
emConfiguration=

#-----------------------------------------------------------------------------
# Name          : emExpressPort
# Datatype      : Number
# Description   : Enterprise Manager Configuration Type
# Valid values  : Check Oracle19c Administrator's Guide
# Default value : NONE
# Mandatory     : No, will be picked up from DBEXPRESS_HTTPS_PORT env variable
#                 or auto generates a free port between 5500 and 5599
#-----------------------------------------------------------------------------
emExpressPort=5500

#-----------------------------------------------------------------------------
# Name          : runCVUChecks
# Datatype      : Boolean
# Description   : Specify whether to run Cluster Verification Utility checks
#                 periodically in Cluster environment
# Valid values  : TRUE\FALSE
# Default value : FALSE
# Mandatory     : No
#-----------------------------------------------------------------------------
runCVUChecks=

#-----------------------------------------------------------------------------
# Name          : dbsnmpPassword
# Datatype      : String
# Description   : Password for DBSNMP user
# Valid values  : Check Oracle19c Administrator's Guide
# Default value : None
# Mandatory     : Yes, if emConfiguration is specified or
#                 the value of runCVUChecks is TRUE
#-----------------------------------------------------------------------------
dbsnmpPassword=

#-----------------------------------------------------------------------------
# Name          : omsHost
# Datatype      : String
# Description   : EM management server host name
# Default value : None
# Mandatory     : Yes, if CENTRAL is specified for emConfiguration
#-----------------------------------------------------------------------------
omsHost=

#-----------------------------------------------------------------------------
# Name          : omsPort
# Datatype      : Number
# Description   : EM management server port number
# Default value : None
# Mandatory     : Yes, if CENTRAL is specified for emConfiguration
#-----------------------------------------------------------------------------
omsPort=

#-----------------------------------------------------------------------------
# Name          : emUser
# Datatype      : String
# Description   : EM Admin username to add or modify targets
# Default value : None
# Mandatory     : Yes, if CENTRAL is specified for emConfiguration
#-----------------------------------------------------------------------------
emUser=

#-----------------------------------------------------------------------------
# Name          : emPassword
# Datatype      : String
# Description   : EM Admin user password
# Default value : None
# Mandatory     : Yes, if CENTRAL is specified for emConfiguration
#-----------------------------------------------------------------------------
emPassword=

#-----------------------------------------------------------------------------
# Name          : dvConfiguration
# Datatype      : Boolean
# Description   : Specify "True" to configure and enable Oracle Database vault
# Valid values  : True/False
# Default value : False
# Mandatory     : No
#-----------------------------------------------------------------------------
dvConfiguration=

#-----------------------------------------------------------------------------
# Name          : dvUserName
# Datatype      : String
# Description   : DataVault Owner
# Valid values  : Check Oracle19c Administrator's Guide
# Default value : None
# Mandatory     : Yes, if DataVault option is chosen
#-----------------------------------------------------------------------------
dvUserName=

#-----------------------------------------------------------------------------
# Name          : dvUserPassword
# Datatype      : String
# Description   : Password for DataVault Owner
# Valid values  : Check Oracle19c Administrator's Guide
# Default value : None
# Mandatory     : Yes, if DataVault option is chosen
#-----------------------------------------------------------------------------
dvUserPassword=

#-----------------------------------------------------------------------------
# Name          : dvAccountManagerName
# Datatype      : String
# Description   : DataVault Account Manager
# Valid values  : Check Oracle19c Administrator's Guide
# Default value : None
# Mandatory     : No
#-----------------------------------------------------------------------------
dvAccountManagerName=

#-----------------------------------------------------------------------------
# Name          : dvAccountManagerPassword
# Datatype      : String
# Description   : Password for  DataVault Account Manager
# Valid values  : Check Oracle19c Administrator's Guide
# Default value : None
# Mandatory     : No
#-----------------------------------------------------------------------------
dvAccountManagerPassword=

#-----------------------------------------------------------------------------
# Name          : olsConfiguration
# Datatype      : Boolean
# Description   : Specify "True" to configure and enable Oracle Label Security
# Valid values  : True/False
# Default value : False
# Mandatory     : No
#-----------------------------------------------------------------------------
olsConfiguration=

#-----------------------------------------------------------------------------
# Name          : datafileJarLocation
# Datatype      : String
# Description   : Location of the data file jar
# Valid values  : Directory containing compressed datafile jar
# Default value : None
# Mandatory     : No
#-----------------------------------------------------------------------------
datafileJarLocation=

#-----------------------------------------------------------------------------
# Name          : datafileDestination
# Datatype      : String
# Description   : Location of the data file's
# Valid values  : Directory for all the database files
# Default value : $ORACLE_BASE/oradata
# Mandatory     : No
#-----------------------------------------------------------------------------
datafileDestination=

#-----------------------------------------------------------------------------
# Name          : recoveryAreaDestination
# Datatype      : String
# Description   : Location of the data file's
# Valid values  : Recovery Area location
# Default value : $ORACLE_BASE/flash_recovery_area
# Mandatory     : No
#-----------------------------------------------------------------------------
recoveryAreaDestination=

#-----------------------------------------------------------------------------
# Name          : storageType
# Datatype      : String
# Description   : Specifies the storage on which the database is to be created
# Valid values  : FS (CFS for RAC), ASM
# Default value : FS
# Mandatory     : No
#-----------------------------------------------------------------------------
storageType=

#-----------------------------------------------------------------------------
# Name          : diskGroupName
# Datatype      : String
# Description   : Specifies the disk group name for the storage
# Default value : DATA
# Mandatory     : No
#-----------------------------------------------------------------------------
diskGroupName=

#-----------------------------------------------------------------------------
# Name          : asmsnmpPassword
# Datatype      : String
# Description   : Password for ASM Monitoring
# Default value : None
# Mandatory     : No
#-----------------------------------------------------------------------------
asmsnmpPassword=

#-----------------------------------------------------------------------------
# Name          : recoveryGroupName
# Datatype      : String
# Description   : Specifies the disk group name for the recovery area
# Default value : RECOVERY
# Mandatory     : No
#-----------------------------------------------------------------------------
recoveryGroupName=

#-----------------------------------------------------------------------------
# Name          : characterSet
# Datatype      : String
# Description   : Character set of the database
# Valid values  : Check Oracle19c National Language Support Guide
# Default value : "US7ASCII"
# Mandatory     : NO
#-----------------------------------------------------------------------------
characterSet=

#-----------------------------------------------------------------------------
# Name          : nationalCharacterSet
# Datatype      : String
# Description   : National Character set of the database
# Valid values  : "UTF8" or "AL16UTF16". For details, check Oracle19c National Language Support Guide
# Default value : "AL16UTF16"
# Mandatory     : No
#-----------------------------------------------------------------------------
nationalCharacterSet=

#-----------------------------------------------------------------------------
# Name          : registerWithDirService
# Datatype      : Boolean
# Description   : Specifies whether to register with Directory Service.
# Valid values  : TRUE \ FALSE
# Default value : FALSE
# Mandatory     : No
#-----------------------------------------------------------------------------
registerWithDirService=


#-----------------------------------------------------------------------------
# Name          : dirServiceUserName
# Datatype      : String
# Description   : Specifies the name of the directory service user
# Mandatory     : YES, if the value of registerWithDirService is TRUE
#-----------------------------------------------------------------------------
dirServiceUserName=

#-----------------------------------------------------------------------------
# Name          : dirServicePassword
# Datatype      : String
# Description   : The password of the directory service user.
#       You can also specify the password at the command prompt instead of here.
# Mandatory     : YES, if the value of registerWithDirService is TRUE
#-----------------------------------------------------------------------------
dirServicePassword=

#-----------------------------------------------------------------------------
# Name          : walletPassword
# Datatype      : String
# Description   : The password for wallet to created or modified.
#       You can also specify the password at the command prompt instead of here.
# Mandatory     : YES, if the value of registerWithDirService is TRUE
#-----------------------------------------------------------------------------
walletPassword=

#-----------------------------------------------------------------------------
# Name          : listeners
# Datatype      : String
# Description   : Specifies list of listeners to register the database with.
#       By default the database is configured for all the listeners specified in the
#       $ORACLE_HOME/network/admin/listener.ora
# Valid values  : The list should be comma separated like "listener1,listener2".
# Mandatory     : NO
#-----------------------------------------------------------------------------
listeners=

#-----------------------------------------------------------------------------
# Name          : variablesFile
# Datatype      : String
# Description   : Location of the file containing variable value pair
# Valid values  : A valid file-system file. The variable value pair format in this file
#       is <variable>=<value>. Each pair should be in a new line.
# Default value : None
# Mandatory     : NO
#-----------------------------------------------------------------------------
variablesFile=

#-----------------------------------------------------------------------------
# Name          : variables
# Datatype      : String
# Description   : comma separated list of name=value pairs. Overrides variables defined in variablefile and templates
# Default value : None
# Mandatory     : NO
#-----------------------------------------------------------------------------
variables=

#-----------------------------------------------------------------------------
# Name          : initParams
# Datatype      : String
# Description   : comma separated list of name=value pairs. Overrides initialization parameters defined in templates
# Default value : None
# Mandatory     : NO
#-----------------------------------------------------------------------------
initParams=

#-----------------------------------------------------------------------------
# Name          : sampleSchema
# Datatype      : Boolean
# Description   : Specifies whether or not to add the Sample Schemas to your database
# Valid values  : TRUE \ FALSE
# Default value : FASLE
# Mandatory     : No
#-----------------------------------------------------------------------------
sampleSchema=

#-----------------------------------------------------------------------------
# Name          : memoryPercentage
# Datatype      : String
# Description   : percentage of physical memory for Oracle
# Default value : None
# Mandatory     : NO
#-----------------------------------------------------------------------------
memoryPercentage=

#-----------------------------------------------------------------------------
# Name          : databaseType
# Datatype      : String
# Description   : used for memory distribution when memoryPercentage specified
# Valid values  : MULTIPURPOSE|DATA_WAREHOUSING|OLTP
# Default value : MULTIPURPOSE
# Mandatory     : NO
#-----------------------------------------------------------------------------
databaseType=

#-----------------------------------------------------------------------------
# Name          : automaticMemoryManagement
# Datatype      : Boolean
# Description   : flag to indicate Automatic Memory Management is used
# Valid values  : TRUE/FALSE
# Default value : TRUE
# Mandatory     : NO
#-----------------------------------------------------------------------------
automaticMemoryManagement=

#-----------------------------------------------------------------------------
# Name          : totalMemory
# Datatype      : String
# Description   : total memory in MB to allocate to Oracle
# Valid values  :
# Default value :
# Mandatory     : NO
#-----------------------------------------------------------------------------
totalMemory=

或许看到应答文件模板后,你可能会觉得好多内容,好复杂。但实际上,以上的应答文件只是提供了一个模板,这个模板中基本包含了Oracle数据库安装、配置的所有选项,而其中很大一部分选项是并不需要进行配置的,有一些配置因为有默认值,安装的时候也可以使用部分默认选项,因此,你并不需要了解所有的配置项。

虽然无须对所有的配置项进行配置,但了解每个配置项的意义是必要的。以下是应答文件配置项的解读:

  • gdbName= : 可以全局访问的数据库名称。推荐配置

  • sid= : 数据库实例名称。推荐配置

  • databaseConfigType : 数据库类型。Oracle提供的数据库类型分为三种,分别为 {SI、RAC、RACONENODE}。推荐配置

  • RACOneNodeServiceName= : 单节点的数据库服务。如果安装的是多节点,该配置项保持默认即可

  • policyManaged= : 数据库管理策略。Oracle数据库提供两种管理策略 "Admin-Managed" 和 "Policy-Managed", 如果使用 "Admin-Managed" 模式, 则如下的 "policyManaged" 的值应为 false。保持默认

  • createServerPool=: 创建服务器池。一般保持默认即可。关于服务器池可参考 服务器池

  • serverPoolName= : 服务器池名称, 根据 "createServerPool" 的值来设置

  • cardinality=: Oracle基数, 其值应为整数。默认不用配置

  • force= : 强制创建服务器池。默认不用配置,如果配置了 serverPool,这里可以选择配置

  • pqPoolName= : 并行查询池(Parallel Query (PQ) pool)的名称。默认即可

  • pqCardinality= : 并行查询基数

  • createAsContainerDatabase= : 创建容器类型的数据库。如果创建CDB模式的数据库,保持默认即可

  • numberOfPDBs= : 容器数据库的个数; 根据 "createAsContainerDatabase" 来设置

  • pdbName= : 容器数据库名称

  • useLocalUndoForPDBs= : 创建的所有容器数据库是否使用本地的undo表空间

  • pdbAdminPassword= : 容器数据库Admin用户密码

  • nodelist= : 安装数据库的所有节点。推荐配置

  • templateName= : 安装时使用的模板文件。Oracle提供了2种安装模板,{Data_Warehouse.dbc、General_Purpose.dbc}。模板文件路径为 {ORACLE_HOME}/assistants/dbca/templates/Data_Warehouse.dbc。推荐配置

  • sysPassword= : sys用户密码。推荐配置

  • systemPassword= : system用户密码。推荐配置

  • serviceUserPassword= : Password for Windows Service user

  • emConfiguration=: 配置企业管理方式(Enterprise Manager Configuration Type), 可选 {CENTRAL、DBEXPRESS、BOTH、NONE}

  • emExpressPort= : EM运行端口。默认5500

  • runCVUChecks= : 集群一致性检查(Cluster Verification Utility)。 truefalse

  • dbsnmpPassword= : 监控用户dbsnmp密码。

  • omsHost= : EM management server host name

  • omsPort= : EM management server 运行的端口

  • emUser= : EM管理用户

  • emPassword= : EM管理用户密码

  • dvConfiguration= : 启用数据库默认值。truefalse

  • dvUserName=: DataVault用户

  • dvUserPassword= : DataVault Owner用户密码

  • dvAccountManagerName= : DataVault Account Manager

  • dvAccountManagerPassword= : DataVault Account Manager密码

  • olsConfiguration= : Oracle标签安全性(Oracle Label Security)

  • datafileJarLocation= : 模版文件路径,可以保持默认。模板路径: {ORACLE_HOME}/assistants/dbca/templates/

  • datafileDestination= : 数据文件路径。如过使用ASM共享存储,可以指定类似 +DATADG/{DB_UNIQUE_NAME}/推荐配置

  • recoveryAreaDestination= : Oracle闪回区。快速恢复区使用的数据文件路径 默认 $ORACLE_BASE/flash_recovery_area

  • storageType= : 存储介质类型。Oracle提供2种存储类型,FS(FileSystem)ASM推荐配置

  • diskGroupName= : 存储介质名称。ASM类型可类似 +DATADG/{DB_UNIQUE_NAME}/推荐配置

  • asmsnmpPassword= : GI asmsnmp监控用户密码

  • recoveryGroupName= : 快速恢复区组名称。ASM可以指定磁盘组名称

  • characterSet= : 数据库字符集 默认 "US7ASCII"。一般使用 ZHS16GBK推荐配置

  • nationalCharacterSet= : 本地字符集 默认 "AL16UTF16".推荐配置

  • registerWithDirService= : 是否注册字典服务。默认为 false

  • dirServiceUserName= : 字典服务名称

  • dirServicePassword= : 字典服务用户所属密码

  • walletPassword= : 加密外部口令文件, "registerWithDirService" 值为true时设置该值

  • listeners= : 数据库监听 默认加载 $ORACLE_HOME/network/admin/listener.ora

  • variablesFile= : 变量对儿 格式为 variable=value

  • variables= : 变量对儿。variables 会覆盖掉 variablesFile 的配置。例如: DB_UNIQUE_NAME=test,ORACLE_BASE=/opt/oracle,PDB_NAME=,DB_NAME=test,ORACLE_HOME={ORACLE_HOME},SID=test

  • initParams= : 初始化参数。注意: initParams 会覆盖掉 templates 的配置。如果配置了templates,此处无需配置

  • sampleSchema= : 创建数据库的过程中创建示例表结构

  • memoryPercentage= : Oracle可使用的物理内存比例

  • databaseType= : 数据库类型。Oracle提供了3种类型,{MULTIPURPOSE、DATA_WAREHOUSING、OLTP} 默认 MULTIPURPOSE

  • automaticMemoryManagement= : 启用内存自动管理

  • totalMemory= : Oracle可以使用的总的物理内存

dbca静默安装

实际上,上面的应答文件模板精简之后,会变成下面这样,以RAC类型数据库安装为例

# cat dbca-test.rsp
responseFileVersion=/oracle/assistants/rspfmt_dbca_response_schema_v19.0.0
gdbName=test
sid=test
databaseConfigType=RAC
policyManaged=FALSE
nodelist=node1,node2
templateName=General_Purpose.dbc
sysPassword=oracle
systemPassword=oracle
emExpressPort=5500
runCVUChecks=TRUE
dbsnmpPassword=oracle
datafileDestination=+DATADG
storageType=ASM
diskGroupName=+DATADG
asmsnmpPassword=oracle
characterSet=ZHS16GBK
nationalCharacterSet=AL16UTF16

而安装时,仅仅需要在终端执行 dbca -createDatabase -silent -responseFile dbca-test.rsp,等待数分钟后,数据库即可安装完毕。

# dbca -createDatabase -silent -responseFile dbca-test.rsp

部分场景下,Oracle扫描到的应答配置文件会在检查阶段失败,可以考虑添加 -ignorePrereqFailure参数,该参数可以让检查过程中发现的一些检查失败的配置不会阻塞数据库的安装。

最后,当看到 Database creation complete. 时即说明数据库创建成功。

©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 217,084评论 6 503
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 92,623评论 3 392
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 163,450评论 0 353
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 58,322评论 1 293
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 67,370评论 6 390
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 51,274评论 1 300
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 40,126评论 3 418
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 38,980评论 0 275
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 45,414评论 1 313
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 37,599评论 3 334
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 39,773评论 1 348
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 35,470评论 5 344
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 41,080评论 3 327
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 31,713评论 0 22
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 32,852评论 1 269
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 47,865评论 2 370
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 44,689评论 2 354

推荐阅读更多精彩内容