SlideShare a Scribd company logo
http://oracle-base.com
Pluggable	
  Databases	
  :	
  What	
  they	
  will	
  break	
  and	
  
why	
  you	
  should	
  use	
  them	
  anyway!	
  
Tim	
  Hall	
  
Oracle	
  ACE	
  Director	
  
Oracle	
  ACE	
  of	
  the	
  Year	
  2006	
  
OakTable	
  Network	
  
OCP	
  DBA	
  (7,	
  8,	
  8i,	
  9i,	
  10g,	
  11g)	
  
OCP	
  Advanced	
  PL/SQL	
  Developer	
  
Oracle	
  Database:	
  SQL	
  CerTfied	
  Expert	
  
	
  
hWp://oracle-­‐base.com	
  
	
  
Books	
  
Oracle	
  PL/SQL	
  Tuning	
  
Oracle	
  Job	
  Scheduling	
  
http://oracle-base.com
http://oracle-base.com
http://oracle-base.com
Agenda	
  
§  What	
  is	
  a	
  pluggable	
  database?	
  
§  What	
  they	
  will	
  break!	
  
§  Why	
  you	
  should	
  use	
  them	
  anyway!	
  
http://oracle-base.com
What	
  is	
  a	
  pluggable	
  
database?	
  
http://oracle-base.com
What	
  is	
  a	
  Pluggable	
  Database	
  
http://oracle-base.com
Create	
  a	
  new	
  PDB	
  
http://oracle-base.com
Unplug/Plugin	
  PDB	
  
http://oracle-base.com
Clone	
  a	
  PDB	
  
http://oracle-base.com
Clone	
  a	
  Remote	
  PDB	
  
http://oracle-base.com
What	
  they	
  will	
  break!	
  
http://oracle-base.com
Break?	
  
§  What	
  do	
  I	
  mean	
  by,	
  “What	
  they	
  will	
  break”?	
  
§  The	
  way	
  you	
  did	
  things	
  in	
  the	
  past	
  no	
  long	
  works!	
  
§  There	
  will	
  be	
  an	
  alternaTve	
  soluTon,	
  so	
  it's	
  not	
  really	
  broken.	
  
§  You	
  will	
  have	
  to	
  change!	
  
	
  
§  What	
  I’m	
  not	
  talking	
  about.	
  
§  Changes	
  that	
  affect	
  both	
  CDBs	
  and	
  non-­‐CDBs.	
  
§  Oracle	
  12c	
  is	
  very	
  different.	
  There	
  is	
  a	
  lot	
  to	
  learn!	
  
http://oracle-base.com
OS	
  AuthenTcaTon	
  
§  OS	
  authenTcaTon	
  doesn't	
  work.	
  
	
  
§  Must	
  connect	
  using	
  services,	
  even	
  when	
  connecTng	
  to	
  sys@pdb.	
  
	
  
§  Those	
  CRON	
  jobs	
  you	
  use	
  are	
  probably	
  broken!	
  
	
  
§  What	
  can	
  we	
  do	
  about	
  this?	
  
http://oracle-base.com
OS	
  AuthenTcaTon	
  
ALTER	
  SESSION	
  SET	
  CONTAINER	
  
§  For	
  SYS	
  connecTons,	
  you	
  can	
  use	
  the	
  ALTER	
  SESSION	
  SET	
  CONTAINER	
  
command.	
  
	
  
sqlplus / as sysdba <<EOF
ALTER SESSION SET CONTAINER = pdb1;
-- Do something.
EXIT;
EOF
http://oracle-base.com
OS	
  AuthenTcaTon	
  
TWO_TASK	
  
§  For	
  non-­‐SYS	
  connecTons	
  that	
  include	
  a	
  password,	
  you	
  can	
  use	
  TWO_TASK.	
  
	
  
export TWO_TASK=pdb1
sqlplus test/test <<EOF
-- Do something.
EXIT;
EOF
http://oracle-base.com
OS	
  AuthenTcaTon	
  
Secure	
  External	
  Password	
  Store	
  
§  Specify	
  wallet	
  locaTon	
  in	
  "$ORACLE_HOME/network/admin/sqlnet.ora"	
  
file.	
  
	
  
WALLET_LOCATION =
(SOURCE =
(METHOD = FILE)
(METHOD_DATA =
(DIRECTORY = /u01/app/oracle/wallet)
)
)
SQLNET.WALLET_OVERRIDE = TRUE
SSL_CLIENT_AUTHENTICATION = FALSE
SSL_VERSION = 0
http://oracle-base.com
OS	
  AuthenTcaTon	
  
Secure	
  External	
  Password	
  Store	
  
§  Create	
  the	
  wallet.	
  
	
  
$ mkdir -p /u01/app/oracle/wallet
$ orapki wallet create -wallet "/u01/app/oracle/wallet" -
pwd "mypassword" -auto_login_local
Oracle Secret Store Tool : Version 12.1.0.1
Copyright (c) 2004, 2012, Oracle and/or its affiliates.
All rights reserved.
Enter password:
Enter password again:
$
http://oracle-base.com
OS	
  AuthenTcaTon	
  
Secure	
  External	
  Password	
  Store	
  
§  Set	
  the	
  credenTals.	
  
	
  
$ mkstore -wrl "/u01/app/oracle/wallet" -createCredential
pdb1_test test test
Oracle Secret Store Tool : Version 12.1.0.1
Copyright (c) 2004, 2012, Oracle and/or its affiliates.
All rights reserved.
Enter wallet password
Create credential oracle.security.client.connect_string1
$
http://oracle-base.com
OS	
  AuthenTcaTon	
  
Secure	
  External	
  Password	
  Store	
  
§  Add	
  an	
  entry	
  into	
  the	
  "$ORACLE_HOME/network/admin/tnsnames.ora"	
  
file.	
  
	
  
PDB1_TEST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)
(HOST = ol6-121)
(PORT = 1521)
)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = pdb1)
)
)
http://oracle-base.com
OS	
  AuthenTcaTon	
  
Secure	
  External	
  Password	
  Store	
  
§  Now	
  you	
  can	
  connect	
  without	
  the	
  password.	
  
	
  
sqlplus /@pdb1_test <<EOF
-- Do something.
EXIT;
EOF
http://oracle-base.com
OS	
  AuthenTcaTon	
  
DBMS_SCHEDULER	
  -­‐	
  Script	
  Jobs	
  
§  New	
  jobs	
  in	
  12c	
  
§  EXTERNAL_SCRIPT	
  :	
  Commands	
  in	
  file	
  or	
  PL/SQL	
  variable	
  run	
  in	
  shell.	
  
§  SQL_SCRIPT	
  :	
  Commands	
  in	
  file	
  or	
  PL/SQL	
  variable	
  run	
  using	
  SQL*Plus	
  from	
  
shell.	
  
§  BACKUP_SCRIPT	
  :	
  Commands	
  in	
  file	
  or	
  PL/SQL	
  variable	
  run	
  using	
  RMAN	
  from	
  
shell.	
  
§  Variants	
  of	
  external	
  jobs.	
  
§  All	
  jobs	
  use	
  credenTals	
  to	
  connect	
  to	
  the	
  proper	
  OS	
  and	
  database	
  users.	
  
§  CredenTals	
  held	
  in	
  the	
  database.
http://oracle-base.com
Running	
  $ORACLE_HOME/rdbms/admin	
  
built-­‐in	
  scripts	
  
§  Built-­‐in	
  funcTonality	
  open	
  requires	
  scripts	
  to	
  be	
  run	
  in	
  CDB	
  and	
  all	
  PDBs.	
  
§  Example	
  of	
  installing	
  "catblock.sql".	
  
	
  
$ cd $ORACLE_HOME/rdbms/admin/
$ perl catcon.pl -d $ORACLE_HOME/rdbms/admin -b /
tmp/catblock_output catblock.sql
$ ls /tmp/catblock_output*
catblock_output0.log catblock_output1.log
catblock_output2.log catblock_output3.log
$
http://oracle-base.com
catcon.pl	
  (conTnued)	
  
§  Can	
  use	
  catcon.pl	
  to	
  run	
  a	
  query	
  in	
  all	
  PDBs.	
  
	
  
$ cd $ORACLE_HOME/rdbms/admin/
$ perl catcon.pl -e -b /tmp/query_output -- --x"SELECT
SYS_CONTEXT('USERENV', 'CON_NAME') FROM dual“
$ ls /tmp/query_output*
/tmp/query_output0.log /tmp/query_output1.log /tmp/
query_output2.log /tmp/query_output3.log
$
§  Use	
  "-­‐c"	
  flag	
  for	
  include	
  list	
  or	
  "-­‐C"	
  for	
  exclude	
  list.	
  
	
  
$ rm -f /tmp/select_output*
$ cd $ORACLE_HOME/rdbms/admin/
$ perl catcon.pl -e -C 'CDB$ROOT PDB$SEED' -b /tmp/select_output
-- --x"SELECT SYS_CONTEXT('USERENV', 'CON_NAME') FROM dual“
$
http://oracle-base.com
Redo	
  and	
  Undo	
  Management	
  
§  Undo	
  and	
  Redo	
  belong	
  to	
  the	
  CDB.	
  PDBs	
  have	
  no	
  direct	
  control	
  over	
  Undo	
  
and	
  Redo.	
  
	
  
§  Remember	
  to	
  perform	
  maintenance	
  of	
  these	
  at	
  the	
  CDB	
  level.	
  
	
  
§  ConsolidaTng	
  mulTple	
  redo-­‐intensive	
  PDBs	
  into	
  one	
  CDB	
  may	
  be	
  unwise.	
  
	
  
§  Shared	
  undo	
  means	
  undo-­‐based	
  flashback	
  operaTons	
  may	
  be	
  affected	
  if	
  
undo	
  is	
  not	
  sized	
  properly.	
  Consider	
  Flashback	
  Data	
  Archive	
  (FDA).	
  
http://oracle-base.com
Backup	
  and	
  Recovery	
  
§  Backup/Recovery	
  of	
  CDB	
  is	
  similar	
  to	
  non-­‐CDB,	
  but	
  affects	
  all	
  PDBs.	
  
	
  
§  Backup/Recovery	
  of	
  PDBs	
  is	
  available.	
  
	
  
§  PITR	
  of	
  a	
  PDB	
  possible,	
  similar	
  to	
  tablespace	
  PITR.	
  Does	
  PITR	
  of	
  CDB	
  to	
  in	
  
auxiliary	
  instance.	
  
	
  
§  If	
  you	
  do	
  PITR	
  of	
  a	
  PDB,	
  you	
  can't	
  flashback	
  the	
  CDB	
  before	
  that	
  Tme.	
  
	
  
§  You	
  will	
  have	
  to	
  relearn	
  B&R,	
  especially	
  caveats.	
  
http://oracle-base.com
Flashback	
  Database	
  
§  You	
  can't	
  use	
  FLASHBACK	
  DATABASE	
  for	
  a	
  PDB.	
  
	
  
§  FLASHBACK	
  DATABASE	
  only	
  works	
  with	
  CDB.	
  
	
  
§  If	
  you	
  do	
  PITR	
  of	
  a	
  PDB,	
  you	
  can't	
  flashback	
  the	
  CDB	
  before	
  that	
  Tme.	
  
	
  
§  Flashback	
  of	
  a	
  PDB	
  may	
  be	
  coming!	
  
http://oracle-base.com
ApplicaTon	
  Express	
  (APEX)	
  
§  By	
  default	
  APEX	
  installaTons	
  are	
  split	
  between	
  the	
  CDB	
  and	
  PDB.	
  
§  CDB	
  holds	
  common	
  components.	
  
§  PDB	
  holds	
  database-­‐specific	
  components	
  and	
  applicaTon	
  metadata.	
  
	
  
§  All	
  APEX	
  installaTons	
  must	
  be	
  maintained	
  at	
  the	
  same	
  version.	
  
	
  
§  Once	
  a	
  PDB	
  is	
  present,	
  you	
  *can't*	
  remove	
  shared	
  APEX	
  installaTon.	
  
	
  
§  Must	
  remove	
  it	
  first,	
  then	
  build	
  PDBs	
  with	
  separate	
  APEX	
  installaTons.	
  
http://oracle-base.com
Transparent	
  Data	
  EncrypTon	
  (TDE)	
  
§  The	
  key	
  management	
  has	
  changed	
  in	
  12c,	
  which	
  affects	
  TDE.	
  
	
  
§  ADMINISTER	
  KEY	
  MANAGEMENT	
  replaces	
  the	
  	
  
ALTER	
  SYSTEM	
  SET	
  ENCRYPTION	
  KEY	
  and	
  	
  
ALTER	
  SYSTEM	
  SET	
  ENCRYPTION	
  WALLET	
  commands.	
  
§  Under	
  mulTtenant,	
  some	
  operaTons	
  have	
  to	
  be	
  performed	
  at	
  CDB	
  before	
  
PDB.	
  
	
  
§  You	
  need	
  to	
  relearn	
  it!	
  
http://oracle-base.com
DBA_%	
  and	
  DBA_%_AE	
  Views	
  
§  This:	
  
	
  
DBA_%
ALL_%
USER_%
	
  
§  Has	
  become	
  this:	
  
	
  
CDB_%
DBA_%
ALL_%
USER_%
http://oracle-base.com
Features	
  Not	
  Available	
  With	
  MulTtenant	
  
§  Not	
  currently	
  supported	
  under	
  mulTtenant	
  in	
  12.1.0.2.	
  
§  DBVERIFY	
  
§  Data	
  Recovery	
  Advisor	
  
§  Flashback	
  Pluggable	
  Database	
  
§  Flashback	
  TransacTon	
  Backout	
  
§  Database	
  Change	
  NoTficaTon	
  
§  ConTnuous	
  Query	
  NoTficaTon	
  (CQN)	
  
§  Client	
  Side	
  Cache	
  
§  Heat	
  map	
  
§  AutomaTc	
  Data	
  OpTmizaTon	
  
§  Oracle	
  Streams	
  
	
  
§  If	
  you	
  need	
  them,	
  use	
  non-­‐CDB	
  architecture.	
  
http://oracle-base.com
Why	
  you	
  should	
  use	
  
pluggable	
  databases	
  
anyway!	
  
http://oracle-base.com
Non-­‐CDB	
  Deprecated	
  
§  From	
  12.1.0.2	
  the	
  non-­‐CDB	
  architecture	
  is	
  deprecated.	
  
	
  
"The	
  non-­‐CDB	
  architecture	
  is	
  deprecated	
  in	
  Oracle	
  Database	
  12c,	
  and	
  may	
  
be	
  desupported	
  and	
  unavailable	
  in	
  a	
  release	
  aper	
  Oracle	
  Database	
  12c	
  
Release	
  2.	
  Oracle	
  recommends	
  use	
  of	
  the	
  CDB	
  architecture..“	
  
	
  
hWps://docs.oracle.com/database/121/UPGRD/deprecated.htm#BABDBCJI	
  
http://oracle-base.com
Lone-­‐PDB	
  is	
  free!	
  
§  A	
  CDB	
  with	
  a	
  single	
  PDB	
  (Lone-­‐PDB,	
  Single	
  Tenant)	
  is	
  free	
  and	
  available	
  in	
  
all	
  ediTons.	
  
	
  
§  You	
  can	
  have	
  mulTple	
  CDBs	
  on	
  a	
  server,	
  each	
  with	
  one	
  PDB.	
  
	
  
§  A	
  CDB	
  with	
  mulTple	
  PDBs	
  costs	
  $.	
  
	
  
§  Lone-­‐PDB	
  allows	
  you	
  to	
  get	
  used	
  to	
  MulTtenant	
  at	
  no	
  extra	
  cost.	
  
http://oracle-base.com
Patching,	
  Upgrading	
  and	
  Cloning	
  
§  "PotenTal"	
  improvements	
  in	
  the	
  speed	
  of	
  patching	
  and	
  upgrades.	
  
	
  
§  Transfers	
  using	
  Unplug/Plugin	
  are	
  simple.	
  
	
  
§  Cloning	
  a	
  PDB	
  between	
  local	
  and	
  remote	
  CDBs	
  is	
  awesome.	
  (Hot-­‐Cloning	
  
coming?)	
  
	
  
CREATE PLUGGABLE DATABASE pdb5
FROM remote_pdb5@remotecdb1
FILE_NAME_CONVERT=(
'/u01/app/oracle/oradata/cdb1/remote_pdb5/',
'/u01/app/oracle/oradata/cdb1/pdb5/‘
);
ALTER PLUGGABLE DATABASE pdb5 OPEN READ WRITE;
http://oracle-base.com
Get	
  Started	
  Now!	
  
Release Schedule of Current Database Releases (Doc ID 742060.1)
12.2?
http://oracle-base.com
Get	
  Started	
  Now!	
  
§  MulTtenant	
  introduces	
  a	
  lot	
  of	
  changes	
  for	
  DBAs.	
  
	
  
§  If	
  you	
  upgrade	
  to	
  non-­‐CDB	
  in	
  12.1,	
  you	
  may	
  be	
  forced	
  to	
  change	
  to	
  CDB	
  in	
  
12.2.	
  
	
  
§  That	
  makes	
  12.2	
  a	
  big	
  upgrade.	
  
	
  
§  Put	
  the	
  effort	
  in	
  now!	
  
http://oracle-base.com
Future-­‐Proof	
  Yourself	
  
§  This	
  is	
  the	
  future	
  of	
  the	
  Oracle	
  Database.	
  
	
  
§  Lots	
  of	
  the	
  old-­‐guard	
  DBAs	
  will	
  be	
  in	
  denial	
  and	
  struggle	
  to	
  get	
  up	
  to	
  
speed.	
  
	
  
§  Make	
  yourself	
  stand	
  out!	
  
http://oracle-base.com
The	
  End…	
  	
  
§  Slides	
  and	
  Demos:	
  
	
  
hWp://oracle-­‐base.com/workshops	
  
	
  
§  QuesTons?	
  

More Related Content

PDF
Best Features of Multitenant 12c
PDF
Best Features of Multitenant 12c
PPTX
Oracle Unified Directory. Lessons learnt. Is it ready for a move from OID? (O...
PPTX
OTN Tour 2014: Rac 11g vs 12c
PDF
REST in Piece - Administration of an Oracle Cluster/Database using REST
PDF
What’s New in Oracle Database 12c for PHP
PDF
Why to Upgrade to Oracle 12c
PDF
Create a Database Application Development Environment with Docker
Best Features of Multitenant 12c
Best Features of Multitenant 12c
Oracle Unified Directory. Lessons learnt. Is it ready for a move from OID? (O...
OTN Tour 2014: Rac 11g vs 12c
REST in Piece - Administration of an Oracle Cluster/Database using REST
What’s New in Oracle Database 12c for PHP
Why to Upgrade to Oracle 12c
Create a Database Application Development Environment with Docker

What's hot (20)

PPTX
Database 12c is ready for you... Are you ready for 12c?
PDF
Php Applications with Oracle by Kuassi Mensah
PDF
Manual Tecnico OGG Oracle to MySQL
PDF
Php &amp; my sql - how do pdo, mysq-li, and x devapi do what they do
PPSX
Oracle Cloud As Services
PPTX
PHP, The X DevAPI, and the MySQL Document Store Presented January 23rd, 20...
PDF
TechEvent 2019: Oracle PDB Isolation and Security; Stefan Oehrli - Trivadis
PDF
Security Best Practice: Oracle passwords, but secure!
PDF
PHP Oracle Web Applications by Kuassi Mensah
PDF
OpenWorld 2014 - Schema Management: versioning and automation with Puppet and...
PDF
MySQL Utilities -- PyTexas 2015
PDF
MySQL JSON Functions
PDF
Take your database source code and data under control
PDF
監査ログをもっと身近に!〜統合監査のすすめ〜
PDF
Oracle Database on Docker
PDF
PNWPHP -- What are Databases so &#%-ing Difficult
PDF
MySQL 5.7 + JSON
PPT
Apache Hadoop India Summit 2011 talk "Oozie - Workflow for Hadoop" by Andreas N
PDF
MySQL's NoSQL -- Texas Linuxfest August 22nd 2015
PDF
Ohio Linux Fest -- MySQL's NoSQL
Database 12c is ready for you... Are you ready for 12c?
Php Applications with Oracle by Kuassi Mensah
Manual Tecnico OGG Oracle to MySQL
Php &amp; my sql - how do pdo, mysq-li, and x devapi do what they do
Oracle Cloud As Services
PHP, The X DevAPI, and the MySQL Document Store Presented January 23rd, 20...
TechEvent 2019: Oracle PDB Isolation and Security; Stefan Oehrli - Trivadis
Security Best Practice: Oracle passwords, but secure!
PHP Oracle Web Applications by Kuassi Mensah
OpenWorld 2014 - Schema Management: versioning and automation with Puppet and...
MySQL Utilities -- PyTexas 2015
MySQL JSON Functions
Take your database source code and data under control
監査ログをもっと身近に!〜統合監査のすすめ〜
Oracle Database on Docker
PNWPHP -- What are Databases so &#%-ing Difficult
MySQL 5.7 + JSON
Apache Hadoop India Summit 2011 talk "Oozie - Workflow for Hadoop" by Andreas N
MySQL's NoSQL -- Texas Linuxfest August 22nd 2015
Ohio Linux Fest -- MySQL's NoSQL
Ad

Viewers also liked (18)

PDF
Gestión de infraestructura tomcat/Tom EE con tfactory
PDF
Why to Upgrade to Oracle 12c
PDF
What's next after Upgrade to 12c
PDF
Integracion Continua en Oracle ADF
PDF
Introduction to Oracle Clusterware 12c
PDF
How to Upgrade Hundreds or Thousands of Databases
PDF
Upgrade/Migrate to Oracle 12c: Live and Uncensored!
PDF
ADF 12c como Backend
PDF
Improving the Performance of PL/SQL function calls from SQL
PDF
It's raining data! Oracle databases in the cloud
PDF
How Oracle Single/Multitenant will change a DBA's life
PDF
SOA y Microservices Diferencias y Aplicaciones
PDF
The best Oracle Database 12c Tuning Features for Developers
PDF
Deep Dive: More Oracle Data Pump Performance Tips and Tricks
PDF
Integration Cloud Service vs SOA
PPTX
Cloud Integration for Human Resources: Connect with Your talent in the Cloud
PPTX
La transformacion digital en nuestra vida cotidiana. Un vistazo a las APIs
PDF
Oracle 12c New Features
Gestión de infraestructura tomcat/Tom EE con tfactory
Why to Upgrade to Oracle 12c
What's next after Upgrade to 12c
Integracion Continua en Oracle ADF
Introduction to Oracle Clusterware 12c
How to Upgrade Hundreds or Thousands of Databases
Upgrade/Migrate to Oracle 12c: Live and Uncensored!
ADF 12c como Backend
Improving the Performance of PL/SQL function calls from SQL
It's raining data! Oracle databases in the cloud
How Oracle Single/Multitenant will change a DBA's life
SOA y Microservices Diferencias y Aplicaciones
The best Oracle Database 12c Tuning Features for Developers
Deep Dive: More Oracle Data Pump Performance Tips and Tricks
Integration Cloud Service vs SOA
Cloud Integration for Human Resources: Connect with Your talent in the Cloud
La transformacion digital en nuestra vida cotidiana. Un vistazo a las APIs
Oracle 12c New Features
Ad

Similar to Pluggable Databases: What they will break and why you should use them anyway! (20)

PDF
Oracle 12c PDB insights
PDF
Under The Hood of Pluggable Databases by Alex Gorbachev, Pythian, Oracle OpeW...
PPTX
Database 12c
PDF
UKOUG TechFest PDB Isolation and Security
PDF
The first bug on Oracle Database 12c: how to create a pdb by cloning a remote...
PDF
Oracle database 12c intro
PDF
COUG_AAbate_Oracle_Database_12c_New_Features
PPTX
Presentation day5 oracle12c
PDF
SOUG PDB Security, Isolation and DB Nest 20c
PDF
One PDB to go, please!
PPTX
Simplify Consolidation with Oracle Pluggable Databases
PDF
PPTX
Oracle 12c - Multitenant Feature
PDF
Security Multitenant
PDF
Cdb part i
PDF
Plugging in oracle database 12c pluggable databases
PDF
Migration to Oracle Multitenant
PPTX
New Features for Multitenant in Oracle Database 21c
PDF
Oracle DB 11g R2 Research (Installation, Users and Privileges, Audit Trail, E...
PDF
The Ultimate Guide to Oracle database security administration 1 z0 116
Oracle 12c PDB insights
Under The Hood of Pluggable Databases by Alex Gorbachev, Pythian, Oracle OpeW...
Database 12c
UKOUG TechFest PDB Isolation and Security
The first bug on Oracle Database 12c: how to create a pdb by cloning a remote...
Oracle database 12c intro
COUG_AAbate_Oracle_Database_12c_New_Features
Presentation day5 oracle12c
SOUG PDB Security, Isolation and DB Nest 20c
One PDB to go, please!
Simplify Consolidation with Oracle Pluggable Databases
Oracle 12c - Multitenant Feature
Security Multitenant
Cdb part i
Plugging in oracle database 12c pluggable databases
Migration to Oracle Multitenant
New Features for Multitenant in Oracle Database 21c
Oracle DB 11g R2 Research (Installation, Users and Privileges, Audit Trail, E...
The Ultimate Guide to Oracle database security administration 1 z0 116

More from Guatemala User Group (11)

PPTX
More than 12 More things about Oracle Database 12c
PPTX
Oracle Optimizer: 12c New Capabilities
PPTX
Understanding Query Optimization with ‘regular’ and ‘Exadata’ Oracle
PPTX
Monitoreo del performance de linux con sar
PPTX
Diagnóstico de problemas de red para DBAs
PDF
Cutting edge Essbase
PDF
Gestión de grandes volúmenes de información
PDF
RMAN – The Pocket Knife of a DBA
PDF
Oracle Linux and Oracle Database - A Trusted Combination
PDF
Re-­Think Mobile… Beyond Mobile­‐First: Oracle Mobile Strategy and Overview
PDF
Building Better Mobile Backends with Oracle Mobile Cloud Service
More than 12 More things about Oracle Database 12c
Oracle Optimizer: 12c New Capabilities
Understanding Query Optimization with ‘regular’ and ‘Exadata’ Oracle
Monitoreo del performance de linux con sar
Diagnóstico de problemas de red para DBAs
Cutting edge Essbase
Gestión de grandes volúmenes de información
RMAN – The Pocket Knife of a DBA
Oracle Linux and Oracle Database - A Trusted Combination
Re-­Think Mobile… Beyond Mobile­‐First: Oracle Mobile Strategy and Overview
Building Better Mobile Backends with Oracle Mobile Cloud Service

Recently uploaded (20)

PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
KodekX | Application Modernization Development
PPTX
Big Data Technologies - Introduction.pptx
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Encapsulation theory and applications.pdf
PDF
cuic standard and advanced reporting.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPT
Teaching material agriculture food technology
PDF
Approach and Philosophy of On baking technology
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
NewMind AI Weekly Chronicles - August'25 Week I
Review of recent advances in non-invasive hemoglobin estimation
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
KodekX | Application Modernization Development
Big Data Technologies - Introduction.pptx
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Encapsulation theory and applications.pdf
cuic standard and advanced reporting.pdf
MYSQL Presentation for SQL database connectivity
Dropbox Q2 2025 Financial Results & Investor Presentation
“AI and Expert System Decision Support & Business Intelligence Systems”
Teaching material agriculture food technology
Approach and Philosophy of On baking technology
Advanced methodologies resolving dimensionality complications for autism neur...
20250228 LYD VKU AI Blended-Learning.pptx
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Reach Out and Touch Someone: Haptics and Empathic Computing
Digital-Transformation-Roadmap-for-Companies.pptx
NewMind AI Weekly Chronicles - August'25 Week I

Pluggable Databases: What they will break and why you should use them anyway!

  • 1. http://oracle-base.com Pluggable  Databases  :  What  they  will  break  and   why  you  should  use  them  anyway!   Tim  Hall   Oracle  ACE  Director   Oracle  ACE  of  the  Year  2006   OakTable  Network   OCP  DBA  (7,  8,  8i,  9i,  10g,  11g)   OCP  Advanced  PL/SQL  Developer   Oracle  Database:  SQL  CerTfied  Expert     hWp://oracle-­‐base.com     Books   Oracle  PL/SQL  Tuning   Oracle  Job  Scheduling  
  • 4. http://oracle-base.com Agenda   §  What  is  a  pluggable  database?   §  What  they  will  break!   §  Why  you  should  use  them  anyway!  
  • 12. http://oracle-base.com Break?   §  What  do  I  mean  by,  “What  they  will  break”?   §  The  way  you  did  things  in  the  past  no  long  works!   §  There  will  be  an  alternaTve  soluTon,  so  it's  not  really  broken.   §  You  will  have  to  change!     §  What  I’m  not  talking  about.   §  Changes  that  affect  both  CDBs  and  non-­‐CDBs.   §  Oracle  12c  is  very  different.  There  is  a  lot  to  learn!  
  • 13. http://oracle-base.com OS  AuthenTcaTon   §  OS  authenTcaTon  doesn't  work.     §  Must  connect  using  services,  even  when  connecTng  to  sys@pdb.     §  Those  CRON  jobs  you  use  are  probably  broken!     §  What  can  we  do  about  this?  
  • 14. http://oracle-base.com OS  AuthenTcaTon   ALTER  SESSION  SET  CONTAINER   §  For  SYS  connecTons,  you  can  use  the  ALTER  SESSION  SET  CONTAINER   command.     sqlplus / as sysdba <<EOF ALTER SESSION SET CONTAINER = pdb1; -- Do something. EXIT; EOF
  • 15. http://oracle-base.com OS  AuthenTcaTon   TWO_TASK   §  For  non-­‐SYS  connecTons  that  include  a  password,  you  can  use  TWO_TASK.     export TWO_TASK=pdb1 sqlplus test/test <<EOF -- Do something. EXIT; EOF
  • 16. http://oracle-base.com OS  AuthenTcaTon   Secure  External  Password  Store   §  Specify  wallet  locaTon  in  "$ORACLE_HOME/network/admin/sqlnet.ora"   file.     WALLET_LOCATION = (SOURCE = (METHOD = FILE) (METHOD_DATA = (DIRECTORY = /u01/app/oracle/wallet) ) ) SQLNET.WALLET_OVERRIDE = TRUE SSL_CLIENT_AUTHENTICATION = FALSE SSL_VERSION = 0
  • 17. http://oracle-base.com OS  AuthenTcaTon   Secure  External  Password  Store   §  Create  the  wallet.     $ mkdir -p /u01/app/oracle/wallet $ orapki wallet create -wallet "/u01/app/oracle/wallet" - pwd "mypassword" -auto_login_local Oracle Secret Store Tool : Version 12.1.0.1 Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved. Enter password: Enter password again: $
  • 18. http://oracle-base.com OS  AuthenTcaTon   Secure  External  Password  Store   §  Set  the  credenTals.     $ mkstore -wrl "/u01/app/oracle/wallet" -createCredential pdb1_test test test Oracle Secret Store Tool : Version 12.1.0.1 Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved. Enter wallet password Create credential oracle.security.client.connect_string1 $
  • 19. http://oracle-base.com OS  AuthenTcaTon   Secure  External  Password  Store   §  Add  an  entry  into  the  "$ORACLE_HOME/network/admin/tnsnames.ora"   file.     PDB1_TEST = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = ol6-121) (PORT = 1521) ) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = pdb1) ) )
  • 20. http://oracle-base.com OS  AuthenTcaTon   Secure  External  Password  Store   §  Now  you  can  connect  without  the  password.     sqlplus /@pdb1_test <<EOF -- Do something. EXIT; EOF
  • 21. http://oracle-base.com OS  AuthenTcaTon   DBMS_SCHEDULER  -­‐  Script  Jobs   §  New  jobs  in  12c   §  EXTERNAL_SCRIPT  :  Commands  in  file  or  PL/SQL  variable  run  in  shell.   §  SQL_SCRIPT  :  Commands  in  file  or  PL/SQL  variable  run  using  SQL*Plus  from   shell.   §  BACKUP_SCRIPT  :  Commands  in  file  or  PL/SQL  variable  run  using  RMAN  from   shell.   §  Variants  of  external  jobs.   §  All  jobs  use  credenTals  to  connect  to  the  proper  OS  and  database  users.   §  CredenTals  held  in  the  database.
  • 22. http://oracle-base.com Running  $ORACLE_HOME/rdbms/admin   built-­‐in  scripts   §  Built-­‐in  funcTonality  open  requires  scripts  to  be  run  in  CDB  and  all  PDBs.   §  Example  of  installing  "catblock.sql".     $ cd $ORACLE_HOME/rdbms/admin/ $ perl catcon.pl -d $ORACLE_HOME/rdbms/admin -b / tmp/catblock_output catblock.sql $ ls /tmp/catblock_output* catblock_output0.log catblock_output1.log catblock_output2.log catblock_output3.log $
  • 23. http://oracle-base.com catcon.pl  (conTnued)   §  Can  use  catcon.pl  to  run  a  query  in  all  PDBs.     $ cd $ORACLE_HOME/rdbms/admin/ $ perl catcon.pl -e -b /tmp/query_output -- --x"SELECT SYS_CONTEXT('USERENV', 'CON_NAME') FROM dual“ $ ls /tmp/query_output* /tmp/query_output0.log /tmp/query_output1.log /tmp/ query_output2.log /tmp/query_output3.log $ §  Use  "-­‐c"  flag  for  include  list  or  "-­‐C"  for  exclude  list.     $ rm -f /tmp/select_output* $ cd $ORACLE_HOME/rdbms/admin/ $ perl catcon.pl -e -C 'CDB$ROOT PDB$SEED' -b /tmp/select_output -- --x"SELECT SYS_CONTEXT('USERENV', 'CON_NAME') FROM dual“ $
  • 24. http://oracle-base.com Redo  and  Undo  Management   §  Undo  and  Redo  belong  to  the  CDB.  PDBs  have  no  direct  control  over  Undo   and  Redo.     §  Remember  to  perform  maintenance  of  these  at  the  CDB  level.     §  ConsolidaTng  mulTple  redo-­‐intensive  PDBs  into  one  CDB  may  be  unwise.     §  Shared  undo  means  undo-­‐based  flashback  operaTons  may  be  affected  if   undo  is  not  sized  properly.  Consider  Flashback  Data  Archive  (FDA).  
  • 25. http://oracle-base.com Backup  and  Recovery   §  Backup/Recovery  of  CDB  is  similar  to  non-­‐CDB,  but  affects  all  PDBs.     §  Backup/Recovery  of  PDBs  is  available.     §  PITR  of  a  PDB  possible,  similar  to  tablespace  PITR.  Does  PITR  of  CDB  to  in   auxiliary  instance.     §  If  you  do  PITR  of  a  PDB,  you  can't  flashback  the  CDB  before  that  Tme.     §  You  will  have  to  relearn  B&R,  especially  caveats.  
  • 26. http://oracle-base.com Flashback  Database   §  You  can't  use  FLASHBACK  DATABASE  for  a  PDB.     §  FLASHBACK  DATABASE  only  works  with  CDB.     §  If  you  do  PITR  of  a  PDB,  you  can't  flashback  the  CDB  before  that  Tme.     §  Flashback  of  a  PDB  may  be  coming!  
  • 27. http://oracle-base.com ApplicaTon  Express  (APEX)   §  By  default  APEX  installaTons  are  split  between  the  CDB  and  PDB.   §  CDB  holds  common  components.   §  PDB  holds  database-­‐specific  components  and  applicaTon  metadata.     §  All  APEX  installaTons  must  be  maintained  at  the  same  version.     §  Once  a  PDB  is  present,  you  *can't*  remove  shared  APEX  installaTon.     §  Must  remove  it  first,  then  build  PDBs  with  separate  APEX  installaTons.  
  • 28. http://oracle-base.com Transparent  Data  EncrypTon  (TDE)   §  The  key  management  has  changed  in  12c,  which  affects  TDE.     §  ADMINISTER  KEY  MANAGEMENT  replaces  the     ALTER  SYSTEM  SET  ENCRYPTION  KEY  and     ALTER  SYSTEM  SET  ENCRYPTION  WALLET  commands.   §  Under  mulTtenant,  some  operaTons  have  to  be  performed  at  CDB  before   PDB.     §  You  need  to  relearn  it!  
  • 29. http://oracle-base.com DBA_%  and  DBA_%_AE  Views   §  This:     DBA_% ALL_% USER_%   §  Has  become  this:     CDB_% DBA_% ALL_% USER_%
  • 30. http://oracle-base.com Features  Not  Available  With  MulTtenant   §  Not  currently  supported  under  mulTtenant  in  12.1.0.2.   §  DBVERIFY   §  Data  Recovery  Advisor   §  Flashback  Pluggable  Database   §  Flashback  TransacTon  Backout   §  Database  Change  NoTficaTon   §  ConTnuous  Query  NoTficaTon  (CQN)   §  Client  Side  Cache   §  Heat  map   §  AutomaTc  Data  OpTmizaTon   §  Oracle  Streams     §  If  you  need  them,  use  non-­‐CDB  architecture.  
  • 31. http://oracle-base.com Why  you  should  use   pluggable  databases   anyway!  
  • 32. http://oracle-base.com Non-­‐CDB  Deprecated   §  From  12.1.0.2  the  non-­‐CDB  architecture  is  deprecated.     "The  non-­‐CDB  architecture  is  deprecated  in  Oracle  Database  12c,  and  may   be  desupported  and  unavailable  in  a  release  aper  Oracle  Database  12c   Release  2.  Oracle  recommends  use  of  the  CDB  architecture..“     hWps://docs.oracle.com/database/121/UPGRD/deprecated.htm#BABDBCJI  
  • 33. http://oracle-base.com Lone-­‐PDB  is  free!   §  A  CDB  with  a  single  PDB  (Lone-­‐PDB,  Single  Tenant)  is  free  and  available  in   all  ediTons.     §  You  can  have  mulTple  CDBs  on  a  server,  each  with  one  PDB.     §  A  CDB  with  mulTple  PDBs  costs  $.     §  Lone-­‐PDB  allows  you  to  get  used  to  MulTtenant  at  no  extra  cost.  
  • 34. http://oracle-base.com Patching,  Upgrading  and  Cloning   §  "PotenTal"  improvements  in  the  speed  of  patching  and  upgrades.     §  Transfers  using  Unplug/Plugin  are  simple.     §  Cloning  a  PDB  between  local  and  remote  CDBs  is  awesome.  (Hot-­‐Cloning   coming?)     CREATE PLUGGABLE DATABASE pdb5 FROM remote_pdb5@remotecdb1 FILE_NAME_CONVERT=( '/u01/app/oracle/oradata/cdb1/remote_pdb5/', '/u01/app/oracle/oradata/cdb1/pdb5/‘ ); ALTER PLUGGABLE DATABASE pdb5 OPEN READ WRITE;
  • 35. http://oracle-base.com Get  Started  Now!   Release Schedule of Current Database Releases (Doc ID 742060.1) 12.2?
  • 36. http://oracle-base.com Get  Started  Now!   §  MulTtenant  introduces  a  lot  of  changes  for  DBAs.     §  If  you  upgrade  to  non-­‐CDB  in  12.1,  you  may  be  forced  to  change  to  CDB  in   12.2.     §  That  makes  12.2  a  big  upgrade.     §  Put  the  effort  in  now!  
  • 37. http://oracle-base.com Future-­‐Proof  Yourself   §  This  is  the  future  of  the  Oracle  Database.     §  Lots  of  the  old-­‐guard  DBAs  will  be  in  denial  and  struggle  to  get  up  to   speed.     §  Make  yourself  stand  out!  
  • 38. http://oracle-base.com The  End…     §  Slides  and  Demos:     hWp://oracle-­‐base.com/workshops     §  QuesTons?