1. 工具用法

 su - oracle
 $ $(orabasehome)/perl/bin/perl $ORACLE_HOME/rdbms/admin/catcon.pl

   Usage: catcon  [-h, --help]
                  [-u, --usr username
                    [{/password | -w, --usr_pwd_env_var env-var-name}]]
                  [-U, --int_usr username
                    [{/password | -W, --int_usr_pwd_env_var env-var-name]]
                  [-d, --script_dir directory]
                  [-l, --log_dir directory]
                  [{-c, --incl_con | -C, --excl_con} container]
                  [-p, --catcon_instances degree-of-parallelism]
                  [-z, --ez_conn EZConnect-strings]
                  [-e, --echo]
                  [-s, --spool]
                  [-E, --error_logging
                    { ON | errorlogging-table-other-than-SPERRORLOG } ]
                  [-F, --app_con Application-Root]
                  [-V, --ignore_errors errors-to-ignore ]
                  [-I, --no_set_errlog_ident]
                  [-g, --diag]
                  [-v, --verbose]
                  [-f, --ignore_unavailable_pdbs]
                  [-r, --reverse]
                  [-R, --recover]
                  [-m, --pdb_seed_mode pdb-mode]
                  [--force_pdb_mode pdb-mode]
                  [--all_instances]
                  -b, --log_file_base log-file-name-base
                  --
                  { sqlplus-script [arguments] | --x<SQL-statement> } ...

    Optional:
      -h, --help
         print usage info and exit
      -u, --usr
         username (optional /password; otherwise prompts for password)
         used to connect to the database to run user-supplied scripts or
         SQL statements
         defaults to "/ as sysdba"
      -w, --usr_pwd_env_var
         name of environment variable which contains a password for a user
         whose name was specified with --usr;
         NOTE: should NOT be used if --usr specified a password
      -U, --int_usr
         username (optional /password; otherwise prompts for password)
         used to connect to the database to perform internal tasks
         defaults to "/ as sysdba"
      -W, --int_usr_pwd_env_var
         name of environment variable which contains a password for a user
         whose name was specified with --int_usr;
         NOTE: should NOT be used if --int_usr specified a password
      -d, --script_dir
         directory containing the file to be run
      -l, --log_dir
         directory to use for spool log files
      -c, --incl_con
         container(s) in which to run sqlplus scripts, i.e. skip all
         Containers not named here; for example,
           --incl_con 'PDB1 PDB2',
      -C, --excl_con
          container(s) in which NOT to run sqlplus scripts, i.e. skip all
         Containers named here; for example,
           --excl_con 'CDB PDB3'

        NOTE: --incl_con and --excl_con are mutually exclusive

      -p, --catcon_instances
         expected number of concurrent invocations of this script on a given
         host

        NOTE: this parameter rarely needs to be specified

      -z, --ez_conn
         blank-separated EZConnect strings corresponding to RAC instances
         which can be used to run scripts
      -e, --echo
         sets echo on while running sqlplus scripts
      -s, --spool
         output of running every script will be spooled into a file whose name
         will be
           <log-file-name-base>_<script_name_without_extension>_[<container_name_if_any>].<default_extension>
      -E, --error_logging
         sets errorlogging on; if ON is specified, default error logging table
         will be used, otherwise, specified error logging table (which must
         have been created in every Container) will be used
      -F, --app_con
         causes scripts to run in a Application Root and all Application PDBs
         belonging to it;
         ***CANNOT*** be specified concurrently with -{cC} flags
      -V, --ignore_errors
         causes catcon to ignore errors encountered during specified operations.
         The following options are supported:
           script_path == ignore errors while validating script path
      -S, --optUserScripts
         running user scripts, meaning that _oracle_script will not be set and
         all entities created by scripts will not be marked as Oracle-maintained
      -I, --no_set_errlog_ident
         do not issue set Errorlogging Identifier (ostensibly because the
         caller already did it and does not want us to override it)
      -g, --diag
         turns on production of diagnostic info while running this script
      -v, --verbose
         turns on verbose output which is less verbose than debugging output
      -f, --ignore_unavailable_pdbs
         instructs catcon to ignore PDBs which are closed or, if --incl_con or
         --excl_con was used, do not exist and process existing PDBs which
         were specified (explicitly or implicitly) and are open

         NOTE: if this flag is not specified and some specified PDBs do not
               exist or are not open, an error will be returned and none of
               the Containers will be processed.

      -r, --reverse
         causes scripts to be run in all PDBs and then in the Root (reverse
         of the default order); required for running catdwgrd.sql in a CDB
      -m, --pdb_seed_mode
         mode in which PDB should be opened; one of the following values
         may be specified:
         - UNCHANGED - leave PDB in whatever mode it is already open
         - READ WRITE (default)
         - READ ONLY
         - UPGRADE
         - DOWNGRADE

         NOTE: if the desired mode is different from the mode in which
               PDB is open, it is will be closed and reopened in the
               desired mode before running any scripts; after all scripts were
               run, it will be restored to the original mode

               --pdb_seed_mode should not be specified if --force_pdb_mode
               is specified because mode supplied with the latter will apply
               to PDB

      --force_pdb_mode
         mode in which ALL PDBs against which scripts will be run must be
         opened; one of the following values may be specified:
         - UNCHANGED - leave PDBs in whatever mode they are already
                       open (default)
         - READ WRITE
         - READ ONLY
         - UPGRADE
         - DOWNGRADE

         NOTE: if the desired mode is different from the mode in which
               some of the PDBs specified by the caller are open, they will be
               closed and reopened in the desired mode before running any
               scripts; after all scripts were run, they will be restored to
               the original mode

               --force_pdb_mode should not be specified if --pdb_seed_mode
               is specified because mode supplied with the latter will apply
               to PDB

      -R, --recover
         causes catcon to recover from unexpected death of a SQL*Plus process
         that it spawned; if not specified, such event will cause catcon to die

      -D, --disable_lockdown
        causes catcon to disable lockdown profile before running script(s) in
        a PDB and reenable them before existing

      --all_instances
        if used to run scripts against a CDB and if --force_pdb_mode was
        specified, catcon will attempt to run scripts on PDBs using all
        instances on which a CDB is open

    Mandatory:
      -b, --log_file_base
         base name (e.g. catcon_test) for log and spool file names

      sqlplus-script - sqlplus script to run OR
      SQL-statement  - a statement to execute

    NOTES:
      - if --x<SQL-statement> is the first non-option string, it needs to be
        preceeded with -- to avoid confusing module parsing options into
        assuming that '-' is an option which that module is not expecting and
        about which it will complain
      - command line parameters to SQL scripts can be introduced using --p
      - interactive (or secret) parameters to SQL scripts can be introduced
        using --P
      - occupying middle ground between --p and --P, parameters whose values
        are stored in environment variables can be specified using --e
        (as in --e"env_var_holding_password")

      For example,
        perl catcon.pl ... x.sql --p"John" --P"Enter Password for John:" ...
      or store John's password in environment variable JOHNS_PASSWORD and
      then issue
        perl catcon.pl ... x.sql --p"John" --e"JOHNS_PASSWORD" ...

 $

2. 安装JAVA相关组件

### ---- JServer.sql ---- ###
# 指定container安装组件,每个container用空格符分割;
LOG_DIR=/tmp/$(date +%Y%m%d)
[[ -d "${LOG_DIR}" ]] || mkdir -p ${LOG_DIR}
#-- JServer JAVA Virtual Machine      JAVAVM
$(orabasehome)/ -l ${LOG_DIR} -v -b initjvm -c 'PDB$SEED' $(orabasehome)/javavm/install/initjvm.sql
OR
$(orabasehome)/ -l ${LOG_DIR} -v -b initjvm -c 'PDB$SEED PDBORCL' $(orabasehome)/javavm/install/initjvm.sql
-- Oracle XDK                XML
$(orabasehome)/ -l ${LOG_DIR} -v -b initxml -c 'PDB$SEED' $(orabasehome)/xdk/admin/initxml.sql
$(orabasehome)/ -l ${LOG_DIR} -v -b xmlja -c PDB$SEED' $(orabasehome)/xdk/admin/xmlja.sql
-- Oracle Database Java Packages         CATJAVA
$(orabasehome)/ -l ${LOG_DIR} -v -b catjava -c 'PDB$SEED' $(orabasehome)/rdbms/admin/catjava.sql
$(orabasehome)/ -l ${LOG_DIR} -v -b catxdbj -c 'PDB$SEED' $(orabasehome)/rdbms/admin/catxdbj.sql

3. 其他组件类似

### ----ordinst.sql ---- ###
-- run in cdb and all open pdbs
$(orabasehome)/ -l ${LOG_DIR} -v -b ordinst -a   $(orabasehome)/ord/admin/ordinst.sql 1SYSAUX 1SYSAUX;

### ----  interMedia.sql ---- ###

-- Oracle Multimedia             ORDIM
$(orabasehome)/ -l ${LOG_DIR} -v -b iminst -c 'PDB$SEED'  $(orabasehome)/ord/im/admin/iminst.sql

### ---- cwmlite.sql ---- ###
-- OLAP Analytic Workspace       APS
-- Oracle OLAP API           XOQ
$(orabasehome)/ -l ${LOG_DIR} -v -b olap -c   $(orabasehome)/olap/admin/olap.sql 1SYSAUX 1TEMP;

### ---- spatial.sql ---- ###

-- Spatial               SDO
$(orabasehome)/ -l ${LOG_DIR} -v -b mdinst -c 'PDB$SEED'  $(orabasehome)/md/admin/mdinst.sql

### ---- catols.sql ---- ###

-- Oracle Label Security            OLS
 $(orabasehome)/ -l ${LOG_DIR} -v -b catols -c 'PDB$SEED CDB$ROOT'   -U "SYS"/"&&sysPassword" $(orabasehome)/rdbms/admin/catols.sql;

### ---- apex.sql ---- ###

-- Oracle Application Express        APEX
$(orabasehome)/ -l ${LOG_DIR} -v -b catapx -c   $(orabasehome)/apex/catapx.sql 1Xbkfsdcdf1ggh_123 1SYSAUX 1SYSAUX 1TEMP /i/ 1NONE;

### ---- catmac.sql ---- ###

-- Oracle Database Vault            DV
$(orabasehome)/ -l ${LOG_DIR} -v -b catmac -c  $(orabasehome)/rdbms/admin/catmac.sql 1SYSAUX 1TEMP;

Oracle Database(rdbms) 12.2 安装组件的更多相关文章

  1. Oracle Database 12c Release 2安装详解

    第1章 Oracle Database 12c Release 2安装详解 1.1 下载方法 oracle官网https://www.oracle.com 1)打开官方网站,找到下载连接 2)选择更多 ...

  2. Oracle Database 12c Release 2安装过程实录

    前言----------公司数据库用的是oracle,由于oracle数据库没有做监控,所有搭个环境用于测试zabbix通过orabbix插件监控oracle数据库,下面先搭建oracle数据库. 简 ...

  3. Adaptive Query Optimization in Oracle Database 12c (12.1 and 12.2)

    https://oracle-base.com/articles/12c/adaptive-query-optimization-12cr1

  4. Upgrade Oracle Database 12c Release 2(12.2) RAC on RHEL7.3 with RU

    Upgrade Oracle Database 12c Release 2(12.2) RAC on RHEL7.3 -- [ RU: 26610291 (GRID INFRASTRUCTURE RE ...

  5. Installing Oracle Database 12c Release 2(12.2) RAC on RHEL7.3 in Silent Mode

    概要 在RHEL7静默方式安装oracle database 12.2 RAC. 一.环境配置 1. 配置hosts文件 cp /etc/hosts /etc/hosts_$(date +%Y%d%m ...

  6. Oracle Database 快捷版 安装 连接

    Oracle Database 快捷版 11g 第 2 版 下载地址:http://www.oracle.com/technetwork/cn/database/database-technologi ...

  7. Install Oracle Database client in silent mode

    下面通过在工作中的使用,总结出不同版本Oracle client的静默(silent)安装方法. Oracle Database client 12.2.0.1 1. reponse file con ...

  8. Maclean Liu对Oracle Database 12c新特性研究汇总

    Maclean Liu关于DB 12c新特性的研究文章如下: [Oracle Database 12c新特性] In-Database Archiving数据库内归档 [Oracle Database ...

  9. Oracle 11g R2 Sample Schemas 安装

    最近准备对之前学习SQL*Loader的笔记进行整理,希望通过官方文档中的示例学习(Case Studies)来进行,但是官方文档中示例学习相关的脚本文件在数据库软件安装完成之后默认并没有提供,而是整 ...

随机推荐

  1. 深入理解Java线程池:ThreadPoolExecutor

    线程池介绍 在web开发中,服务器需要接受并处理请求,所以会为一个请求来分配一个线程来进行处理.如果每次请求都新创建一个线程的话实现起来非常简便,但是存在一个问题: 如果并发的请求数量非常多,但每个线 ...

  2. Java基础——泛型

    一.定义 泛型(generic)是指参数化类型的能力.可以定义带泛型类型的类或方法,随后编译器会用具体的类型来替换它(泛型实例化).使用泛型的主要优点是能够在编译时,而不是在运行时检测出错误.它是jd ...

  3. oracle逐步学习总结之oracle数字函数和日期函数(基础四)

    原创作品,转自请注明出处:https://www.cnblogs.com/sunshine5683/p/10140716.html 继上篇总结,继续进行总结: 以下下数字函数: 1.abs(n):返回 ...

  4. Hamming Problem(hdu3199)

    Hamming Problem Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) ...

  5. RocketMQ 消息发送

    消息发送基本流程: 1.消息验证 验证主题(topic),消息体不能为空和大小不能超过4M. 2.路由查找 a.查看缓存,是否有topic的路由信息. b.如果没有则到NameServer中获取路由信 ...

  6. php静态变量与方法与phar的使用

    本节用类与静态变量改造之前的例子:php根据命令行参数生成配置文件 ghostinit.php: <?php class ghostinit{ static $version = 'ghost ...

  7. 百度智能小程序弹窗组件wcPop|智能小程序自定义model弹窗模板

    百度智能小程序自定义弹窗组件wcPop|百度小程序model对话框|智能小程序弹窗界面模板 最近百度也推出了自己的智能小程序,如是就赶紧去试了下,官方提供的api还不是狠完整.而且官方提供的弹窗组件也 ...

  8. Context 上下文

    全称:context 解释:上下文,在我们的开发的程序中,通常使用context上下文. 理解:结合实际生活我们可以把它理解为是语境,比如A说:我喜欢他. 那么这个他是谁,我们不知道,如果在这句话之前 ...

  9. 1.String、StringBuffer与StringBuilder之间区别

    1.三者在执行速度方面的比较:StringBuilder >  StringBuffer  >  String 2.String <(StringBuffer,StringBuild ...

  10. nginx 配置 非80 的其他 端口

    如果nginx的监听端口不是默认的80端口,改为其他非80端口后,后端服务tomcat中的request.getServerPort()方法无法获得正确的端口号,仍然返回到80端口.在response ...