7. Manual Provisioning
• Create from PDB seed
CREATE PLUGGABLE DATABASE pdbname ADMIN USER
pdbadmin IDENTIFIED BY password
• Cloning an existing PDB
CREATE PLUGGABLE DATABASE pdbclone FROM
pdbsource
• Plugging in an unplugged PDB
CREATE PLUGGABLE DATABASE USING ‘pdb.xml’
• Migrate non-CDB to a PDB
– DBMS_PDB
– Data Pump
7
@leight0nn
http://pdbss.oracledb12c.com:8080/ords/fp?=pdbss
6/24/14
8. Manual Provisioning
• Drop PDB
DROP PLUGGABLE DATABASE pdbname
• Unplug PDB
ALTER PLUGGABLE DATABASE pdbname
UNPLUG INTO ‘pdb.xml’
• Open/Close
ALTER PLUGGABLE DATABASE pdbname
OPEN/CLOSE
8
@leight0nn
http://pdbss.oracledb12c.com:8080/ords/fp?=pdbss
6/24/14
10. Oracle Multitenant Self-Service
Provisioning – BETA 2
• APEX App available on OTN
• Provisions PDBs using PL/SQL API on top of
APEX.
• Customizable
– Quotas
– Security
– DB Size
10
@leight0nn
http://pdbss.oracledb12c.com:8080/ords/fp?=pdbss
6/24/14
11. Oracle Multitenant Self Service APEX
Setup
• Install Oracle Database 12c
• Create new container database
• Upgrade APEX to 4.2.3+
• Configure RESTful Web Services in CDB
• Unlock APEX_PUBLIC_USER
• Grant permissions on containers to APEX users
• Download and Configure APEX Listener 2.0.4+
(Oracle REST Data Services)
• Start APEX Listener in Standalone Mode
11
@leight0nn
http://pdbss.oracledb12c.com:8080/ords/fp?=pdbss
6/24/14
12. Oracle Multitenant Self Service APEX
Setup
• Create a new 12c container database
12
@leight0nn
http://pdbss.oracledb12c.com:8080/ords/fp?=pdbss
6/24/14
13. Oracle Multitenant Self Service APEX
Setup
• Upgrade APEX to 4.2.3+
– Download and apply Oracle Application Express
patch 17347169 from My Oracle Support. This
patch will upgrade Application Express to release
4.2.3.00.08.
– Recommended to apply latest patch 4.2.5.00.08
(patch no. 17966818)
-For APEX 4.1 and below Install APEX 4.2.5 Full
installer (OTN)
13
@leight0nn
http://pdbss.oracledb12c.com:8080/ords/fp?=pdbss
6/24/14
14. Oracle Multitenant Self Service APEX
Setup
• Configure RESTful Web Services in CDB
– cd patch (the directory from Step 3 above)
– Connect as SYS as SYSDBA to CDB$ROOT
– @apex_rest_config_con.sql
– When prompted, enter passwords for the
APEX_LISTENER and APEX_REST_PUBLIC_USER
database users that will be created.
14
@leight0nn
http://pdbss.oracledb12c.com:8080/ords/fp?=pdbss
6/24/14
15. Oracle Multitenant Self Service APEX
Setup
• Unlock APEX_PUBLIC_USER
– Connect as SYS as SYSDBA to CDB$ROOT
– alter user APEX_PUBLIC_USER identified by
"<replace_with_password>" account unlock;
15
@leight0nn
http://pdbss.oracledb12c.com:8080/ords/fp?=pdbss
6/24/14
16. Oracle Multitenant Self Service APEX
Setup
• Grant permissions on containers to APEX users
– Connect as SYS as SYSDBA to CDB$ROOT
– grant set container to APEX_PUBLIC_USER
container=all;
– grant set container to APEX_REST_PUBLIC_USER
container=all;
– grant set container to APEX_LISTENER
container=all;
16
@leight0nn
http://pdbss.oracledb12c.com:8080/ords/fp?=pdbss
6/24/14
17. Oracle Multitenant Self Service APEX
Setup
• Download and Configure APEX Listener 2.0.4+
– unzip apex_listener.<version>.zip (ords.zip)
– Change your working directory to where you unzipped the
software
– java -jar apex.war
or
– java –jar ords.war
17
@leight0nn
http://pdbss.oracledb12c.com:8080/ords/fp?=pdbss
6/24/14
18. Oracle Multitenant Self Service APEX
Setup
• Start APEX Listener in Standalone Mode
– java -jar apex.war
– Supply the full file system path to the Application
Express images directory from the patch set from
Step 3
– Choose an available network port (for example,
8080)
– Confirm that you can access the URL listed at the
end of the apex.war console output using a web
browser
18
@leight0nn
http://pdbss.oracledb12c.com:8080/ords/fp?=pdbss
6/24/14
35. Summary
• Consolidated database environment
• Fast database provisioning
• Self-Service
• Ideal for Test/Development Environments
• No need for complex tools
• Does not manage or monitor PDBs
– configure EM12c Express
35
@leight0nn
http://pdbss.oracledb12c.com:8080/ords/fp?=pdbss
6/24/14
Oracle database 12c multitenant supported in since SQL Developer 3.2.
PL/SQL API created as packages in SYS schema. pdbss_provisioning, pdbss_provisioning_internal.
APEX Workspace – ORACLE_PDB_SELF_SERVICE
APEX Schema owner C##PDBMGR
PDBSS installed in CDB$ROOT. Beta1 installed in PDB.
Use Advanced Mode to Create an empty Container Database
Character set should be set to Unicode (AL32UTF8)
Oracle Database 12c included APEX 4.2.0 by default
If you use the latest version of APEX listener replace apex_listener.jar with ords.jar
SMTP setting doesn’t support TLS!
May be possible to configure SMTP relay.