Oracle 安装系列 --静默创建数据库

上篇介绍了静默安装数据库软件,下面介绍静默创建数据库的方法。


1. 用DBCA根据种子数据库创建一个模板
(种子数据库就是源数据库,如果没有源数据库,可以用DBCA创建一个新的模版或编辑原有的模版)
2. 将Oracle DB安装盘里面response目录下的dbca.rsp拷贝到本机上
3. 修改dbca.rsp文件,将模板名和DB名添加进去
GDBNAME=
SID=
TEMPLATENAME=   //改参数就是你建库的模版,该模版要存放在$ORACLE_HOME/assistants/dbca/templates
如果需要使用Oracle Enterprise Manager,则还需要修改以下参数如下:
EMCONFIGURATION="LOCAL"
SYSMANPASSWORD="password"
DBSNMPPASSWORD="password"

 

4. 执行以下命令使用DBCA根据模板创建新数据库

$./dbca -silent -createdatabase -responseFile /home/oracle/embed/dbca.rsp

也可以不是用rsp响应文件,直接是用模版静默安装

dbca -silent -createDatabase -templateName oraacc.dbt -gdbName oraacc -sid oraacc /
 -sysDBAPassword oracleabcd -characterSet ZHS16GBK -nationalCharacterSet AL16UTF16

ASM:
dbca -silent -nodeList nodelist -configureASM -asmPassword asm_pwd [-diskList
disk_list] [-redundancy redundancy_option] [-diskGroupName dgname] [-diskString
disk_discovery_string] [-recoveryGroupName recovery_dgname] [-recoveryRedundancy
redundancy_option]

 

相关参数解释:
■ nodelist is a comma-delimited list of nodes and these are the nodes on which
you want to perform the ASM activities
■ asm_pwd is the password for the SYS account in the ASM instance
■ disk_list is a comma-delimited list of disks to be added to disk group
■ redundancy_option is NORMAL, HIGH, or EXTERNAL
■ dgname is either the name of an existing disk group, in which case the disk group
is mounted on all of the selected nodes, or dgname is the name of a new disk
group, in which case the disk group is created and started on all of the selected
nodes
■ disk_recovery_string identifies the location or identifier for the ASM-ready
disks
■ recovery_dgname is the name for a recovery disk group


5. 建议直接写.ora文件配置listener
6. 使用Netca配置listener的方法如下
(1) 将Oracle DB安装盘里面response目录下的netca.rsp拷贝到本机上
(2) 修改netca.rsp文件
INSTALL_TYPE=""custom""
LISTENER_NAMES={"LISTENER_EMBED"}
LISTENER_PROTOCOLS={"TCP;1521"}
LISTENER_START=""LISTENER_EMBED""
(3) 执行以下命令静默配置Listener
$./dbca -silent -responseFile /home/oracle/embed/netca.rsp

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值