一般我们可能经常看到用图形安装方法安装Oracle,这种方法一台两台是没什么问题,不过如果一下子要安装很多台服务器的ORACLE,那用图形安装,显然是不合理的。
而且如果现场安装,服务器系统还必须要安装图形界面才行,但是一般服务器是不允许安装图形的。

所以这种时候就特别需要在文本模式下批量安装ORACLE了。

ORACLE官方本来就有提供在文本模式下自动安装ORACLE的方法。

这个功能是由一个配置文件respnseFile来完成的,responseFile是一个记录了Oracle安装时所需的一些必要配置信息的配置文件,图形界面安装都是通过用户手工输入来获得的,静默安装就通过读取responseFile里的配置来进行安装。

只要配置好ORACLE提供responseFile文件,后面安装就不需要任何的信息输入和操作,完全在文本模式下自动化完成整个Oracle安装过程(仅限于swonly式安装,即只安装Oracle数据库系统)。

responseFile静默安装又分两种:SilentMode和SuppressedMode。
SilentMode是完完全全的自动安装,一般说的静默安装也都是指这种方法。
SuppressedMode是SlientMode和普通图形界面安装方式相结合,即responseFile中没有给出的配置信息,则还是要通过图形界面,由用户手工输入。

responseFile的创建:
responseFile的来源有三个:
一个是Oracle安装包中提供的空模板文件,需要修改里面的一些配置信息才可以使用了(一般已经提供了安装模板db_install.rsp,建库模板dbca.rsp,网络配置模板netca.rsp,这些模板文件都放在安装包的response子目录中)。

一个是安装好的数据库中也有,路径$ORACLE_HOME/inventory/response/

另一个是通过图形界面手工安装时,再进行到差不多最后步骤时,右下角会有一个“save response File”按钮,点击保存出来,保存的rsp文件已经保存有前面在图形界面做的配置信息了。可以拿来直接进行静默安装。

3DC46634-B3FC-4640-8404-0286C322153C

 

下面分析一下各静默文件的配置:

静默安装数据库软件只有使用rsp文件。

静默建库就不止一种方法了,可以用sql脚本,dbc模板文件、rsp文件三种方法静默创建。

一、静默安装软件
db_install.rsp:主要一些配置参数(文章后附详细rsp文件)

# 1. INSTALL_DB_SWONLY software only:只装数据库软件,不建库
oracle.install.option=INSTALL_DB_SWONLY
ORACLE_HOSTNAME=DB1
UNIX_GROUP_NAME=oinstall
INVENTORY_LOCATION=/u01/app/oracle/oraInventory
# 指定数据库语言,可以选择多个,用逗号隔开。选择en, zh_CN(英文和简体中文)
SELECTED_LANGUAGES=en,zh_CN
ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1
ORACLE_BASE=/u01/app/oracle
# EE : Enterprise Edition 企业版
# 选择Oracle安装数据库软件的版本(企业版,标准版,标准版1),不同的版本功能不同
oracle.install.db.InstallEdition=EE
# 是否自定义Oracle的组件,如果选择false,则会使用默认的组件
# 如果选择true则需要自己在下面一条参数将要安装的组件一一列出。
# 安装相应版权后会安装所有的组件,后期如果缺乏某个组件,再次安装会非常的麻烦。
oracle.install.db.isCustomInstall=false
#上面的oracle.install.db.isCustomInstall为false时,下面这个值就为空
oracle.install.db.customComponents=oracle.server:11.2.0.1.0,oracle.sysman.ccr:10.2.7.0.0,oracle.xdk:11.2.0.1.0,oracle.rdbms.oci:11.2.0.1.0,oracle.network:11.2.0.1.0,oracle.network.listener:11.2.0.1.0,oracle.rdbms:11.2.0.1.0,oracle.options:11.2.0.1.0,oracle.rdbms.partitioning:11.2.0.1.0,oracle.oraolap:11.2.0.1.0,oracle.rdbms.dm:11.2.0.1.0,oracle.rdbms.dv:11.2.0.1.0,orcle.rdbms.lbac:11.2.0.1.0,oracle.rdbms.rat:11.2.0.1.0
# 指定拥有OSDBA用户组
oracle.install.db.DBA_GROUP=dba
# 指定拥有OSOPER用户组
oracle.install.db.OPER_GROUP=oinstall
# - GENERAL_PURPOSE/TRANSACTION_PROCESSING 一般用途/事物处理
# 选择数据库的用途,一般用途/事物处理,数据仓库
oracle.install.db.config.starterdb.type=GENERAL_PURPOSE
oracle.install.db.config.starterdb.globalDBName=orcl
oracle.install.db.config.starterdb.SID=orcl
#选择字符集。不正确的字符集会给数据显示和存储带来麻烦无数。
#通常中文选择的有ZHS16GBK简体中文库,建议选择unicode的AL32UTF8国际字符集
oracle.install.db.config.starterdb.characterSet=AL32UTF8
#11g的新特性自动内存管理,也就是SGA_TARGET和PAG_AGGREGATE_TARGET都#不用设置了,Oracle会自动调配两部分大小。
oracle.install.db.config.starterdb.memoryOption=false
# 是否载入模板示例
oracle.install.db.config.starterdb.installExampleSchemas=false
# 是否启用安全设置
oracle.install.db.config.starterdb.enableSecuritySettings=true
# 这个starterdb.password密码将用于数据库其它所有地方,只要设置这一个就行
oracle.install.db.config.starterdb.password.ALL=oracle_4U

# 数据库本地管理工具DB_CONTROL,远程集中管理工具GRID_CONTROL
oracle.install.db.config.starterdb.control=DB_CONTROL
# end

1、开始静默安装:

$ ./runInstaller     -silent     -responseFile     /home/oracle/db_install.rsp  -ignoreSysPrereqs

或者直接把配置参数写到命令行中:
./runInstaller -silent "ORACLE_HOME_NAME=OraDBHome1" ...
所有在命令行中指定的参数都必须用双引号括起来。

各参数含义如下:

./runInstaller -help

-silent 表示以静默方式安装,不会有任何提示,所有配置信息都有responseFile提供,安装过程中不提示任何图形界面,该选项用来区分SilentMode和SuppressedMode。

不过不论是SilentMode还是SuppressedMode,因为都无法通过OUI图形界面指定OracleInventory目录和Oracle安装群组并自动生成oraInst.loc文件(oraInst.loc中就记录了OracleInventory路径和Oracle安装用户群组),所以在启动安装之前,需要先手工配置一个oraInst.loc文件,在其中指定好OracleInventory路径和Oracle安装用户群组名,oraInst.loc文件的路径为/etc/oraInst.loc,以下为一个oraInst.loc示例文件:
inventory_loc=/opt/oracle/oraInventory
inst_group=root

-force 允许安装到一个非空目录

-noconfig 只进行Oracle数据库系统的安装,不执行其它的配置工具(如DBCA、NetCA)。

-responseFile 表示使用哪个响应文件,必需使用绝对路径

oracle.install.responseFileVersion 响应文件模板的版本,该参数不要更改

oracle.install.option 安装选项,本例只安装oracle软件,该参数不要更改

DECLINE_SECURITY_UPDATES 是否需要在线安全更新,设置为false,该参数不要更改

ORACLE_HOSTNAME 安装主机名

UNIX_GROUP_NAME oracle 用户用于安装软件的组名

INVENTORY_LOCATION oracle产品清单目录

SELECTED_LANGUAGES oracle运行语言环境,一般包括引文和简繁体中文

ORACLE_HOME Oracle 安装目录

ORACLE_BASE oracle 基础目录

oracle.install.db.InstallEdition 安装版本类型,一般是企业版

oracle.install.db.isCustomInstall 是否定制安装,默认Partitioning,OLAP,RAT都选上了

oracle.install.db.customComponents 定制安装组件列表:除了以上默认的,可加上Label <wbr />Security和Database <wbr />Vault

oracle.install.db.DBA_GROUP oracle用户用于授予OSDBA权限的组名

oracle.install.db.OPER_GROUP oracle用户用于授予OSOPER权限的组名

如果顺利的话,不久后能看到下面的提示:
#——————————————————————-

/u01/app/oracle/oraInventory/orainstRoot.sh
/u01/app/oracle/product/11.2.0/dbhome_1/root.sh
To execute the configuration scripts:
1. Open a terminal window
2. Log in as “root”
3. Run the scripts
4. Return to this window and hit “Enter” key to continue

Successfully Setup Software.
#——————————————————————-
安装期间查看安装日志信息了解安装进度
$ cd $ORACLE_BASE/oraInventory/logs
$ tail -100f installActions*.log

安装的软件信息会写入inventory.xml文件, 如果需重运行则把该文件的对应安装条目信息删除即可:
$ vi $ORACLE_BASE/oraInventory/ContentsXML/inventory.xml

2、在root账户下运行下面两个脚本:
/u01/app/oracle/oraInventory/orainstRoot.sh
/u01/app/oracle/product/11.2.0/dbhome_1/root.sh
一定要记得运行,不然会出现ORA-09925: Unable to create audit trail file的错误

 

二、静默建库:

静默建库也差不多有三种方法:
第一种
是根据模板文件rsp进行安装,在上文中提到了在oracle安装程序的安装文件夹下的response目录中有一个dbca.rsp文件就是dbca的模板文件。(后面有详细说明)

第二种
是根据oracle自身的数据库模板来建立数据库实例(模板文件位置:$ORACLE_HOME/assistants/dbca/templates/*.dbc
ORACLE为我们提供了几个dbc模板:
Data_Warehouse.dbc:Data Warehouse数据仓库
Transaction Processing事务处理
General_Purpose.dbc:General Purpose一般用途
可以使用dbca图形建库时,安装到最后的时候选择“save as a Database Template”,保存一份自己的dbc模板

根据Oracle提供的数据库模版创建数据库:
dbca -silent -createDatabase -templateName $ORACLE_HOME/assistants/dbca/template/Transaction_Processing.dbc -gdbName orcl -sid orcl -responseFile NO_VALUE -characterSet ZHS16GBK

第三种
这种方法比较简单,不做详细说明。就是直接用脚本创建,可以自己完全手工写出来,也可以在用dbca图形建库时,安装到最后的时候选择“Generate Database Creation Scripts”保存一份自己的脚本,用来静默建库

7640CCF8-332B-4684-9821-73EB2E538F31

在安装之前需要注意的几个问题:
1、/etc/hosts文件中,本机的hostname必须和IP对应(如果你有改过hostname的话,需要修改该文件)
2、$ORACLE_HOME/network/admin/listener.ora文件必须配置服务器监听,为了保险起见,将tnsnames和sqlnet文件都配置了吧
3、在dbca命令中出现的文件参数,必须使用全路径
4、注意在使用dbca命令的时候各个同级别的参数的必要性,有些是必要的,有些是不必要的。具体可参考dbca -help

静默建库的话,可能最常用还是脚本建库,因为自己完全能手工写出来。

第一种:根据rsp文件创建数据库:
可以在命令中直接指定一些参数,如dbname,sid,数据路径等
$dbca -silent -cloneTemplate -gdbName orcl -sid orcl -datafileDestination /u01/oradata -responseFile /home/oracle/response/dbca.rsp
一些参数的说明:
-silent指定dbca的静默安装方式
-cloneTemplate指定自模版文件创建
-gdbNameGlobal Database Name
-sid创建数据库的sid
-datafileDestination数据文件存放的目标路径
-responseFIle模版文件的路径

配置文件详解:
$ vi /u01/database/response/dbca.rsp
#——————————————————————–
#以下参数不要更改
[GENERAL]
RESPONSEFILE_VERSION = “11.2.0”
OPERATION_TYPE = “createDatabase”
#以下参数必须设置
[CREATEDATABASE]
GDBNAME = “ORCL.LK”
TEMPLATENAME = “General_Purpose.dbc”
#以下参数不设置则使用默认值,建议设置
CHARACTERSET = “ZHS16GBK”
TOTALMEMORY = “1024”
#——————————————————————–
种子数据库和控制文件位于$ORACLE_HOME/assistants/dbca/templates/下, 即Seed_Database.dfb和 Seed_Database.ctl文件, 实际上建库就是基于通过rman恢复种子数据库和控制文件来实现的.

也可以在rsp文件中都配置好参数,直接用命令指定文件就行
$dbca -silent -responseFile /u01/database/response/dbca.rsp
Enter SYS user password:
< 输入sys用户密码>
Enter SYSTEM user password:
< 输入system用户密码>
Copying database files

37% complete
Creating and starting Oracle instance

62% complete
Completing Database Creation

100% complete
Look at the log file “/u01/app/oracle/cfgtoollogs/dbca/ORCL/ORCL.log” for further details.

各参数含义如下:
-silent 表示以静默方式安装
-responseFile 表示使用哪个响应文件,必需使用绝对路径
RESPONSEFILE_VERSION 响应文件模板的版本,该参数不要更改
OPERATION_TYPE 安装类型,该参数不要更改
GDBNAME 全局数据库名,点号前面默认是db_name,点号后面默认就是db_domain
TEMPLATENAME 建库模板名,参考各模板定义:$ORACLE_HOME/assistants/dbca/templates/*.dbc
CHARACTERSET 字符集,默认是WE8MSWIN1252
TOTALMEMORY 实例内存,默认是服务器物理内存的40%

修改 cp database/response/dbca.rsp orcl.rsp

针对下面的项进行修改:

RESPONSEFILE_VERSION = "11.2.0" //不能更改
OPERATION_TYPE = "createDatabase"
GDBNAME = "orcl" //数据库的名字
SID = "orcl" //对应的实例名字
TEMPLATENAME = "General_Purpose.dbc" //建库用的模板文件
SYSPASSWORD = "oracle_4U" //SYS管理员密码
SYSTEMPASSWORD = "oracle_4U" //SYSTEM管理员密码
DATAFILEDESTINATION = /u01/app/oracle/oradata //数据文件存放目录
RECOVERYAREADESTINATION=/u01/app/oracle/flash_recovery_area //恢复数据存放目录
CHARACTERSET = "ZHS16GBK" //字符集,重要!!! 建库后一般不能更改,所以建库前要确定清楚。
TOTALMEMORY = "5120" //oracle内存5120MB

cat dbca.rsp
##############################################################################
## ##
## DBCA response file ##
## —————— ##
## Copyright 1998, 2007, Oracle Corporation. All Rights Reserved. ##
## ##
## Specify values for the variables listed below to customize Oracle ##
## Database Configuration installation. ##
## ##
## Each variable is associated with a comment. The comment identifies the ##
## variable type. ##
## ##
## Please specify the values in the following format : ##
## Type : Example ##
## String : “” ##
## Boolean : True or False ##
## Number : ##
## StringList : {“”,””} ##
## ##
## Examples : ##
## 1. dbca -progress_only -responseFile ##
## Display a progress bar depicting progress of database creation ##
## process. ##
##
## 2. dbca -silent -responseFile ##
## Creates database silently. No user interface is displayed. ##
## ##
## 3. dbca -silent -createDatabase -cloneTemplate ##
## -responseFile ##
## Creates database silently with clone template. The template in ##
## responsefile is a clone template. ##
## ##
## 4. dbca -silent -deleteDatabase -responseFile ##
## Deletes database silently. ##
##############################################################################

#—————————————————————————–
# GENERAL section is required for all types of database creations.
#—————————————————————————–
[GENERAL]

#—————————————————————————–
# Name : RESPONSEFILE_VERSION
# Datatype : String
# Description : Version of the database to create
# Valid values : “11.1.0”
# Default value : None
# Mandatory : Yes
#—————————————————————————–
RESPONSEFILE_VERSION = “11.2.0”

#—————————————————————————–
# Name : OPERATION_TYPE
# Datatype : String
# Description : Type of operation
# Valid values : “createDatabase” \ “createTemplateFromDB” \ “createCloneTemplate” \ “deleteDatabase” \ “configureDatabase” \ “addInstance” (RAC-only) \ “deleteInstance” (RAC-only)
# Default value : None
# Mandatory : Yes
#—————————————————————————–
OPERATION_TYPE = “createDatabase”

#———————–*** End of GENERAL section ***———————— #—————————————————————————–
# CREATEDATABASE section is used when OPERATION_TYPE is defined as “createDatabase”.
#—————————————————————————–
[CREATEDATABASE]

#—————————————————————————–
# Name : GDBNAME
# Datatype : String
# Description : Global database name of the database
# Valid values : . – when database domain isn’t NULL
# – when database domain is NULL
# Default value : None
# Mandatory : Yes
#—————————————————————————–
# 数据库名称
GDBNAME = “orcl”
#—————————————————————————–
# 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 = “false”

#—————————————————————————–
# 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 = “false”

#—————————————————————————–
# 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 = “false”

#—————————————————————————–
# 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 : SID
# Datatype : String
# Description : System identifier (SID) of the database
# Valid values : Check Oracle11g Administrator’s Guide
# Default value : specified in GDBNAME
# Mandatory : No
#—————————————————————————–
SID = “orcl”

#—————————————————————————–
# 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 = “General_Purpose.dbc”

#—————————————————————————–
# Name : OBFUSCATEDPASSWORDS
# Datatype : Boolean
# Description : Set to true if passwords are encrypted
# Valid values : TRUE\FALSE
# Default value : FALSE
# Mandatory : No
#—————————————————————————–
#OBFUSCATEDPASSWORDS = FALSE

#—————————————————————————–
# Name : SYSPASSWORD
# Datatype : String
# Description : Password for SYS user
# Valid values : Check Oracle11g Administrator’s Guide
# Default value : None
# Mandatory : Yes
#—————————————————————————–
SYSPASSWORD = “oracle_4U”
#—————————————————————————–
# Name : SYSTEMPASSWORD
# Datatype : String
# Description : Password for SYSTEM user
# Valid values : Check Oracle11g Administrator’s Guide
# Default value : None
# Mandatory : Yes
#—————————————————————————–
SYSTEMPASSWORD = “oracle_4U”

#—————————————————————————–
# Name : EMCONFIGURATION
# Datatype : String
# Description : Enterprise Manager Configuration Type
# Valid values : CENTRAL|LOCAL|ALL|NOBACKUP|NOEMAIL|NONE
# Default value : NONE
# Mandatory : No
#—————————————————————————–
#EMCONFIGURATION = “NONE”

#—————————————————————————–
# Name : DISABLESECURITYCONFIGURATION
# Datatype : String
# Description : Database Security Settings
# Valid values : ALL|NONE|AUDIT|PASSWORD_PROFILE
# Default value : NONE
# Mandatory : No
#—————————————————————————–
#DISABLESECURITYCONFIGURATION = “NONE”

#—————————————————————————–
# Name : SYSMANPASSWORD
# Datatype : String
# Description : Password for SYSMAN user
# Valid values : Check Oracle11g Administrator’s Guide
# Default value : None
# Mandatory : Yes, if LOCAL specified for EMCONFIGURATION
#—————————————————————————–
#SYSMANPASSWORD = “password”
#—————————————————————————–
# Name : DBSNMPPASSWORD
# Datatype : String
# Description : Password for DBSNMP user
# Valid values : Check Oracle11g Administrator’s Guide
# Default value : None
# Mandatory : Yes, if EMCONFIGURATION is specified
#—————————————————————————–
#DBSNMPPASSWORD = “password”

#—————————————————————————–
# Name : CENTRALAGENT
# Datatype : String
# Description : Grid Control Central Agent Oracle Home
# Default value : None
# Mandatory : Yes, if CENTRAL is specified for EMCONFIGURATION
#—————————————————————————–
#CENTRALAGENT =

#—————————————————————————–
# Name : HOSTUSERNAME
# Datatype : String
# Description : Host user name for EM backup job
# Default value : None
# Mandatory : Yes, if ALL or NOEMAIL are specified for EMCONFIGURATION
#—————————————————————————–
#HOSTUSERNAME =

#—————————————————————————–
# Name : HOSTUSERPASSWORD
# Datatype : String
# Description : Host user password for EM backup job
# Default value : None
# Mandatory : Yes, if ALL or NOEMAIL are specified for EMCONFIGURATION
#—————————————————————————–
#BACKUPSCHEDULE=

#—————————————————————————–
# Name : SMTPSERVER
# Datatype : String
# Description : Outgoing mail (SMTP) server for email notifications
# Default value : None
# Mandatory : Yes, if ALL or NOBACKUP are specified for EMCONFIGURATION
#—————————————————————————–
#SMTPSERVER =

#—————————————————————————–
# Name : EMAILADDRESS
# Datatype : String
# Description : Email address for email notifications
# Default value : None
# Mandatory : Yes, if ALL or NOBACKUP are specified for EMCONFIGURATION
#—————————————————————————–
#EMAILADDRESS =

#—————————————————————————–
# Name : DVOWNERNAME
# Datatype : String
# Description : DataVault Owner
# Valid values : Check Oracle11g Administrator’s Guide
# Default value : None
# Mandatory : Yes, if DataVault option is chosen
#—————————————————————————–
#DVOWNERNAME = “”

#—————————————————————————–
# Name : DVOWNERPASSWORD
# Datatype : String
# Description : Password for DataVault Owner
# Valid values : Check Oracle11g Administrator’s Guide
# Default value : None
# Mandatory : Yes, if DataVault option is chosen
#—————————————————————————–
#DVOWNERPASSWORD = “”

#—————————————————————————–
# Name : DVACCOUNTMANAGERNAME
# Datatype : String
# Description : DataVault Account Manager
# Valid values : Check Oracle11g Administrator’s Guide
# Default value : None
# Mandatory : No
#—————————————————————————–
#DVACCOUNTMANAGERNAME = “”

#—————————————————————————–
# Name : DVACCOUNTMANAGERPASSWORD
# Datatype : String
# Description : Password for DataVault Account Manager
# Valid values : Check Oracle11g Administrator’s Guide
# Default value : None
# Mandatory : No
#—————————————————————————–
#DVACCOUNTMANAGERPASSWORD = “”

#—————————————————————————–
# 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 = /u01/app/oracle/oradata

#—————————————————————————–
# 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=

#—————————————————————————–
# 恢复数据存放目录
RECOVERYAREADESTINATION = /u01/app/oracle/flash_recovery_area

#—————————————————————————–
# 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=FS
#—————————————————————————–
# Name : DISKGROUPNAME
# Datatype : String
# Description : Specifies the disk group name for the storage
# Default value : DATA
# Mandatory : No
#—————————————————————————–
#DISKGROUPNAME=DATA

#—————————————————————————–
# Name : ASMSNMP_PASSWORD
# Datatype : String
# Description : Password for ASM Monitoring
# Default value : None
# Mandatory : No
#—————————————————————————–
#ASMSNMP_PASSWORD=””

#—————————————————————————–
# Name : RECOVERYGROUPNAME
# Datatype : String
# Description : Specifies the disk group name for the recovery area
# Default value : RECOVERY
# Mandatory : No
#—————————————————————————–
#RECOVERYGROUPNAME=RECOVERY
# Name : CHARACTERSET
# Datatype : String
# Description : Character set of the database
# Valid values : Check Oracle11g National Language Support Guide
# Default value : “US7ASCII”
# Mandatory : NO
#—————————————————————————–
CHARACTERSET = “AL32UTF8”

#—————————————————————————–
# Name : NATIONALCHARACTERSET
# Datatype : String
# Description : National Character set of the database
# Valid values : “UTF8” or “AL16UTF16”. For details, check Oracle11g National Language Support Guide
# Default value : “AL16UTF16”
# Mandatory : No
#—————————————————————————–
#NATIONALCHARACTERSET= “UTF8”

#—————————————————————————–
# Name : REGISTERWITHDIRSERVICE
# Datatype : Boolean
# Description : Specifies whether to register with Directory Service.
# Valid values : TRUE \ FALSE
# Default value : FALSE
# Mandatory : No
#—————————————————————————–
#REGISTERWITHDIRSERVICE= TRUE
#—————————————————————————–
# Name : DIRSERVICEUSERNAME
# Datatype : String
# Description : Specifies the name of the directory service user
# Mandatory : YES, if the value of registerWithDirService is TRUE
#—————————————————————————–
#DIRSERVICEUSERNAME= “name”

#—————————————————————————–
# 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= “password”

#—————————————————————————–
# 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= “password”
#—————————————————————————–
# 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 space separated names like “listener1 listener2”.
# Mandatory : NO
#—————————————————————————–
#LISTENERS = “listener1 listener2”
#—————————————————————————–
# 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 =. 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 : MEMORYPERCENTAGE
# Datatype : String
# Description : percentage of physical memory for Oracle
# Default value : None
# Mandatory : NO
#—————————————————————————–
#MEMORYPERCENTAGE = “40”

#—————————————————————————–
# Name : DATABASETYPE
# Datatype : String
# Description : used for memory distribution when MEMORYPERCENTAGE specified
# Valid values : MULTIPURPOSE|DATA_WAREHOUSING|OLTP
# Default value : MULTIPURPOSE
# Mandatory : NO
#—————————————————————————–
#DATABASETYPE = “MULTIPURPOSE”

#—————————————————————————–
# Name : AUTOMATICMEMORYMANAGEMENT
# Datatype : Boolean
# Description : flag to indicate Automatic Memory Management is used
# Valid values : TRUE/FALSE
# Default value : TRUE
# Mandatory : NO
#—————————————————————————–
#AUTOMATICMEMORYMANAGEMENT = “TRUE”

#—————————————————————————–
# Name : TOTALMEMORY
# Datatype : String
# Description : total memory in MB to allocate to Oracle
# Valid values :
# Default value :
# Mandatory : NO
#—————————————————————————–
#TOTALMEMORY = “800”

#———————–*** End of CREATEDATABASE section ***————————

建库后实例检查

$ ps -ef | grep ora_ | grep -v grep | wc -l
$ ps -ef | grep ora_ | grep -v grep

15、在dbs下拷贝一份init.ora到initORCL.ora
16、startup 可能会报错说控制文件不对:
SQL> startup
ORACLE instance started.
Total System Global Area 217157632 bytes
Fixed Size 2211928 bytes
Variable Size 159387560 bytes
Database Buffers 50331648 bytes
Redo Buffers 5226496 bytes
ORA-00205: error in identifying control file, check alert log for more info

这个很好办:alter system set control_files=’/u01/app/oracle/oradata/ORCL/control01.ctl’ scope=spfile;
然后shutdown immediate => startup

如果不出意外,静默安装就算大功告成了。

三、静默配置监听
通过response文件运行netca, 在$ORACLE_HOME/network/admin目录下生成sqlnet.ora和listener.ora文件。

# su – oracle
$ $ORACLE_HOME/bin/netca /silent /responsefile /u01/database/response/netca.rsp
$ ll $ORACLE_HOME/network/admin/*.ora
$ lsnrctl status
执行完后, 监听就已经启动了, 默认端口是1521, 默认是动态监听, 只要实例启动了就会监听到.
(当时因为没配环境变量,监听程序一直启动不起来,郁闷了老半天,低级错误啊。。。。)

 

 

 

附:db_install.rsp

#——————————————————————————
# Do not change the following system generated value.
# 不要更改以下系统所生成的值
#——————————————————————————
oracle.install.responseFileVersion=/oracle/install/rspfmt_dbinstall_response_schema_v11_2_0

#——————————————————————————
# Specify the installation option.
# It can be one of the following:
# 1. INSTALL_DB_SWONLY software only:只装数据库软件,不建库
# 2. INSTALL_DB_AND_CONFIG
# 3. UPGRADE_DB 升级软件
#——————————————————————————-
oracle.install.option=INSTALL_DB_SWONLY

#——————————————————————————-
# Specify the hostname of the system as set during the install. It can be used
# to force the installation to use an alternative hostname rather than using the
# first hostname found on the system. (e.g., for systems with multiple hostnames
# and network interfaces)
#——————————————————————————-
ORACLE_HOSTNAME=DB1

#——————————————————————————-
# Specify the Unix group to be set for the inventory directory.
#——————————————————————————-
UNIX_GROUP_NAME=oinstall

#——————————————————————————-
# Specify the location which holds the inventory files.
#——————————————————————————-
INVENTORY_LOCATION=/u01/app/oracle/oraInventory

#——————————————————————————-
# Specify the languages in which the components will be installed.
# 指定数据库语言,可以选择多个,用逗号隔开。
# en : English ja : Japanese
# fr : French ko : Korean
# ar : Arabic es : Latin American Spanish
# bn : Bengali lv : Latvian
# pt_BR: Brazilian Portuguese lt : Lithuanian
# bg : Bulgarian ms : Malay
# fr_CA: Canadian French es_MX: Mexican Spanish
# ca : Catalan no : Norwegian
# hr : Croatian pl : Polish
# cs : Czech pt : Portuguese
# da : Danish ro : Romanian
# nl : Dutch ru : Russian
# ar_EG: Egyptian zh_CN: Simplified Chinese
# en_GB: English (Great Britain) sk : Slovak
# et : Estonian sl : Slovenian
# fi : Finnish es_ES: Spanish
# de : German sv : Swedish
# el : Greek th : Thai
# iw : Hebrew zh_TW: Traditional Chinese
# hu : Hungarian tr : Turkish
# is : Icelandic uk : Ukrainian
# in : Indonesian vi : Vietnamese
# it : Italian
#
# Example : SELECTED_LANGUAGES=en,fr,ja
#——————————————————————————
# 指定数据库语言,可以选择多个,用逗号隔开。选择en, zh_CN(英文和简体中文)
SELECTED_LANGUAGES=en,zh_CN

#——————————————————————————
# Specify the complete path of the Oracle Home.
#——————————————————————————
ORACLE_HOME=/u01/app/oracle/product/11.2.0/db_1

#——————————————————————————
# Specify the complete path of the Oracle Base.
#——————————————————————————
ORACLE_BASE=/u01/app/oracle

#——————————————————————————
# Specify the installation edition of the component.
#
# The value should contain only one of these choices.
# EE : Enterprise Edition 企业版
# SE : Standard Edition 标准版
# SEONE : Standard Edition One 标准版one
# PE : Personal Edition (WINDOWS ONLY) 个人版
#——————————————————————————
# 选择Oracle安装数据库软件的版本(企业版,标准版,标准版1),不同的版本功能不同
oracle.install.db.InstallEdition=EE

#——————————————————————————
# This variable is used to enable or disable custom install.
#
# true : Components mentioned as part of ‘customComponents’ property
# are considered for install.
# false : Value for ‘customComponents’ is not considered.
#——————————————————————————
# 是否自定义Oracle的组件,如果选择false,则会使用默认的组件

# 如果选择true则需要自己在下面一条参数将要安装的组件一一列出。

# 安装相应版权后会安装所有的组件,后期如果缺乏某个组件,再次安装会非常的麻烦。
oracle.install.db.isCustomInstall=false

#——————————————————————————
# This variable is considered only if ‘IsCustomInstall’ is set to true.
#
# Description: List of Enterprise Edition Options you would like to install.
#
# The following choices are available. You may specify any
# combination of these choices. The components you choose should
# be specified in the form “internal-component-name:version”
# Below is a list of components you may specify to install.
#
# oracle.rdbms.partitioning:11.2.0.1.0 – Oracle Partitioning
# oracle.rdbms.dm:11.2.0.1.0 – Oracle Data Mining
# oracle.rdbms.dv:11.2.0.1.0 – Oracle Database Vault
# oracle.rdbms.lbac:11.2.0.1.0 – Oracle Label Security
# oracle.rdbms.rat:11.2.0.1.0 – Oracle Real Application Testing
# oracle.oraolap:11.2.0.1.0 – Oracle OLAP
#——————————————————————————

#上面的oracle.install.db.isCustomInstall为false时,下面这个值就为空
oracle.install.db.customComponents=oracle.server:11.2.0.1.0,oracle.sysman.ccr:10.2.7.0.0,oracle.xdk:11.2.0.1.0,oracle.rdbms.oci:11.2.0.1.0,oracle.network:11.2.0.1.0,oracle.network.listener:11.2.0.1.0,oracle.rdbms:11.2.0.1.0,oracle.options:11.2.0.1.0,oracle.rdbms.partitioning:11.2.0.1.0,oracle.oraolap:11.2.0.1.0,oracle.rdbms.dm:11.2.0.1.0,oracle.rdbms.dv:11.2.0.1.0,orcle.rdbms.lbac:11.2.0.1.0,oracle.rdbms.rat:11.2.0.1.0

###############################################################################
# #
# PRIVILEGED OPERATING SYSTEM GROUPS #
# —————————————— #
# Provide values for the OS groups to which OSDBA and OSOPER privileges #
# needs to be granted. If the install is being performed as a member of the #
# group “dba”, then that will be used unless specified otherwise below. #
# #
###############################################################################

#——————————————————————————
# The DBA_GROUP is the OS group which is to be granted OSDBA privileges.
#——————————————————————————
# 指定拥有OSDBA用户组
oracle.install.db.DBA_GROUP=dba

#——————————————————————————
# The OPER_GROUP is the OS group which is to be granted OSOPER privileges.
#——————————————————————————
# 指定拥有OSOPER用户组
oracle.install.db.OPER_GROUP=oinstall
#——————————————————————————
# Specify the cluster node names selected during the installation.
#——————————————————————————
# 如果是RAC的安装,在这里指定所有的节点
oracle.install.db.CLUSTER_NODES=

#——————————————————————————
# Specify the type of database to create.
# It can be one of the following:
# – GENERAL_PURPOSE/TRANSACTION_PROCESSING 一般用途/事物处理
# – DATA_WAREHOUSE 数据仓库
#——————————————————————————
# 选择数据库的用途,一般用途/事物处理,数据仓库
oracle.install.db.config.starterdb.type=GENERAL_PURPOSE

#——————————————————————————
# Specify the Starter Database Global Database Name.
#——————————————————————————
oracle.install.db.config.starterdb.globalDBName=orcl

#——————————————————————————
# Specify the Starter Database SID.
#——————————————————————————
oracle.install.db.config.starterdb.SID=orcl

#——————————————————————————
# Specify the Starter Database character set.
#
# It can be one of the following:
# AL32UTF8, WE8ISO8859P15, WE8MSWIN1252, EE8ISO8859P2,
# EE8MSWIN1250, NE8ISO8859P10, NEE8ISO8859P4, BLT8MSWIN1257,
# BLT8ISO8859P13, CL8ISO8859P5, CL8MSWIN1251, AR8ISO8859P6,
# AR8MSWIN1256, EL8ISO8859P7, EL8MSWIN1253, IW8ISO8859P8,
# IW8MSWIN1255, JA16EUC, JA16EUCTILDE, JA16SJIS, JA16SJISTILDE,
# KO16MSWIN949, ZHS16GBK, TH8TISASCII, ZHT32EUC, ZHT16MSWIN950,
# ZHT16HKSCS, WE8ISO8859P9, TR8MSWIN1254, VN8MSWIN1258
#——————————————————————————
#选择字符集。不正确的字符集会给数据显示和存储带来麻烦无数。
#通常中文选择的有ZHS16GBK简体中文库,建议选择unicode的AL32UTF8国际字符集
oracle.install.db.config.starterdb.characterSet=AL32UTF8

#——————————————————————————
# This variable should be set to true if Automatic Memory Management
# in Database is desired.
# If Automatic Memory Management is not desired, and memory allocation
# is to be done manually, then set it to false.
#——————————————————————————
#11g的新特性自动内存管理,也就是SGA_TARGET和PAG_AGGREGATE_TARGET都#不用设置了,Oracle会自动调配两部分大小。
oracle.install.db.config.starterdb.memoryOption=false

#——————————————————————————
# Specify the total memory allocation for the database. Value(in MB) should be
# at least 256 MB, and should not exceed the total physical memory available
# on the system.
# Example: oracle.install.db.config.starterdb.memoryLimit=512
#——————————————————————————
#指定Oracle自动管理内存的大小,最小是256MB
oracle.install.db.config.starterdb.memoryLimit=

#——————————————————————————
# This variable controls whether to load Example Schemas onto the starter
# database or not.
#——————————————————————————
# 是否载入模板示例
oracle.install.db.config.starterdb.installExampleSchemas=false

#——————————————————————————
# This variable includes enabling audit settings, configuring password profiles
# and revoking some grants to public. These settings are provided by default.
# These settings may also be disabled.
#——————————————————————————
# 是否启用安全设置
oracle.install.db.config.starterdb.enableSecuritySettings=true

###############################################################################
# #
# Passwords can be supplied for the following four schemas in the #
# starter database: #
# SYS #
# SYSTEM #
# SYSMAN (used by Enterprise Manager) #
# DBSNMP (used by Enterprise Manager) #
# #
# Same password can be used for all accounts (not recommended) #
# or different passwords for each account can be provided (recommended) #
# #

# This variable holds the password that is to be used for all schemas in the
# starter database.
#——————————————————————————-
# 这个starterdb.password密码将用于数据库其它所有地方,只要设置这一个就行
oracle.install.db.config.starterdb.password.ALL=oracle_4U

#——————————————————————————-
# Specify the SYS password for the starter database.
#——————————————————————————-
oracle.install.db.config.starterdb.password.SYS=

#——————————————————————————-
# Specify the SYSTEM password for the starter database.
#——————————————————————————-
oracle.install.db.config.starterdb.password.SYSTEM=

#——————————————————————————-
# Specify the SYSMAN password for the starter database.
#——————————————————————————-
oracle.install.db.config.starterdb.password.SYSMAN=

#——————————————————————————-
# Specify the DBSNMP password for the starter database.
#——————————————————————————-
oracle.install.db.config.starterdb.password.DBSNMP=
#——————————————————————————-
# Specify the management option to be selected for the starter database.
# It can be one of the following:
# 1. GRID_CONTROL
# 2. DB_CONTROL
#——————————————————————————-
# 数据库本地管理工具DB_CONTROL,远程集中管理工具GRID_CONTROL
oracle.install.db.config.starterdb.control=DB_CONTROL

#——————————————————————————-
# Specify the Management Service to use if Grid Control is selected to manage
# the database.
#——————————————————————————-
# 如果有GRID_CONTROL,需要设定grid control的远程路径URL
oracle.install.db.config.starterdb.gridcontrol.gridControlServiceURL=

#——————————————————————————-
# This variable indicates whether to receive email notification for critical
# alerts when using DB control.
#——————————————————————————-
# 是否启用Email通知, 启用后会将告警等信息发送到指定邮箱
oracle.install.db.config.starterdb.dbcontrol.enableEmailNotification=false

#——————————————————————————-
# Specify the email address to which the notifications are to be sent.
#——————————————————————————-
# 设置通知EMAIL地址
oracle.install.db.config.starterdb.dbcontrol.emailAddress=

#——————————————————————————-
# Specify the SMTP server used for email notifications.
# 设置EMAIL邮件服务器
oracle.install.db.config.starterdb.dbcontrol.SMTPServer=

###############################################################################
# #
# SPECIFY BACKUP AND RECOVERY OPTIONS #
# ———————————— #
# Out-of-box backup and recovery options for the database can be mentioned #
# using the entries below. #
# #
###############################################################################
#安全及恢复设置(默认值即可)out-of-box(out-of-box experience)缩写为OOBE

#产品给用产品给用户良好第一印象和使用感受
#——————————————————————————
# This variable is to be set to false if automated backup is not required. Else
# this can be set to true.
#——————————————————————————
# 设置自动备份,和OUI里的自动备份一样。
oracle.install.db.config.starterdb.automatedBackup.enable=false

#——————————————————————————
# Regardless of the type of storage that is chosen for backup and recovery, if
# automated backups are enabled, a job will be scheduled to run daily at
# 2:00 AM to backup the database. This job will run as the operating system
# user that is specified in this variable.
#——————————————————————————
# 自动备份会启动一个job,指定启动JOB的系统用户ID
oracle.install.db.config.starterdb.automatedBackup.osuid=

#——————————————————————————-
# Regardless of the type of storage that is chosen for backup and recovery, if
# automated backups are enabled, a job will be scheduled to run daily at
# 2:00 AM to backup the database. This job will run as the operating system user
# specified by the above entry. The following entry stores the password for the
# above operating system user.
#——————————————————————————-
# 自动备份会开启一个job,需要指定OSUser的密码
oracle.install.db.config.starterdb.automatedBackup.ospwd=

#——————————————————————————-
# Specify the type of storage to use for the database.
# It can be one of the following:
# – FILE_SYSTEM_STORAGE
# – ASM_STORAGE
#——————————————————————————
# 自动备份,要求指定使用的文件系统存放数据库文件还是ASM
oracle.install.db.config.starterdb.storageType=

#——————————————————————————-
# Specify the database file location which is a directory for datafiles, control
# files, redo logs.
# 使用文件系统存放数据库文件才需要指定数据文件、控制文件、Redo log的存放目录
# Applicable only when oracle.install.db.config.starterdb.storage=FILE_SYSTEM
#——————————————————————————-
oracle.install.db.config.starterdb.fileSystemStorage.dataLocation=

#——————————————————————————-
#——————————————————————————-
# Specify the backup and recovery location.
#
# Applicable only when oracle.install.db.config.starterdb.storage=FILE_SYSTEM
#——————————————————————————-
# 使用文件系统存放数据库文件才需要指定备份恢复目录
oracle.install.db.config.starterdb.fileSystemStorage.recoveryLocation=

#——————————————————————————-
# Specify the existing ASM disk groups to be used for storage.
#
# Applicable only when oracle.install.db.config.starterdb.storage=ASM
#——————————————————————————-
# 使用ASM存放数据库文件才需要指定存放的磁盘组
oracle.install.db.config.asm.diskGroup=

#——————————————————————————-
# Specify the password for ASMSNMP user of the ASM instance.
#
# Applicable only when oracle.install.db.config.starterdb.storage=ASM_SYSTEM
#——————————————————————————-
# 使用ASM存放数据库文件才需要指定ASM实例密码
oracle.install.db.config.asm.ASMSNMPPassword=

#——————————————————————————
# Specify the My Oracle Support Account Username.
#
# Example : MYORACLESUPPORT_USERNAME=metalink
#——————————————————————————
# 指定metalink账户用户名
MYORACLESUPPORT_USERNAME=
#——————————————————————————
# Specify the My Oracle Support Account Username password.
#
# Example : MYORACLESUPPORT_PASSWORD=password
#——————————————————————————
# 指定metalink账户密码
MYORACLESUPPORT_PASSWORD=

#——————————————————————————
# Specify whether to enable the user to set the password for
# My Oracle Support credentials. The value can be either true or false.
# If left blank it will be assumed to be false.
#
# Example : SECURITY_UPDATES_VIA_MYORACLESUPPORT=true
#——————————————————————————
# # 用户是否可以设置metalink密码
SECURITY_UPDATES_VIA_MYORACLESUPPORT=

#——————————————————————————
# Specify whether user wants to give any proxy details for connection.
# The value can be either true or false. If left blank it will be assumed
# to be false.
#
# Example : DECLINE_SECURITY_UPDATES=false
#——————————————————————————
# False表示不需要设置安全更新,注意,在11.2的静默安装中疑似有一个BUG
# Response File中必须指定为true,否则会提示错误,不管是否正确填写了邮件地址
DECLINE_SECURITY_UPDATES=true

#——————————————————————————
# Specify the Proxy server name. Length should be greater than zero.
#
# Example : PROXY_HOST=proxy.domain.com
#——————————————————————————
# 代理服务器名
PROXY_HOST=

#——————————————————————————
# Specify the proxy port number. Should be Numeric and atleast 2 chars.
#
# Example : PROXY_PORT=25
#——————————————————————————
# 代理服务器端口
PROXY_PORT=

#——————————————————————————
# Specify the proxy user name. Leave PROXY_USER and PROXY_PWD
# blank if your proxy server requires no authentication.
#
# Example : PROXY_USER=username
#——————————————————————————
# 代理服务器用户名
PROXY_USER=

#——————————————————————————
# Specify the proxy password. Leave PROXY_USER and PROXY_PWD
# blank if your proxy server requires no authentication.
#
# Example : PROXY_PWD=password
#——————————————————————————
# 代理服务器密码
PROXY_PWD=

# end

附: dbca.rsp
##############################################################################
## ##
## DBCA response file ##
## —————— ##
## Copyright 1998, 2007, Oracle Corporation. All Rights Reserved. ##
## ##
## Specify values for the variables listed below to customize Oracle ##
## Database Configuration installation. ##
## ##
## Each variable is associated with a comment. The comment identifies the ##
## variable type. ##
## ##
## Please specify the values in the following format : ##
## Type : Example ##
## String : “” ##
## Boolean : True or False ##
## Number : ##
## StringList : {“”,””} ##
## ##
## Examples : ##
## 1. dbca -progress_only -responseFile ##
## Display a progress bar depicting progress of database creation ##
## process. ##
##
## 2. dbca -silent -responseFile ##
## Creates database silently. No user interface is displayed. ##
## ##
## 3. dbca -silent -createDatabase -cloneTemplate ##
## -responseFile ##
## Creates database silently with clone template. The template in ##
## responsefile is a clone template. ##
## ##
## 4. dbca -silent -deleteDatabase -responseFile ##
## Deletes database silently. ##
##############################################################################

#—————————————————————————–
# GENERAL section is required for all types of database creations.
#—————————————————————————–
[GENERAL]

#—————————————————————————–
# Name : RESPONSEFILE_VERSION
# Datatype : String
# Description : Version of the database to create
# Valid values : “11.1.0”
# Default value : None
# Mandatory : Yes
#—————————————————————————–
RESPONSEFILE_VERSION = “11.2.0”

#—————————————————————————–
# Name : OPERATION_TYPE
# Datatype : String
# Description : Type of operation
# Valid values : “createDatabase” \ “createTemplateFromDB” \ “createCloneTemplate” \ “deleteDatabase” \ “configureDatabase” \ “addInstance” (RAC-only) \ “deleteInstance” (RAC-only)
# Default value : None
# Mandatory : Yes
#—————————————————————————–
OPERATION_TYPE = “createDatabase”

#———————–*** End of GENERAL section ***———————— #—————————————————————————–
# CREATEDATABASE section is used when OPERATION_TYPE is defined as “createDatabase”.
#—————————————————————————–
[CREATEDATABASE]

#—————————————————————————–
# Name : GDBNAME
# Datatype : String
# Description : Global database name of the database
# Valid values : . – when database domain isn’t NULL
# – when database domain is NULL
# Default value : None
# Mandatory : Yes
#—————————————————————————–
# 数据库名称
GDBNAME = “orcl”
#—————————————————————————–
# 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 = “false”

#—————————————————————————–
# 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 = “false”

#—————————————————————————–
# 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 = “false”

#—————————————————————————–
# 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 : SID
# Datatype : String
# Description : System identifier (SID) of the database
# Valid values : Check Oracle11g Administrator’s Guide
# Default value : specified in GDBNAME
# Mandatory : No
#—————————————————————————–
SID = “orcl”

#—————————————————————————–
# 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 = “General_Purpose.dbc”

#—————————————————————————–
# Name : OBFUSCATEDPASSWORDS
# Datatype : Boolean
# Description : Set to true if passwords are encrypted
# Valid values : TRUE\FALSE
# Default value : FALSE
# Mandatory : No
#—————————————————————————–
#OBFUSCATEDPASSWORDS = FALSE

#—————————————————————————–
# Name : SYSPASSWORD
# Datatype : String
# Description : Password for SYS user
# Valid values : Check Oracle11g Administrator’s Guide
# Default value : None
# Mandatory : Yes
#—————————————————————————–
SYSPASSWORD = “oracle_4U”
#—————————————————————————–
# Name : SYSTEMPASSWORD
# Datatype : String
# Description : Password for SYSTEM user
# Valid values : Check Oracle11g Administrator’s Guide
# Default value : None
# Mandatory : Yes
#—————————————————————————–
SYSTEMPASSWORD = “oracle_4U”

#—————————————————————————–
# Name : EMCONFIGURATION
# Datatype : String
# Description : Enterprise Manager Configuration Type
# Valid values : CENTRAL|LOCAL|ALL|NOBACKUP|NOEMAIL|NONE
# Default value : NONE
# Mandatory : No
#—————————————————————————–
#EMCONFIGURATION = “NONE”

#—————————————————————————–
# Name : DISABLESECURITYCONFIGURATION
# Datatype : String
# Description : Database Security Settings
# Valid values : ALL|NONE|AUDIT|PASSWORD_PROFILE
# Default value : NONE
# Mandatory : No
#—————————————————————————–
#DISABLESECURITYCONFIGURATION = “NONE”

#—————————————————————————–
# Name : SYSMANPASSWORD
# Datatype : String
# Description : Password for SYSMAN user
# Valid values : Check Oracle11g Administrator’s Guide
# Default value : None
# Mandatory : Yes, if LOCAL specified for EMCONFIGURATION
#—————————————————————————–
#SYSMANPASSWORD = “password”
#—————————————————————————–
# Name : DBSNMPPASSWORD
# Datatype : String
# Description : Password for DBSNMP user
# Valid values : Check Oracle11g Administrator’s Guide
# Default value : None
# Mandatory : Yes, if EMCONFIGURATION is specified
#—————————————————————————–
#DBSNMPPASSWORD = “password”

#—————————————————————————–
# Name : CENTRALAGENT
# Datatype : String
# Description : Grid Control Central Agent Oracle Home
# Default value : None
# Mandatory : Yes, if CENTRAL is specified for EMCONFIGURATION
#—————————————————————————–
#CENTRALAGENT =

#—————————————————————————–
# Name : HOSTUSERNAME
# Datatype : String
# Description : Host user name for EM backup job
# Default value : None
# Mandatory : Yes, if ALL or NOEMAIL are specified for EMCONFIGURATION
#—————————————————————————–
#HOSTUSERNAME =

#—————————————————————————–
# Name : HOSTUSERPASSWORD
# Datatype : String
# Description : Host user password for EM backup job
# Default value : None
# Mandatory : Yes, if ALL or NOEMAIL are specified for EMCONFIGURATION
#—————————————————————————–
#BACKUPSCHEDULE=

#—————————————————————————–
# Name : SMTPSERVER
# Datatype : String
# Description : Outgoing mail (SMTP) server for email notifications
# Default value : None
# Mandatory : Yes, if ALL or NOBACKUP are specified for EMCONFIGURATION
#—————————————————————————–
#SMTPSERVER =

#—————————————————————————–
# Name : EMAILADDRESS
# Datatype : String
# Description : Email address for email notifications
# Default value : None
# Mandatory : Yes, if ALL or NOBACKUP are specified for EMCONFIGURATION
#—————————————————————————–
#EMAILADDRESS =

#—————————————————————————–
# Name : DVOWNERNAME
# Datatype : String
# Description : DataVault Owner
# Valid values : Check Oracle11g Administrator’s Guide
# Default value : None
# Mandatory : Yes, if DataVault option is chosen
#—————————————————————————–
#DVOWNERNAME = “”

#—————————————————————————–
# Name : DVOWNERPASSWORD
# Datatype : String
# Description : Password for DataVault Owner
# Valid values : Check Oracle11g Administrator’s Guide
# Default value : None
# Mandatory : Yes, if DataVault option is chosen
#—————————————————————————–
#DVOWNERPASSWORD = “”

#—————————————————————————–
# Name : DVACCOUNTMANAGERNAME
# Datatype : String
# Description : DataVault Account Manager
# Valid values : Check Oracle11g Administrator’s Guide
# Default value : None
# Mandatory : No
#—————————————————————————–
#DVACCOUNTMANAGERNAME = “”

#—————————————————————————–
# Name : DVACCOUNTMANAGERPASSWORD
# Datatype : String
# Description : Password for DataVault Account Manager
# Valid values : Check Oracle11g Administrator’s Guide
# Default value : None
# Mandatory : No
#—————————————————————————–
#DVACCOUNTMANAGERPASSWORD = “”

#—————————————————————————–
# 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 = /u01/app/oracle/oradata

#—————————————————————————–
# 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=

#—————————————————————————–
# 恢复数据存放目录
RECOVERYAREADESTINATION = /u01/app/oracle/flash_recovery_area

#—————————————————————————–
# 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=FS
#—————————————————————————–
# Name : DISKGROUPNAME
# Datatype : String
# Description : Specifies the disk group name for the storage
# Default value : DATA
# Mandatory : No
#—————————————————————————–
#DISKGROUPNAME=DATA

#—————————————————————————–
# Name : ASMSNMP_PASSWORD
# Datatype : String
# Description : Password for ASM Monitoring
# Default value : None
# Mandatory : No
#—————————————————————————–
#ASMSNMP_PASSWORD=””

#—————————————————————————–
# Name : RECOVERYGROUPNAME
# Datatype : String
# Description : Specifies the disk group name for the recovery area
# Default value : RECOVERY
# Mandatory : No
#—————————————————————————–
#RECOVERYGROUPNAME=RECOVERY
# Name : CHARACTERSET
# Datatype : String
# Description : Character set of the database
# Valid values : Check Oracle11g National Language Support Guide
# Default value : “US7ASCII”
# Mandatory : NO
#—————————————————————————–
CHARACTERSET = “AL32UTF8”

#—————————————————————————–
# Name : NATIONALCHARACTERSET
# Datatype : String
# Description : National Character set of the database
# Valid values : “UTF8” or “AL16UTF16”. For details, check Oracle11g National Language Support Guide
# Default value : “AL16UTF16”
# Mandatory : No
#—————————————————————————–
#NATIONALCHARACTERSET= “UTF8”

#—————————————————————————–
# Name : REGISTERWITHDIRSERVICE
# Datatype : Boolean
# Description : Specifies whether to register with Directory Service.
# Valid values : TRUE \ FALSE
# Default value : FALSE
# Mandatory : No
#—————————————————————————–
#REGISTERWITHDIRSERVICE= TRUE
#—————————————————————————–
# Name : DIRSERVICEUSERNAME
# Datatype : String
# Description : Specifies the name of the directory service user
# Mandatory : YES, if the value of registerWithDirService is TRUE
#—————————————————————————–
#DIRSERVICEUSERNAME= “name”

#—————————————————————————–
# 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= “password”

#—————————————————————————–
# 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= “password”
#—————————————————————————–
# 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 space separated names like “listener1 listener2”.
# Mandatory : NO
#—————————————————————————–
#LISTENERS = “listener1 listener2”
#—————————————————————————–
# 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 =. 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 : MEMORYPERCENTAGE
# Datatype : String
# Description : percentage of physical memory for Oracle
# Default value : None
# Mandatory : NO
#—————————————————————————–
#MEMORYPERCENTAGE = “40”

#—————————————————————————–
# Name : DATABASETYPE
# Datatype : String
# Description : used for memory distribution when MEMORYPERCENTAGE specified
# Valid values : MULTIPURPOSE|DATA_WAREHOUSING|OLTP
# Default value : MULTIPURPOSE
# Mandatory : NO
#—————————————————————————–
#DATABASETYPE = “MULTIPURPOSE”

#—————————————————————————–
# Name : AUTOMATICMEMORYMANAGEMENT
# Datatype : Boolean
# Description : flag to indicate Automatic Memory Management is used
# Valid values : TRUE/FALSE
# Default value : TRUE
# Mandatory : NO
#—————————————————————————–
#AUTOMATICMEMORYMANAGEMENT = “TRUE”

#—————————————————————————–
# Name : TOTALMEMORY
# Datatype : String
# Description : total memory in MB to allocate to Oracle
# Valid values :
# Default value :
# Mandatory : NO
#—————————————————————————–
#TOTALMEMORY = “800”

#———————–*** End of CREATEDATABASE section ***————————



发表评论