Oracle 11g静默安装软件+手工创建数据库(3)

#------------------------------------------------------------------------------
# This variable is used to enable or disable custom install and is considered
# only if InstallEdition is EE.
#
# true  : Components mentioned as part of 'optionalComponents' property
#        are considered for install.
# false : Value for 'optionalComponents' is not considered.
#------------------------------------------------------------------------------
oracle.install.db.EEOptionsSelection=false

#------------------------------------------------------------------------------
# This variable is considered only if 'EEOptionsSelection' is set to true.
#
# Description: List of Enterprise Edition Options you would like to enable.
#
#              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 enable.
#       
#              oracle.oraolap:11.2.0.4.0 - Oracle OLAP
#              oracle.rdbms.dm:11.2.0.4.0 - Oracle Data Mining
#              oracle.rdbms.dv:11.2.0.4.0 - Oracle Database Vault
#              oracle.rdbms.lbac:11.2.0.4.0 - Oracle Label Security
#              oracle.rdbms.partitioning:11.2.0.4.0 - Oracle Partitioning
#              oracle.rdbms.rat:11.2.0.4.0 - Oracle Real Application Testing
#------------------------------------------------------------------------------
oracle.install.db.optionalComponents=oracle.rdbms.partitioning:11.2.0.4.0,oracle.oraolap:11.2.0.4.0,oracle.rdbms.dm:11.2.0.4.0,oracle.rdbms.dv:11.2.0.4.0,or
acle.rdbms.lbac:11.2.0.4.0,oracle.rdbms.rat:11.2.0.4.0
#------------------------------------------------------------------------------
# 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.
# The value to be specified for OSOPER group is optional.
#------------------------------------------------------------------------------
oracle.install.db.OPER_GROUP=

#------------------------------------------------------------------------------
# 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 false.
#
# Example    : DECLINE_SECURITY_UPDATES=false
#------------------------------------------------------------------------------
DECLINE_SECURITY_UPDATES=true

netca.rsp不需要修改,直接建立监听

netca -silent -responsefile /data/database/response/netca.rsp
netca静默创建监听:
$ netca -silent -responsefile /data/database/response/netca.rsp

正在对命令行参数进行语法分析:
参数"silent" = true
参数"responsefile" = /data/database/response/netca.rsp
完成对命令行参数进行语法分析。
Oracle Net Services 配置:
完成概要文件配置。
Oracle Net 监听程序启动:
    正在运行监听程序控制:
      /opt/app/oracle/product/11.2.0/dbhome_1/bin/lsnrctl start LISTENER
    监听程序控制完成。
    监听程序已成功启动。
监听程序配置完成。
成功完成 Oracle Net Services 配置。退出代码是0

2. 手工建库

新建参数文件 $ORACLE_HOME/dbs/initcrnophq.ora
db_name=crnophq
memory_target=100G

建库脚本:
CREATE DATABASE crnophq
    USER SYS IDENTIFIED BY oracle
    USER SYSTEM IDENTIFIED BY oracle
    LOGFILE GROUP 1 ('/opt/app/oracle/oradata/crnophq/redo01a.log') SIZE 2000M BLOCKSIZE 512,
            GROUP 2 ('/opt/app/oracle/oradata/crnophq/redo02a.log') SIZE 2000M BLOCKSIZE 512,
            GROUP 3 ('/opt/app/oracle/oradata/crnophq/redo03a.log') SIZE 2000M BLOCKSIZE 512
    MAXLOGFILES 5
    MAXLOGMEMBERS 5
    MAXLOGHISTORY 1
    MAXDATAFILES 1000
    CHARACTER SET ZHS16GBK
    NATIONAL CHARACTER SET AL16UTF16
    EXTENT MANAGEMENT LOCAL
    DATAFILE '/opt/app/oracle/oradata/crnophq/system01.dbf' SIZE 300M REUSE
    SYSAUX DATAFILE '/opt/app/oracle/oradata/crnophq/sysaux01.dbf' SIZE 300M REUSE
    DEFAULT TABLESPACE users
    DATAFILE '/opt/app/oracle/oradata/crnophq/users01.dbf'
        SIZE 5M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED
    DEFAULT TEMPORARY TABLESPACE temp
        TEMPFILE '/opt/app/oracle/oradata/crnophq/temp01.dbf'
        SIZE 20M REUSE
    UNDO TABLESPACE undotbs
        DATAFILE '/opt/app/oracle/oradata/crnophq/undotbs01.dbf'
        SIZE 20M REUSE AUTOEXTEND ON MAXSIZE UNLIMITED;

执行下面脚本,创建数据字典和存储过程等
SQL> @?/rdbms/admin/catalog.sql
SQL> @?/rdbms/admin/catproc.sql
SQL> @?/sqlplus/admin/pupbld.sql

关于手工建库,更多可以参见转载的文章:Oracle 11g 手工建库

3. 检查各组件是否符合要求
col comp_name for a60
set linesize 1000
select comp_id, comp_name, version, status from sys.dba_registry;

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/ea04c3478df463865005a0b9771d131f.html