20.2 Installing DBMS_CLOUD
To use the DBMS_CLOUD family of packages on a
customer-managed Oracle Database, you must create a new user and install
DBMS_CLOUD packages as that user.
To use the DBMS_CLOUD family of packages on a customer-managed Oracle
Database, you must create a new user and install the DBMS_CLOUD family of
packages as that user. These instructions provide information about installing on the
following platforms:
- Multitenant Container databases (CDB) with Pluggable Databases (PDBs)
- Standalone Non-CDB databases
Choose "Installing DBMS_CLOUD on CDBs with PDBs" if your database is a CDB with one or more PDBs. Choose "Installing DBMS_CLOUD on Standalone Non-CDBs" if your database is a non-CDB instance.
General notes for both CDB/PDB and non-CDB installations
To complete installation successfully, review the following:
The default DBMS_CLOUD installation is owned by the schema
C##CLOUD$SERVICE. The schema is locked by default to prevent direct
connections. You cannot change the owning schema.
When a Release Update (RU) includes a new DBMS_CLOUD deployment, rerun the
installation on the databases where you need access. The procedure is idempotent; you do not
need to uninstall first. However, when you re-install the code in a database with a previous
installations, some errors are to be expected, especially the existence of schema
C##CLOUD$SERVICE and several control tables.
Examples:
...
create user C##CLOUD$SERVICE no authentication account lock
*
ERROR at line 1:
ORA-01920: user name 'C##CLOUD$SERVICE' conflicts with another user or role name
CREATE TABLE dbms_cloud_config_param$
*
ERROR at line 1:
ORA-00955: name is already used by an existing object
```
The DBMS_CLOUD code and installation scripts are part of the Oracle
software distribution. Do not modify these scripts:
catclouduser.sql: Creates the schemaC##CLOUD$SERVICEwith the necessary privileges.dbms_cloud_install.sql: Installs theDBMS_CLOUDpackages in schemaC##CLOUD$SERVICE.
If install logs show any error, or if you have any invalid objects owned by
C##CLOUD$SERVICE, analyze and correct these issues. If you find any error
that you cannot correct, then please contact Oracle Support.
- Installing DBMS_CLOUD on CDBs with PDBs
Use this procedure if your database is a CDB with one or more PDBs. - Installing DBMS_CLOUD on Standalone Non-CDBs
Use this procedure if your database is a non-CDB.
Parent topic: DBMS_CLOUD Family of Packages
20.2.1 Installing DBMS_CLOUD on CDBs with PDBs
Use this procedure if your database is a CDB with one or more PDBs.
Use catcon.pl to ensure correct installation into existing and future
PDBs. The installation temporarily opens all pluggable databases. The prior state of each
PDB is retained after installation.The Perl script catcon.pl is used to run
Oracle-supplied SQL scripts within a CDB. For details, see:
In the following example, the DBMS_CLOUD packages are
installed, and the log files are configured to be created in the /tmp
directory with the prefix dbms_cloud_install:
-
Create the
C##CLOUD$SERVICEschema in your Container database usingcatcon.pl. The following example creates log files in the/tmpdirectory with a prefix ofdbms_cloud_install:$ORACLE_HOME/perl/bin/perl $ORACLE_HOME/rdbms/admin/catcon.pl -u sys/your-password -force_pdb_mode 'READ WRITE' -b dbms_cloud_install -d $ORACLE_HOME/rdbms/admin/ -l /tmp catclouduser.sql -
Install the DBMS_CLOUD packages:
$ORACLE_HOME/perl/bin/perl $ORACLE_HOME/rdbms/admin/catcon.pl -u sys/your-password -force_pdb_mode 'READ WRITE' -b dbms_cloud_install -d $ORACLE_HOME/rdbms/admin/ -l /tmp dbms_cloud_install.sql -
After the installation is complete, do the following:
-
Review the
catcon.pllog files for errors. For example, you should see the packageDBMS_CLOUDcreated and valid in bothROOTandSYS.In
ROOT:select con_id, owner, object_name, status, sharing, oracle_maintained from cdb_objects where object_name like 'DBMS_CLOUD%';In each open PDB:
select owner, object_name, status, sharing, oracle_maintained from dba_objects where object_name like 'DBMS_CLOUD%';
-
Parent topic: Installing DBMS_CLOUD
20.2.2 Installing DBMS_CLOUD on Standalone Non-CDBs
Use this procedure if your database is a non-CDB.
In a non-CDB database, there is no CDB root and PDB structure, so
catcon.pl multiple times is unnecessary. Run the scripts once in the
single database instance.
The provided scripts create and use the C##CLOUD$SERVICE schema. Do not
try to install the family of packages into a different schema.
In this example, DBMS_CLOUD is installed using SQL*Plus.
-
Start SQL*Plus and connect as
SYSDBA:sqlplus sys/your-passwordas sysdba -
Create the
C##CLOUD$SERVICEschema:SPOOL /tmp/dbms_cloud_install_catclouduser.log @catclouduser.sql SPOOL OFF -
Install the DBMS_CLOUD packages:
SPOOL /tmp/dbms_cloud_install_dbms_cloud_install.log @dbms_cloud_install.sql SPOOL OFF EXIT -
After the installation is complete, do the following:
-
Review the spool log files for errors.
-
Verify that the packages are created and valid:
select owner, object_name, status from dba_objects where object_name like 'DBMS_CLOUD%';
-
Parent topic: Installing DBMS_CLOUD