Search notes:

$ORACLE_HOME/rdbms/admin/catcon.pl

catcon.pl is a perl script that executes SQL scripts or SQL statements in container and pluggable databases at once. It can run these scripts in correct order in CDB$ROOT and specified PDBs.
$ $ORACLE_HOME/perl/bin/perl $ORACLE_HOME/rdbms/admin/catcon.pl [options] -b|--log_file_base  sql-script|statement

Command line options

Typically, the following command line options are used:
-u --usr username[/password] Specify username and optional password for user with which user supplied script is run. Default: / as sysdba
-d --script_dir directory Name of the directory in which the script to be run is located
-b -log_file_base The base name for log files. This parameter is mandatory. It's value can be freely chosen.
-s --spool Spool to <log-file-name-base>_<script_name_without_extension>_[<container_name_if_any>].<default_extension>
-e --echo Sets echo on
-c --incl_con container(s) The container(s) (space separated) in which the scripts should be run. (By default, the script is run in all open databases. Compare with -C)
--p value Variables to pass to the scripts
Additinal command line options are:
-w --usr_pwd_env_var env-var-name Specify name of environment variable that stores a user's password.
-U --int_usr username[/password] User to perform internal tasks
-W --int_usr_pwd_env_var env-var-name Same ide as -w, but for -U user.
-l --log_dir directory Directory to spool log files to
-C --excl_con container(s) The container(s) in which the scripts should not be run. Compare with -c
-p --catcon_instances degree-of-parallelism number of concurrent invocations (rarely used)
-z --ez_conn EZConnect-strings EZConnect strings corresponding to RAC instances
--ezconn_to_pdb pdb-name
-E --error_logging {ON | errorlogging-table-other-than-SPERRORLOG} Use default or specified error logging table.
-F --app_con Application-Root Run script in application root and all application PDBs that belong to this root. (cannot be specified with -c or -C)
-V --ignore_errors errors-to-ignore Only supported error type is script_path
-S --user_scripts run user scripts (i. e. _oracle_script is not set and created entities will not be marked as Oracle-maintained)
-I --no_set_errlog_ident Do not issue set errorlogging idnetifier (ostensibly because caller already did it)
-g --diag Emit diagnostic information
-v --verbose
-f --ignore_unavailable_pdbs Ignore closed PDBs or (if --incl_con or --excl_con is used) don't exist
-r --reverse Run scripts in all PDBs and then in the root (required for running catdwgrd.sql in a CDB)
-R --recover Recover if spawned SQL*Plus process dies.
-m --pdb_seed_mode pdb-mode Mode in which a PDB should be opened (UNCHANGED, READ WRITE (default), READ ONLY, UPGRADE or DOWNGRADE)
-D --disable_lockdown Disab le lockdown profile before running script(s)
--fail_on_unopenable_pdbs
--force_pdb_mode pdb-mode Specifies the required open mode for all PDBs where the scripts are run. Same set of possible values as in --pdb_seed_mode.
--all_instances
--upgrade Specified if a database is upgraded
--sqlplus_dir directory Directory where sqlplus binary is located
--dflt_app_module app-module application module to be set.
-n Number of SQL*Plus process to spwan
--kill_kgl_x_blocker
--ddl_lock_timeout time-in-sec Value for ddl_lock_timeout
--app_action_no_arg
-h --help

See also

The $ORACLE_HOME/rdbms/admin directory (especially the two scripts sqlsessstart.sql and sqlsessend.sql).

Index