Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
1
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
2
Application Express with
Oracle Database 12c
Multitenant Architecture
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
3 Source: Gartner Top Five Trends for Private Cloud Computing, February 2012, Thomas J Bittman
The following is intended to outline Oracle’s general
product direction. It is intended for information
purposes only, and may not be incorporated into any
contract. It is not a commitment to deliver any
material, code, or functionality, and should not be
relied upon in making purchasing decisions.
The development, release, and timing of any
features or functionality described for Oracle’s
products remain at the sole discretion of Oracle.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
4
Database Cloud & Consolidation Architectures
Multiple DB
Instances
Schema
Consolidation
Share servers
and OS with
“DB Instance Isolation”
Virtual
Machines
Share servers
with
“VM isolation”
NEW DB 12c
Multitenant
Share servers, OS
and database with
“Pluggable DB Isolation”
Share servers, OS
and database with
“Schema Isolation”
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
5
 Customers have 100s or 1000s of databases across their
enterprise
 They want to lower costs by operating these databases on a
centrally managed platform
 With only hardware consolidation, each database has an overhead,
that prevents 100s of database from being placed on the same
physical server
The need for Database Consolidation
Why?
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
6
DW
ERP
CRM
BI
 No change to applications
 No performance degradation
 Centralized resource
management
 Isolation between
environments
 Simplify patching and
upgrades
Database Consolidation Requirements
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
7
Isolation and multitenancy
Fast provisioning and cloning
Secure and highly available
No application changes
Manage many as one
Greater resource utilization
Performant and scalable
Lower IT costs
Consolidating Databases on Clouds
Key requirements…
12.1
12.1
12.1
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
8
 Oracle Database 12c lets you have many
pluggable databases (PDBs)
in a single multitenant container database (CDB)
 PDBs share common resources
 The application connects to the PDB and sees it just like
a pre-12c database
 The system administrator connects to the CDB as a whole
and sees a single system image
Multitenant Architecture + Pluggable Databases
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
9
Oracle Database Architecture
Each Databases requires memory, processes and database files
System Resources
ERP
Memory
Background
Processes
Database
Files
CRM
Memory
Background
Processes
Database
Files
DW
Memory
Background
Processes
Database
Files
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
10
Container Database
New Multitenant Architecture
Memory and processes required at container level only
ERP
Memory
Background
Processes
Database
Files
System Resources
CRM
Memory
Background
Processes
Database
Files
DW
Memory
Background
Processes
Database
Files
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
11
New Multitenant Architecture
Memory and processes shared and managed at container level
System Resources
Container Database
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
12
Managing Shared Resources
Resource management for consolidated databases
Container Database
High Priority
Medium Priority
Low Priority
DW
CRM
ERP
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
13
OLTP benchmark comparison
Only 3GB of memory vs. 20GB
memory used for 50 databases
Pluggable databases scaled to
over 250 while separate
database instances maxed at 50
Pluggable vs Separate Databases
Highly Efficient: 6x Less H/W Resource, 5x more Scalable
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
14
Manage Many Databases as One
Backup databases as one, recover at pluggable database Level
DW
12.1
CRM
12.1
ERP
12.1
One Backup
Point-in-time recovery
at pluggable database level
Container Database
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
15
Production Container Database
Manage Many Databases as One
One standby database covers all pluggable databases
HCM
12.1
DW
12.1
CRM
12.1
ERP
12.1
Standby Container Database
HCM
12.1
DW
12.1
CRM
12.1
ERP
12.1
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
16
Simplified Patching
Apply changes once, all pluggable databases updated
Upgrade
in-place
Container Database
DW
12.1
CRM
12.1
ERP
12.1
12.X
12.X
12.X
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
17
Simplified Upgrades
Flexible choice when patching & upgrading databases
Original Container Database (12.1) Upgraded Container Database (12.X)
DW
12.1
CRM
12.1
ERP
12.1
DW
12.X
CRM
12.X
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
18
Production Container Database Development Container Database
Creating Databases for Test and Development
Fast, flexible copy and snapshot of pluggable databases
DW
12.1
CRM
12.1
ERP
12.1
ERP
Dev
Copy
ERP
Dev
Copy
ERP
Dev
Copy
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
19
DW
ERP
CRM
BI
 Reduced TCO
• Administrative costs
• Operational costs
• Data Center costs
• Storage costs
• Contingency costs
 Improved …
• Resource utilization
• Manageability
• Service Management
Oracle Database 12c Multitenant Architecture
Benefits
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
20
Oracle Database 12c
Alternative Architectures
Business Value
Many databases
on
one machine
Many databases
as schemas in one
database
Many databases
as PDBs
in one CDB
Implementation Easy Difficult* Easy
Isolation Highest Limited High
Availability High Highest Highest
Scalability Limited High High
Performance Low High High
Resource management Fair Severely limited Excellent
ROI Low High Highest
* Need to validate application schemas can co-exist
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
21
Isolation and multitenancy
Fast provisioning and cloning
Secure and highly available
No application changes
Manage many as one
Greater resource utilization
Performant and scalable
Lower IT costs
New Multitenant Architecture for Consolidating
Databases
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
22
Pluggable Database
 A PDB feels and operates identically
to a non-CDB Database
 You cannot tell, from the viewpoint of a
connected client, if you’re using a PDB
or a non-CDB Database
 A new PDB can be created in seconds
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
23
Pluggable Database
Simply unplug…
 Moving between CDBs is a simple
case of moving a PDBs metadata
 PDBs can be moved using
• SQL Developer
• Enterprise Manager 12c
• SQL commands
• Database Configuration Assistant
(DBCA)
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
24
Pluggable Databases
And if you can have one…
 The Pluggable Databases
architecture can currently
support up to 252 PDBs
in a single CDB Database
 You can utilize Database Links
between PDBs and between
PDBs and non-CDB databases
Database Link
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
25
Shared Resources
 Background processes
 Shared/process memory
 Oracle metadata
 Control files
 Redo Log files
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
26
Files in PDBs
 Each PDB has its own set of
tablespaces including SYSTEM
and SYSAUX
 PDBs share UNDO, REDO
and control files
 By default the CDB has a single TEMP
tablespace, but PDBs may create their
own
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
27
Users
 PDB Users are the successors for users
in a non-CDB
 Local users can administer PDBs
 A special class of users “Common
Users” has the same identity in all PDBs
 Common users can log into any
database they have “create session”
privilege for
 Common users own the Oracle system
 PDBs can be administered by a
common user, too
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
28
Application Express
in
Oracle Database 12c
Multitenant
Architecture
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
29
Standard “Default” 12c Installation
Application Express 4.2 installed in CDB (Container DB)
Root
PDB
Seed
 APEX 4.2 is installed into CDB$Root and PDB$Seed
APEX_040200 Schema
Views,
Packages,
Functions,
Procedures
Local Tables
(APEX
meta-data for
*that* PDB)
APEX_
040200
APEX_
040200
APEX_
040200
Meta-data Links
APEX_
040200
 Each PDB contains meta-data linked objects to APEX Schema in Root
 Each PDB also has an APEX Schema which holds local tables
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
30
Standard 12c Installation
Creating a new PDB from seed
Root
PDB
Seed
 PDBs created by copying PDB$Seed
APEX_040200 Schema
APEX_
040200
APEX_
040200
APEX_
040200
APEX_
040200
APEX_
040200
 New PDB includes Local Tables and Meta-data links to Root objects
 Web Listener *must* be configured for each PDB {each with unique port}
Meta-data Link
Local Tables
(APEX
meta-data for
*that* PDB)
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
31
Removing Common Application Express
Uninstalling Application Express 4.2 from the CDB
Root
No
APEX
1) Post-installation run apxremov_con.sql* to remove from CDB,
PDB Seed and all PDB’s {*DB Patch 16946990 required}
All existing APEX meta-data within all of the PDBs will be removed
PDB
Seed No
APEX
No
APEX
No
APEX
APEX_040200 Schema
APEX_
040200
APEX_
040200
APEX_
040200
APEX_
040200
No
APEX
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
32
Non-Standard Configuration
Installing Different Versions into PDBs
Root
No
APEX
APEX_
040200
APEX_
050000
No
APEX
1) Uninstall Application Express from the CDB
PDB
Seed
2) Log into PDB, run apexins.sql or apxrtins.sql
Can install different versions of APEX (> Release 4.2) into any PDB
No
APEX
No
APEX
APEX_040200 Schema
APEX_
040200
APEX_
040200
APEX_
040200
APEX_
040200
No
APEX
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
33
Re-Installing into Root Database
Application Express 4.2 *removed* and then reinstalled into CDB
1) Uninstall Application Express from the CDB
Root
PDB
Seed No
APEX
No
APEX
No
APEX
APEX_
040200
Runtime
No
APEX
2) Run script apexins_con.sql or apxrtins_con.sql
Use this technique to install runtime only Application Express in CDB
Installs in Root, PDB$Seed and all PDBs, also creates meta-data links
APEX_040200 Schema
APEX_
040200
APEX_
040200
APEX_
040200
APEX_
040200
APEX_040200 Runtime Schema
APEX_
040200
Runtime
APEX_
040200
Runtime
APEX_
040200
Runtime
APEX_
040200
Runtime
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
34
Migrating from Oracle Database 11g to PDB
1) Upgrade 11g database to 12.1 in place
2) Place the non-CDB into read only mode
3) Connect to non-CDB and generate an
XML Metadata file
4) Shutdown the non-CDB
5) Plug in non-CDB to CDB
6) Run noncdb_to_pdb.sql 
Replaces local APEX_040200 schema
objects with meta-data linked objects
{If APEX configured in CDB$Root}
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
35
Moving/Copying PDBs Between 12c Databases
From APEX IN CDB$Root  APEX IN CDB$Root
Root
1) Move / copy PDB
Root APEX_040200 Schema
APEX_040200 Schema
APEX_
040200
APEX_
040200
APEX_
040200
APEX_
040200
APEX_
040200
2) Configure Web Listener for new PDB {Must specify a unique port}
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
36
Moving/Copying PDBs Between 12c Databases
From APEX NOT IN CDB$Root  APEX IN CDB$Root
Root Root APEX_040200 Schema
APEX_
040200
APEX_
040200
APEX_
040200
APEX_
040200
1) Move / copy PDB (…)
Application Express installed differently in source and target databases
APEX_
040200
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
37
Moving/Copying PDBs Between 12c Databases
From APEX NOT IN CDB$Root  APEX IN CDB$Root
Root
2) Run apex_to_common.sql in PDB to create meta-data links
Root APEX_040200 Schema
APEX_
040200 APEX_
040200
APEX_
040200
APEX_
040200
APEX_
040200
3) Configure Web Listener for new PDB
APEX_
040200
APEX_
040200
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
38
Moving/Copying PDBs Between 12c Databases
No APEX  APEX IN CDB$Root
Root Root APEX_040200 Schema
APEX_
040200
1) Run apexins.sql on PDB while in Source database (…)
Need to install before moving as can’t be installed into PDB when in Root
APEX_
040200
APEX_
040200
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
39
Moving/Copying PDBs Between 12c Databases
No APEX  APEX IN CDB$Root
Root Root APEX_040200 Schema
APEX_
040200
APEX_
040200 APEX_
040200
APEX_
040200
2) Move / copy PDB (…)
Now that Application Express is in source database it is ready to move
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
40
Moving/Copying PDBs Between 12c Databases
No APEX  APEX IN CDB$Root
Root
3) Run apex_to_common.sql in PDB to create meta-data links
Root APEX_040200 Schema
APEX_
040200 APEX_
040200
APEX_
040200
APEX_
040200
4) Configure Web Listener for new PDB
APEX_
040200
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
41
Moving/Copying PDBs Between 12c Databases
From APEX NOT IN CDB$Root  APEX NOT IN CDB$Root
Root Root
APEX_
040200
APEX_
040200
1) Move / copy PDB
2) Configure Web Listener for new PDB
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
42
Moving/Copying PDBs Between 12c Databases
From APEX IN CDB$Root  APEX NOT IN CDB$Root
Root
 Contact Oracle Support
APEX_040200 Schema Root
APEX_
040200
APEX_
040200
APEX_
040200
 Special version specific apex_to_local.sql scripts available
APEX_
040200
X
APEX_
040200
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
43
Root Root APEX_yyyyyy Schema
APEX_xxxxxx Schema
1) Run apxpatch_con.sql or apexins_con.sql
in target CDB to upgrade CDB Root to be the same as the source
APEX_
xxxxxx
APEX_
xxxxxx
APEX_
yyyyyy
APEX_
yyyyyy
APEX_
xxxxxx
Moving/Copying PDBs Between 12c Databases
Incompatible Versions: Higher Release  Lower Release (x > y)
2) Move / copy PDB {Perform other steps, such as configure Web Listener}
APEX_xxxxxx Schema
APEX_
xxxxxx
APEX_
xxxxxx
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
44
Root Root APEX_yyyyyy Schema
APEX_xxxxxx Schema
1) Move / copy PDB
APEX_
xxxxxx
APEX_
xxxxxx
APEX_
yyyyyy
APEX_
yyyyyy
APEX_
xxxxxx
Moving/Copying PDBs Between 12c Databases
Incompatible Versions: Lower Release  Higher Release (x < y)
2) Run catcon.pl in new PDB to upgrade to the same release as
in the target CDB Root installation {See Installation Guide for syntax}
APEX_
yyyyyy
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
45
Upgrading / Patching Application Express
Root
 Run container scripts, such as
apexins_con.sql, in CDB
Perform update / patch ONCE
for CDB and all PDBs
APEX_040200 Schema Root
APEX_
040200
{4.2.0}
APEX_
040200
{4.2.2}
 Run standard scripts, such as
apexins.sql, in PDBs
Perform update / patch on
EACH PDB separately &
independently
APEX_
040200
APEX_
040200
APEX IN CDB$Root versus APEX NOT IN CDB$Root
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
46
Oracle Database 12c
New Features
Important to
Application Express
Developers
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
47
New Feature - Varchar2 32K
 12c Database Parameter – max_string_size
• STANDARD [Default] = 4000 byte/character limit (Pre-12c
behavior)
• EXTENDED = 32767 byte/character limit
 After changing parameter must bounce database
 Can specify textfield or textarea sizes up to 32K (32767)
 Can run /core/collection_member_resize.sql to change collection
VARCHAR2 columns from 4000 characters to 32767 characters
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
48
 Default values are utilized when inserting a record if column
not specified in the insert statement
 With ON NULL will use default even if specified in the insert statement
 If you specify a value explicitly it will not use default
 Avoids the need for trigger logic
New Feature - Default | Default On Null
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
49
 Use Identity Columns instead of specifying a Sequence and using
triggers / processes to retrieve the next value from the sequence
• ALWAYS [Default] – Uses the sequence generator
• BY DEFAULT – Can explicitly assign a specified value
• BY DEFAULT ON NULL – Can explicitly assign,
but uses sequence if evaluates to NULL
 SQL Workshop  Can specify Identity in Create Table Wizard
 Create Form / Report Wizard  Creates correct item type {display only}
New Feature - Identity Column
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
50
New Feature - Invisible Column
 Invisible columns are *user specified* hidden columns
• SELECT *  Won’t display invisible columns
• INSERT INTO x VALUES Won’t insert values in invisible columns
• Must explicitly specify invisible columns to include them
 SQL Workshop  Not shown in Object Browser, Query Builder, etc.
 Create Form / Report Wizards  Columns won’t be shown
 Must manually add to Source within APEX Region (post-generation)
to view in Reports, etc.
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
51
 FETCH returns top ‘N’ records
 Can specify rows or percentage,
 Can include OFFSET to skip specified number of rows
 Respects ORDER BY clause
New Feature - Limiting Rows from SQL Query
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
52
Soc. Sec. #
115-69-3428
DOB
11/06/71
PIN
5623
Policy
enforced
redaction of
sensitive data
New Feature - Data Redaction
Mask Application Data Dynamically
Call Center
Operator
Payroll
Processing
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
53
Proof Point - ARIA People
1st
“Production” application on Oracle Database 12c
 Written in Application Express
 Used by virtually every
employee in Oracle
 >1.3 million page views / day
 > 60 page views / sec
 Median execution time
0.05 seconds
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
54
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
55
Copyright © 2013, Oracle and/or its affiliates. All rights reserved.
56

apex-42-in-12c-1970039.pptx apex oracle

  • 1.
    Copyright © 2013,Oracle and/or its affiliates. All rights reserved. 1
  • 2.
    Copyright © 2013,Oracle and/or its affiliates. All rights reserved. 2 Application Express with Oracle Database 12c Multitenant Architecture
  • 3.
    Copyright © 2013,Oracle and/or its affiliates. All rights reserved. 3 Source: Gartner Top Five Trends for Private Cloud Computing, February 2012, Thomas J Bittman The following is intended to outline Oracle’s general product direction. It is intended for information purposes only, and may not be incorporated into any contract. It is not a commitment to deliver any material, code, or functionality, and should not be relied upon in making purchasing decisions. The development, release, and timing of any features or functionality described for Oracle’s products remain at the sole discretion of Oracle.
  • 4.
    Copyright © 2013,Oracle and/or its affiliates. All rights reserved. 4 Database Cloud & Consolidation Architectures Multiple DB Instances Schema Consolidation Share servers and OS with “DB Instance Isolation” Virtual Machines Share servers with “VM isolation” NEW DB 12c Multitenant Share servers, OS and database with “Pluggable DB Isolation” Share servers, OS and database with “Schema Isolation”
  • 5.
    Copyright © 2013,Oracle and/or its affiliates. All rights reserved. 5  Customers have 100s or 1000s of databases across their enterprise  They want to lower costs by operating these databases on a centrally managed platform  With only hardware consolidation, each database has an overhead, that prevents 100s of database from being placed on the same physical server The need for Database Consolidation Why?
  • 6.
    Copyright © 2013,Oracle and/or its affiliates. All rights reserved. 6 DW ERP CRM BI  No change to applications  No performance degradation  Centralized resource management  Isolation between environments  Simplify patching and upgrades Database Consolidation Requirements
  • 7.
    Copyright © 2013,Oracle and/or its affiliates. All rights reserved. 7 Isolation and multitenancy Fast provisioning and cloning Secure and highly available No application changes Manage many as one Greater resource utilization Performant and scalable Lower IT costs Consolidating Databases on Clouds Key requirements… 12.1 12.1 12.1
  • 8.
    Copyright © 2013,Oracle and/or its affiliates. All rights reserved. 8  Oracle Database 12c lets you have many pluggable databases (PDBs) in a single multitenant container database (CDB)  PDBs share common resources  The application connects to the PDB and sees it just like a pre-12c database  The system administrator connects to the CDB as a whole and sees a single system image Multitenant Architecture + Pluggable Databases
  • 9.
    Copyright © 2013,Oracle and/or its affiliates. All rights reserved. 9 Oracle Database Architecture Each Databases requires memory, processes and database files System Resources ERP Memory Background Processes Database Files CRM Memory Background Processes Database Files DW Memory Background Processes Database Files
  • 10.
    Copyright © 2013,Oracle and/or its affiliates. All rights reserved. 10 Container Database New Multitenant Architecture Memory and processes required at container level only ERP Memory Background Processes Database Files System Resources CRM Memory Background Processes Database Files DW Memory Background Processes Database Files
  • 11.
    Copyright © 2013,Oracle and/or its affiliates. All rights reserved. 11 New Multitenant Architecture Memory and processes shared and managed at container level System Resources Container Database
  • 12.
    Copyright © 2013,Oracle and/or its affiliates. All rights reserved. 12 Managing Shared Resources Resource management for consolidated databases Container Database High Priority Medium Priority Low Priority DW CRM ERP
  • 13.
    Copyright © 2013,Oracle and/or its affiliates. All rights reserved. 13 OLTP benchmark comparison Only 3GB of memory vs. 20GB memory used for 50 databases Pluggable databases scaled to over 250 while separate database instances maxed at 50 Pluggable vs Separate Databases Highly Efficient: 6x Less H/W Resource, 5x more Scalable
  • 14.
    Copyright © 2013,Oracle and/or its affiliates. All rights reserved. 14 Manage Many Databases as One Backup databases as one, recover at pluggable database Level DW 12.1 CRM 12.1 ERP 12.1 One Backup Point-in-time recovery at pluggable database level Container Database
  • 15.
    Copyright © 2013,Oracle and/or its affiliates. All rights reserved. 15 Production Container Database Manage Many Databases as One One standby database covers all pluggable databases HCM 12.1 DW 12.1 CRM 12.1 ERP 12.1 Standby Container Database HCM 12.1 DW 12.1 CRM 12.1 ERP 12.1
  • 16.
    Copyright © 2013,Oracle and/or its affiliates. All rights reserved. 16 Simplified Patching Apply changes once, all pluggable databases updated Upgrade in-place Container Database DW 12.1 CRM 12.1 ERP 12.1 12.X 12.X 12.X
  • 17.
    Copyright © 2013,Oracle and/or its affiliates. All rights reserved. 17 Simplified Upgrades Flexible choice when patching & upgrading databases Original Container Database (12.1) Upgraded Container Database (12.X) DW 12.1 CRM 12.1 ERP 12.1 DW 12.X CRM 12.X
  • 18.
    Copyright © 2013,Oracle and/or its affiliates. All rights reserved. 18 Production Container Database Development Container Database Creating Databases for Test and Development Fast, flexible copy and snapshot of pluggable databases DW 12.1 CRM 12.1 ERP 12.1 ERP Dev Copy ERP Dev Copy ERP Dev Copy
  • 19.
    Copyright © 2013,Oracle and/or its affiliates. All rights reserved. 19 DW ERP CRM BI  Reduced TCO • Administrative costs • Operational costs • Data Center costs • Storage costs • Contingency costs  Improved … • Resource utilization • Manageability • Service Management Oracle Database 12c Multitenant Architecture Benefits
  • 20.
    Copyright © 2013,Oracle and/or its affiliates. All rights reserved. 20 Oracle Database 12c Alternative Architectures Business Value Many databases on one machine Many databases as schemas in one database Many databases as PDBs in one CDB Implementation Easy Difficult* Easy Isolation Highest Limited High Availability High Highest Highest Scalability Limited High High Performance Low High High Resource management Fair Severely limited Excellent ROI Low High Highest * Need to validate application schemas can co-exist
  • 21.
    Copyright © 2013,Oracle and/or its affiliates. All rights reserved. 21 Isolation and multitenancy Fast provisioning and cloning Secure and highly available No application changes Manage many as one Greater resource utilization Performant and scalable Lower IT costs New Multitenant Architecture for Consolidating Databases
  • 22.
    Copyright © 2013,Oracle and/or its affiliates. All rights reserved. 22 Pluggable Database  A PDB feels and operates identically to a non-CDB Database  You cannot tell, from the viewpoint of a connected client, if you’re using a PDB or a non-CDB Database  A new PDB can be created in seconds
  • 23.
    Copyright © 2013,Oracle and/or its affiliates. All rights reserved. 23 Pluggable Database Simply unplug…  Moving between CDBs is a simple case of moving a PDBs metadata  PDBs can be moved using • SQL Developer • Enterprise Manager 12c • SQL commands • Database Configuration Assistant (DBCA)
  • 24.
    Copyright © 2013,Oracle and/or its affiliates. All rights reserved. 24 Pluggable Databases And if you can have one…  The Pluggable Databases architecture can currently support up to 252 PDBs in a single CDB Database  You can utilize Database Links between PDBs and between PDBs and non-CDB databases Database Link
  • 25.
    Copyright © 2013,Oracle and/or its affiliates. All rights reserved. 25 Shared Resources  Background processes  Shared/process memory  Oracle metadata  Control files  Redo Log files
  • 26.
    Copyright © 2013,Oracle and/or its affiliates. All rights reserved. 26 Files in PDBs  Each PDB has its own set of tablespaces including SYSTEM and SYSAUX  PDBs share UNDO, REDO and control files  By default the CDB has a single TEMP tablespace, but PDBs may create their own
  • 27.
    Copyright © 2013,Oracle and/or its affiliates. All rights reserved. 27 Users  PDB Users are the successors for users in a non-CDB  Local users can administer PDBs  A special class of users “Common Users” has the same identity in all PDBs  Common users can log into any database they have “create session” privilege for  Common users own the Oracle system  PDBs can be administered by a common user, too
  • 28.
    Copyright © 2013,Oracle and/or its affiliates. All rights reserved. 28 Application Express in Oracle Database 12c Multitenant Architecture
  • 29.
    Copyright © 2013,Oracle and/or its affiliates. All rights reserved. 29 Standard “Default” 12c Installation Application Express 4.2 installed in CDB (Container DB) Root PDB Seed  APEX 4.2 is installed into CDB$Root and PDB$Seed APEX_040200 Schema Views, Packages, Functions, Procedures Local Tables (APEX meta-data for *that* PDB) APEX_ 040200 APEX_ 040200 APEX_ 040200 Meta-data Links APEX_ 040200  Each PDB contains meta-data linked objects to APEX Schema in Root  Each PDB also has an APEX Schema which holds local tables
  • 30.
    Copyright © 2013,Oracle and/or its affiliates. All rights reserved. 30 Standard 12c Installation Creating a new PDB from seed Root PDB Seed  PDBs created by copying PDB$Seed APEX_040200 Schema APEX_ 040200 APEX_ 040200 APEX_ 040200 APEX_ 040200 APEX_ 040200  New PDB includes Local Tables and Meta-data links to Root objects  Web Listener *must* be configured for each PDB {each with unique port} Meta-data Link Local Tables (APEX meta-data for *that* PDB)
  • 31.
    Copyright © 2013,Oracle and/or its affiliates. All rights reserved. 31 Removing Common Application Express Uninstalling Application Express 4.2 from the CDB Root No APEX 1) Post-installation run apxremov_con.sql* to remove from CDB, PDB Seed and all PDB’s {*DB Patch 16946990 required} All existing APEX meta-data within all of the PDBs will be removed PDB Seed No APEX No APEX No APEX APEX_040200 Schema APEX_ 040200 APEX_ 040200 APEX_ 040200 APEX_ 040200 No APEX
  • 32.
    Copyright © 2013,Oracle and/or its affiliates. All rights reserved. 32 Non-Standard Configuration Installing Different Versions into PDBs Root No APEX APEX_ 040200 APEX_ 050000 No APEX 1) Uninstall Application Express from the CDB PDB Seed 2) Log into PDB, run apexins.sql or apxrtins.sql Can install different versions of APEX (> Release 4.2) into any PDB No APEX No APEX APEX_040200 Schema APEX_ 040200 APEX_ 040200 APEX_ 040200 APEX_ 040200 No APEX
  • 33.
    Copyright © 2013,Oracle and/or its affiliates. All rights reserved. 33 Re-Installing into Root Database Application Express 4.2 *removed* and then reinstalled into CDB 1) Uninstall Application Express from the CDB Root PDB Seed No APEX No APEX No APEX APEX_ 040200 Runtime No APEX 2) Run script apexins_con.sql or apxrtins_con.sql Use this technique to install runtime only Application Express in CDB Installs in Root, PDB$Seed and all PDBs, also creates meta-data links APEX_040200 Schema APEX_ 040200 APEX_ 040200 APEX_ 040200 APEX_ 040200 APEX_040200 Runtime Schema APEX_ 040200 Runtime APEX_ 040200 Runtime APEX_ 040200 Runtime APEX_ 040200 Runtime
  • 34.
    Copyright © 2013,Oracle and/or its affiliates. All rights reserved. 34 Migrating from Oracle Database 11g to PDB 1) Upgrade 11g database to 12.1 in place 2) Place the non-CDB into read only mode 3) Connect to non-CDB and generate an XML Metadata file 4) Shutdown the non-CDB 5) Plug in non-CDB to CDB 6) Run noncdb_to_pdb.sql  Replaces local APEX_040200 schema objects with meta-data linked objects {If APEX configured in CDB$Root}
  • 35.
    Copyright © 2013,Oracle and/or its affiliates. All rights reserved. 35 Moving/Copying PDBs Between 12c Databases From APEX IN CDB$Root  APEX IN CDB$Root Root 1) Move / copy PDB Root APEX_040200 Schema APEX_040200 Schema APEX_ 040200 APEX_ 040200 APEX_ 040200 APEX_ 040200 APEX_ 040200 2) Configure Web Listener for new PDB {Must specify a unique port}
  • 36.
    Copyright © 2013,Oracle and/or its affiliates. All rights reserved. 36 Moving/Copying PDBs Between 12c Databases From APEX NOT IN CDB$Root  APEX IN CDB$Root Root Root APEX_040200 Schema APEX_ 040200 APEX_ 040200 APEX_ 040200 APEX_ 040200 1) Move / copy PDB (…) Application Express installed differently in source and target databases APEX_ 040200
  • 37.
    Copyright © 2013,Oracle and/or its affiliates. All rights reserved. 37 Moving/Copying PDBs Between 12c Databases From APEX NOT IN CDB$Root  APEX IN CDB$Root Root 2) Run apex_to_common.sql in PDB to create meta-data links Root APEX_040200 Schema APEX_ 040200 APEX_ 040200 APEX_ 040200 APEX_ 040200 APEX_ 040200 3) Configure Web Listener for new PDB APEX_ 040200 APEX_ 040200
  • 38.
    Copyright © 2013,Oracle and/or its affiliates. All rights reserved. 38 Moving/Copying PDBs Between 12c Databases No APEX  APEX IN CDB$Root Root Root APEX_040200 Schema APEX_ 040200 1) Run apexins.sql on PDB while in Source database (…) Need to install before moving as can’t be installed into PDB when in Root APEX_ 040200 APEX_ 040200
  • 39.
    Copyright © 2013,Oracle and/or its affiliates. All rights reserved. 39 Moving/Copying PDBs Between 12c Databases No APEX  APEX IN CDB$Root Root Root APEX_040200 Schema APEX_ 040200 APEX_ 040200 APEX_ 040200 APEX_ 040200 2) Move / copy PDB (…) Now that Application Express is in source database it is ready to move
  • 40.
    Copyright © 2013,Oracle and/or its affiliates. All rights reserved. 40 Moving/Copying PDBs Between 12c Databases No APEX  APEX IN CDB$Root Root 3) Run apex_to_common.sql in PDB to create meta-data links Root APEX_040200 Schema APEX_ 040200 APEX_ 040200 APEX_ 040200 APEX_ 040200 4) Configure Web Listener for new PDB APEX_ 040200
  • 41.
    Copyright © 2013,Oracle and/or its affiliates. All rights reserved. 41 Moving/Copying PDBs Between 12c Databases From APEX NOT IN CDB$Root  APEX NOT IN CDB$Root Root Root APEX_ 040200 APEX_ 040200 1) Move / copy PDB 2) Configure Web Listener for new PDB
  • 42.
    Copyright © 2013,Oracle and/or its affiliates. All rights reserved. 42 Moving/Copying PDBs Between 12c Databases From APEX IN CDB$Root  APEX NOT IN CDB$Root Root  Contact Oracle Support APEX_040200 Schema Root APEX_ 040200 APEX_ 040200 APEX_ 040200  Special version specific apex_to_local.sql scripts available APEX_ 040200 X APEX_ 040200
  • 43.
    Copyright © 2013,Oracle and/or its affiliates. All rights reserved. 43 Root Root APEX_yyyyyy Schema APEX_xxxxxx Schema 1) Run apxpatch_con.sql or apexins_con.sql in target CDB to upgrade CDB Root to be the same as the source APEX_ xxxxxx APEX_ xxxxxx APEX_ yyyyyy APEX_ yyyyyy APEX_ xxxxxx Moving/Copying PDBs Between 12c Databases Incompatible Versions: Higher Release  Lower Release (x > y) 2) Move / copy PDB {Perform other steps, such as configure Web Listener} APEX_xxxxxx Schema APEX_ xxxxxx APEX_ xxxxxx
  • 44.
    Copyright © 2013,Oracle and/or its affiliates. All rights reserved. 44 Root Root APEX_yyyyyy Schema APEX_xxxxxx Schema 1) Move / copy PDB APEX_ xxxxxx APEX_ xxxxxx APEX_ yyyyyy APEX_ yyyyyy APEX_ xxxxxx Moving/Copying PDBs Between 12c Databases Incompatible Versions: Lower Release  Higher Release (x < y) 2) Run catcon.pl in new PDB to upgrade to the same release as in the target CDB Root installation {See Installation Guide for syntax} APEX_ yyyyyy
  • 45.
    Copyright © 2013,Oracle and/or its affiliates. All rights reserved. 45 Upgrading / Patching Application Express Root  Run container scripts, such as apexins_con.sql, in CDB Perform update / patch ONCE for CDB and all PDBs APEX_040200 Schema Root APEX_ 040200 {4.2.0} APEX_ 040200 {4.2.2}  Run standard scripts, such as apexins.sql, in PDBs Perform update / patch on EACH PDB separately & independently APEX_ 040200 APEX_ 040200 APEX IN CDB$Root versus APEX NOT IN CDB$Root
  • 46.
    Copyright © 2013,Oracle and/or its affiliates. All rights reserved. 46 Oracle Database 12c New Features Important to Application Express Developers
  • 47.
    Copyright © 2013,Oracle and/or its affiliates. All rights reserved. 47 New Feature - Varchar2 32K  12c Database Parameter – max_string_size • STANDARD [Default] = 4000 byte/character limit (Pre-12c behavior) • EXTENDED = 32767 byte/character limit  After changing parameter must bounce database  Can specify textfield or textarea sizes up to 32K (32767)  Can run /core/collection_member_resize.sql to change collection VARCHAR2 columns from 4000 characters to 32767 characters
  • 48.
    Copyright © 2013,Oracle and/or its affiliates. All rights reserved. 48  Default values are utilized when inserting a record if column not specified in the insert statement  With ON NULL will use default even if specified in the insert statement  If you specify a value explicitly it will not use default  Avoids the need for trigger logic New Feature - Default | Default On Null
  • 49.
    Copyright © 2013,Oracle and/or its affiliates. All rights reserved. 49  Use Identity Columns instead of specifying a Sequence and using triggers / processes to retrieve the next value from the sequence • ALWAYS [Default] – Uses the sequence generator • BY DEFAULT – Can explicitly assign a specified value • BY DEFAULT ON NULL – Can explicitly assign, but uses sequence if evaluates to NULL  SQL Workshop  Can specify Identity in Create Table Wizard  Create Form / Report Wizard  Creates correct item type {display only} New Feature - Identity Column
  • 50.
    Copyright © 2013,Oracle and/or its affiliates. All rights reserved. 50 New Feature - Invisible Column  Invisible columns are *user specified* hidden columns • SELECT *  Won’t display invisible columns • INSERT INTO x VALUES Won’t insert values in invisible columns • Must explicitly specify invisible columns to include them  SQL Workshop  Not shown in Object Browser, Query Builder, etc.  Create Form / Report Wizards  Columns won’t be shown  Must manually add to Source within APEX Region (post-generation) to view in Reports, etc.
  • 51.
    Copyright © 2013,Oracle and/or its affiliates. All rights reserved. 51  FETCH returns top ‘N’ records  Can specify rows or percentage,  Can include OFFSET to skip specified number of rows  Respects ORDER BY clause New Feature - Limiting Rows from SQL Query
  • 52.
    Copyright © 2013,Oracle and/or its affiliates. All rights reserved. 52 Soc. Sec. # 115-69-3428 DOB 11/06/71 PIN 5623 Policy enforced redaction of sensitive data New Feature - Data Redaction Mask Application Data Dynamically Call Center Operator Payroll Processing
  • 53.
    Copyright © 2013,Oracle and/or its affiliates. All rights reserved. 53 Proof Point - ARIA People 1st “Production” application on Oracle Database 12c  Written in Application Express  Used by virtually every employee in Oracle  >1.3 million page views / day  > 60 page views / sec  Median execution time 0.05 seconds
  • 54.
    Copyright © 2013,Oracle and/or its affiliates. All rights reserved. 54
  • 55.
    Copyright © 2013,Oracle and/or its affiliates. All rights reserved. 55
  • 56.
    Copyright © 2013,Oracle and/or its affiliates. All rights reserved. 56

Editor's Notes

  • #20 All provide fast provisioning
  • #24 Waiting on confirmation from Bryn
  • #34 Script noncdb_to_pdb.sql is available in $ORACLE_HOME/bin