Centos 6.6静默安装Oracle的教程

一、配置Centos 6.6

1、安装数据库需要的软件包

yum -y install binutils compat-libstdc++ elfutils-libelf elfutils-libelf-devel glibc glibc-common glibc-devel glibc-headers gcc gcc-c++ libaio libaio-devel libgcc libstdc++ libstdc++-devel make numactl-devel sysstat  unixODBC unixODBC-devel

2、修改内核参数 limits

vim /etc/security/limits.conf

oracle soft nofile 1024

oracle hard nofile 65536

oracle soft nproc 2047

oracle hard nproc 16384

3、修改内核参数 sysctl9000 & 6550

vim /etc/sysctl.conf

kernel.shmmax = 4294967295

kernel.shmmni = 4096

kernel.shmall = 268435456

kernel.sem = 250 32000 100 128

fs.file-max = 6815744

net.ipv4.ip_local_port_range = 9000 65500

net.core.rmem_default = 4194304

net.core.rmem_max = 4194304

net.core.wmem_default = 262144

net.core.wmem_max = 1048576

fs.aio-max-nr = 1048576

4、让内核生效

/sbin/sysctl -p

5、关闭SELINUX

# vim /etc/selinux/config

SELINUX=disabled

6、添加用户和组

groupadd dba

groupadd oinstall

useradd -g oinstall -G dba oracle

passwd  oracle

7、修改profile

vim /etc/profile

在尾部加入

if [ $USER = "oracle" ]; then

if [ $SHELL = "/bin/ksh" ]; then

ulimit -p 16384

ulimit -n 65536

else

ulimit -u 16384 -n 65536

fi

fi

8、修改登录设定

vi /etc/pam.d/login

session     required      /lib/security/pam_limits.so  32位登录方式

session     required      /lib64/security/pam_limits.so  64位登录方式

session     required      pam_limits.so

session     required      pam_unix.so

9、创建安装目录并加入到Oracle用户权限

mkdir -p /data/oracle #oracle数据库安装目录

mkdir -p /data/oraInventory #oracle数据库配置文件目录

mkdir -p /data/database #oracle数据库软件包解压目录

chown -R oracle:oinstall /data/oracle #设置目录所有者为oinstall用户组的oracle用户

chown -R oracle:oinstall /data/oraInventory

chown -R oracle:oinstall /data/database

10、修改操作系统标识(oracle默认不支持CentOS系统安装,可以省略)

vi /etc/redhat-release #编辑

把:CentOS release6.6 (Final)

修改为:redhat-4

:wq! #保存退出 /data/oracle/product/11.2.0

11、配置用户环境

切换到Oracle用户

#su - oracle

vi /home/oracle/.bash_profile #在最后添加以下代码

export ORACLE_BASE=/data/oracle #oracle数据库安装目录

export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1 #oracle数据库路径

export ORACLE_SID=orcl #oracle启动数据库实例名

export ORACLE_TERM=xterm #xterm窗口模式安装  #静默安装可以省略此步骤

export PATH=$ORACLE_HOME/bin:/usr/sbin:$PATH #添加系统环境变量

export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib #添加系统环境变量

export #防止安装过程出现乱码

export NLS_LANG=AMERICAN_AMERICA.ZHS16GBK  #设置Oracle客户端字符集,必须与Oracle安装时设置的字符集保持一致,如:ZHS16GBK,否则出现数据导入导出中文乱码问题

wq! #保存退出

source .bash_profile #使设置立刻生效

12、修改hosts

vi /etc/hosts,改IP(192.168.80.6  oracledb)

13、解压缩安装文件(使用XFTP上传到/data/database/文件夹中,出现)

unzip linux.x64_11gR2_database_1of2.zip

unzip linux.x64_11gR2_database_2of2.zip

chown -R oracle:oinstall database

二、图形安装(静默安装可跳到三)

1、开始安装

xhost +

su - oracle

./runInstaller

图形安装省略

2、安装完毕执行

在root用户下执行

/data/oracle/oraInventory/orainstRoot.sh

/data/oracle/product/11.2.0/dbhome_1/root.sh

三、静默安装

1、配置安装文件

su – oracle

$mkdir /home/oracle/ora11g

$ cp -R /data/database/database/response/db_install.rsp /home/oracle/ora11g/

$ cp -R /data/database/database/response/necta.rsp /home/oracle/ora11g/

$ cp -R /data/database/database/response/dbca.rsp /home/oracle/ora11g/ #复制一份模板到ora11g文件夹

$cd /home/oracle/ora11g

$vim /home/orace/ora11g/db_install.rsp

以下是配置文件,配置完成后按ESC键,然后输入wq保存。

绿色字体是需要你更改的部分

####################################################################

## Copyright(c) Oracle Corporation 1998,2008. 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.

#------------------------------------------------------------------------------

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

# 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=oracledb

 

#-------------------------------------------------------------------------------

# 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=/data/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

#------------------------------------------------------------------------------

SELECTED_LANGUAGES=en,zh_CN

 

#------------------------------------------------------------------------------

# Specify the complete path of the Oracle Home.

#------------------------------------------------------------------------------

ORACLE_HOME=/data/oracle/product/11.2.0/db_1

 

#------------------------------------------------------------------------------

# Specify the complete path of the Oracle Base.

#------------------------------------------------------------------------------

ORACLE_BASE=/data/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

# PE     : Personal Edition (WINDOWS ONLY)

#------------------------------------------------------------------------------

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.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.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.

#------------------------------------------------------------------------------

oracle.install.db.DBA_GROUP=dba

 

#------------------------------------------------------------------------------

# The OPER_GROUP is the OS group which is to be granted OSOPER privileges.

#------------------------------------------------------------------------------

oracle.install.db.OPER_GROUP=oinstall

 

#------------------------------------------------------------------------------

# Specify the cluster node names selected during the installation.

#------------------------------------------------------------------------------

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

#------------------------------------------------------------------------------

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.

#------------------------------------------------------------------------------

oracle.install.db.config.starterdb.memoryOption=true

 

#------------------------------------------------------------------------------

# 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.install.db.config.starterdb.memoryLimit=10240

 

#------------------------------------------------------------------------------

# 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.

#-------------------------------------------------------------------------------

oracle.install.db.config.starterdb.password.ALL=wang023878

 

#-------------------------------------------------------------------------------

# 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

#-------------------------------------------------------------------------------

oracle.install.db.config.starterdb.control=DB_CONTROL

 

#-------------------------------------------------------------------------------

# Specify the Management Service to use if Grid Control is selected to manage

# the database.     

#-------------------------------------------------------------------------------

oracle.install.db.config.starterdb.gridcontrol.gridControlServiceURL=

 

#-------------------------------------------------------------------------------

# This variable indicates whether to receive email notification for critical

# alerts when using DB control.  

#-------------------------------------------------------------------------------

oracle.install.db.config.starterdb.dbcontrol.enableEmailNotification=false

 

#-------------------------------------------------------------------------------

# Specify the email address to which the notifications are to be sent.

#-------------------------------------------------------------------------------

oracle.install.db.config.starterdb.dbcontrol.emailAddress=

 

#-------------------------------------------------------------------------------

# Specify the SMTP server used for email notifications.

#-------------------------------------------------------------------------------

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.                                               # 

#                                                                             #

###############################################################################

 

#------------------------------------------------------------------------------

# This variable is to be set to false if automated backup is not required. Else

# this can be set to true.

#------------------------------------------------------------------------------

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.

#------------------------------------------------------------------------------

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.

#-------------------------------------------------------------------------------

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

#------------------------------------------------------------------------------

oracle.install.db.config.starterdb.storageType=

 

#-------------------------------------------------------------------------------

# Specify the database file location which is a directory for datafiles, control

# files, redo logs.        

#

# 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

#-------------------------------------------------------------------------------

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

#-------------------------------------------------------------------------------

oracle.install.db.config.asm.ASMSNMPPassword=

 

#------------------------------------------------------------------------------

# Specify the My Oracle Support Account Username.

#

#  Example   : MYORACLESUPPORT_USERNAME=metalink

#------------------------------------------------------------------------------

MYORACLESUPPORT_USERNAME=

 

#------------------------------------------------------------------------------

# Specify the My Oracle Support Account Username password.

#

# Example    : MYORACLESUPPORT_PASSWORD=password

#------------------------------------------------------------------------------

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

#------------------------------------------------------------------------------

SECURITY_UPDATES_VIA_MYORACLESUPPORT=false

 

#------------------------------------------------------------------------------

# 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

#------------------------------------------------------------------------------

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=

2、静默安装Oracle

$cd /data/oracle/database/database

$ ./runInstaller -silent -ignorePrereq -responseFile /home/oracle/ora11g/db_install.rsp

控制台直到出现以下提示则表示安装完成:

[oracle@oracledb database]$./runInstaller -silent -ignorePrereq -responseFile /home/oracle/ora11g/db_install.rsp

Starting Oracle Universal Installer...

 

Checking Temp space: must be greater than 120 MB.   Actual 28493 MB    Passed

Checking swap space: must be greater than 150 MB.   Actual 3999 MB    Passed

Preparing to launch Oracle Universal Installer from /tmp/OraInstall2017-07-09_02-42-49PM. Please wait ...

[oracle@oracledb database]$ You can find the log of this install session at:

 /data/oraInventory/logs/installActions2017-07-09_02-42-49PM.log

The following configuration scripts need to be executed as the "root" user.

 #!/bin/sh

 #Root scripts to run

 

/data/oraInventory/orainstRoot.sh

/data/oracle/product/11.2.0/db_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.

出现以上代表安装成功。

在XSELL上开一上界面:查看安装进度

查看地安装进度 tail -f /data/oraInventory/logs/installActions2017-07-09_02-42-49PM.log

 #Root scripts to run

安装完成后,需要进入root用户,

su – root

输入密码:

以root的用户进去运行以下两条

/data/oraInventory/orainstRoot.sh

/data/oracle/product/11.2.0/db_1/root.sh

安装完成后重启服务器

3、配置监听

su - oracle

$netca /silent /responsefile /home/oracle/ora11g/netca.rsp

启动监听:lsnrctl  start  停用监听:lsnrctl stop   查看监听:lsnrctl status

4、配置创建实例文档:

$ cd /home/oracle/ora11g

$vim 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     :  "<value>"                                         ##

##          Boolean    :  True or False                                     ##

##          Number     :  <numeric value>                                   ##

##          StringList :  {"<value1>","<value2>"}                           ##

##                                                                          ##

## Examples :                                                               ##

##     1. dbca -progress_only -responseFile <response file>                 ##

##        Display a progress bar depicting progress of database creation    ##

##        process.                                                          ##

##                                                                          ##

##     2. dbca -silent -responseFile <response file>                        ##

##        Creates database silently. No user interface is displayed.        ##

##                                                                          ##

##     3. dbca -silent -createDatabase -cloneTemplate                       ##

##                 -responseFile <response file>                      ##

##        Creates database silently with clone template. The template in    ##

##     responsefile is a clone template.                                ##

##                                                                          ##

##     4. dbca -silent -deleteDatabase -responseFile <response file>        ##

##        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  : <db_name>.<db_domain> - when database domain isn't NULL

#                 <db_name>             - 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 : <db_name> 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 = "wang023878"

 

#-----------------------------------------------------------------------------

# Name          : SYSTEMPASSWORD

# Datatype      : String

# Description   : Password for SYSTEM user

# Valid values  : Check Oracle11g Administrator's Guide

# Default value : None

# Mandatory     : Yes

#-----------------------------------------------------------------------------

SYSTEMPASSWORD = "wang023878"

 

#-----------------------------------------------------------------------------

# 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

#-----------------------------------------------------------------------------

#HOSTUSERPASSWORD=

 

#-----------------------------------------------------------------------------

# Name          : BACKUPSCHEDULE

# Datatype      : String

# Description   : Daily backup schedule in the form of hh:mm

# Default value : 2:00

# 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 = /data/oracle

 

#-----------------------------------------------------------------------------

# 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 = /data/oracle

 

#-----------------------------------------------------------------------------

# 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= /data/oracle/oracle_back

 

#-----------------------------------------------------------------------------

# 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 <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          : 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 = "5120"

 

 

#-----------------------*** End of CREATEDATABASE section ***------------------------

 

#-----------------------------------------------------------------------------

# createTemplateFromDB section is used when OPERATION_TYPE is defined as "createTemplateFromDB".

#-----------------------------------------------------------------------------

[createTemplateFromDB]

#-----------------------------------------------------------------------------

# Name          : SOURCEDB

# Datatype      : String

# Description   : The source database from which to create the template

# Valid values  : The format is <host>:<port>:<sid>

# Default value : none

# Mandatory     : YES

#-----------------------------------------------------------------------------

SOURCEDB = "myhost:1521:orcl"

 

#-----------------------------------------------------------------------------

# Name          : SYSDBAUSERNAME

# Datatype      : String

# Description   : A user with DBA role.

# Default value : none

# Mandatory     : YES

#-----------------------------------------------------------------------------

SYSDBAUSERNAME = "system"

 

#-----------------------------------------------------------------------------

# Name          : SYSDBAPASSWORD

# Datatype      : String

# Description   : The password of the DBA user.

#              You can also specify the password at the command prompt instead of here.

# Default value : none

# Mandatory     : YES

#-----------------------------------------------------------------------------

#SYSDBAPASSWORD = "password"

 

#-----------------------------------------------------------------------------

# Name          : TEMPLATENAME

# Datatype      : String

# Description   : Name for the new template.

# Default value : None

# Mandatory     : Yes

#-----------------------------------------------------------------------------

TEMPLATENAME = "My Copy TEMPLATE"

 

#-----------------------*** End of createTemplateFromDB section ***------------------------

 

#-----------------------------------------------------------------------------

# createCloneTemplate section is used when OPERATION_TYPE is defined as "createCloneTemplate".

#-----------------------------------------------------------------------------

[createCloneTemplate]

#-----------------------------------------------------------------------------

# Name          : SOURCEDB

# Datatype      : String

# Description   : The source database is the SID from which to create the template.

#              This database must be local and on the same ORACLE_HOME.

# Default value : none

# Mandatory     : YES

#-----------------------------------------------------------------------------

SOURCEDB = "orcl"

 

#-----------------------------------------------------------------------------

# Name          : SYSDBAUSERNAME

# Datatype      : String

# Description   : A user with DBA role.

# Default value : none

# Mandatory     : YES, if no OS authentication

#-----------------------------------------------------------------------------

#SYSDBAUSERNAME = "sys"

 

#-----------------------------------------------------------------------------

# Name          : SYSDBAPASSWORD

# Datatype      : String

# Description   : The password of the DBA user.

#              You can also specify the password at the command prompt instead of here.

# Default value : none

# Mandatory     : YES

#-----------------------------------------------------------------------------

#SYSDBAPASSWORD = "password"

 

#-----------------------------------------------------------------------------

# Name          : TEMPLATENAME

# Datatype      : String

# Description   : Name for the new template.

# Default value : None

# Mandatory     : Yes

#-----------------------------------------------------------------------------

TEMPLATENAME = "My Clone TEMPLATE"

 

#-----------------------------------------------------------------------------

# Name          : DATAFILEJARLOCATION

# Datatype      : String

# Description   : Location of the data file jar

# Valid values  : Directory where the new compressed datafile jar will be placed

# Default value : $ORACLE_HOME/assistants/dbca/templates

# Mandatory     : NO

#-----------------------------------------------------------------------------

#DATAFILEJARLOCATION =

 

#-----------------------*** End of createCloneTemplate section ***------------------------

 

#-----------------------------------------------------------------------------

# DELETEDATABASE section is used when DELETE_TYPE is defined as "deleteDatabase".

#-----------------------------------------------------------------------------

[DELETEDATABASE]

#-----------------------------------------------------------------------------

# Name          : SOURCEDB

# Datatype      : String

# Description   : The source database is the SID

#              This database must be local and on the same ORACLE_HOME.

# Default value : none

# Mandatory     : YES

#-----------------------------------------------------------------------------

SOURCEDB = "orcl"

 

#-----------------------------------------------------------------------------

# Name          : SYSDBAUSERNAME

# Datatype      : String

# Description   : A user with DBA role.

# Default value : none

# Mandatory     : YES, if no OS authentication

#-----------------------------------------------------------------------------

#SYSDBAUSERNAME = "sys"

 

#-----------------------------------------------------------------------------

# Name          : SYSDBAPASSWORD

# Datatype      : String

# Description   : The password of the DBA user.

#              You can also specify the password at the command prompt instead of here.

# Default value : none

# Mandatory     : YES, if no OS authentication

#-----------------------------------------------------------------------------

#SYSDBAPASSWORD = "password"

#-----------------------*** End of deleteDatabase section ***------------------------

 

#-----------------------------------------------------------------------------

# GENERATESCRIPTS section

#-----------------------------------------------------------------------------

[generateScripts]

#-----------------------------------------------------------------------------

# Name          : TEMPLATENAME

# Datatype      : String

# Description   : Name of the template

# Valid values  : Template name as seen in DBCA

# Default value : None

# Mandatory     : Yes

#-----------------------------------------------------------------------------

TEMPLATENAME = "New Database"

 

#-----------------------------------------------------------------------------

# 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 = "orcl11.us.oracle.com"

 

#-----------------------------------------------------------------------------

# Name          : SCRIPTDESTINATION

# Datatype      : String

# Description   : Location of the scripts

# Valid values  : Directory for all the scripts

# Default value : None

# Mandatory     : No

#-----------------------------------------------------------------------------

#SCRIPTDESTINATION =

 

#-----------------------*** End of deleteDatabase section ***------------------------

 

#-----------------------------------------------------------------------------

# CONFIGUREDATABASE section is used when OPERATION_TYPE is defined as "configureDatabase".

#-----------------------------------------------------------------------------

[CONFIGUREDATABASE]

 

#-----------------------------------------------------------------------------

# Name          : SOURCEDB

# Datatype      : String

# Description   : The source database is the SID

#              This database must be local and on the same ORACLE_HOME.

# Default value : none

# Mandatory     : YES

#-----------------------------------------------------------------------------

#SOURCEDB = "orcl"

 

#-----------------------------------------------------------------------------

# Name          : SYSDBAUSERNAME

# Datatype      : String

# Description   : A user with DBA role.

# Default value : none

# Mandatory     : YES, if no OS authentication

#-----------------------------------------------------------------------------

#SYSDBAUSERNAME = "sys"

 

 

#-----------------------------------------------------------------------------

# Name          : SYSDBAPASSWORD

# Datatype      : String

# Description   : The password of the DBA user.

#              You can also specify the password at the command prompt instead of here.

# Default value : none

# Mandatory     : YES, if no OS authentication

#-----------------------------------------------------------------------------

#SYSDBAPASSWORD =

 

#-----------------------------------------------------------------------------

# Name          : REGISTERWITHDIRSERVICE

# Datatype      : Boolean

# Description   : Specifies whether to register with Directory Service.

# Valid values  : TRUE \ FALSE

# Default value : FALSE

# Mandatory     : No

#-----------------------------------------------------------------------------

#REGISTERWITHDIRSERVICE= TRUE

 

#-----------------------------------------------------------------------------

# Name          : UNREGISTERWITHDIRSERVICE

# Datatype      : Boolean

# Description   : Specifies whether to unregister with Directory Service.

# Valid values  : TRUE \ FALSE

# Default value : FALSE

# Mandatory     : No

#-----------------------------------------------------------------------------

#UNREGISTERWITHDIRSERVICE= TRUE

 

#-----------------------------------------------------------------------------

# Name          : REGENERATEDBPASSWORD

# Datatype      : Boolean

# Description   : Specifies whether regenerate database password in OID/Wallet

# Valid values  : TRUE \ FALSE

# Default value : FALSE

# Mandatory     : No

#-----------------------------------------------------------------------------

#REGENERATEDBPASSWORD= TRUE

 

#-----------------------------------------------------------------------------

# Name          : DIRSERVICEUSERNAME

# Datatype      : String

# Description   : Specifies the name of the directory service user

# Mandatory     : YES, if the any of the reg/unreg/regenPasswd options specified

#-----------------------------------------------------------------------------

#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 any of the reg/unreg/regenPasswd options specified

#-----------------------------------------------------------------------------

#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 any of the reg/unreg/regenPasswd options specified

#-----------------------------------------------------------------------------

#WALLETPASSWORD= "password"

 

#-----------------------------------------------------------------------------

# Name          : DISABLESECURITYCONFIGURATION

# Datatype      : String

# Description   : Database Security Settings

# Valid values  : ALL|NONE|AUDIT|PASSWORD_PROFILE

# Default value : NONE

# Mandatory     : No

#-----------------------------------------------------------------------------

#DISABLESECURITYCONFIGURATION = "NONE"

 

 

 

#-----------------------------------------------------------------------------

# Name          : ENABLESECURITYCONFIGURATION

# Datatype      : String

# Description   : Database Security Settings

# Valid values  : true|false

# Default value : true

# Mandatory     : No

#-----------------------------------------------------------------------------

#ENABLESECURITYCONFIGURATION = "true"

 

 

#-----------------------------------------------------------------------------

# 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          : 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

#-----------------------------------------------------------------------------

#HOSTUSERPASSWORD=

 

#-----------------------------------------------------------------------------

# Name          : BACKUPSCHEDULE

# Datatype      : String

# Description   : Daily backup schedule in the form of hh:mm

# Default value : 2:00

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

 

#-----------------------*** End of CONFIGUREDATABASE section ***------------------------

 

 

#-----------------------------------------------------------------------------

# ADDINSTANCE section is used when OPERATION_TYPE is defined as "addInstance".

#-----------------------------------------------------------------------------

[ADDINSTANCE]

 

#-----------------------------------------------------------------------------

# Name          : DB_UNIQUE_NAME

# Datatype      : String

# Description   : DB Unique Name of the RAC database

# Valid values  : <db_unique_name>

# Default value : None

# Mandatory     : Yes

#-----------------------------------------------------------------------------

DB_UNIQUE_NAME = "orcl11g.us.oracle.com"

 

#-----------------------------------------------------------------------------

# Name          : INSTANCENAME

# Datatype      : String

# Description   : RAC instance name to be added

# Valid values  : Check Oracle11g Administrator's Guide

# Default value : <sid_prefix>+<highest_current_thread+1>

# Mandatory     : No

#-----------------------------------------------------------------------------

#INSTANCENAME = "orcl1"

 

#-----------------------------------------------------------------------------

# Name          : NODELIST

# Datatype      : String

# Description   : Node on which to add new instance

#                 (in 10gR2, instance addition is supported on 1 node at a time)

# Valid values  : Cluster node name

# Default value : None

# Mandatory     : Yes

#-----------------------------------------------------------------------------

NODELIST=

 

#-----------------------------------------------------------------------------

# Name          : OBFUSCATEDPASSWORDS

# Datatype      : Boolean

# Description   : Set to true if passwords are encrypted

# Valid values  : TRUE\FALSE

# Default value : FALSE

# Mandatory     : No

#-----------------------------------------------------------------------------

#OBFUSCATEDPASSWORDS = FALSE

 

#-----------------------------------------------------------------------------

# Name          : SYSDBAUSERNAME

# Datatype      : String

# Description   : A user with DBA role.

# Default value : none

# Mandatory     : YES

#-----------------------------------------------------------------------------

SYSDBAUSERNAME = "sys"

 

#-----------------------------------------------------------------------------

# Name          : SYSDBAPASSWORD

# Datatype      : String

# Description   : The password of the DBA user.

# Default value : none

# Mandatory     : YES

#-----------------------------------------------------------------------------

#SYSDBAPASSWORD = "password"

 

#-----------------------*** End of ADDINSTANCE section ***------------------------

 

 

#-----------------------------------------------------------------------------

# DELETEINSTANCE section is used when OPERATION_TYPE is defined as "deleteInstance".

#-----------------------------------------------------------------------------

[DELETEINSTANCE]

 

#-----------------------------------------------------------------------------

# Name          : DB_UNIQUE_NAME

# Datatype      : String

# Description   : DB Unique Name of the RAC database

# Valid values  : <db_unique_name>

# Default value : None

# Mandatory     : Yes

#-----------------------------------------------------------------------------

DB_UNIQUE_NAME = "orcl11g.us.oracle.com"

 

#-----------------------------------------------------------------------------

# Name          : INSTANCENAME

# Datatype      : String

# Description   : RAC instance name to be deleted

# Valid values  : Check Oracle11g Administrator's Guide

# Default value : None

# Mandatory     : Yes

#-----------------------------------------------------------------------------

INSTANCENAME = "orcl11g"

 

#-----------------------------------------------------------------------------

# Name          : NODELIST

# Datatype      : String

# Description   : Node on which instance to be deleted (SID) is located

# Valid values  : Cluster node name

# Default value : None

# Mandatory     : No

#-----------------------------------------------------------------------------

#NODELIST=

 

#-----------------------------------------------------------------------------

# Name          : OBFUSCATEDPASSWORDS

# Datatype      : Boolean

# Description   : Set to true if passwords are encrypted

# Valid values  : TRUE\FALSE

# Default value : FALSE

# Mandatory     : No

#-----------------------------------------------------------------------------

#OBFUSCATEDPASSWORDS = FALSE

 

#-----------------------------------------------------------------------------

# Name          : SYSDBAUSERNAME

# Datatype      : String

# Description   : A user with DBA role.

# Default value : none

# Mandatory     : YES

#-----------------------------------------------------------------------------

SYSDBAUSERNAME = "sys"

 

#-----------------------------------------------------------------------------

# Name          : SYSDBAPASSWORD

# Datatype      : String

# Description   : The password of the DBA user.

# Default value : none

# Mandatory     : YES

#-----------------------------------------------------------------------------

#SYSDBAPASSWORD = "password"

 

 

#-----------------------*** End of DELETEINSTANCE section ***------------------------

5、安装创建实例

[oracle@oracledb ~]$ dbca -silent -responseFile /home/oracle/ora11g/dbca.rsp

Copying database files

1% complete

3% complete

11% complete

18% complete

26% complete

37% complete

Creating and starting Oracle instance

40% complete

45% complete

50% complete

55% complete

56% complete

60% complete

62% complete

Completing Database Creation

66% complete

70% complete

73% complete

85% complete

96% complete

100% complete

Look at the log file "/data/oracle/cfgtoollogs/dbca/orcl/orcl.log" for further details.

[oracle@oracledb ~]$ cat /data/oracle/cfgtoollogs/dbca/orcl/orcl.log

Copying database files

DBCA_PROGRESS : 1%

DBCA_PROGRESS : 3%

DBCA_PROGRESS : 11%

DBCA_PROGRESS : 18%

DBCA_PROGRESS : 26%

DBCA_PROGRESS : 37%

Creating and starting Oracle instance

DBCA_PROGRESS : 40%

DBCA_PROGRESS : 45%

DBCA_PROGRESS : 50%

DBCA_PROGRESS : 55%

DBCA_PROGRESS : 56%

DBCA_PROGRESS : 60%

DBCA_PROGRESS : 62%

Completing Database Creation

DBCA_PROGRESS : 66%

DBCA_PROGRESS : 70%

DBCA_PROGRESS : 73%

DBCA_PROGRESS : 85%

DBCA_PROGRESS : 96%

DBCA_PROGRESS : 100%

Database creation complete. For details check the logfiles at:

 /data/oracle/cfgtoollogs/dbca/orcl.

Database Information:

Global Database Name:orcl

System Identifier(SID):orcl

6、重置EM的过程

[oracle@oracledb ~]$ emctl start dbconsole

Environment variable ORACLE_UNQNAME not defined. Please set ORACLE_UNQNAME to database unique name. 

[oracle@oracledb ~]$ emca -repos recreate

 

STARTED EMCA at Jul 11, 2017 10:07:02 PM

EM Configuration Assistant, Version 11.2.0.0.2 Production

Copyright (c) 2003, 2005, Oracle.  All rights reserved.

 

Enter the following information:

Database SID: orcl

Listener port number: 1521

Password for SYS user: 

Password for SYSMAN user: 

 

Do you wish to continue? [yes(Y)/no(N)]: y

Jul 11, 2017 10:07:24 PM oracle.sysman.emcp.EMConfig perform

INFO: This operation is being logged at /data/oracle/cfgtoollogs/emca/orcl/emca_2017_07_11_22_07_02.log.

Jul 11, 2017 10:07:24 PM oracle.sysman.emcp.EMReposConfig invoke

INFO: Dropping the EM repository (this may take a while) ...

Jul 11, 2017 10:08:37 PM oracle.sysman.emcp.EMReposConfig invoke

INFO: Repository successfully dropped

Jul 11, 2017 10:08:37 PM oracle.sysman.emcp.EMReposConfig createRepository

INFO: Creating the EM repository (this may take a while) ...

 

Jul 11, 2017 10:12:08 PM oracle.sysman.emcp.EMReposConfig invoke

INFO: Repository successfully created

Enterprise Manager configuration completed successfully

FINISHED EMCA at Jul 11, 2017 10:12:08 PM

 [oracle@oracledb ~]$ emca -config dbcontrol db

 

STARTED EMCA at Jul 11, 2017 10:13:08 PM

EM Configuration Assistant, Version 11.2.0.0.2 Production

Copyright (c) 2003, 2005, Oracle.  All rights reserved.

 

Enter the following information:

Database SID: orcl

Listener port number: 1521

Listener ORACLE_HOME [ /data/oracle/product/11.2.0/db_1 ]: orcl

Password for SYS user: 

Password for DBSNMP user: 

Password for SYSMAN user: 

Email address for notifications (optional):

Outgoing Mail (SMTP) server for notifications (optional):

-----------------------------------------------------------------

 

You have specified the following settings

 

Database ORACLE_HOME ................ /data/oracle/product/11.2.0/db_1

 

Local hostname ................ oracledb

Listener ORACLE_HOME ................ orcl

Listener port number ................ 1521

Database SID ................ orcl

Email address for notifications ...............

Outgoing Mail (SMTP) server for notifications ...............

 

-----------------------------------------------------------------

Do you wish to continue? [yes(Y)/no(N)]: y

Jul 11, 2017 10:13:45 PM oracle.sysman.emcp.EMConfig perform

INFO: This operation is being logged at /data/oracle/cfgtoollogs/emca/orcl/emca_2017_07_11_22_13_08.log.

Jul 11, 2017 10:13:48 PM oracle.sysman.emcp.EMReposConfig uploadConfigDataToRepository

INFO: Uploading configuration data to EM repository (this may take a while) ...

Jul 11, 2017 10:14:16 PM oracle.sysman.emcp.EMReposConfig invoke

INFO: Uploaded configuration data successfully

Jul 11, 2017 10:14:16 PM oracle.sysman.emcp.ParamsManager getLocalListener

WARNING: Error retrieving listener for oracledb

Jul 11, 2017 10:14:17 PM oracle.sysman.emcp.util.DBControlUtil configureSoftwareLib

INFO: Software library configured successfully.

Jul 11, 2017 10:14:17 PM oracle.sysman.emcp.EMDBPostConfig configureSoftwareLibrary

INFO: Deploying Provisioning archives ...

Jul 11, 2017 10:14:39 PM oracle.sysman.emcp.EMDBPostConfig configureSoftwareLibrary

INFO: Provisioning archives deployed successfully.

Jul 11, 2017 10:14:39 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole

INFO: Securing Database Control (this may take a while) ...

Jul 11, 2017 10:15:41 PM oracle.sysman.emcp.util.DBControlUtil secureDBConsole

INFO: Database Control secured successfully.

Jul 11, 2017 10:15:41 PM oracle.sysman.emcp.util.DBControlUtil startOMS

INFO: Starting Database Control (this may take a while) ...

Jul 11, 2017 10:16:13 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration

INFO: Database Control started successfully

Jul 11, 2017 10:16:13 PM oracle.sysman.emcp.EMDBPostConfig performConfiguration

INFO: >>>>>>>>>>> The Database Control URL is https://oracledb:1158/em <<<<<<<<<<<

Jul 11, 2017 10:16:15 PM oracle.sysman.emcp.EMDBPostConfig invoke

WARNING:

************************  WARNING  ************************

 

Management Repository has been placed in secure mode wherein Enterprise Manager data will be encrypted.  The encryption key has been placed in the file: /data/oracle/product/11.2.0/db_1/oracledb_orcl/sysman/config/emkey.ora.   Please ensure this file is backed up as the encrypted data will become unusable if this file is lost.

 

***********************************************************

Enterprise Manager configuration completed successfully

FINISHED EMCA at Jul 11, 2017 10:16:15 PM

[oracle@oracledb ~]$ netstat -ntpl | grep 1158

(Not all processes could be identified, non-owned process info

 will not be shown, you would have to be root to see it all.)

tcp        0      0 :::1158                     :::*                        LISTEN      9549/java          

[oracle@oracledb ~]$ emctl start dbconsole

Oracle Enterprise Manager 11g Database Control Release 11.2.0.1.0

Copyright (c) 1996, 2009 Oracle Corporation.  All rights reserved.

https://oracledb:1158/em/console/aboutApplication

 - An instance of Oracle Enterprise Manager 11g Database Control is already running.

四、随系统启动的脚本:

二、脚本设定

Linux 下Oracle11g 自动随系统启动

 

安装完毕 Oracle 11g 每次都得手动启动 | 停止数据库(dbstart | dbshut)、监听器(lsnrctl)、控制台(emtcl)。  

 

设置一下,若手动启动数据库的同时监听器没有启动(即启动数据库时自动启动监听器,停止数据库时停止监听器),则需要修改 dbstart  脚本文件

 

[root@oracle bin]# vi dbstart

 

找到此段话,在最前端

 

# First argument is used to bring up Oracle Net Listener

ORACLE_HOME_LISTNER=$1      

//需要将此处的 ORACLE_HOME_LISTNER=$1 修改为 ORACLE_HOME_LISTNER=$ORACLE_HOME

if [ ! $ORACLE_HOME_LISTNER ] ; then

  echo "ORACLE_HOME_LISTNER is not SET, unable to auto-start Oracle Net Listener"

  echo "Usage: $0 ORACLE_HOME"

else

  LOG=$ORACLE_HOME_LISTNER/listener.log

 

同样,也需要修改 dbshut

 

[root@oracle bin]# vi dbshut

 

# The  this to bring down Oracle Net Listener

ORACLE_HOME_LISTNER=$1

//需要将此处的 ORACLE_HOME_LISTNER=$1 修改为 ORACLE_HOME_LISTNER=$ORACLE_HOME

if [ ! $ORACLE_HOME_LISTNER ] ; then

  echo "ORACLE_HOME_LISTNER is not SET, unable to auto-stop Oracle Net Listener"

  echo "Usage: $0 ORACLE_HOME"

else

  LOG=$ORACLE_HOME_LISTNER/listener.log

 

在启动了Linux系统之后,转到  /etc/init.d  目录下;

 

[root@oracle ~]# cd /etc/init.d

 

使用 vi 命令,新建一个以 oracle 命名的文件(并将以下代码复制至文件中)

 

[root@oracle init.d]# vi oracle

 

#!/bin/sh

# chkconfig: 345 61 61

# description: Oracle 11g AutoRun Services

# /etc/init.d/oracle

#

# Run-level Startup script for the Oracle Instance, Listener, and

# Web Interface

export ORACLE_BASE=/data/oracle

export ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1

export ORACLE_SID=orcl

export PATH=$ORACLE_HOME/bin:/usr/sbin:$PATH

ORA_OWNR="oracle"

 

# if the executables do not exist -- display error

 

if [ ! -f $ORACLE_HOME/bin/dbstart -o ! -d $ORACLE_HOME ]

then

     echo "Oracle startup: cannot start"

     exit 1

fi

 

# depending on parameter -- startup, shutdown, restart

# of the instance and listener or usage display

 

case "$1" in

 start)

     # Oracle listener and instance startup

     su $ORA_OWNR -lc $ORACLE_HOME/bin/dbstart

     echo "Oracle Start Succesful!OK."

     ;;

 stop)

     # Oracle listener and instance shutdown

     su $ORA_OWNR -lc $ORACLE_HOME/bin/dbshut

     echo "Oracle Stop Succesful!OK."

     ;;

 reload|restart)

     $0 stop

     $0 start

     ;;

 *)

     echo $"Usage: `basename $0` {start|stop|reload|reload}"

     exit 1

esac

exit 0

 

 

 

       在编辑完成之后,使用 :wq  命令保存此文件。

 

赋予执行权限

 

[root@oracle init.d]# chmod 750 /etc/init.d/oracle

 

链接:

 

[root@oracle init.d]# ln -s /etc/init.d/oracle /etc/rc1.d/K61oracle

 

[root@oracle init.d]# ln -s /etc/init.d/oracle /etc/rc3.d/S61oracle

 

执行以下命令:

 

[root@oracle init.d]# chkconfig --level 345 oracle on

 

[root@oracle init.d]# chkconfig --add oracle         //添加到服务里

 

[oracle@oracle]$ vi /etc/oratab

 

找到:accp:/u01/oracle:N   修改为: accp:/u01/oracle:Y

 

第二步:把lsnrctl start、dbstart和emctl start dbconsole添加到rc.local文件中,命令如下:

 

[root@oracle]$ vi /etc/rc.d/rc.local

 

添加:

su - oracle -c "/data/oracle/product/11.2.0/db_1/bin/dbstart"

 

su - oracle -c "/data/oracle/product/11.2.0/db_1/bin/emctl start dbconsole" 

 

su oracle -lc "/data/oracle/product/11.2.0/db_1/bin/lsnrctl start"

 

重启试试吧!

mkdir -p /opt/oracle/product/112010/db_1