概要
在RHEL7静默方式安装oracle database 12.2 RAC.
一、环境配置
1. 配置hosts文件
cp /etc/hosts /etc/hosts_$(date +%Y%d%m) cat > /etc/hosts << EOF 127.0.0.1 loopback localhost.localdomain localhost # Public 192.168.10.166 orc1.example.com orc1 192.168.10.167 orc2.example.com orc2 # Private 172.168.0.156 orc1-priv.example.com orc1-priv 172.168.0.157 orc2-priv.example.com orc2-priv # Virtual 192.168.10.168 orc1-vip.example.com orc1-vip 192.168.10.169 orc2-vip.example.com orc2-vip # SCAN #192.168.10.170 orc12c-scan #192.168.10.171 orc12c-scan #192.168.10.172 orc12c-scan EOF
2. install packages requirements
cat > /tmp/db_req_rpm.txt << EOF binutils compat-libcap1 compat-libstdc++-33 compat-libstdc++-33.i686 gcc gcc-c++ glibc.i686 glibc glibc-devel glibc-devel.i686 ksh libgcc.i686 libgcc libstdc++ libstdc++.i686 libstdc++-devel libstdc++-devel.i686 libaio libaio.i686 libaio-devel libaio-devel.i686 libXext libXext.i686 libXtst libXtst.i686 libX11 libX11.i686 libXau libXau.i686 libxcb libxcb.i686 libXi libXi.i686 make sysstat unixODBC unixODBC.i686 unixODBC-devel unixODBC-devel.i686 libdmx xorg-x11-utils xorg-x11-xauth libXv libXt libXmu libXxf86misc libXxf86dga LibXxf86vm device-mapper-multipath zlib zlib-devel.i686 zlib-devel unzip nfs-utils smartmontools xorg-x11-server-utils psmisc EOF cat > /etc/yum.repos.d/rhel7.repo << EOF [rhel-Packages] name=Red Hat Enterprise Linux \$releasever - \$basearch - Source baseurl=file:///mnt enabled=1 gpgcheck=0 gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release EOF mount /dev/sr0 /mnt if [[ -f "/mnt/RPM-GPG-KEY-redhat-release" ]]; then yum -y install $(awk '{print $1}' /tmp/db_req_rpm.txt) >> /tmp/db_req_rpm_install.log fi
3. 屏蔽RemoveIPC参数 [ rhel 7.2 BUG Doc ID 2081410.1 ]
if [[ -f "/etc/systemd/logind.conf" ]]; then cp /etc/systemd/logind.conf /etc/systemd/logind.conf_$(date +%Y%m%d) sed -i "/#RemoveIPC=no/c\#RemoveIPC=no\nRemoveIPC=no" /etc/systemd/logind.conf else cat > /etc/systemd/logind.conf << EOF RemoveIPC=no EOF fi -- 重启服务器或重启systemd-logind systemctl daemon-reload systemctl restart systemd-logind
4. 关闭selinux
if [[ "$(getenforce)" = "Enforcing" ]]; then cp /etc/selinux/config /etc/selinux/config_$(date +%Y%m%d) setenforce 0 sed -i "/^SELINUX=enforcing/c\#SELINUX=enforcing\nSELINUX=disable" /etc/selinux/config fi
5. 关闭防火墙
if [[ "$(ps -ef |grep -v grep|grep -ci firewalld)" = "1" ]]; then systemctl stop firewalld systemctl disable firewalld fi
6. 配置系统参数
cp /etc/sysctl.conf /etc/sysctl.conf_$(date +%Y%m%d) cat > /etc/sysctl.conf << EOF # sysctl settings are defined through files in # /usr/lib/sysctl.d/, /run/sysctl.d/, and /etc/sysctl.d/. # # Vendors settings live in /usr/lib/sysctl.d/. # To override a whole file, create a new file with the same in # /etc/sysctl.d/ and put new settings there. To override # only specific settings, add a file with a lexically later # name in /etc/sysctl.d/ and put new settings there. # # For more information, see sysctl.conf(5) and sysctl.d(5). vm.swappiness = 1 vm.dirty_background_ratio = 3 vm.dirty_ratio = 80 vm.dirty_expire_centisecs = 500 vm.dirty_writeback_centisecs = 100 kernel.shmmax = 4398046511104 kernel.shmall = 1073741824 kernel.shmmni = 4096 kernel.sem = 250 32000 100 128 net.ipv4.ip_local_port_range = 9000 65500 net.core.rmem_default = 262144 net.core.rmem_max = 4194304 net.core.wmem_default = 262144 net.core.wmem_max = 1048576 fs.aio-max-nr = 1048576 fs.file-max = 6815744 kernel.panic_on_oops = 1 net.ipv4.conf.all.rp_filter = 2 net.ipv4.conf.default.rp_filter = 2 kernel.panic_on_oops = 1 EOF # 启用参数sysctl -p
7. 关闭avahi-daemon服务
if [[ -f "/etc/systemd/system/dbus-org.freedesktop.Avahi.service" ]]; then systemctl stop avahi-dnsconfd systemctl stop avahi-daemon systemctl disable avahi-dnsconfd systemctl disable avahi-daemon fi
8. 创建用户&用户组
# 创建用户组 groupadd --gid 54321 oinstall groupadd --gid 54322 dba groupadd --gid 54323 asmdba groupadd --gid 54324 asmoper groupadd --gid 54325 asmadmin groupadd --gid 54326 oper groupadd --gid 54327 backupdba groupadd --gid 54328 dgdba groupadd --gid 54329 kmdba groupadd --gid 54330 racdba # 创建用户 useradd --uid 54321 --gid oinstall --groups dba,oper,asmdba,asmoper,backupdba,dgdba,kmdba,racdba --comment "Oracle Software Owner" oracle useradd --uid 54322 --gid oinstall --groups dba,asmadmin,asmdba,asmoper --comment "Grid Infrastructure Owner" grid # 设置用户密码 OS_PASS=123456 echo "${OS_PASS}"|passwd --stdin oracle echo "${OS_PASS}"|passwd --stdin grid
9. 创建软基纳目录
mkdir -p /ups/oracle/grid mkdir -p /ups/oracle/12.2/grid mkdir -p /ups/oracle/oraInventory chown -R grid:oinstall /ups/oracle mkdir -p /ups/oracle/database chown oracle:oinstall /ups/oracle/database chmod -R 775 /ups/oracle
10. 编辑用户环境变量
su - grid vi ~/.bash_profile export ORACLE_SID=+ASM1 export ORACLE_BASE=/ups/oracle/grid export ORACLE_HOME=/ups/oracle/12.2/grid export PATH=${PATH}:${ORACLE_HOME}/bin:${ORACLE_HOME}/OPatch umask 022 su - oracle vi ~/.bash_profile export ORACLE_SID=orcl1 export ORACLE_BASE=/ups/oracle/database export ORACLE_HOME=${ORACLE_BASE}/product/12.2/db_1 export GRID_HOME=/ups/oracle/12.2/grid export LD_LIBRARY_PATH=${ORACLE_HOME}/lib export PATH=${PATH}:${ORACLE_HOME}/bin:${ORACLE_HOME}/OPatch:${GRID_HOME}/bin:${HOME}/dba export TNS_ADMIN=${GRID_HOME}/network/admin umask 022
11. Setting Shell Limits for the Grid and Oracle User
cat > /etc/security/limits.d/99-grid-oracle-limits.conf << EOF oracle soft nproc 16384 #Ora bug 15971421 oracle hard nproc 16384 oracle soft nofile 1024 oracle hard nofile 65536 oracle soft stack 10240 oracle hard stack 32768 # setting for memlock hard limit is maximum of 128GB on x86_64 or 3GB on x86 OR 90 % of RAM oracle soft memlock 3145728 # current size is 3GB oracle hard memlock 3145728 #<value-provided-by-script> grid soft nproc 16384 #Ora bug 15971421 grid hard nproc 16384 grid soft nofile 1024 grid hard nofile 65536 grid soft stack 10240 grid hard stack 32768 grid soft memlock 3145728 grid hard memlock 3145728 EOF
12. huge pages script
#!/bin/bash KERN=`uname -r | awk -F. '{ printf("%d.%d\n",$1,$2); }'` # Find out the HugePage size HPG_SZ=`grep Hugepagesize /proc/meminfo | awk '{print $2}'` # Start from 1 pages to be on the safe side and guarantee 1 free HugePage NUM_PG=1 # Cumulative number of pages required to handle the running shared memory segments for SEG_BYTES in `ipcs -m | awk '{print $5}' | grep "[0-9][0-9]*"` do MIN_PG=`echo "$SEG_BYTES/($HPG_SZ*1024)" | bc -q` if [ $MIN_PG -gt 0 ]; then NUM_PG=`echo "$NUM_PG+$MIN_PG+1" | bc -q` fi done # Finish with results case $KERN in '2.4') HUGETLB_POOL=`echo "$NUM_PG*$HPG_SZ/1024" | bc -q`; echo "Recommended setting: vm.hugetlb_pool = $HUGETLB_POOL" ;; '2.6') MEM_LOCK=`echo "$NUM_PG*$HPG_SZ" | bc -q`; echo "Recommended setting within the kernel boot command line: hugepages = $NUM_PG" echo "Recommended setting within /etc/security/limits.d/99-grid-oraclelimits.conf: oracle soft memlock $MEM_LOCK" echo "Recommended setting within /etc/security/limits.d/99-grid-oraclelimits.conf: oracle hard memlock $MEM_LOCK" ;; '3.10') MEM_LOCK=`echo "$NUM_PG*$HPG_SZ" | bc -q`; echo "Recommended setting within the kernel boot command line: hugepages = $NUM_PG" echo "Recommended setting within /etc/security/limits.d/99-grid-oraclelimits.conf: oracle soft memlock $MEM_LOCK" echo "Recommended setting within /etc/security/limits.d/99-grid-oraclelimits.conf: oracle hard memlock $MEM_LOCK" ;; *) echo "Unrecognized kernel version $KERN. Exiting." ;; esac
13. 配置profile
cat > /etc/profile.d/oracle-grid.sh << EOF #Setting the appropriate ulimits for oracle and grid user if [ $USER = "oracle" ]; then if [ $SHELL = "/bin/ksh" ]; then ulimit -u 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fi fi if [ $USER = "grid" ]; then if [ $SHELL = "/bin/ksh" ]; then ulimit -u 16384 ulimit -n 65536 else ulimit -u 16384 -n 65536 fi fi EOF
14. configurate the network of nozeroconf
cp /etc/sysconfig/network /etc/sysconfig/network_$(date +%Y%m%d) cat >> /etc/sysconfig/network << EOF NOZEROCONF=yes EOF
15. 关闭 transparent_hugepage
cp /etc/default/grub /etc/default/grub_$(date +%Y%m%d) cat > /etc/default/grub << EOF GRUB_TIMEOUT=5 GRUB_DISTRIBUTOR="\$(sed 's, release .*$,,g' /etc/system-release)" GRUB_DEFAULT=saved GRUB_DISABLE_SUBMENU=true GRUB_TERMINAL_OUTPUT="console" # GRUB_CMDLINE_LINUX="rd.lvm.lv=rootvg/lvroot rd.lvm.lv=rootvg/lvswap rhgb quiet" GRUB_CMDLINE_LINUX="rd.lvm.lv=rootvg/lvroot rd.lvm.lv=rootvg/lvswap quiet transparent_hugepage=never" GRUB_DISABLE_RECOVERY="true" EOF grub2-mkconfig -o /boot/grub2/grub.cfg
16. 配置时间同步
1)时区 --查看当前时区 # timedatectl status --修改时区 # timedatectl set-timezone Asia/ShangHai 2)配置 # 安装 yum install chrony -y systemctl start chronyd systemctl enable chronyd systemctl status chronyd systemctl stop chronyd systemctl disable chronyd # 添加同步服务器 cp /etc/chrony.conf /etc/chrony.conf_$(date +%Y%m%d) server 192.168.10.166 iburst # 检查状态 [root@orcl2 ~]# chronyc sources -v 210 Number of sources = 1 .-- Source mode '^' = server, '=' = peer, '#' = local clock. / .- Source state '*' = current synced, '+' = combined , '-' = not combined, | / '?' = unreachable, 'x' = time may be in error, '~' = time too variable. || .- xxxx [ yyyy ] +/- zzzz || Reachability register (octal) -. | xxxx = adjusted offset, || Log2(Polling interval) --. | | yyyy = measured offset, || \ | | zzzz = estimated error. || | | \ MS Name/IP address Stratum Poll Reach LastRx Last sample =============================================================================== ^? orcl1.example.com 0 6 0 10y +0ns[ +0ns] +/- 0ns [root@orcl2 ~]# chronyc sourcestats -v 210 Number of sources = 1 .- Number of sample points in measurement set. / .- Number of residual runs with same sign. | / .- Length of measurement set (time). | | / .- Est. clock freq error (ppm). | | | / .- Est. error in freq. | | | | / .- Est. offset. | | | | | | On the -. | | | | | | samples. \ | | | | | | | Name/IP Address NP NR Span Frequency Freq Skew Offset Std Dev ============================================================================== orcl1.example.com 0 0 0 +0.000 2000.000 +0ns 4000ms [root@orcl2 ~]#
17. 配置dns
# yum 安装 yum -y install unbound yum install -y bind-utils # 配置配置文件/etc/unbound/unbound.conf vi /etc/unbound/unbound.conf …… 38 # interface: 0.0.0.0 39 interface: 0.0.0.0 …… //找到38行,复制去掉注释行,打开监听全网功能。 177 # access-control: 0.0.0.0/0 refuse 178 access-control: 192.168.10.0/24 allow 179 # access-control: 127.0.0.0/8 allow // 找到配置文件/etc/unbound/unbound.conf的第177行,缺省为注释行,且内容为拒绝访问。复制本行内容到下面一行,去掉注释“#“,改refuse为allow。然后保存退出,重启服务即可。 155 # do-ip6: yes 156 do-ip6: no //找到155行内容,在其下复制一行并去除注释,改yes为no,重启服务即可去除对Ipv6的监听 # 创建解析文件 [root@orc1 ~]# cat cat > /etc/unbound/local.d/example.conf << EOF local-zone: "example.com." static local-data: "example.com. 86400 IN SOA ns.example.com. root 1 1D 1H 1W 1H" local-data: "ns.example.com. IN A 192.168.10.166" local-data: "orc1.example.com. IN A 192.168.10.166" local-data: "orc12c-scan.example.com. IN A 192.168.10.170" local-data: "orc12c-scan.example.com. IN A 192.168.10.171" local-data: "orc12c-scan.example.com. IN A 192.168.10.172" local-data-ptr: "192.168.10.170 orc12c-scan.example.com." local-data-ptr: "192.168.10.171 orc12c-scan.example.com." local-data-ptr: "192.168.10.172 orc12c-scan.example.com." EOF # 启动服务及检查 systemctl start unbound systemctl restart unbound systemctl status unbound netstat -tunlp |grep unbound
18. 配置共享存储
# 获取配置命令 for i in c d e f g do echo "KERNEL==\"sd?\",SUBSYSTEM==\"block\", PROGRAM==\"/usr/lib/udev/scsi_id --whitelisted --replace-whitespace --device=/dev/\$name\",RESULT==\"`/usr/lib/udev/scsi_id --whitelisted --replace-whitespace --device=/dev/sd$i`\", SYMLINK+=\"asm-disk$i\",OWNER=\"grid\", GROUP=\"asmadmin\",MODE=\"0660\"" >>/etc/udev/rules.d/99-oracle-asmdevices.rules done # 将上面结果写入文件,例如: cat > /etc/udev/rules.d/99-oracle-asmdevices.rules << EOF ENV{DM_NAME}=="asm_crs1", OWNER:="grid", GROUP:="asmadmin", MODE:="660", SYMLINK+="mapper/\$env{DM_NAME}" ENV{DM_NAME}=="asm_crs2", OWNER:="grid", GROUP:="asmadmin", MODE:="660", SYMLINK+="mapper/\$env{DM_NAME}" ENV{DM_NAME}=="asm_crs3", OWNER:="grid", GROUP:="asmadmin", MODE:="660", SYMLINK+="mapper/\$env{DM_NAME}" ENV{DM_NAME}=="asm_mgmt1", OWNER:="grid", GROUP:="asmadmin", MODE:="660", SYMLINK+="mapper/\$env{DM_NAME}" ENV{DM_NAME}=="asm_data1", OWNER:="grid", GROUP:="asmadmin", MODE:="660", SYMLINK+="mapper/\$env{DM_NAME}" EOF # 重启生效 /sbin/udevadm trigger --type=devices --action=change
19. 配置ssh互相
ssh-keygen -t rsa -P '' -f ~/.ssh/id_rsa ssh-keygen -t dsa -P '' -f ~/.ssh/id_dsa cat ~/.ssh/*.pub >> ~/.ssh/authorized_keys ssh -o stricthostkeychecking=no 192.168.0.12 cat ~/.ssh/*.pub >> ~/.ssh/authorized_keys scp ~/.ssh/authorized_keys 192.168.0.12:~/.ssh/authorized_keys # 检查确认 ssh -o stricthostkeychecking=no orc1.example.com date ssh -o stricthostkeychecking=no orc2.example.com date ssh -o stricthostkeychecking=no orc1-priv.example.com date ssh -o stricthostkeychecking=no orc2-priv.example.com date ssh -o stricthostkeychecking=no orc1 date ssh -o stricthostkeychecking=no orc2 date
二、Oracle软件安装
1. 解压grid software
unzip -q /ups/soft/linuxx64_12201_grid_home.zip -d /ups/oracle/12.2/grid
2. 安装cvuqdisk--所有节点
cd /ups/oracle/12.2/grid/cv/rpm rpm -ivh cvuqdisk--.rpm -.rpm orc2:/tmp/ ssh -o stricthostkeychecking=no orc2 rpm -ivh /tmp/cvuqdisk--.rpm
3. 检查环境
cd /ups/oracle/12.2/grid/ ./runcluvfy.sh stage -pre crsinst -n orc1,orc2 -fixup -verbose > ~/grid_env_check.txt
4. 安装GI软件
cd /ups/oracle/12.2/grid/ ./gridSetup.sh -silent -responseFile ~/.giinstall.rsp -skipPrereqs
~/.giinstall.rsp 内容如下:
############################################################################### ## Copyright(c) Oracle Corporation 1998,2017. 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. ## ## ## ############################################################################### ############################################################################### ## ## ## Instructions to fill this response file ## ## To install and configure 'Grid Infrastructure for Cluster' ## ## - Fill out sections A,B,C,D,E,F and G ## ## - Fill out section G if OCR and voting disk should be placed on ASM ## ## ## ## To install and configure 'Grid Infrastructure for Standalone server' ## ## - Fill out sections A,B and G ## ## ## ## To install software for 'Grid Infrastructure' ## ## - Fill out sections A,B and C ## ## ## ## To upgrade clusterware and/or Automatic storage management of earlier ## ## releases ## ## - Fill out sections A,B,C,D and H ## ## ## ############################################################################### #------------------------------------------------------------------------------ # Do not change the following system generated value. #------------------------------------------------------------------------------ oracle.install.responseFileVersion=/oracle/install/rspfmt_crsinstall_response_schema_v12.2.0 ############################################################################### # # # SECTION A - BASIC # # # ############################################################################### #------------------------------------------------------------------------------- # Specify the location which holds the inventory files. # This is an optional parameter if installing on # Windows based Operating System. #------------------------------------------------------------------------------- INVENTORY_LOCATION=/ups/oracle/oraInventory #------------------------------------------------------------------------------- # Specify the installation option. # Allowed values: CRS_CONFIG or HA_CONFIG or UPGRADE or CRS_SWONLY or HA_SWONLY # - CRS_CONFIG : To configure Grid Infrastructure for cluster # - HA_CONFIG : To configure Grid Infrastructure for stand alone server # - UPGRADE : To upgrade clusterware software of earlier release # - CRS_SWONLY : To install clusterware files only (can be configured for cluster # or stand alone server later) # - HA_SWONLY : To install clusterware files only (can be configured for stand # alone server later. This is only supported on Windows.) #------------------------------------------------------------------------------- oracle.install.option=CRS_CONFIG #------------------------------------------------------------------------------- # Specify the complete path of the Oracle Base. #------------------------------------------------------------------------------- ORACLE_BASE=/ups/oracle/grid #------------------------------------------------------------------------------- # Specify the complete path of the Oracle Home. #------------------------------------------------------------------------------- ORACLE_HOME=/ups/oracle/12.2/grid ################################################################################ # # # SECTION B - GROUPS # # # # The following three groups need to be assigned for all GI installations. # # OSDBA and OSOPER can be the same or different. OSASM must be different # # than the other two. # # The value to be specified for OSDBA, OSOPER and OSASM group is only for # # Unix based Operating System. # # # ################################################################################ #------------------------------------------------------------------------------- # The OSDBA_GROUP is the OS group which is to be granted SYSDBA privileges. #------------------------------------------------------------------------------- oracle.install.asm.OSDBA=asmdba #------------------------------------------------------------------------------- # The OSOPER_GROUP is the OS group which is to be granted SYSOPER privileges. # The value to be specified for OSOPER group is optional. # Value should not be provided if configuring Client Cluster - i.e. storageOption=CLIENT_ASM_STORAGE. #------------------------------------------------------------------------------- oracle.install.asm.OSOPER=asmoper #------------------------------------------------------------------------------- # The OSASM_GROUP is the OS group which is to be granted SYSASM privileges. This # must be different than the previous two. #------------------------------------------------------------------------------- oracle.install.asm.OSASM=asmadmin ################################################################################ # # # SECTION C - SCAN # # # ################################################################################ #------------------------------------------------------------------------------- # Specify a name for SCAN #------------------------------------------------------------------------------- oracle.install.crs.config.gpnp.scanName=orcl-scan #------------------------------------------------------------------------------- # Specify a unused port number for SCAN service #------------------------------------------------------------------------------- oracle.install.crs.config.gpnp.scanPort=1522 ################################################################################ # # # SECTION D - CLUSTER & GNS # # # ################################################################################ #------------------------------------------------------------------------------- # Specify the required cluster configuration # Allowed values: STANDALONE, DOMAIN, MEMBERDB, MEMBERAPP #------------------------------------------------------------------------------- oracle.install.crs.config.ClusterConfiguration=STANDALONE #------------------------------------------------------------------------------- # Specify 'true' if you would like to configure the cluster as Extended, else # specify 'false' # # Applicable only for STANDALONE and DOMAIN cluster configuration #------------------------------------------------------------------------------- oracle.install.crs.config.configureAsExtendedCluster=false #------------------------------------------------------------------------------- # Specify the Member Cluster Manifest file # # Applicable only for MEMBERDB and MEMBERAPP cluster configuration #------------------------------------------------------------------------------- oracle.install.crs.config.memberClusterManifestFile= #------------------------------------------------------------------------------- # Specify a name for the Cluster you are creating. # # The maximum length allowed for clustername is 15 characters. The name can be # any combination of lower and uppercase alphabets (A - Z), (0 - 9), hyphen(-) # and underscore(_). # # Applicable only for STANDALONE and DOMAIN cluster configuration #------------------------------------------------------------------------------- oracle.install.crs.config.clusterName=orcl-cluster #------------------------------------------------------------------------------- # Applicable only for STANDALONE, DOMAIN, MEMBERDB cluster configuration. # Specify 'true' if you would like to configure Grid Naming Service(GNS), else # specify 'false' #------------------------------------------------------------------------------- oracle.install.crs.config.gpnp.configureGNS=false #------------------------------------------------------------------------------- # Applicable only for STANDALONE and DOMAIN cluster configuration if you choose to configure GNS. # Specify 'true' if you would like to assign SCAN name VIP and Node VIPs by DHCP # , else specify 'false' #------------------------------------------------------------------------------- oracle.install.crs.config.autoConfigureClusterNodeVIP=false #------------------------------------------------------------------------------- # Applicable only if you choose to configure GNS. # Specify the type of GNS configuration for cluster # Allowed values are: CREATE_NEW_GNS and USE_SHARED_GNS # Only USE_SHARED_GNS value is allowed for MEMBERDB cluster configuration. #------------------------------------------------------------------------------- oracle.install.crs.config.gpnp.gnsOption= #------------------------------------------------------------------------------- # Applicable only if SHARED_GNS is being configured for cluster # Specify the path to the GNS client data file #------------------------------------------------------------------------------- oracle.install.crs.config.gpnp.gnsClientDataFile= #------------------------------------------------------------------------------- # Applicable only for STANDALONE and DOMAIN cluster configuration if you choose to # configure GNS for this cluster oracle.install.crs.config.gpnp.gnsOption=CREATE_NEW_GNS # Specify the GNS subdomain and an unused virtual hostname for GNS service #------------------------------------------------------------------------------- oracle.install.crs.config.gpnp.gnsSubDomain= oracle.install.crs.config.gpnp.gnsVIPAddress= #------------------------------------------------------------------------------- # Specify the list of sites - only if configuring an Extended Cluster #------------------------------------------------------------------------------- oracle.install.crs.config.sites= #------------------------------------------------------------------------------- # Specify the list of nodes that have to be configured to be part of the cluster. # # The list should a comma-separated list of tuples. Each tuple should be a # colon-separated string that contains # - 1 field if configuring an Application Cluster, or # - 3 fields if configuring a Flex Cluster # - 4 fields if configuring an Extended Cluster # # The fields should be ordered as follows: # 1. The first field should be the public node name. # 2. The second field should be the virtual host name # (Should be specified as AUTO if you have chosen 'auto configure for VIP' # i.e. autoConfigureClusterNodeVIP=true) # 3. The third field indicates the role of node (HUB,LEAF). This has to # be provided only if Flex Cluster is being configured. # For Extended Cluster only HUB should be specified for all nodes # 4. The fourth field indicates the site designation for the node. To be specified only if configuring an Extended Cluster.# The 2nd and 3rd fields are not applicable if configuring an Appl ication Cluster # # Examples # For configuring Application Cluster: oracle.install.crs.config.clusterNodes=node1,node2 # For configuring Flex Cluster: oracle.install.crs.config.clusterNodes=node1:node1-vip:HUB,node2:node2-vip:LEAF # For configuring Extended Cluster: oracle.install.crs.config.clusterNodes=node1:node1-vip:HUB:site1,node2:node2-vip:HUB:site2 # You can specify a range of nodes in the tuple using colon separated fields of format # hostnameprefix:lowerbound-upperbound:hostnamesuffix:vipsuffix:role of node # #------------------------------------------------------------------------------- oracle.install.crs.config.clusterNodes=orcl1:orcl1-vip:HUB,orcl2:orcl2-vip:HUB #------------------------------------------------------------------------------- # The value should be a comma separated strings where each string is as shown below # InterfaceName:SubnetAddress:InterfaceType # where InterfaceType can be either "1", "2", "3", "4", or "5" # InterfaceType stand for the following values # - 1 : PUBLIC # - 2 : PRIVATE # - 3 : DO NOT USE # - 4 : ASM # - 5 : ASM & PRIVATE # # For example: eth0:140.87.24.0:1,eth1:10.2.1.0:2,eth2:140.87.52.0:3 # #------------------------------------------------------------------------------- oracle.install.crs.config.networkInterfaceList=bond0:192.168.10.0:1,bond1:172.168.0.0:5 #------------------------------------------------------------------------------ # Create a separate ASM DiskGroup to store GIMR data. # Specify 'true' if you would like to separate GIMR data with clusterware data, # else specify 'false' # Value should be 'true' for DOMAIN cluster configurations # Value can be true/false for STANDALONE cluster configurations. #------------------------------------------------------------------------------ oracle.install.asm.configureGIMRDataDG=false ################################################################################ # # # SECTION E - STORAGE # # # ################################################################################ #------------------------------------------------------------------------------- # Specify the type of storage to use for Oracle Cluster Registry(OCR) and Voting # Disks files # - FLEX_ASM_STORAGE # - CLIENT_ASM_STORAGE # # Applicable only for MEMBERDB cluster configuration #------------------------------------------------------------------------------- oracle.install.crs.config.storageOption= ################################################################################ # # # SECTION F - IPMI # # # ################################################################################ #------------------------------------------------------------------------------- # Specify 'true' if you would like to configure Intelligent Power Management interface # (IPMI), else specify 'false' #------------------------------------------------------------------------------- oracle.install.crs.config.useIPMI=false #------------------------------------------------------------------------------- # Applicable only if you choose to configure IPMI # i.e. oracle.install.crs.config.useIPMI=true # Specify the username and password for using IPMI service #------------------------------------------------------------------------------- oracle.install.crs.config.ipmi.bmcUsername= oracle.install.crs.config.ipmi.bmcPassword= ################################################################################ # # # SECTION G - ASM # # # ################################################################################ #------------------------------------------------------------------------------- # ASM Storage Type # Allowed values are : ASM and ASM_ON_NAS # ASM_ON_NAS applicable only if # oracle.install.crs.config.ClusterConfiguration=STANDALONE #------------------------------------------------------------------------------- oracle.install.asm.storageOption=ASM #------------------------------------------------------------------------------- # NAS location to create ASM disk group for storing OCR/VDSK # Specify the NAS location where you want the ASM disk group to be created # to be used to store OCR/VDSK files # Applicable only if oracle.install.asm.storageOption=ASM_ON_NAS #------------------------------------------------------------------------------- oracle.install.asmOnNAS.ocrLocation= #------------------------------------------------------------------------------ # Create a separate ASM DiskGroup on NAS to store GIMR data # Specify 'true' if you would like to separate GIMR data with clusterware data, else # specify 'false' # Applicable only if oracle.install.asm.storageOption=ASM_ON_NAS #------------------------------------------------------------------------------ oracle.install.asmOnNAS.configureGIMRDataDG= #------------------------------------------------------------------------------- # NAS location to create ASM disk group for storing GIMR data # Specify the NAS location where you want the ASM disk group to be created # to be used to store the GIMR database # Applicable only if oracle.install.asm.storageOption=ASM_ON_NAS # and oracle.install.asmOnNAS.configureGIMRDataDG=true #------------------------------------------------------------------------------- oracle.install.asmOnNAS.gimrLocation= #------------------------------------------------------------------------------- # Password for SYS user of Oracle ASM #------------------------------------------------------------------------------- oracle.install.asm.SYSASMPassword=p#ssw0rd123 #------------------------------------------------------------------------------- # The ASM DiskGroup # # Example: oracle.install.asm.diskGroup.name=data # #------------------------------------------------------------------------------- oracle.install.asm.diskGroup.name=CRSDG #------------------------------------------------------------------------------- # Redundancy level to be used by ASM. # It can be one of the following # - NORMAL # - HIGH # - EXTERNAL # - FLEX# - EXTENDED (required if oracle.install.crs.config.ClusterConfiguration=EXTENDED) # Example: oracle.install.asm.diskGroup.redundancy=NORMAL # #------------------------------------------------------------------------------- oracle.install.asm.diskGroup.redundancy=NORMAL #------------------------------------------------------------------------------- # Allocation unit size to be used by ASM. # It can be one of the following values # - 1 # - 2 # - 4 # - 8 # - 16 # Example: oracle.install.asm.diskGroup.AUSize=4 # size unit is MB # #------------------------------------------------------------------------------- oracle.install.asm.diskGroup.AUSize=4 #------------------------------------------------------------------------------- # Failure Groups for the disk group # If configuring for Extended cluster specify as list of "failure group name:site" # tuples. # Else just specify as list of failure group names #------------------------------------------------------------------------------- oracle.install.asm.diskGroup.FailureGroups= #------------------------------------------------------------------------------- # List of disks and their failure groups to create a ASM DiskGroup # (Use this if each of the disks have an associated failure group) # Failure Groups are not required if oracle.install.asm.diskGroup.redundancy=EXTERNAL # Example: # For Unix based Operating System: # oracle.install.asm.diskGroup.disksWithFailureGroupNames=/oracle/asm/disk1,FGName,/oracle/asm/disk2,FGName # For Windows based Operating System: # oracle.install.asm.diskGroup.disksWithFailureGroupNames=\\.\ORCLDISKDATA0,FGName,\\.\ORCLDISKDATA1,FGName # #------------------------------------------------------------------------------- oracle.install.asm.diskGroup.disksWithFailureGroupNames=/dev/mapper/asm_crs3,,/dev/mapper/asm_crs2,,/dev/mapper/asm_crs1, #------------------------------------------------------------------------------- # List of disks to create a ASM DiskGroup # (Use this variable only if failure groups configuration is not required) # Example: # For Unix based Operating System: # oracle.install.asm.diskGroup.disks=/oracle/asm/disk1,/oracle/asm/disk2 # For Windows based Operating System: # oracle.install.asm.diskGroup.disks=\\.\ORCLDISKDATA0,\\.\ORCLDISKDATA1 # #------------------------------------------------------------------------------- oracle.install.asm.diskGroup.disks=/dev/mapper/asm_crs3,/dev/mapper/asm_crs2,/dev/mapper/asm_crs1 #------------------------------------------------------------------------------- # List of failure groups to be marked as QUORUM. # Quorum failure groups contain only voting disk data, no user data is stored # Example: # oracle.install.asm.diskGroup.quorumFailureGroupNames=FGName1,FGName2 #------------------------------------------------------------------------------- oracle.install.asm.diskGroup.quorumFailureGroupNames= #------------------------------------------------------------------------------- # The disk discovery string to be used to discover the disks used create a ASM DiskGroup # # Example: # For Unix based Operating System: # oracle.install.asm.diskGroup.diskDiscoveryString=/oracle/asm/* # For Windows based Operating System: # oracle.install.asm.diskGroup.diskDiscoveryString=\\.\ORCLDISK* # #------------------------------------------------------------------------------- oracle.install.asm.diskGroup.diskDiscoveryString=/dev/mapper/* #------------------------------------------------------------------------------- # Password for ASMSNMP account # ASMSNMP account is used by Oracle Enterprise Manager to monitor Oracle ASM instances #------------------------------------------------------------------------------- oracle.install.asm.monitorPassword=p#ssw0rd123 #------------------------------------------------------------------------------- # GIMR Storage data ASM DiskGroup # Applicable only when # oracle.install.asm.configureGIMRDataDG=true # Example: oracle.install.asm.GIMRDG.name=MGMT # #------------------------------------------------------------------------------- oracle.install.asm.gimrDG.name= #------------------------------------------------------------------------------- # Redundancy level to be used by ASM. # It can be one of the following # - NORMAL # - HIGH # - EXTERNAL # - FLEX# - EXTENDED (only if oracle.install.crs.config.ClusterConfiguration=EXTENDED) # Example: oracle.install.asm.gimrDG.redundancy=NORMAL # #------------------------------------------------------------------------------- oracle.install.asm.gimrDG.redundancy= #------------------------------------------------------------------------------- # Allocation unit size to be used by ASM. # It can be one of the following values # - 1 # - 2 # - 4 # - 8 # - 16 # Example: oracle.install.asm.gimrDG.AUSize=4 # size unit is MB # #------------------------------------------------------------------------------- oracle.install.asm.gimrDG.AUSize= #------------------------------------------------------------------------------- # Failure Groups for the GIMR storage data ASM disk group # If configuring for Extended cluster specify as list of "failure group name:site" # tuples. # Else just specify as list of failure group names #------------------------------------------------------------------------------- oracle.install.asm.gimrDG.FailureGroups= #------------------------------------------------------------------------------- # List of disks and their failure groups to create GIMR data ASM DiskGroup # (Use this if each of the disks have an associated failure group) # Failure Groups are not required if oracle.install.asm.gimrDG.redundancy=EXTERNAL # Example: # For Unix based Operating System: # oracle.install.asm.gimrDG.disksWithFailureGroupNames=/oracle/asm/disk1,FGName,/oracle/asm/disk2,FGName # For Windows based Operating System: # oracle.install.asm.gimrDG.disksWithFailureGroupNames=\\.\ORCLDISKDATA0,FGName,\\.\ORCLDISKDATA1,FGName # #------------------------------------------------------------------------------- oracle.install.asm.gimrDG.disksWithFailureGroupNames= #------------------------------------------------------------------------------- # List of disks to create GIMR data ASM DiskGroup # (Use this variable only if failure groups configuration is not required) # Example: # For Unix based Operating System: # oracle.install.asm.gimrDG.disks=/oracle/asm/disk1,/oracle/asm/disk2 # For Windows based Operating System: # oracle.install.asm.gimrDG.disks=\\.\ORCLDISKDATA0,\\.\ORCLDISKDATA1 # #------------------------------------------------------------------------------- oracle.install.asm.gimrDG.disks= #------------------------------------------------------------------------------- # List of failure groups to be marked as QUORUM. # Quorum failure groups contain only voting disk data, no user data is stored # Example: # oracle.install.asm.gimrDG.quorumFailureGroupNames=FGName1,FGName2 #------------------------------------------------------------------------------- oracle.install.asm.gimrDG.quorumFailureGroupNames= #------------------------------------------------------------------------------- # Configure AFD - ASM Filter Driver # Applicable only for FLEX_ASM_STORAGE option # Specify 'true' if you want to configure AFD, else specify 'false' #------------------------------------------------------------------------------- oracle.install.asm.configureAFD=false #------------------------------------------------------------------------------- # Configure RHPS - Rapid Home Provisioning Service # Applicable only for DOMAIN cluster configuration # Specify 'true' if you want to configure RHP service, else specify 'false' #------------------------------------------------------------------------------- oracle.install.crs.configureRHPS=false ################################################################################ # # # SECTION H - UPGRADE # # # ################################################################################ #------------------------------------------------------------------------------- # Specify whether to ignore down nodes during upgrade operation. # Value should be 'true' to ignore down nodes otherwise specify 'false' #------------------------------------------------------------------------------- oracle.install.crs.config.ignoreDownNodes=false ################################################################################ # # # MANAGEMENT OPTIONS # # # ################################################################################ #------------------------------------------------------------------------------- # Specify the management option to use for managing Oracle Grid Infrastructure # Options are: # 1. CLOUD_CONTROL - If you want to manage your Oracle Grid Infrastructure with Enterprise Manager Cloud Control. # 2. NONE -If you do not want to manage your Oracle Grid Infrastructure with Enterprise Manager Cloud Control. #------------------------------------------------------------------------------- oracle.install.config.managementOption=NONE #------------------------------------------------------------------------------- # Specify the OMS host to connect to Cloud Control. # Applicable only when oracle.install.config.managementOption=CLOUD_CONTROL #------------------------------------------------------------------------------- oracle.install.config.omsHost= #------------------------------------------------------------------------------- # Specify the OMS port to connect to Cloud Control. # Applicable only when oracle.install.config.managementOption=CLOUD_CONTROL #------------------------------------------------------------------------------- oracle.install.config.omsPort= #------------------------------------------------------------------------------- # Specify the EM Admin user name to use to connect to Cloud Control. # Applicable only when oracle.install.config.managementOption=CLOUD_CONTROL #------------------------------------------------------------------------------- oracle.install.config.emAdminUser= #------------------------------------------------------------------------------- # Specify the EM Admin password to use to connect to Cloud Control. # Applicable only when oracle.install.config.managementOption=CLOUD_CONTROL #------------------------------------------------------------------------------- oracle.install.config.emAdminPassword= ################################################################################ # # # Root script execution configuration # # # ################################################################################ #------------------------------------------------------------------------------------------------------- # Specify the root script execution mode. # # - true : To execute the root script automatically by using the appropriate configuration methods. # - false : To execute the root script manually. # # If this option is selected, password should be specified on the console. #------------------------------------------------------------------------------------------------------- oracle.install.crs.rootconfig.executeRootScript=false #-------------------------------------------------------------------------------------- # Specify the configuration method to be used for automatic root script execution. # # Following are the possible choices: # - ROOT # - SUDO #-------------------------------------------------------------------------------------- oracle.install.crs.rootconfig.configMethod= #-------------------------------------------------------------------------------------- # Specify the absolute path of the sudo program. # # Applicable only when SUDO configuration method was chosen. #-------------------------------------------------------------------------------------- oracle.install.crs.rootconfig.sudoPath= #-------------------------------------------------------------------------------------- # Specify the name of the user who is in the sudoers list. # # Applicable only when SUDO configuration method was chosen. #-------------------------------------------------------------------------------------- oracle.install.crs.rootconfig.sudoUserName= #-------------------------------------------------------------------------------------- # Specify the nodes batch map. # # This should be a comma separated list of node:batch pairs. # During upgrade, you can sequence the automatic execution of root scripts # by pooling the nodes into batches. # A maximum of three batches can be specified. # Installer will execute the root scripts on all the nodes in one batch before # proceeding to next batch. # Root script execution on the local node must be in Batch 1. # Only one type of node role can be used for each batch. # Root script execution should be done first in all HUB nodes and then, when # existent, in all the LEAF nodes. # # Examples: # 1. oracle.install.crs.config.batchinfo=HUBNode1:1,HUBNode2:2,HUBNode3:2,LEAFNode4:3 # 2. oracle.install.crs.config.batchinfo=HUBNode1:1,LEAFNode2:2,LEAFNode3:2,LEAFNode4:2 # 3. oracle.install.crs.config.batchinfo=HUBNode1:1,HUBNode2:1,LEAFNode3:2,LEAFNode4:3 # # Applicable only for UPGRADE install option. #-------------------------------------------------------------------------------------- oracle.install.crs.config.batchinfo= ################################################################################ # # # APPLICATION CLUSTER OPTIONS # # # ################################################################################ #------------------------------------------------------------------------------- # Specify the Virtual hostname to configure virtual access for your Application # The value to be specified for Virtual hostname is optional. #------------------------------------------------------------------------------- oracle.install.crs.app.applicationAddress=
5. 创建MGMT管理资料库
/oracle/app//grid/gridSetup.sh -executeConfigTools -responseFile /home/grid/.giinstall.rsp -silent
6. 创建DATA asm diskgroup
asmca -silent -sysAsmPassword password -createDiskGroup -diskString
7. 安装database 软件
unzip /ups/soft/linuxx64_12201_database.zip cd /ups/soft/database ./runInstaller -silent -ignorePrereqFailure -responseFile ~/.db.rsp
~/.db.rsp 响应文件如下:
#################################################################### ## Copyright(c) Oracle Corporation 1998,2017. 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_v12.2.0 #------------------------------------------------------------------------------- # Specify the installation option. # It can be one of the following: # - INSTALL_DB_SWONLY # - INSTALL_DB_AND_CONFIG # - UPGRADE_DB #------------------------------------------------------------------------------- oracle.install.option=INSTALL_DB_SWONLY #------------------------------------------------------------------------------- # Specify the Unix group to be set for the inventory directory. #------------------------------------------------------------------------------- UNIX_GROUP_NAME=oinstall #------------------------------------------------------------------------------- # Specify the location which holds the inventory files. # This is an optional parameter if installing on # Windows based Operating System. #------------------------------------------------------------------------------- INVENTORY_LOCATION=/ups/oracle/oraInventory #------------------------------------------------------------------------------- # Specify the complete path of the Oracle Home. #------------------------------------------------------------------------------- ORACLE_HOME=/ups/oracle/database/product/12.2/db_1 #------------------------------------------------------------------------------- # Specify the complete path of the Oracle Base. #------------------------------------------------------------------------------- ORACLE_BASE=/ups/oracle/database #------------------------------------------------------------------------------- # Specify the installation edition of the component. # # The value should contain only one of these choices. # - EE : Enterprise Edition # - SE2 : Standard Edition 2 #------------------------------------------------------------------------------- oracle.install.db.InstallEdition=EE ############################################################################### # # # PRIVILEGED OPERATING SYSTEM GROUPS # # ------------------------------------------ # # Provide values for the OS groups to which SYSDBA and SYSOPER 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 value to be specified for OSDBA and OSOPER group is only for UNIX based # # Operating System. # # # ############################################################################### #------------------------------------------------------------------------------ # The OSDBA_GROUP is the OS group which is to be granted SYSDBA privileges. #------------------------------------------------------------------------------- oracle.install.db.OSDBA_GROUP=dba #------------------------------------------------------------------------------ # The OSOPER_GROUP is the OS group which is to be granted SYSOPER privileges. # The value to be specified for OSOPER group is optional. #------------------------------------------------------------------------------ oracle.install.db.OSOPER_GROUP=oper #------------------------------------------------------------------------------ # The OSBACKUPDBA_GROUP is the OS group which is to be granted SYSBACKUP privileges. #------------------------------------------------------------------------------ oracle.install.db.OSBACKUPDBA_GROUP=backupdba #------------------------------------------------------------------------------ # The OSDGDBA_GROUP is the OS group which is to be granted SYSDG privileges. #------------------------------------------------------------------------------ oracle.install.db.OSDGDBA_GROUP=dgdba #------------------------------------------------------------------------------ # The OSKMDBA_GROUP is the OS group which is to be granted SYSKM privileges. #------------------------------------------------------------------------------ oracle.install.db.OSKMDBA_GROUP=kmdba #------------------------------------------------------------------------------ # The OSRACDBA_GROUP is the OS group which is to be granted SYSRAC privileges. #------------------------------------------------------------------------------ oracle.install.db.OSRACDBA_GROUP=racdba ############################################################################### # # # Grid Options # # # ############################################################################### #------------------------------------------------------------------------------ # Specify the type of Real Application Cluster Database # # - ADMIN_MANAGED: Admin-Managed # - POLICY_MANAGED: Policy-Managed # # If left unspecified, default will be ADMIN_MANAGED #------------------------------------------------------------------------------ oracle.install.db.rac.configurationType= #------------------------------------------------------------------------------ # Value is required only if RAC database type is ADMIN_MANAGED # # Specify the cluster node names selected during the installation. # Leaving it blank will result in install on local server only (Single Instance) # # Example : oracle.install.db.CLUSTER_NODES=node1,node2 #------------------------------------------------------------------------------ oracle.install.db.CLUSTER_NODES=orcl1,orcl2 #------------------------------------------------------------------------------ # This variable is used to enable or disable RAC One Node install. # # - true : Value of RAC One Node service name is used. # - false : Value of RAC One Node service name is not used. # # If left blank, it will be assumed to be false. #------------------------------------------------------------------------------ oracle.install.db.isRACOneInstall=false #------------------------------------------------------------------------------ # Value is required only if oracle.install.db.isRACOneInstall is true. # # Specify the name for RAC One Node Service #------------------------------------------------------------------------------ oracle.install.db.racOneServiceName= #------------------------------------------------------------------------------ # Value is required only if RAC database type is POLICY_MANAGED # # Specify a name for the new Server pool that will be configured # Example : oracle.install.db.rac.serverpoolName=pool1 #------------------------------------------------------------------------------ oracle.install.db.rac.serverpoolName= #------------------------------------------------------------------------------ # Value is required only if RAC database type is POLICY_MANAGED # # Specify a number as cardinality for the new Server pool that will be configured # Example : oracle.install.db.rac.serverpoolCardinality=2 #------------------------------------------------------------------------------ oracle.install.db.rac.serverpoolCardinality=0 ############################################################################### # # # Database Configuration Options # # # ############################################################################### #------------------------------------------------------------------------------- # Specify the type of database to create. # It can be one of the following: # - GENERAL_PURPOSE # - DATA_WAREHOUSE # GENERAL_PURPOSE: A starter database designed for general purpose use or transaction-heavy applications. # DATA_WAREHOUSE : A starter database optimized for data warehousing applications. #------------------------------------------------------------------------------- oracle.install.db.config.starterdb.type=GENERAL_PURPOSE #------------------------------------------------------------------------------- # Specify the Starter Database Global Database Name. #------------------------------------------------------------------------------- oracle.install.db.config.starterdb.globalDBName= #------------------------------------------------------------------------------- # Specify the Starter Database SID. #------------------------------------------------------------------------------- oracle.install.db.config.starterdb.SID= #------------------------------------------------------------------------------- # Specify whether the database should be configured as a Container database. # The value can be either "true" or "false". If left blank it will be assumed # to be "false". #------------------------------------------------------------------------------- oracle.install.db.ConfigureAsContainerDB=false #------------------------------------------------------------------------------- # Specify the Pluggable Database name for the pluggable database in Container Database. #------------------------------------------------------------------------------- oracle.install.db.config.PDBName= #------------------------------------------------------------------------------- # Specify the Starter Database character set. # # 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= #------------------------------------------------------------------------------ # 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=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.install.db.config.starterdb.memoryLimit= #------------------------------------------------------------------------------- # This variable controls whether to load Example Schemas onto # the starter database or not. # The value can be either "true" or "false". If left blank it will be assumed # to be "false". #------------------------------------------------------------------------------- oracle.install.db.config.starterdb.installExampleSchemas=false ############################################################################### # # # Passwords can be supplied for the following four schemas in the # # starter database: # # SYS # # SYSTEM # # 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= #------------------------------------------------------------------------------- # 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 DBSNMP password for the starter database. # Applicable only when oracle.install.db.config.starterdb.managementOption=CLOUD_CONTROL #------------------------------------------------------------------------------- oracle.install.db.config.starterdb.password.DBSNMP= #------------------------------------------------------------------------------- # Specify the PDBADMIN password required for creation of Pluggable Database in the Container Database. #------------------------------------------------------------------------------- oracle.install.db.config.starterdb.password.PDBADMIN= #------------------------------------------------------------------------------- # Specify the management option to use for managing the database. # Options are: # 1. CLOUD_CONTROL - If you want to manage your database with Enterprise Manager Cloud Control along with Database Express. # 2. DEFAULT -If you want to manage your database using the default Database Express option. #------------------------------------------------------------------------------- oracle.install.db.config.starterdb.managementOption=DEFAULT #------------------------------------------------------------------------------- # Specify the OMS host to connect to Cloud Control. # Applicable only when oracle.install.db.config.starterdb.managementOption=CLOUD_CONTROL #------------------------------------------------------------------------------- oracle.install.db.config.starterdb.omsHost= #------------------------------------------------------------------------------- # Specify the OMS port to connect to Cloud Control. # Applicable only when oracle.install.db.config.starterdb.managementOption=CLOUD_CONTROL #------------------------------------------------------------------------------- oracle.install.db.config.starterdb.omsPort=0 #------------------------------------------------------------------------------- # Specify the EM Admin user name to use to connect to Cloud Control. # Applicable only when oracle.install.db.config.starterdb.managementOption=CLOUD_CONTROL #------------------------------------------------------------------------------- oracle.install.db.config.starterdb.emAdminUser= #------------------------------------------------------------------------------- # Specify the EM Admin password to use to connect to Cloud Control. # Applicable only when oracle.install.db.config.starterdb.managementOption=CLOUD_CONTROL #------------------------------------------------------------------------------- oracle.install.db.config.starterdb.emAdminPassword= ############################################################################### # # # SPECIFY RECOVERY OPTIONS # # ------------------------------------ # # Recovery options for the database can be mentioned using the entries below # # # ############################################################################### #------------------------------------------------------------------------------ # This variable is to be set to false if database recovery is not required. Else # this can be set to true. #------------------------------------------------------------------------------- oracle.install.db.config.starterdb.enableRecovery=false #------------------------------------------------------------------------------- # 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_STORAGE #------------------------------------------------------------------------------- oracle.install.db.config.starterdb.fileSystemStorage.dataLocation= #------------------------------------------------------------------------------- # Specify the recovery location. # # Applicable only when oracle.install.db.config.starterdb.storage=FILE_SYSTEM_STORAGE #------------------------------------------------------------------------------- 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.storageType=ASM_STORAGE #------------------------------------------------------------------------------- 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_STORAGE #------------------------------------------------------------------------------- oracle.install.db.config.asm.ASMSNMPPassword= #------------------------------------------------------------------------------ # Specify the My Oracle Support Account Username. # # Example : MYORACLESUPPORT_USERNAME=abc@oracle.com #------------------------------------------------------------------------------ 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 doesn't want to configure Security Updates. # The value for this variable should be true if you don't want to configure # Security Updates, false otherwise. # # The value can be either true or false. If left blank it will be assumed # to be true. # # 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 at least 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= #------------------------------------------------------------------------------ # Specify the Oracle Support Hub URL. # # Example : COLLECTOR_SUPPORTHUB_URL=https://orasupporthub.company.com:8080/ #------------------------------------------------------------------------------ COLLECTOR_SUPPORTHUB_URL=
8. dbca 创建实例
dbca -silent -ignorePreReqs -ignorePrereqFailure -createDatabase -responseFile ~/.dbca.rsp
~/.dbca.rsp
############################################################################## ## ## ## DBCA response file ## ## ------------------ ## ## Copyright(c) Oracle Corporation 1998,2017. All rights reserved. ## ## ## ## Specify values for the variables listed below to customize ## ## your installation. ## ## ## ## Each variable is associated with a comment. The comment ## ## can help to populate the variables with the appropriate ## ## values. ## ## ## ## IMPORTANT NOTE: This file contains plain text passwords and ## ## should be secured to have read permission only by oracle user ## ## or db administrator who owns this installation. ## ############################################################################## #------------------------------------------------------------------------------- # Do not change the following system generated value. #------------------------------------------------------------------------------- responseFileVersion=/oracle/assistants/rspfmt_dbca_response_schema_v12.2.0 #----------------------------------------------------------------------------- # Name : gdbName # Datatype : String # Description : Global database name of the database # Valid values : <db_name>.<db_domain> - when database domain isn't NULL # <db_name> - when database domain is NULL # Default value : None # Mandatory : Yes #----------------------------------------------------------------------------- gdbName=orcl #----------------------------------------------------------------------------- # Name : sid # Datatype : String # Description : System identifier (SID) of the database # Valid values : Check Oracle12c Administrator's Guide # Default value : <db_name> specified in GDBNAME # Mandatory : No #----------------------------------------------------------------------------- sid=orcl #----------------------------------------------------------------------------- # Name : databaseConfigType # Datatype : String # Description : database conf type as Single Instance, Real Application Cluster or Real Application Cluster One Nodes database # Valid values : SI\RAC\RACONENODE # Default value : SI # Mandatory : No #----------------------------------------------------------------------------- databaseConfigType=RAC #----------------------------------------------------------------------------- # Name : RACOneNodeServiceName # Datatype : String # Description : Service is required by application to connect to RAC One # Node Database # Valid values : Service Name # Default value : None # Mandatory : No [required in case DATABASECONFTYPE is set to RACONENODE ] #----------------------------------------------------------------------------- RACOneNodeServiceName= #----------------------------------------------------------------------------- # Name : policyManaged # Datatype : Boolean # Description : Set to true if Database is policy managed and # set to false if Database is admin managed # Valid values : TRUE\FALSE # Default value : FALSE # Mandatory : No #----------------------------------------------------------------------------- policyManaged=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 : serverPoolName # Datatype : String # Description : Only one serverpool name need to be specified # if Create Server Pool option is specified. # Comma-separated list of Serverpool names if db need to use # multiple Server pool # Valid values : ServerPool name # Default value : None # Mandatory : No [required in case of RAC service centric database] #----------------------------------------------------------------------------- serverPoolName= #----------------------------------------------------------------------------- # Name : cardinality # Datatype : Number # Description : Specify Cardinality for create server pool operation # Valid values : any positive Integer value # Default value : Number of qualified nodes on cluster # Mandatory : No [Required when a new serverpool need to be created] #----------------------------------------------------------------------------- cardinality= #----------------------------------------------------------------------------- # Name : force # Datatype : Boolean # Description : Set to true if new server pool need to be created by force # if this option is specified then the newly created serverpool # will be assigned server even if no free servers are available. # This may affect already running database. # This flag can be specified for Admin managed as well as policy managed db. # Valid values : TRUE\FALSE # Default value : FALSE # Mandatory : No #----------------------------------------------------------------------------- force=false #----------------------------------------------------------------------------- # Name : pqPoolName # Datatype : String # Description : Only one serverpool name needs to be specified # if create server pool option is specified. # Comma-separated list of serverpool names if use # server pool. This is required to # create Parallel Query (PQ) database. Applicable to Big Cluster # Valid values : Parallel Query (PQ) pool name # Default value : None # Mandatory : No [required in case of RAC service centric database] #----------------------------------------------------------------------------- pqPoolName= #----------------------------------------------------------------------------- # Name : pqCardinality # Datatype : Number # Description : Specify Cardinality for create server pool operation. # Applicable to Big Cluster # Valid values : any positive Integer value # Default value : Number of qualified nodes on cluster # Mandatory : No [Required when a new serverpool need to be created] #----------------------------------------------------------------------------- pqCardinality= #----------------------------------------------------------------------------- # Name : createAsContainerDatabase # Datatype : boolean # Description : flag to create database as container database # Valid values : Check Oracle12c Administrator's Guide # Default value : false # Mandatory : No #----------------------------------------------------------------------------- createAsContainerDatabase=true #----------------------------------------------------------------------------- # Name : numberOfPDBs # Datatype : Number # Description : Specify the number of pdb to be created # Valid values : 0 to 252 # Default value : 0 # Mandatory : No #----------------------------------------------------------------------------- numberOfPDBs=1 #----------------------------------------------------------------------------- # Name : pdbName # Datatype : String # Description : Specify the pdbname/pdbanme prefix if one or more pdb need to be created # Valid values : Check Oracle12c Administrator's Guide # Default value : None # Mandatory : No #----------------------------------------------------------------------------- pdbName=orclpdb #----------------------------------------------------------------------------- # Name : useLocalUndoForPDBs # Datatype : boolean # Description : Flag to create local undo tablespace for all PDB's. # Valid values : TRUE\FALSE # Default value : TRUE # Mandatory : No #----------------------------------------------------------------------------- useLocalUndoForPDBs=true #----------------------------------------------------------------------------- # Name : pdbAdminPassword # Datatype : String # Description : PDB Administrator user password # Valid values : Check Oracle12c Administrator's Guide # Default value : None # Mandatory : No #----------------------------------------------------------------------------- pdbAdminPassword=holyP#ssw0rd123 #----------------------------------------------------------------------------- # 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=orcl1,orcl2 #----------------------------------------------------------------------------- # Name : templateName # Datatype : String # Description : Name of the template # Valid values : Template file name # Default value : None # Mandatory : Yes #----------------------------------------------------------------------------- templateName=/ups/oracle/database/product/12.2/db_1/assistants/dbca/templates/General_Purpose.dbc #----------------------------------------------------------------------------- # Name : sysPassword # Datatype : String # Description : Password for SYS user # Valid values : Check Oracle12c Administrator's Guide # Default value : None # Mandatory : Yes #----------------------------------------------------------------------------- sysPassword=holyP#ssw0rd123 #----------------------------------------------------------------------------- # Name : systemPassword # Datatype : String # Description : Password for SYSTEM user # Valid values : Check Oracle12c Administrator's Guide # Default value : None # Mandatory : Yes #----------------------------------------------------------------------------- systemPassword=holyP#ssw0rd123 #----------------------------------------------------------------------------- # Name : serviceUserPassword # Datatype : String # Description : Password for Windows Service user # Default value : None # Mandatory : If Oracle home is installed with windows service user #----------------------------------------------------------------------------- serviceUserPassword= #----------------------------------------------------------------------------- # Name : emConfiguration # Datatype : String # Description : Enterprise Manager Configuration Type # Valid values : CENTRAL|DBEXPRESS|BOTH|NONE # Default value : NONE # Mandatory : No #----------------------------------------------------------------------------- emConfiguration= #----------------------------------------------------------------------------- # Name : emExpressPort # Datatype : Number # Description : Enterprise Manager Configuration Type # Valid values : Check Oracle12c Administrator's Guide # Default value : NONE # Mandatory : No, will be picked up from DBEXPRESS_HTTPS_PORT env variable # or auto generates a free port between 5500 and 5599 #----------------------------------------------------------------------------- emExpressPort=5500 #----------------------------------------------------------------------------- # Name : runCVUChecks # Datatype : Boolean # Description : Specify whether to run Cluster Verification Utility checks # periodically in Cluster environment # Valid values : TRUE\FALSE # Default value : FALSE # Mandatory : No #----------------------------------------------------------------------------- runCVUChecks=true #----------------------------------------------------------------------------- # Name : dbsnmpPassword # Datatype : String # Description : Password for DBSNMP user # Valid values : Check Oracle12c Administrator's Guide # Default value : None # Mandatory : Yes, if emConfiguration is specified or # the value of runCVUChecks is TRUE #----------------------------------------------------------------------------- dbsnmpPassword= #----------------------------------------------------------------------------- # Name : omsHost # Datatype : String # Description : EM management server host name # Default value : None # Mandatory : Yes, if CENTRAL is specified for emConfiguration #----------------------------------------------------------------------------- omsHost= #----------------------------------------------------------------------------- # Name : omsPort # Datatype : Number # Description : EM management server port number # Default value : None # Mandatory : Yes, if CENTRAL is specified for emConfiguration #----------------------------------------------------------------------------- omsPort=0 #----------------------------------------------------------------------------- # Name : emUser # Datatype : String # Description : EM Admin username to add or modify targets # Default value : None # Mandatory : Yes, if CENTRAL is specified for emConfiguration #----------------------------------------------------------------------------- emUser= #----------------------------------------------------------------------------- # Name : emPassword # Datatype : String # Description : EM Admin user password # Default value : None # Mandatory : Yes, if CENTRAL is specified for emConfiguration #----------------------------------------------------------------------------- emPassword= #----------------------------------------------------------------------------- # Name : dvConfiguration # Datatype : Boolean # Description : Specify "True" to configure and enable Oracle Database vault # Valid values : True/False # Default value : False # Mandatory : No #----------------------------------------------------------------------------- dvConfiguration=false #----------------------------------------------------------------------------- # Name : dvUserName # Datatype : String # Description : DataVault Owner # Valid values : Check Oracle12c Administrator's Guide # Default value : None # Mandatory : Yes, if DataVault option is chosen #----------------------------------------------------------------------------- dvUserName= #----------------------------------------------------------------------------- # Name : dvUserPassword # Datatype : String # Description : Password for DataVault Owner # Valid values : Check Oracle12c Administrator's Guide # Default value : None # Mandatory : Yes, if DataVault option is chosen #----------------------------------------------------------------------------- dvUserPassword= #----------------------------------------------------------------------------- # Name : dvAccountManagerName # Datatype : String # Description : DataVault Account Manager # Valid values : Check Oracle12c Administrator's Guide # Default value : None # Mandatory : No #----------------------------------------------------------------------------- dvAccountManagerName= #----------------------------------------------------------------------------- # Name : dvAccountManagerPassword # Datatype : String # Description : Password for DataVault Account Manager # Valid values : Check Oracle12c Administrator's Guide # Default value : None # Mandatory : No #----------------------------------------------------------------------------- dvAccountManagerPassword= #----------------------------------------------------------------------------- # Name : olsConfiguration # Datatype : Boolean # Description : Specify "True" to configure and enable Oracle Label Security # Valid values : True/False # Default value : False # Mandatory : No #----------------------------------------------------------------------------- olsConfiguration=false #----------------------------------------------------------------------------- # Name : datafileJarLocation # Datatype : String # Description : Location of the data file jar # Valid values : Directory containing compressed datafile jar # Default value : None # Mandatory : No #----------------------------------------------------------------------------- datafileJarLocation={ORACLE_HOME}/assistants/dbca/templates/ #----------------------------------------------------------------------------- # 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=+DATADG/{DB_UNIQUE_NAME}/ #----------------------------------------------------------------------------- # Name : recoveryAreaDestination # Datatype : String # Description : Location of the data file's # Valid values : Recovery Area location # Default value : $ORACLE_BASE/flash_recovery_area # Mandatory : No #----------------------------------------------------------------------------- recoveryAreaDestination= #----------------------------------------------------------------------------- # Name : storageType # Datatype : String # Description : Specifies the storage on which the database is to be created # Valid values : FS (CFS for RAC), ASM # Default value : FS # Mandatory : No #----------------------------------------------------------------------------- storageType=ASM #----------------------------------------------------------------------------- # Name : diskGroupName # Datatype : String # Description : Specifies the disk group name for the storage # Default value : DATA # Mandatory : No #----------------------------------------------------------------------------- diskGroupName=+DATADG/{DB_UNIQUE_NAME}/ #----------------------------------------------------------------------------- # Name : asmsnmpPassword # Datatype : String # Description : Password for ASM Monitoring # Default value : None # Mandatory : No #----------------------------------------------------------------------------- asmsnmpPassword= #----------------------------------------------------------------------------- # Name : recoveryGroupName # Datatype : String # Description : Specifies the disk group name for the recovery area # Default value : RECOVERY # Mandatory : No #----------------------------------------------------------------------------- recoveryGroupName= #----------------------------------------------------------------------------- # Name : characterSet # Datatype : String # Description : Character set of the database # Valid values : Check Oracle12c National Language Support Guide # Default value : "US7ASCII" # Mandatory : NO #----------------------------------------------------------------------------- characterSet=ZHS16GBK #----------------------------------------------------------------------------- # Name : nationalCharacterSet # Datatype : String # Description : National Character set of the database # Valid values : "UTF8" or "AL16UTF16". For details, check Oracle12c National Language Support Guide # Default value : "AL16UTF16" # Mandatory : No #----------------------------------------------------------------------------- nationalCharacterSet=AL16UTF16 #----------------------------------------------------------------------------- # Name : registerWithDirService # Datatype : Boolean # Description : Specifies whether to register with Directory Service. # Valid values : TRUE \ FALSE # Default value : FALSE # Mandatory : No #----------------------------------------------------------------------------- registerWithDirService=false #----------------------------------------------------------------------------- # Name : dirServiceUserName # Datatype : String # Description : Specifies the name of the directory service user # Mandatory : YES, if the value of registerWithDirService is TRUE #----------------------------------------------------------------------------- dirServiceUserName= #----------------------------------------------------------------------------- # Name : dirServicePassword # Datatype : String # Description : The password of the directory service user. # You can also specify the password at the command prompt instead of here. # Mandatory : YES, if the value of registerWithDirService is TRUE #----------------------------------------------------------------------------- dirServicePassword= #----------------------------------------------------------------------------- # Name : walletPassword # Datatype : String # Description : The password for wallet to created or modified. # You can also specify the password at the command prompt instead of here. # Mandatory : YES, if the value of registerWithDirService is TRUE #----------------------------------------------------------------------------- walletPassword= #----------------------------------------------------------------------------- # Name : listeners # Datatype : String # Description : Specifies list of listeners to register the database with. # By default the database is configured for all the listeners specified in the # $ORACLE_HOME/network/admin/listener.ora # Valid values : The list should be comma separated like "listener1,listener2". # Mandatory : NO #----------------------------------------------------------------------------- listeners=LISTENER #----------------------------------------------------------------------------- # 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=DB_UNIQUE_NAME=orcl,ORACLE_BASE=/ups/oracle/database,PDB_NAME=,DB_NAME=orcl,ORACLE_HOME=/ups/oracle/database/product/12.2/db_1,SID=orcl #----------------------------------------------------------------------------- # Name : initParams # Datatype : String # Description : comma separated list of name=value pairs. Overrides initialization parameters defined in templates # Default value : None # Mandatory : NO #----------------------------------------------------------------------------- initParams=orcl2.undo_tablespace=UNDOTBS2,family:dw_helper.instance_mode=read-only,processes=300,orcl2.instance_number=2,nls_language=AMERICAN,pga_aggregate_target=314MB,sga_target=940MB,dispatchers=(PROTOCOL=TCP) (SERVICE=orclXDB),db_block_size=8192BYTES,orcl1.undo_tablespace=UNDOTBS1,orcl2.thread=2,diagnostic_dest={ORACLE_BASE},cluster_database=true,orcl1.thread=1,audit_file_dest={ORACLE_BASE}/admin/{DB_UNIQUE_NAME}/adump,db_create_file_dest=+DATADG/{DB_UNIQUE_NAME}/,nls_territory=AMERICA,local_listener=-oraagent-dummy-,compatible=12.2.0,db_name=orcl,audit_trail=db,orcl1.instance_number=1,remote_login_passwordfile=exclusive,open_cursors=300 #----------------------------------------------------------------------------- # Name : sampleSchema # Datatype : Boolean # Description : Specifies whether or not to add the Sample Schemas to your database # Valid values : TRUE \ FALSE # Default value : FASLE # Mandatory : No #----------------------------------------------------------------------------- sampleSchema=false #----------------------------------------------------------------------------- # 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=false #----------------------------------------------------------------------------- # Name : totalMemory # Datatype : String # Description : total memory in MB to allocate to Oracle # Valid values : # Default value : # Mandatory : NO #----------------------------------------------------------------------------- totalMemory=0
三、配置PDB启动
# 命令配置启动pdb随cdb启动 alter pluggable database [pdbname] save state; alter pluggable database ORCLPDB save state; -- 结果检查 set lines 168 pages 999 col CON_NAME for a18 col INSTANCE_NAME for a18 col RESTRICTED for a12 select con_id,CON_NAME,INSTANCE_NAME,STATE,RESTRICTED from dba_pdb_saved_states; CON_ID CON_NAME INSTANCE_NAME STATE RESTRICTED ---------- ------------------ ------------------ -------------- ------------ 3 ORCLPDB orcl2 OPEN NO 3 ORCLPDB orcl1 OPEN NO SQL> # 禁用pdb随cdb启动 alter pluggable database ORCLPDB discard state ; SQL> alter pluggable database ORCLPDB discard state; Pluggable database altered. SQL> select con_id,CON_NAME,INSTANCE_NAME,STATE,RESTRICTED from dba_pdb_saved_states; CON_ID CON_NAME INSTANCE_NAME STATE RESTRICTED ---------- ------------------ ------------------ -------------- ------------ 3 ORCLPDB orcl2 OPEN NO SQL> alter pluggable database ORCLPDB save state; Pluggable database altered. SQL> select con_id,CON_NAME,INSTANCE_NAME,STATE,RESTRICTED from dba_pdb_saved_states; CON_ID CON_NAME INSTANCE_NAME STATE RESTRICTED ---------- ------------------ ------------------ -------------- ------------ 3 ORCLPDB orcl2 OPEN NO 3 ORCLPDB orcl1 OPEN NO SQL>