Oracle數(shù)據(jù)庫的常用安裝方法分為兩種,一種是基于GUI界面的安裝方式剩彬,一種是基于命令行終端的安裝方式浮庐。最初使用Oracle數(shù)據(jù)庫時,總是習慣于使用GUI模式的安裝方式霎挟,因為剛開始了解Oracle的時候窝剖,圖形化所需要了解的內(nèi)容總是比終端命令行的方式要少。
不過酥夭,基于圖形化方式的安裝盡管使用起來方便赐纱,但安裝一個數(shù)據(jù)庫大概需要30~40分鐘的時間,從配置到安裝熬北,整個過程還是顯得比較繁瑣疙描,而且耗時。
而這種情況在使用終端方式安裝時則不存在讶隐,終端模式安裝時僅需要提前配置好一個 .rsp
文件起胰,安裝時通過指定應(yīng)答文件即可完成對數(shù)據(jù)庫的安裝、卸載巫延、配置等操作效五。而唯一麻煩的在于,對于應(yīng)答文件中的配置需要額外的精力去了解炉峰。
通過終端方式安裝時畏妖,需要指定 -silent
參數(shù),也即是 靜默安裝
讲冠。而安裝前瓜客,首先需要了解的則是應(yīng)答文件的配置。Oracle安裝包解壓后竿开,Oracle提供了一個默認的應(yīng)答文件模版谱仪。可以使用 find $ORACLE_HOME/ -name dbca.rsp
否彩。
dbca.rsp 應(yīng)答文件模版
以下是基于 19.3.0.0
版本Oracle提供的默認的應(yīng)答文件模板
##############################################################################
## ##
## 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=
或許看到應(yīng)答文件模板后疯攒,你可能會覺得好多內(nèi)容,好復(fù)雜列荔。但實際上敬尺,以上的應(yīng)答文件只是提供了一個模板,這個模板中基本包含了Oracle數(shù)據(jù)庫安裝贴浙、配置的所有選項砂吞,而其中很大一部分選項是并不需要進行配置的,有一些配置因為有默認值崎溃,安裝的時候也可以使用部分默認選項蜻直,因此,你并不需要了解所有的配置項。
雖然無須對所有的配置項進行配置概而,但了解每個配置項的意義是必要的呼巷。以下是應(yīng)答文件配置項的解讀:
gdbName=
: 可以全局訪問的數(shù)據(jù)庫名稱。推薦配置sid=
: 數(shù)據(jù)庫實例名稱赎瑰。推薦配置databaseConfigType
: 數(shù)據(jù)庫類型王悍。Oracle提供的數(shù)據(jù)庫類型分為三種,分別為 {SI餐曼、RAC压储、RACONENODE}。推薦配置RACOneNodeServiceName=
: 單節(jié)點的數(shù)據(jù)庫服務(wù)源譬。如果安裝的是多節(jié)點渠脉,該配置項保持默認即可policyManaged=
: 數(shù)據(jù)庫管理策略。Oracle數(shù)據(jù)庫提供兩種管理策略 "Admin-Managed" 和 "Policy-Managed", 如果使用 "Admin-Managed" 模式, 則如下的 "policyManaged" 的值應(yīng)為 false瓶佳。保持默認createServerPool=
: 創(chuàng)建服務(wù)器池。一般保持默認即可鳞青。關(guān)于服務(wù)器池可參考 服務(wù)器池serverPoolName=
: 服務(wù)器池名稱, 根據(jù) "createServerPool" 的值來設(shè)置cardinality=
: Oracle基數(shù), 其值應(yīng)為整數(shù)霸饲。默認不用配置force=
: 強制創(chuàng)建服務(wù)器池。默認不用配置臂拓,如果配置了serverPool
厚脉,這里可以選擇配置pqPoolName=
: 并行查詢池(Parallel Query (PQ) pool)的名稱。默認即可pqCardinality=
: 并行查詢基數(shù)createAsContainerDatabase=
: 創(chuàng)建容器類型的數(shù)據(jù)庫胶惰。如果創(chuàng)建CDB模式的數(shù)據(jù)庫傻工,保持默認即可numberOfPDBs=
: 容器數(shù)據(jù)庫的個數(shù); 根據(jù) "createAsContainerDatabase" 來設(shè)置pdbName=
: 容器數(shù)據(jù)庫名稱useLocalUndoForPDBs=
: 創(chuàng)建的所有容器數(shù)據(jù)庫是否使用本地的undo表空間pdbAdminPassword=
: 容器數(shù)據(jù)庫Admin用戶密碼nodelist=
: 安裝數(shù)據(jù)庫的所有節(jié)點。推薦配置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 useremConfiguration=
: 配置企業(yè)管理方式(Enterprise Manager Configuration Type), 可選 {CENTRAL蟋滴、DBEXPRESS、BOTH痘绎、NONE}emExpressPort=
: EM運行端口津函。默認5500runCVUChecks=
: 集群一致性檢查(Cluster Verification Utility)。true
或false
dbsnmpPassword=
: 監(jiān)控用戶dbsnmp密碼孤页。omsHost=
: EM management server host nameomsPort=
: EM management server 運行的端口emUser=
: EM管理用戶emPassword=
: EM管理用戶密碼dvConfiguration=
: 啟用數(shù)據(jù)庫默認值尔苦。true
或false
dvUserName=
: DataVault用戶dvUserPassword=
: DataVault Owner用戶密碼dvAccountManagerName=
: DataVault Account ManagerdvAccountManagerPassword=
: DataVault Account Manager密碼olsConfiguration=
: Oracle標簽安全性(Oracle Label Security)datafileJarLocation=
: 模版文件路徑,可以保持默認。模板路徑: {ORACLE_HOME}/assistants/dbca/templates/datafileDestination=
: 數(shù)據(jù)文件路徑蕉堰。如過使用ASM共享存儲凌净,可以指定類似+DATADG/{DB_UNIQUE_NAME}/
。推薦配置recoveryAreaDestination=
: Oracle閃回區(qū)屋讶”埃快速恢復(fù)區(qū)使用的數(shù)據(jù)文件路徑 默認 $ORACLE_BASE/flash_recovery_areastorageType=
: 存儲介質(zhì)類型。Oracle提供2種存儲類型皿渗,FS(FileSystem)
和ASM
斩芭。推薦配置diskGroupName=
: 存儲介質(zhì)名稱。ASM類型可類似+DATADG/{DB_UNIQUE_NAME}/
乐疆。推薦配置asmsnmpPassword=
: GI asmsnmp監(jiān)控用戶密碼recoveryGroupName=
: 快速恢復(fù)區(qū)組名稱划乖。ASM可以指定磁盤組名稱characterSet=
: 數(shù)據(jù)庫字符集 默認 "US7ASCII"。一般使用ZHS16GBK
挤土。推薦配置nationalCharacterSet=
: 本地字符集 默認 "AL16UTF16".推薦配置registerWithDirService=
: 是否注冊字典服務(wù)琴庵。默認為 falsedirServiceUserName=
: 字典服務(wù)名稱dirServicePassword=
: 字典服務(wù)用戶所屬密碼walletPassword=
: 加密外部口令文件, "registerWithDirService" 值為true時設(shè)置該值listeners=
: 數(shù)據(jù)庫監(jiān)聽 默認加載 $ORACLE_HOME/network/admin/listener.oravariablesFile=
: 變量對兒 格式為 variable=valuevariables=
: 變量對兒。variables 會覆蓋掉 variablesFile 的配置仰美。例如: DB_UNIQUE_NAME=test,ORACLE_BASE=/opt/oracle,PDB_NAME=,DB_NAME=test,ORACLE_HOME={ORACLE_HOME},SID=testinitParams=
: 初始化參數(shù)迷殿。注意: initParams 會覆蓋掉 templates 的配置
。如果配置了templates咖杂,此處無需配置sampleSchema=
: 創(chuàng)建數(shù)據(jù)庫的過程中創(chuàng)建示例表結(jié)構(gòu)memoryPercentage=
: Oracle可使用的物理內(nèi)存比例databaseType=
: 數(shù)據(jù)庫類型庆寺。Oracle提供了3種類型,{MULTIPURPOSE诉字、DATA_WAREHOUSING懦尝、OLTP} 默認 MULTIPURPOSEautomaticMemoryManagement=
: 啟用內(nèi)存自動管理totalMemory=
: Oracle可以使用的總的物理內(nèi)存
dbca靜默安裝
實際上,上面的應(yīng)答文件模板精簡之后壤圃,會變成下面這樣陵霉,以RAC類型數(shù)據(jù)庫安裝為例
# 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
而安裝時,僅僅需要在終端執(zhí)行 dbca -createDatabase -silent -responseFile dbca-test.rsp
埃唯,等待數(shù)分鐘后撩匕,數(shù)據(jù)庫即可安裝完畢。
# dbca -createDatabase -silent -responseFile dbca-test.rsp
部分場景下墨叛,Oracle掃描到的應(yīng)答配置文件會在檢查階段失敗止毕,可以考慮添加 -ignorePrereqFailure
參數(shù),該參數(shù)可以讓檢查過程中發(fā)現(xiàn)的一些檢查失敗的配置不會阻塞數(shù)據(jù)庫的安裝漠趁。
最后扁凛,當看到 Database creation complete.
時即說明數(shù)據(jù)庫創(chuàng)建成功。