Category Archives: Articles

This pages contains all the articles of dba-scripts.com

OCP 12C – Managing CDBs and PDBs

CDB

Connecting to a CDB or PDB

  • Connecting to a CDB or PDB is not different of connecting to a standard database.
  • When you create a PDB, it is automatically assigned a service which can be used to reach this specific PDB.
  • You can either use the EZ connect syntax, the Oracle Net Service syntax or the new : ALTER SESSION SET CONTAINER syntax.
  • The CDB_SERVICES view lets you view the services for each PDB.
  • The SHOW CON_NAME command can be used to identify the container your are connected to.

Users and administrative tasks

  • Only a common user can connect to CDB$ROOT.
  • To use the ALTER SESSION SET CONTAINER command, a common user must have the SET CONTAINER privilege.
  • All management tasks except PLUG/UNPLUG and STOP/START  in a PDB are equivalent to a standard database.
  • You can use the CONTAINER=ALL clause in a DDL statement to execute it in all PDBs. This can only be done by a common user with the SET CONTAINER privilege.
  • By DEFAULT when you issue a DDL the CONTAINER clause is equal to CURRENT.
  • A common user name starts wth C##

Continue reading OCP 12C – Managing CDBs and PDBs

OCP 12C – Basics of Multitenant Container Database (CDB)

The multitenant architecture

  • Needs enterprise edition and the multitenant option.
  • Consists of a CDB (Container database) and zero, one or up to 252 PDBs (pluggable databases).
  • Has a root container (the CDB itself) and a seed container (template to create PDBs)
  • There is only one instance per CDB.
  • A PDB doesn’t have :
    • background processes
    • undo tablespace, it uses the CDB’s.
    • redologs, it uses the CDB’s.
    • controlfiles
  • A PDB have :
    • It’s own tablespaces
    • It’s own local users and local roles
    • It’s own metadata
  • A PDB CAN have :
    • a temporary tablespace or can use the CDB temporary tablespace.
    • it’s own Resource Manager Plan or can use the default CDB one.
  • Users can be common users (at the CDB level) or local users (local to a PDB)

Continue reading OCP 12C – Basics of Multitenant Container Database (CDB)

OCP 12C – Enterprise Manager and Other Tools

EM Database Express

  • The old Enterprise Manager database control is replaced by Enterprise Manager database express in Oracle 12c.
  • It contains only basic administration capabilities as the advanced ones are included in Enterprise Manager cloud control
  • With EM database Express you can manage Security (Users, roles, profiles), Configuration (Instance Parameters, memory, database features), Storage (tablespaces, undo, redo, archive logs, control files), Performance.
  • Enterprise Manager needs the XML DB component.
  • You can configure the port used by EM database Express using :  exec DBMS_XDB_CONFIG.setHTTPsPort(5500);
  • You can get the port configured for EM database Express using :  select DBMS_XDB_CONFIG.getHTTPsPort from dual;
  • The EM_EXPRESS_BASIC (read-only role)  and EM_EXPRESS_ALL (access all functionnalities) roles can be used to grant access to EM Database Express to non-administrative users.
  • You can’t start or stop your DB with EM database express, this means that you database is accessible through EM database express only when you opened it.
  • Listener should be up and running for access to EM Express being possible.
  • Alternative for performing some DBA admin tasks is the DBA tab of SQLDeveloper