RHEL5.6静默安装oracle11.2.0数据库实例脚本

脚本:单实例静默安装

echo '[GENERAL]
RESPONSEFILE_VERSION = "11.2.0"               //查看数据库的版本
OPERATION_TYPE = "createDatabase"
[CREATEDATABASE]
GDBNAME = "PROD2"                     //数据库名字
SID = "PROD2"                            //实例名
TEMPLATENAME = "General_Purpose.dbc"             //模板,默认就可以
STORAGETYPE=FS                        //filesystem文件系统
DATAFILEDESTINATION ="/u01/app/oracle/aa/datafile"        //创建的数据文件存放datafile地址
#RECOVERYAREADESTINATION=/opt/app/flash_recovery_area      //恢复数据存放目录,可以选择注释掉,或者开启
CHARACTERSET = "AL32UTF8"                 //字符集
NATIONALCHARACTERSET= "AL16UTF16"            //国家字符集,一般默认
TOTALMEMORY = "700"                     //https://blog.csdn.net/xiewenbo/article/details/9346329
SYSPASSWORD = "oracle"                    //sys密码
SYSTEMPASSWORD = "oracle" '>>/u01/app/oracle/aa/dbca_install.rsp  //指定编辑脚本的位置名字
--静默安装数据库
$ORACLE_HOME/bin/dbca -silent -responseFile /u01/app/oracle/aa/dbca_install.rsp //进入到$ORACLE_HOME/bin目录下进行dbca静默安装,执行目录下编辑的dbca_install.rsp

--如果没有安装监听,可以手动静默安装监听配置
$ netca -silent -responsefile $ORACLE_HOME/assistants/netca/netca.rsp

 

复制粘贴脚本:

echo '[GENERAL]
RESPONSEFILE_VERSION = "11.2.0" OPERATION_TYPE = "createDatabase" [CREATEDATABASE] GDBNAME = "PROD2" SID = "PROD2" TEMPLATENAME = "General_Purpose.dbc" STORAGETYPE=FS DATAFILEDESTINATION ="/u01/app/oracle/aa/datafile" RECOVERYAREADESTINATION="/opt/app/flash_recovery_area" CHARACTERSET = "AL32UTF8" NATIONALCHARACTERSET= "AL16UTF16" TOTALMEMORY = "700" SYSPASSWORD = "oracle" SYSTEMPASSWORD = "oracle"'>>/u01/app/oracle/aa/dbca_install.rsp

 

ORACLE_HOME/bin/dbca -silent -responseFile /u01/app/oracle/aa/dbca_install.rsp 

 

1.可以检查本机oracle版本要写在脚本里

 

 2.脚本执行过程,过程较为缓慢

 

 3.可以查看更多日志细节,显示数据库名字,sid的名字都是prod2

 

posted @ 2019-11-28 15:14  我爱睡莲  阅读(467)  评论(0编辑  收藏  举报