Databases for the Masses:
Self-Service Oracle Multitenant with
APEX
Leighton L. Nelson
Who am I?
• Oracle DBA
• Oracle ACE
• Oracle Certified Expert RAC and Grid
Infrastructure Administrator 11gR2
• Co-Author Expert Oracle Enterprise
Manager Cloud Control 12c (Apress
2013)
• Speaker at RMOUG, IOUG Collaborate,
ODTUG KScope, Oracle OpenWorld
• Blogs, Social Media
• RAC Attack Ninja
2
@leight0nn
http://pdbss.oracledb12c.com:8080/ords/fp?=pdbss
6/24/14
Agenda
• Oracle Multitenant Overview
• Manual Provisioning
• Oracle Multitenant Self Service Apex Setup
• Self-Service Provisioning Demo
• Summary
3
@leight0nn
http://pdbss.oracledb12c.com:8080/ords/fp?=pdbss
6/24/14
Oracle Multitenant Overview
4
@leight0nn
http://pdbss.oracledb12c.com:8080/ords/fp?=pdbss
6/24/14
Oracle Multitenant Overview
5
@leight0nn
http://pdbss.oracledb12c.com:8080/ords/fp?=pdbss
6/24/14
• High consolidation density
• Rapid provisioning and cloning
• Rapid patching and upgrades
• Manage many databases as one
• Dynamic resource management between
pluggable database
Manual Provisioning
6
@leight0nn
http://pdbss.oracledb12c.com:8080/ords/fp?=pdbss
6/24/14
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
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
Manual Provisioning
9
@leight0nn
http://pdbss.oracledb12c.com:8080/ords/fp?=pdbss
6/24/14
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
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
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
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
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
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
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
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
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
Oracle Multitenant Self Service APEX
Setup
• Install PDBSS application
SQL> @pdbss_ins.sql
. Oracle Multitenant Self-Service Provisioning
..............................................
19
@leight0nn
http://pdbss.oracledb12c.com:8080/ords/fp?=pdbss
6/24/14
Oracle Multitenant Self Service APEX
Setup
• Login to APEX app as ADMIN
20
@leight0nn
http://pdbss.oracledb12c.com:8080/ords/fp?=pdbss
6/24/14
Self-Service Provisioning Demo
DEMO TIME
21
@leight0nn
http://pdbss.oracledb12c.com:8080/ords/fp?=pdbss
6/24/14
Self-Service Provisioning Demo
22
@leight0nn
http://pdbss.oracledb12c.com:8080/ords/fp?=pdbss
6/24/14
Self-Service Provisioning Demo
• Administration
23
@leight0nn
http://pdbss.oracledb12c.com:8080/ords/fp?=pdbss
6/24/14
Self-Service Provisioning Demo
• Configure SMTP settings
24
@leight0nn
http://pdbss.oracledb12c.com:8080/ords/fp?=pdbss
6/24/14
Self-Service Provisioning Demo
• Update Admin Email Address
25
@leight0nn
http://pdbss.oracledb12c.com:8080/ords/fp?=pdbss
6/24/14
Self-Service Provisioning Demo
• Request Access
26
@leight0nn
http://pdbss.oracledb12c.com:8080/ords/fp?=pdbss
6/24/14
Self-Service Provisioning Demo Mode
27
@leight0nn
http://pdbss.oracledb12c.com:8080/ords/fp?=pdbss
6/24/14
Self-Service Provisioning Demo
28
@leight0nn
http://pdbss.oracledb12c.com:8080/ords/fp?=pdbss
6/24/14
Self-Service Provisioning Demo
29
@leight0nn
http://pdbss.oracledb12c.com:8080/ords/fp?=pdbss
6/24/14
Self-Service Provisioning Demo
30
@leight0nn
http://pdbss.oracledb12c.com:8080/ords/fp?=pdbss
6/24/14
Self-Service Provisioning Demo
31
@leight0nn
http://pdbss.oracledb12c.com:8080/ords/fp?=pdbss
6/24/14
Self-Service Provisioning Demo
32
@leight0nn
http://pdbss.oracledb12c.com:8080/ords/fp?=pdbss
6/24/14
Database Management
• PDBSS ONLY does provisioning
– No monitoring
– No DBA management
• SQL Developer 4.0
• Manually configure EM12c Express for PDBs
– Requires EM_EXPRESS_ALL or EM_EXPRESS_BASIC
33
@leight0nn
http://pdbss.oracledb12c.com:8080/ords/fp?=pdbss
6/24/14
Database Management
34@leight0nn
http://pdbss.oracledb12c.com:8080/ords/fp?=pdbss
6/24/14
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
Summary
36
@leight0nn
http://pdbss.oracledb12c.com:8080/ords/fp?=pdbss
6/24/14
Thank you
Questions?
37
@leight0nn
http://pdbss.oracledb12c.com:8080/ords/fp?=pdbss
6/24/14
Contact
@leight0nn
http://pdbss.oracledb12c.com:8080/ords/fp?=pdbss
386/24/14
http://blogs.griddba.com
linkedin.com/pub/leighton-nelson/4/6b8/a7a
@leight0nn
leightonn@gmail.com
References
• Oracle Multitenant Option - 12c : Frequently
Asked Questions (Doc ID 1511619.1)
• Oracle® Database Administrator's Guide 12c
Release 1 (12.1)
@leight0nn
http://pdbss.oracledb12c.com:8080/ords/fp?=pdbss
396/24/14

PDB Provisioning with Oracle Multitenant Self Service Application

Editor's Notes

  • #10 Oracle database 12c multitenant supported in since SQL Developer 3.2.
  • #11 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
  • #12 PDBSS installed in CDB$ROOT. Beta1 installed in PDB.
  • #13 Use Advanced Mode to Create an empty Container Database Character set should be set to Unicode (AL32UTF8)
  • #14 Oracle Database 12c included APEX 4.2.0 by default
  • #18 If you use the latest version of APEX listener replace apex_listener.jar with ords.jar
  • #25 SMTP setting doesn’t support TLS! May be possible to configure SMTP relay.
  • #35 https://blogs.oracle.com/dba/entry/how_to_configure_em_express