Database Reference
In-Depth Information
SQL> select replace(file_name,'/u01/','/u02/') from dba_data_files;
REPLACE(FILE_NAME,'/u01/','/u02/')
-----------------------------------------------------
/u02/oradata/CDB1/datafiles/system.257.780854341
/u02/oradata/CDB1/datafiles/sysaux.256.780854265
/u02/oradata/CDB1/datafiles/users.258.780854405
/u02/oradata/CDB1/datafiles/undotbs1.259.780854407
this technique applies for many Oracle processes, including rMaN database cloning.
The SQL script then executes the scripts necessary to generate the data dictionary, and all the database
components you need. What makes these scripts different from previous releases and the non-CDB is the invocation
via the catcon.pl script. Consider the following snippet used to create the Oracle Database Catalog Views and Oracle
Database Packages and Types (CreateDBCatalog.sql):
...
alter session set "_oracle_script"=true;
alter pluggable database pdb$seed close;
alter pluggable database pdb$seed open;
host perl /u01/app/oracle/product/12.1.0.1/dbhome_1/rdbms/admin/catcon.pl
-n 1 -l /u01/app/oracle/admin/CDB3/scripts -b catalog
/u01/app/oracle/product/12.1.0.1/dbhome_1/rdbms/admin/catalog.sql;
host perl /u01/app/oracle/product/12.1.0.1/dbhome_1/rdbms/admin/catcon.pl
-n 1 -l /u01/app/oracle/admin/CDB3/scripts -b catblock
/u01/app/oracle/product/12.1.0.1/dbhome_1/rdbms/admin/catblock.sql;
...
the scripts creating the dictionary are documented in the Oracle Database reference 12.1 manual, in
appendix b on “sQl scripts.”
Note
As you can see the scripts we used to run while directly connected to the database have changed and are
channeled via the catcon.pl Perl script. This is the reason for setting the perl environment variables in the top-level
shell script. The purpose of the script is to execute one or more scripts in a CDB, or within one or more PDBs. The
parameters specified in the snippet shown above indicate that:
/u01/app/oracle/admin/CDB3/scripts should be used for log files
The directory
The log file base name is indicated as the argument to the option “-b” (catalog for example)
Followed by the file to be executed
The catcon.pl script is often involved when dictionary scripts are executed in a CDB. It is potentially very useful
and thankfully Oracle documented it in the Administrator's Guide in Chapter 40 in section “Running Oracle Supplied
SQL scripts in a CDB”.
The creation process takes a little while depending on the options you need to be present in the Container
Database. As with most things in life, less is more, which is especially true with Oracle databases. Not only does the
execution of each additional dictionary script take more time, it also opens the door for exploits. If your application
does not make use of the InterMedia or Spatial options for example, don't add the options to the database. In releases
before Oracle 12.1 one could also argue that any component in the data dictionary that wasn't needed used up
 
Search WWH ::




Custom Search