SlideShare a Scribd company logo
ORACLE DATABASE 12C
CREATION OF CDB AND PDB
DATABASE
(Reference – Oracle documentation)
Check detailed contents on
http://dbaboss.com/ 1
CREATION OF CDB
• Reference links
• http://docs.oracle.com/database/121/ADMI
N/cdb_create.htm
• http://www.toadworld.com/platforms/oracl
e/w/wiki/11059.container-database-cdb-
with-pluggable-databases-pdbs-in-oracle-
12c-rac.aspx
Check detailed contents on
http://dbaboss.com/
2
• Multitenant : Create and Configure a Container Database (CDB) in Oracle
Database 12c Release 1 (12.1)
• The multitenant option introduced in Oracle Database 12c allows a single
container database (CDB) to host multiple separate pluggable databases (PDB).
This article covers the options available to create a new container database.
• There are articles specifically about installation of Oracle Database 12c here.
• •Oracle Universal Installer (OUI)
• •Database Configuration Assistant (DBCA)
• •Manual Creation
• •Configure a Container Database (CDB)
•
• Oracle Universal Installer (OUI)
• The Oracle Universal Installer (OUI) allows you to create a container database
(CDB) during the software installation. The "Typical Install Configuration" screen
has a checkbox to indicate the database is a container database. You can optionally
create a single pluggable database (PDB) in this screen also.
3
Check detailed contents on
http://dbaboss.com/
Check detailed contents on
http://dbaboss.com/
4
Check detailed contents on
http://dbaboss.com/
5
• Database Configuration Assistant (DBCA)
• The Database Configuration Assistant (DBCA) gives similar options to the
Oracle Universal Installer (OUI). The "Creation Mode" page allows you to
enter the default installation configuration details directly
6
Check detailed contents on
http://dbaboss.com/
7
Check detailed contents on
http://dbaboss.com/
8
Check detailed contents on
http://dbaboss.com/
Manual Creation
• Creating Multitenant Container database
• Creating container database is similar to creating non-container database but with few changes.
Following changes should be made if we want to create container database
•
• 1) Define enable_pluggable_database parameter to true.
• By default this parameter is false. Meaning that by default database will be created as non-
multitenant database. If you want to create multitenant database, you have to make this parameter
true.
• Failing to make this parameter true will give you following error if you try to create multitenant
database
•
• ORA-65093: multitenant container database not set up properly
•
• 2) Change in “Create database” command
• So if you are going to create multitenant database using “create database” command, you need to
add couple of clause to this command.
• Following clause needs to be added
• •ENABLE PLUGGABLE DATABASE
• •SEED
9
Check detailed contents on
http://dbaboss.com/
• Following steps can be used to create multitenant database
•
• Step 1) Create pfile and spfile
•
• You can use following parameters as generic to create test database. You can alter the memory parameters and
include/remove many parameters as required. But these are good enough to create test instance
10
Check detailed contents on
http://dbaboss.com/
• ORA-04031: unable to allocate 4096 bytes of shared memory (“java
pool”,”/51835a0f_ReflectionFactoryGet”,”JOXLE^5cb1fb41″,”:SGAClass”)
• Step 2) Create database command
•
Check detailed contents on
http://dbaboss.com/
11
• Step 3) run catcdb.sql
•
• DO NOT RUN catlog.sql and catproc.sql
• If you are creating container database, you need to run only catcdb.sql.
• This script takes care of running all other dependent scripts internally.
•
• If you run catlog.sql and catproc.sql, this script will fail later at many stages with following errors
• catcon: ALL catcon-related output will be written to dbmsxdbt_catcon_2527.lst
• catcon: See dbmsxdbt*.log files for output generated by scripts
• catcon: See dbmsxdbt_*.lst files for spool files, if any
• catconInit: database is not open on the default instance
• Unexpected error encountered in catconInit; exiting
• In case of normal database creation, we usually run catlog.sql and catproc.sql as mentioned in
http://docs.oracle.com/database/121/ADMIN/create.htm#ADMIN11082
• But that’s for normal database creation and process is same in 12c. But for creating container database, we
should be running only catcdb.sql
•
• catcdb.sql will ask for 3 inputs – new sys password, new system password and temp tablespace
• SQL> @?/rdbms/admin/catcdb.sql
• Session altered.
• Enter new password for SYS:
• Enter new password for SYSTEM:
• Enter temporary tablespace name: TEMP
• Once you provide this, it will create root container database with whatever database name you give. Container
name for root container DB will be CDB$ROOT.
• It will also create seed pluggable container database. Container name will be seed$pdb
12
Check detailed contents on
http://dbaboss.com/
• SQL> @?/rdbms/admin/catcdb.sql
• Session altered.
• Enter new password for SYS:
• Enter new password for SYSTEM:
• Enter temporary tablespace name: TEMP
• Once you provide this, it will create root container database with
whatever database name you give. Container name for root container DB
will be CDB$ROOT.
• It will also create seed pluggable container database. Container name will
be seed$pdb
•
• Step 4) Run utlrp.sql to compile invalid objects.
•
• There will be few invalid objects in database. You can run utlrp.sql to
compile the same
13
Check detailed contents on
http://dbaboss.com/
• Validation
•
• You can run few commands to validate if you database is container databases and what all containers it has.
•
• We have a new column in v$database called CDB. If your database is container database it will show as YES
• SYS.DEOCDB.PRIMARY>select name, cdb from v$database;
• NAME CDB
• --------- ---
• DEOCDB YES
• 1 row selected.
• You can also check different containers in your database using following
• SYS.DEOCDB.PRIMARY>select CON_ID, NAME, OPEN_MODE, TOTAL_SIZE from v$containers;
• CON_ID NAME OPEN_MODE TOTAL_SIZE
• ---------- ------------------------------ ---------- ----------
• 1 CDB$ROOT READ WRITE 0
• 2 PDB$SEED READ ONLY 1599078400
• V$CONTAINER is the new view available in 12c. When this is run from root container, it shows all containers CDB as well as
PDB. But if you run same command from any PDB, it will show that container.
• SYS.DEOCDB.PRIMARY>alter session set container=PDB$SEED;
• Session altered.
• SYS.DEOCDB.PRIMARY>select CON_ID, NAME, OPEN_MODE, TOTAL_SIZE from v$containers;
• CON_ID NAME OPEN_MODE TOTAL_SIZE
• ---------- ------------------------------ ---------- ----------
• 2 PDB$SEED READ ONLY 1599078400
14
Check detailed contents on
http://dbaboss.com/
• Manual Creation through DBCA scripts
• Using the DBCA, either during or after the software installation, is the recommended approach to creating CDBs,
but it is possible to create them manually.
• The simplest way to see how manual creation of a CDB is accomplished is to run the DBCA. Pick "Advanced
Mode", select the "Custom Database" option (no template used) and at the end, uncheck the "Create Database"
option and check the "Generate Database Creation Scripts" option. The resulting scripts will include one called
"CreateDB.sql", with contents similar to this.
• SET VERIFY OFF
• connect "SYS"/"&&sysPassword" as SYSDBA
• set echo on
• spool /u01/app/oracle/admin/cdb1/scripts/CreateDB.log append
• startup nomount pfile="/u01/app/oracle/admin/cdb1/scripts/init.ora";
• CREATE DATABASE "cdb1"
• MAXINSTANCES 8
• MAXLOGHISTORY 1
• MAXLOGFILES 16
• MAXLOGMEMBERS 3
• MAXDATAFILES 1024
• DATAFILE '/u01/app/oracle/oradata/cdb1/system01.dbf' SIZE 700M REUSE
• AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
• EXTENT MANAGEMENT LOCAL
• SYSAUX DATAFILE '/u01/app/oracle/oradata/cdb1/sysaux01.dbf' SIZE 550M REUSE
• AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
• SMALLFILE DEFAULT TEMPORARY TABLESPACE TEMP TEMPFILE '/u01/app/oracle/oradata/cdb1/temp01.dbf' SIZE
20M REUSE
• AUTOEXTEND ON NEXT 640K MAXSIZE UNLIMITED
15
Check detailed contents on
http://dbaboss.com/
• SMALLFILE UNDO TABLESPACE "UNDOTBS1" DATAFILE '/u01/app/oracle/oradata/cdb1/undotbs01.dbf' SIZE 200M REUSE
• AUTOEXTEND ON NEXT 5120K MAXSIZE UNLIMITED
• CHARACTER SET AL32UTF8
• NATIONAL CHARACTER SET AL16UTF16
• LOGFILE GROUP 1 ('/u01/app/oracle/oradata/cdb1/redo01.log') SIZE 50M,
• GROUP 2 ('/u01/app/oracle/oradata/cdb1/redo02.log') SIZE 50M,
• GROUP 3 ('/u01/app/oracle/oradata/cdb1/redo03.log') SIZE 50M
• USER SYS IDENTIFIED BY "&&sysPassword" USER SYSTEM IDENTIFIED BY "&&systemPassword"
• enable pluggable database
• seed
file_name_convert=('/u01/app/oracle/oradata/cdb1/system01.dbf','/u01/app/oracle/oradata/cdb1/pdbseed/system01.dbf',
• '/u01/app/oracle/oradata/cdb1/sysaux01.dbf','/u01/app/oracle/oradata/cdb1/pdbseed/sysaux01.dbf',
• '/u01/app/oracle/oradata/cdb1/temp01.dbf','/u01/app/oracle/oradata/cdb1/pdbseed/temp01.dbf',
• '/u01/app/oracle/oradata/cdb1/undotbs01.dbf','/u01/app/oracle/oradata/cdb1/pdbseed/undotbs01.dbf');
• spool off
• Most of the CREATE DATABASE statement should look familiar. Notice the ENABLE PLUGGABLE DATABASE and SEED
FILE_NAME_CONVERT options in bold.
• When the ENABLE PLUGGABLE DATABASE clause is present, the database is created as a CDB with both root and seed.
• The SEED FILE_NAME_CONVERT clause is used to determine the seed file names, based on the root file names. If you are
using Oracle Managed Files (OMF), this clause is not necessary. If you prefer, you can specify the seed datafiles explicitly,
rather than using the convert.
• SEED
• SYSTEM DATAFILE '/u01/app/oracle/oradata/cdb1/pdbseed/system01.dbf' SIZE 700M REUSE
• AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
• EXTENT MANAGEMENT LOCAL
• SYSAUX DATAFILE '/u01/app/oracle/oradata/cdb1/pdbseed/sysaux01.dbf' SIZE 550M REUSE
• AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED
16Check detailed contents on
http://dbaboss.com/
CREATION OF PDB DATABASES
• There are articles specifically about installation of Oracle Database 12c here.
• •Oracle Universal Installer (OUI)
• •Database Configuration Assistant (DBCA)
• ◦Create a Pluggable Database (PDB) using the DBCA
• ◦Unplug a Pluggable Database (PDB) using the DBCA
• ◦Plugin a Pluggable Database (PDB) using the DBCA
• ◦Delete a Pluggable Database (PDB) using the DBCA
• ◦Configure a Pluggable Database (PDB) using the DBCA
• •SQL Developer
• •Cloud Control GRID Infrastructure 12c
• •Manual (SQL*Plus)
• ◦Create a Pluggable Database (PDB) Manually
• ◦Unplug a Pluggable Database (PDB) Manually
• ◦Plugin a Pluggable Database (PDB) Manually
• ◦Clone a Pluggable Database (PDB) Manually
• ◦Clone a Pluggable Database (PDB) Manually (Metadata-Only : NO DATA)
• ◦Delete a Pluggable Database (PDB) Manually
17
Check detailed contents on
http://dbaboss.com/
• Reference links
• https://docs.oracle.com/database/121/SQLRF
/statements_6010.htm
• http://docs.oracle.com/database/121/ADMIN
/cdb_plug.htm
• http://www.morganslibrary.org/reference/con
tainer_db.html
18
Check detailed contents on
http://dbaboss.com/
• Oracle Universal Installer (OUI)
19
Check detailed contents on
http://dbaboss.com/
• Database Configuration Assistant (DBCA)
• The DBCA includes a new option on the opening "Database Operation" screen that allows you to manage
the pluggable databases of an existing container database. Select the "Manage Pluggable Databases"
option and click the "Next" button.
20
Check detailed contents on
http://dbaboss.com/
21
Check detailed contents on
http://dbaboss.com/
• Create a Pluggable Database (PDB) using the DBCA
• On the "Manage Pluggable Databases" screen shown previously, select the "Create a Pluggable Database"
option and click the "Next" button. On the resulting screen, select the container database to house the
new pluggable database and click the "Next" button.
22
Check detailed contents on
http://dbaboss.com/
• Select the "Create a new Pluggable Database" option and click the "Next" button. If you were plugging in a
previously unplugged database, you would select the PDB Archive or PDB File Set options to match the
format of the files containing the unplugged PDB.
23
Check detailed contents on
http://dbaboss.com/
• Enter the pluggable database name, database location and admin credentials, then click the "Next" button
24
Check detailed contents on
http://dbaboss.com/
• If you are happy with the summary information, click the "Finish" button
25
Check detailed contents on
http://dbaboss.com/
• Wait while the pluggable database is created. Once complete, click the "OK" button on the message dialog
and the "Close" button on the main screen. The new pluggable database has been created as a clone of
the seed database.
26
Check detailed contents on
http://dbaboss.com/
SQL Developer
• The DBA section of SQL Developer includes tree node called "Container Database".
27
Check detailed contents on
http://dbaboss.com/
• Right-clicking on the "Container Database" node produces a popup menu showing you what operations
are available
28
Check detailed contents on
http://dbaboss.com/
• Right-clicking on a specific PDB node produces a popup menu showing only those operations that are
relevant to that PDB
29
Check detailed contents on
http://dbaboss.com/
Cloud Control
• Cloud Control 12cR3 onward supports pluggable database functionality. Once you click on the container
database, the "Oracle Database > Control > Open/Close Pluggable Database" menu option allows you to
control the state of the PDBs owned by the CDB.
30
Check detailed contents on
http://dbaboss.com/
• The "Oracle Database > Provision > Provision Pluggable Database" menu option allows you to perform
other operations PDBs owned by the CDB, including cloning, unplugging amongst other things.
31
Check detailed contents on
http://dbaboss.com/
Manual (SQL*Plus)
• To create a new pluggable database from the seed database, all we have to do is tell Oracle where the file
should be placed. We can do this using one of two methods. The first method uses the
FILE_NAME_CONVERT clause in the CREATE PLUGGABLE DATABASE statement.
• CONN / AS SYSDBA
• CREATE PLUGGABLE DATABASE pdb2 ADMIN USER pdb_adm IDENTIFIED BY Password1
•
FILE_NAME_CONVERT=('/u01/app/oracle/oradata/cdb1/pdbseed/','/u01/app/oracle/oradata/cdb1/pdb2/'
);
• Alternatively, we can specify the PDB_FILE_NAME_CONVERT initialization parameter before calling the
command without using the FILE_NAME_CONVERT clause.
• CONN / AS SYSDBA
• ALTER SESSION SET
PDB_FILE_NAME_CONVERT='/u01/app/oracle/oradata/cdb1/pdbseed/','/u01/app/oracle/oradata/cdb1/p
db3/';
• CREATE PLUGGABLE DATABASE pdb3 ADMIN USER pdb_adm IDENTIFIED BY Password1;
• Every time there is a need to convert file locations, either of these two methods will work. For the
remainder of the article I will stick to using the FILE_NAME_CONVERT method to cut down on the
variations I have to display.
• We can see the PDBs are present by querying the DBA_PDBS and V$PDBS views.
• COLUMN pdb_name FORMAT A20
32
Check detailed contents on
http://dbaboss.com/
• SQL>SELECT pdb_name, status
• FROM dba_pdbs
• ORDER BY pdb_name;
• PDB_NAME STATUS
• -------------------- -------------
• PDB$SEED NORMAL
• PDB1 NORMAL
• PDB2 NEW
• PDB3 NEW
• SQL>
• SELECT name, open_mode
• FROM v$pdbs
• ORDER BY name;
• NAME OPEN_MODE
• ------------------------------ ----------
• PDB$SEED READ ONLY
• PDB1 MOUNTED
• PDB2 MOUNTED
• PDB3 MOUNTED
• SQL>
33
Check detailed contents on
http://dbaboss.com/
• The PDBs are created with the status of 'NEW'. They must be opened in READ WRITE mode at least once for the integration of the PDB
into the CDB to be complete.
• ALTER PLUGGABLE DATABASE pdb2 OPEN READ WRITE;
• ALTER PLUGGABLE DATABASE pdb3 OPEN READ WRITE;
• SELECT pdb_name, status
• FROM dba_pdbs
• ORDER BY pdb_name;
• PDB_NAME STATUS
• -------------------- -------------
• PDB$SEED NORMAL
• PDB1 NORMAL
• PDB2 NORMAL
• PDB3 NORMAL
• SQL>
• SELECT name, open_mode
• FROM v$pdbs
• ORDER BY name;
• NAME OPEN_MODE
• ------------------------------ ----------
• PDB$SEED READ ONLY
• PDB1 MOUNTED
• PDB2 READ WRITE
• PDB3 READ WRITE
• SQL>
34
Check detailed contents on
http://dbaboss.com/
Ad

More Related Content

What's hot (20)

Using oracle12c pluggable databases to archive
Using oracle12c pluggable databases to archiveUsing oracle12c pluggable databases to archive
Using oracle12c pluggable databases to archive
Secure-24
 
Simplify Consolidation with Oracle Database 12c
Simplify Consolidation with Oracle Database 12cSimplify Consolidation with Oracle Database 12c
Simplify Consolidation with Oracle Database 12c
Maris Elsins
 
Oracle 12c Multitenant architecture
Oracle 12c Multitenant architectureOracle 12c Multitenant architecture
Oracle 12c Multitenant architecture
naderattia
 
Oracle database 12c introduction- Satyendra Pasalapudi
Oracle database 12c introduction- Satyendra PasalapudiOracle database 12c introduction- Satyendra Pasalapudi
Oracle database 12c introduction- Satyendra Pasalapudi
pasalapudi123
 
Reduce planned database down time with Oracle technology
Reduce planned database down time with Oracle technologyReduce planned database down time with Oracle technology
Reduce planned database down time with Oracle technology
Kirill Loifman
 
Exploring Oracle Database 12c Multitenant best practices for your Cloud
Exploring Oracle Database 12c Multitenant best practices for your CloudExploring Oracle Database 12c Multitenant best practices for your Cloud
Exploring Oracle Database 12c Multitenant best practices for your Cloud
dyahalom
 
Oracle 12c and its pluggable databases
Oracle 12c and its pluggable databasesOracle 12c and its pluggable databases
Oracle 12c and its pluggable databases
Gustavo Rene Antunez
 
Oracle 12c Multi Tenant
Oracle 12c Multi TenantOracle 12c Multi Tenant
Oracle 12c Multi Tenant
Red Stack Tech
 
Database Consolidation using the Oracle Multitenant Architecture
Database Consolidation using the Oracle Multitenant ArchitectureDatabase Consolidation using the Oracle Multitenant Architecture
Database Consolidation using the Oracle Multitenant Architecture
Pini Dibask
 
DBA 101 : Calling all New Database Administrators (WP)
DBA 101 : Calling all New Database Administrators (WP)DBA 101 : Calling all New Database Administrators (WP)
DBA 101 : Calling all New Database Administrators (WP)
Gustavo Rene Antunez
 
Oracle Database 12c Multitenant for Consolidation
Oracle Database 12c Multitenant for ConsolidationOracle Database 12c Multitenant for Consolidation
Oracle Database 12c Multitenant for Consolidation
Yudi Herdiana
 
12cR2 Single-Tenant: Multitenant Features for All Editions
12cR2 Single-Tenant: Multitenant Features for All Editions12cR2 Single-Tenant: Multitenant Features for All Editions
12cR2 Single-Tenant: Multitenant Features for All Editions
Franck Pachot
 
Oracle database 12c intro
Oracle database 12c introOracle database 12c intro
Oracle database 12c intro
pasalapudi
 
12 Things about Oracle WebLogic Server 12c
12 Things	 about Oracle WebLogic Server 12c12 Things	 about Oracle WebLogic Server 12c
12 Things about Oracle WebLogic Server 12c
Guatemala User Group
 
RMAN in 12c: The Next Generation (WP)
RMAN in 12c: The Next Generation (WP)RMAN in 12c: The Next Generation (WP)
RMAN in 12c: The Next Generation (WP)
Gustavo Rene Antunez
 
Oracle Basics and Architecture
Oracle Basics and ArchitectureOracle Basics and Architecture
Oracle Basics and Architecture
Sidney Chen
 
Oracle 12c Architecture
Oracle 12c ArchitectureOracle 12c Architecture
Oracle 12c Architecture
AmeerpetTrainingOnline
 
My First 100 days with a MySQL DBMS
My First 100 days with a MySQL DBMSMy First 100 days with a MySQL DBMS
My First 100 days with a MySQL DBMS
Gustavo Rene Antunez
 
SharePoint Storage Best Practices
SharePoint Storage Best PracticesSharePoint Storage Best Practices
SharePoint Storage Best Practices
Mark Ginnebaugh
 
Operating and supporting HBase Clusters
Operating and supporting HBase ClustersOperating and supporting HBase Clusters
Operating and supporting HBase Clusters
enissoz
 
Using oracle12c pluggable databases to archive
Using oracle12c pluggable databases to archiveUsing oracle12c pluggable databases to archive
Using oracle12c pluggable databases to archive
Secure-24
 
Simplify Consolidation with Oracle Database 12c
Simplify Consolidation with Oracle Database 12cSimplify Consolidation with Oracle Database 12c
Simplify Consolidation with Oracle Database 12c
Maris Elsins
 
Oracle 12c Multitenant architecture
Oracle 12c Multitenant architectureOracle 12c Multitenant architecture
Oracle 12c Multitenant architecture
naderattia
 
Oracle database 12c introduction- Satyendra Pasalapudi
Oracle database 12c introduction- Satyendra PasalapudiOracle database 12c introduction- Satyendra Pasalapudi
Oracle database 12c introduction- Satyendra Pasalapudi
pasalapudi123
 
Reduce planned database down time with Oracle technology
Reduce planned database down time with Oracle technologyReduce planned database down time with Oracle technology
Reduce planned database down time with Oracle technology
Kirill Loifman
 
Exploring Oracle Database 12c Multitenant best practices for your Cloud
Exploring Oracle Database 12c Multitenant best practices for your CloudExploring Oracle Database 12c Multitenant best practices for your Cloud
Exploring Oracle Database 12c Multitenant best practices for your Cloud
dyahalom
 
Oracle 12c and its pluggable databases
Oracle 12c and its pluggable databasesOracle 12c and its pluggable databases
Oracle 12c and its pluggable databases
Gustavo Rene Antunez
 
Oracle 12c Multi Tenant
Oracle 12c Multi TenantOracle 12c Multi Tenant
Oracle 12c Multi Tenant
Red Stack Tech
 
Database Consolidation using the Oracle Multitenant Architecture
Database Consolidation using the Oracle Multitenant ArchitectureDatabase Consolidation using the Oracle Multitenant Architecture
Database Consolidation using the Oracle Multitenant Architecture
Pini Dibask
 
DBA 101 : Calling all New Database Administrators (WP)
DBA 101 : Calling all New Database Administrators (WP)DBA 101 : Calling all New Database Administrators (WP)
DBA 101 : Calling all New Database Administrators (WP)
Gustavo Rene Antunez
 
Oracle Database 12c Multitenant for Consolidation
Oracle Database 12c Multitenant for ConsolidationOracle Database 12c Multitenant for Consolidation
Oracle Database 12c Multitenant for Consolidation
Yudi Herdiana
 
12cR2 Single-Tenant: Multitenant Features for All Editions
12cR2 Single-Tenant: Multitenant Features for All Editions12cR2 Single-Tenant: Multitenant Features for All Editions
12cR2 Single-Tenant: Multitenant Features for All Editions
Franck Pachot
 
Oracle database 12c intro
Oracle database 12c introOracle database 12c intro
Oracle database 12c intro
pasalapudi
 
12 Things about Oracle WebLogic Server 12c
12 Things	 about Oracle WebLogic Server 12c12 Things	 about Oracle WebLogic Server 12c
12 Things about Oracle WebLogic Server 12c
Guatemala User Group
 
RMAN in 12c: The Next Generation (WP)
RMAN in 12c: The Next Generation (WP)RMAN in 12c: The Next Generation (WP)
RMAN in 12c: The Next Generation (WP)
Gustavo Rene Antunez
 
Oracle Basics and Architecture
Oracle Basics and ArchitectureOracle Basics and Architecture
Oracle Basics and Architecture
Sidney Chen
 
My First 100 days with a MySQL DBMS
My First 100 days with a MySQL DBMSMy First 100 days with a MySQL DBMS
My First 100 days with a MySQL DBMS
Gustavo Rene Antunez
 
SharePoint Storage Best Practices
SharePoint Storage Best PracticesSharePoint Storage Best Practices
SharePoint Storage Best Practices
Mark Ginnebaugh
 
Operating and supporting HBase Clusters
Operating and supporting HBase ClustersOperating and supporting HBase Clusters
Operating and supporting HBase Clusters
enissoz
 

Similar to Presentation day4 oracle12c (20)

Vijfhart thema-avond-oracle-12c-new-features
Vijfhart thema-avond-oracle-12c-new-featuresVijfhart thema-avond-oracle-12c-new-features
Vijfhart thema-avond-oracle-12c-new-features
mkorremans
 
Create manula and automaticly database
Create manula and automaticly databaseCreate manula and automaticly database
Create manula and automaticly database
Anar Godjaev
 
Aioug vizag oracle12c_new_features
Aioug vizag oracle12c_new_featuresAioug vizag oracle12c_new_features
Aioug vizag oracle12c_new_features
AiougVizagChapter
 
Exploring Oracle Multitenant in Oracle Database 12c
Exploring Oracle Multitenant in Oracle Database 12cExploring Oracle Multitenant in Oracle Database 12c
Exploring Oracle Multitenant in Oracle Database 12c
Zohar Elkayam
 
Oracle Database 12.1.0.2 New Features
Oracle Database 12.1.0.2 New FeaturesOracle Database 12.1.0.2 New Features
Oracle Database 12.1.0.2 New Features
Alex Zaballa
 
Migration to Oracle Multitenant
Migration to Oracle MultitenantMigration to Oracle Multitenant
Migration to Oracle Multitenant
Jitendra Singh
 
Denver SQL Saturday The Next Frontier
Denver SQL Saturday The Next FrontierDenver SQL Saturday The Next Frontier
Denver SQL Saturday The Next Frontier
Kellyn Pot'Vin-Gorman
 
Take your database source code and data under control
Take your database source code and data under controlTake your database source code and data under control
Take your database source code and data under control
Marcin Przepiórowski
 
Tips, Tricks & Best Practices for large scale HDInsight Deployments
Tips, Tricks & Best Practices for large scale HDInsight DeploymentsTips, Tricks & Best Practices for large scale HDInsight Deployments
Tips, Tricks & Best Practices for large scale HDInsight Deployments
Ashish Thapliyal
 
Clone_a_remote_PDB_in_Data_Guard_Environments_19c_1698741799.pdf
Clone_a_remote_PDB_in_Data_Guard_Environments_19c_1698741799.pdfClone_a_remote_PDB_in_Data_Guard_Environments_19c_1698741799.pdf
Clone_a_remote_PDB_in_Data_Guard_Environments_19c_1698741799.pdf
Alireza Kamrani
 
MySQL database
MySQL databaseMySQL database
MySQL database
lalit choudhary
 
Copy Data Management for the DBA
Copy Data Management for the DBACopy Data Management for the DBA
Copy Data Management for the DBA
Kellyn Pot'Vin-Gorman
 
MySQL highav Availability
MySQL highav AvailabilityMySQL highav Availability
MySQL highav Availability
Baruch Osoveskiy
 
60 Admin Tips
60 Admin Tips60 Admin Tips
60 Admin Tips
Gabriella Davis
 
Oracle Database 12.1.0.2 New Features
Oracle Database 12.1.0.2 New FeaturesOracle Database 12.1.0.2 New Features
Oracle Database 12.1.0.2 New Features
Deiby Gómez
 
ZFS Workshop
ZFS WorkshopZFS Workshop
ZFS Workshop
APNIC
 
Scylla Summit 2016: Compose on Containing the Database
Scylla Summit 2016: Compose on Containing the DatabaseScylla Summit 2016: Compose on Containing the Database
Scylla Summit 2016: Compose on Containing the Database
ScyllaDB
 
Flashback in OCI
Flashback in OCIFlashback in OCI
Flashback in OCI
Tércio Costa
 
Creating database
Creating databaseCreating database
Creating database
Hitesh Kumar Markam
 
Top 20 FAQs on the Autonomous Database
Top 20 FAQs on the Autonomous DatabaseTop 20 FAQs on the Autonomous Database
Top 20 FAQs on the Autonomous Database
Sandesh Rao
 
Vijfhart thema-avond-oracle-12c-new-features
Vijfhart thema-avond-oracle-12c-new-featuresVijfhart thema-avond-oracle-12c-new-features
Vijfhart thema-avond-oracle-12c-new-features
mkorremans
 
Create manula and automaticly database
Create manula and automaticly databaseCreate manula and automaticly database
Create manula and automaticly database
Anar Godjaev
 
Aioug vizag oracle12c_new_features
Aioug vizag oracle12c_new_featuresAioug vizag oracle12c_new_features
Aioug vizag oracle12c_new_features
AiougVizagChapter
 
Exploring Oracle Multitenant in Oracle Database 12c
Exploring Oracle Multitenant in Oracle Database 12cExploring Oracle Multitenant in Oracle Database 12c
Exploring Oracle Multitenant in Oracle Database 12c
Zohar Elkayam
 
Oracle Database 12.1.0.2 New Features
Oracle Database 12.1.0.2 New FeaturesOracle Database 12.1.0.2 New Features
Oracle Database 12.1.0.2 New Features
Alex Zaballa
 
Migration to Oracle Multitenant
Migration to Oracle MultitenantMigration to Oracle Multitenant
Migration to Oracle Multitenant
Jitendra Singh
 
Denver SQL Saturday The Next Frontier
Denver SQL Saturday The Next FrontierDenver SQL Saturday The Next Frontier
Denver SQL Saturday The Next Frontier
Kellyn Pot'Vin-Gorman
 
Take your database source code and data under control
Take your database source code and data under controlTake your database source code and data under control
Take your database source code and data under control
Marcin Przepiórowski
 
Tips, Tricks & Best Practices for large scale HDInsight Deployments
Tips, Tricks & Best Practices for large scale HDInsight DeploymentsTips, Tricks & Best Practices for large scale HDInsight Deployments
Tips, Tricks & Best Practices for large scale HDInsight Deployments
Ashish Thapliyal
 
Clone_a_remote_PDB_in_Data_Guard_Environments_19c_1698741799.pdf
Clone_a_remote_PDB_in_Data_Guard_Environments_19c_1698741799.pdfClone_a_remote_PDB_in_Data_Guard_Environments_19c_1698741799.pdf
Clone_a_remote_PDB_in_Data_Guard_Environments_19c_1698741799.pdf
Alireza Kamrani
 
Oracle Database 12.1.0.2 New Features
Oracle Database 12.1.0.2 New FeaturesOracle Database 12.1.0.2 New Features
Oracle Database 12.1.0.2 New Features
Deiby Gómez
 
ZFS Workshop
ZFS WorkshopZFS Workshop
ZFS Workshop
APNIC
 
Scylla Summit 2016: Compose on Containing the Database
Scylla Summit 2016: Compose on Containing the DatabaseScylla Summit 2016: Compose on Containing the Database
Scylla Summit 2016: Compose on Containing the Database
ScyllaDB
 
Top 20 FAQs on the Autonomous Database
Top 20 FAQs on the Autonomous DatabaseTop 20 FAQs on the Autonomous Database
Top 20 FAQs on the Autonomous Database
Sandesh Rao
 
Ad

Recently uploaded (20)

VKS-Python-FIe Handling text CSV Binary.pptx
VKS-Python-FIe Handling text CSV Binary.pptxVKS-Python-FIe Handling text CSV Binary.pptx
VKS-Python-FIe Handling text CSV Binary.pptx
Vinod Srivastava
 
Molecular methods diagnostic and monitoring of infection - Repaired.pptx
Molecular methods diagnostic and monitoring of infection  -  Repaired.pptxMolecular methods diagnostic and monitoring of infection  -  Repaired.pptx
Molecular methods diagnostic and monitoring of infection - Repaired.pptx
7tzn7x5kky
 
GenAI for Quant Analytics: survey-analytics.ai
GenAI for Quant Analytics: survey-analytics.aiGenAI for Quant Analytics: survey-analytics.ai
GenAI for Quant Analytics: survey-analytics.ai
Inspirient
 
Geometry maths presentation for begginers
Geometry maths presentation for begginersGeometry maths presentation for begginers
Geometry maths presentation for begginers
zrjacob283
 
Deloitte Analytics - Applying Process Mining in an audit context
Deloitte Analytics - Applying Process Mining in an audit contextDeloitte Analytics - Applying Process Mining in an audit context
Deloitte Analytics - Applying Process Mining in an audit context
Process mining Evangelist
 
Safety Innovation in Mt. Vernon A Westchester County Model for New Rochelle a...
Safety Innovation in Mt. Vernon A Westchester County Model for New Rochelle a...Safety Innovation in Mt. Vernon A Westchester County Model for New Rochelle a...
Safety Innovation in Mt. Vernon A Westchester County Model for New Rochelle a...
James Francis Paradigm Asset Management
 
Ppt. Nikhil.pptxnshwuudgcudisisshvehsjks
Ppt. Nikhil.pptxnshwuudgcudisisshvehsjksPpt. Nikhil.pptxnshwuudgcudisisshvehsjks
Ppt. Nikhil.pptxnshwuudgcudisisshvehsjks
panchariyasahil
 
Adobe Analytics NOAM Central User Group April 2025 Agent AI: Uncovering the S...
Adobe Analytics NOAM Central User Group April 2025 Agent AI: Uncovering the S...Adobe Analytics NOAM Central User Group April 2025 Agent AI: Uncovering the S...
Adobe Analytics NOAM Central User Group April 2025 Agent AI: Uncovering the S...
gmuir1066
 
Calories_Prediction_using_Linear_Regression.pptx
Calories_Prediction_using_Linear_Regression.pptxCalories_Prediction_using_Linear_Regression.pptx
Calories_Prediction_using_Linear_Regression.pptx
TijiLMAHESHWARI
 
How iCode cybertech Helped Me Recover My Lost Funds
How iCode cybertech Helped Me Recover My Lost FundsHow iCode cybertech Helped Me Recover My Lost Funds
How iCode cybertech Helped Me Recover My Lost Funds
ireneschmid345
 
04302025_CCC TUG_DataVista: The Design Story
04302025_CCC TUG_DataVista: The Design Story04302025_CCC TUG_DataVista: The Design Story
04302025_CCC TUG_DataVista: The Design Story
ccctableauusergroup
 
VKS-Python Basics for Beginners and advance.pptx
VKS-Python Basics for Beginners and advance.pptxVKS-Python Basics for Beginners and advance.pptx
VKS-Python Basics for Beginners and advance.pptx
Vinod Srivastava
 
Secure_File_Storage_Hybrid_Cryptography.pptx..
Secure_File_Storage_Hybrid_Cryptography.pptx..Secure_File_Storage_Hybrid_Cryptography.pptx..
Secure_File_Storage_Hybrid_Cryptography.pptx..
yuvarajreddy2002
 
Just-In-Timeasdfffffffghhhhhhhhhhj Systems.ppt
Just-In-Timeasdfffffffghhhhhhhhhhj Systems.pptJust-In-Timeasdfffffffghhhhhhhhhhj Systems.ppt
Just-In-Timeasdfffffffghhhhhhhhhhj Systems.ppt
ssuser5f8f49
 
CTS EXCEPTIONSPrediction of Aluminium wire rod physical properties through AI...
CTS EXCEPTIONSPrediction of Aluminium wire rod physical properties through AI...CTS EXCEPTIONSPrediction of Aluminium wire rod physical properties through AI...
CTS EXCEPTIONSPrediction of Aluminium wire rod physical properties through AI...
ThanushsaranS
 
computer organization and assembly language.docx
computer organization and assembly language.docxcomputer organization and assembly language.docx
computer organization and assembly language.docx
alisoftwareengineer1
 
C++_OOPs_DSA1_Presentation_Template.pptx
C++_OOPs_DSA1_Presentation_Template.pptxC++_OOPs_DSA1_Presentation_Template.pptx
C++_OOPs_DSA1_Presentation_Template.pptx
aquibnoor22079
 
03 Daniel 2-notes.ppt seminario escatologia
03 Daniel 2-notes.ppt seminario escatologia03 Daniel 2-notes.ppt seminario escatologia
03 Daniel 2-notes.ppt seminario escatologia
Alexander Romero Arosquipa
 
Conic Sectionfaggavahabaayhahahahahs.pptx
Conic Sectionfaggavahabaayhahahahahs.pptxConic Sectionfaggavahabaayhahahahahs.pptx
Conic Sectionfaggavahabaayhahahahahs.pptx
taiwanesechetan
 
Simple_AI_Explanation_English somplr.pptx
Simple_AI_Explanation_English somplr.pptxSimple_AI_Explanation_English somplr.pptx
Simple_AI_Explanation_English somplr.pptx
ssuser2aa19f
 
VKS-Python-FIe Handling text CSV Binary.pptx
VKS-Python-FIe Handling text CSV Binary.pptxVKS-Python-FIe Handling text CSV Binary.pptx
VKS-Python-FIe Handling text CSV Binary.pptx
Vinod Srivastava
 
Molecular methods diagnostic and monitoring of infection - Repaired.pptx
Molecular methods diagnostic and monitoring of infection  -  Repaired.pptxMolecular methods diagnostic and monitoring of infection  -  Repaired.pptx
Molecular methods diagnostic and monitoring of infection - Repaired.pptx
7tzn7x5kky
 
GenAI for Quant Analytics: survey-analytics.ai
GenAI for Quant Analytics: survey-analytics.aiGenAI for Quant Analytics: survey-analytics.ai
GenAI for Quant Analytics: survey-analytics.ai
Inspirient
 
Geometry maths presentation for begginers
Geometry maths presentation for begginersGeometry maths presentation for begginers
Geometry maths presentation for begginers
zrjacob283
 
Deloitte Analytics - Applying Process Mining in an audit context
Deloitte Analytics - Applying Process Mining in an audit contextDeloitte Analytics - Applying Process Mining in an audit context
Deloitte Analytics - Applying Process Mining in an audit context
Process mining Evangelist
 
Safety Innovation in Mt. Vernon A Westchester County Model for New Rochelle a...
Safety Innovation in Mt. Vernon A Westchester County Model for New Rochelle a...Safety Innovation in Mt. Vernon A Westchester County Model for New Rochelle a...
Safety Innovation in Mt. Vernon A Westchester County Model for New Rochelle a...
James Francis Paradigm Asset Management
 
Ppt. Nikhil.pptxnshwuudgcudisisshvehsjks
Ppt. Nikhil.pptxnshwuudgcudisisshvehsjksPpt. Nikhil.pptxnshwuudgcudisisshvehsjks
Ppt. Nikhil.pptxnshwuudgcudisisshvehsjks
panchariyasahil
 
Adobe Analytics NOAM Central User Group April 2025 Agent AI: Uncovering the S...
Adobe Analytics NOAM Central User Group April 2025 Agent AI: Uncovering the S...Adobe Analytics NOAM Central User Group April 2025 Agent AI: Uncovering the S...
Adobe Analytics NOAM Central User Group April 2025 Agent AI: Uncovering the S...
gmuir1066
 
Calories_Prediction_using_Linear_Regression.pptx
Calories_Prediction_using_Linear_Regression.pptxCalories_Prediction_using_Linear_Regression.pptx
Calories_Prediction_using_Linear_Regression.pptx
TijiLMAHESHWARI
 
How iCode cybertech Helped Me Recover My Lost Funds
How iCode cybertech Helped Me Recover My Lost FundsHow iCode cybertech Helped Me Recover My Lost Funds
How iCode cybertech Helped Me Recover My Lost Funds
ireneschmid345
 
04302025_CCC TUG_DataVista: The Design Story
04302025_CCC TUG_DataVista: The Design Story04302025_CCC TUG_DataVista: The Design Story
04302025_CCC TUG_DataVista: The Design Story
ccctableauusergroup
 
VKS-Python Basics for Beginners and advance.pptx
VKS-Python Basics for Beginners and advance.pptxVKS-Python Basics for Beginners and advance.pptx
VKS-Python Basics for Beginners and advance.pptx
Vinod Srivastava
 
Secure_File_Storage_Hybrid_Cryptography.pptx..
Secure_File_Storage_Hybrid_Cryptography.pptx..Secure_File_Storage_Hybrid_Cryptography.pptx..
Secure_File_Storage_Hybrid_Cryptography.pptx..
yuvarajreddy2002
 
Just-In-Timeasdfffffffghhhhhhhhhhj Systems.ppt
Just-In-Timeasdfffffffghhhhhhhhhhj Systems.pptJust-In-Timeasdfffffffghhhhhhhhhhj Systems.ppt
Just-In-Timeasdfffffffghhhhhhhhhhj Systems.ppt
ssuser5f8f49
 
CTS EXCEPTIONSPrediction of Aluminium wire rod physical properties through AI...
CTS EXCEPTIONSPrediction of Aluminium wire rod physical properties through AI...CTS EXCEPTIONSPrediction of Aluminium wire rod physical properties through AI...
CTS EXCEPTIONSPrediction of Aluminium wire rod physical properties through AI...
ThanushsaranS
 
computer organization and assembly language.docx
computer organization and assembly language.docxcomputer organization and assembly language.docx
computer organization and assembly language.docx
alisoftwareengineer1
 
C++_OOPs_DSA1_Presentation_Template.pptx
C++_OOPs_DSA1_Presentation_Template.pptxC++_OOPs_DSA1_Presentation_Template.pptx
C++_OOPs_DSA1_Presentation_Template.pptx
aquibnoor22079
 
Conic Sectionfaggavahabaayhahahahahs.pptx
Conic Sectionfaggavahabaayhahahahahs.pptxConic Sectionfaggavahabaayhahahahahs.pptx
Conic Sectionfaggavahabaayhahahahahs.pptx
taiwanesechetan
 
Simple_AI_Explanation_English somplr.pptx
Simple_AI_Explanation_English somplr.pptxSimple_AI_Explanation_English somplr.pptx
Simple_AI_Explanation_English somplr.pptx
ssuser2aa19f
 
Ad

Presentation day4 oracle12c

  • 1. ORACLE DATABASE 12C CREATION OF CDB AND PDB DATABASE (Reference – Oracle documentation) Check detailed contents on http://dbaboss.com/ 1
  • 2. CREATION OF CDB • Reference links • http://docs.oracle.com/database/121/ADMI N/cdb_create.htm • http://www.toadworld.com/platforms/oracl e/w/wiki/11059.container-database-cdb- with-pluggable-databases-pdbs-in-oracle- 12c-rac.aspx Check detailed contents on http://dbaboss.com/ 2
  • 3. • Multitenant : Create and Configure a Container Database (CDB) in Oracle Database 12c Release 1 (12.1) • The multitenant option introduced in Oracle Database 12c allows a single container database (CDB) to host multiple separate pluggable databases (PDB). This article covers the options available to create a new container database. • There are articles specifically about installation of Oracle Database 12c here. • •Oracle Universal Installer (OUI) • •Database Configuration Assistant (DBCA) • •Manual Creation • •Configure a Container Database (CDB) • • Oracle Universal Installer (OUI) • The Oracle Universal Installer (OUI) allows you to create a container database (CDB) during the software installation. The "Typical Install Configuration" screen has a checkbox to indicate the database is a container database. You can optionally create a single pluggable database (PDB) in this screen also. 3 Check detailed contents on http://dbaboss.com/
  • 4. Check detailed contents on http://dbaboss.com/ 4
  • 5. Check detailed contents on http://dbaboss.com/ 5
  • 6. • Database Configuration Assistant (DBCA) • The Database Configuration Assistant (DBCA) gives similar options to the Oracle Universal Installer (OUI). The "Creation Mode" page allows you to enter the default installation configuration details directly 6 Check detailed contents on http://dbaboss.com/
  • 7. 7 Check detailed contents on http://dbaboss.com/
  • 8. 8 Check detailed contents on http://dbaboss.com/
  • 9. Manual Creation • Creating Multitenant Container database • Creating container database is similar to creating non-container database but with few changes. Following changes should be made if we want to create container database • • 1) Define enable_pluggable_database parameter to true. • By default this parameter is false. Meaning that by default database will be created as non- multitenant database. If you want to create multitenant database, you have to make this parameter true. • Failing to make this parameter true will give you following error if you try to create multitenant database • • ORA-65093: multitenant container database not set up properly • • 2) Change in “Create database” command • So if you are going to create multitenant database using “create database” command, you need to add couple of clause to this command. • Following clause needs to be added • •ENABLE PLUGGABLE DATABASE • •SEED 9 Check detailed contents on http://dbaboss.com/
  • 10. • Following steps can be used to create multitenant database • • Step 1) Create pfile and spfile • • You can use following parameters as generic to create test database. You can alter the memory parameters and include/remove many parameters as required. But these are good enough to create test instance 10 Check detailed contents on http://dbaboss.com/
  • 11. • ORA-04031: unable to allocate 4096 bytes of shared memory (“java pool”,”/51835a0f_ReflectionFactoryGet”,”JOXLE^5cb1fb41″,”:SGAClass”) • Step 2) Create database command • Check detailed contents on http://dbaboss.com/ 11
  • 12. • Step 3) run catcdb.sql • • DO NOT RUN catlog.sql and catproc.sql • If you are creating container database, you need to run only catcdb.sql. • This script takes care of running all other dependent scripts internally. • • If you run catlog.sql and catproc.sql, this script will fail later at many stages with following errors • catcon: ALL catcon-related output will be written to dbmsxdbt_catcon_2527.lst • catcon: See dbmsxdbt*.log files for output generated by scripts • catcon: See dbmsxdbt_*.lst files for spool files, if any • catconInit: database is not open on the default instance • Unexpected error encountered in catconInit; exiting • In case of normal database creation, we usually run catlog.sql and catproc.sql as mentioned in http://docs.oracle.com/database/121/ADMIN/create.htm#ADMIN11082 • But that’s for normal database creation and process is same in 12c. But for creating container database, we should be running only catcdb.sql • • catcdb.sql will ask for 3 inputs – new sys password, new system password and temp tablespace • SQL> @?/rdbms/admin/catcdb.sql • Session altered. • Enter new password for SYS: • Enter new password for SYSTEM: • Enter temporary tablespace name: TEMP • Once you provide this, it will create root container database with whatever database name you give. Container name for root container DB will be CDB$ROOT. • It will also create seed pluggable container database. Container name will be seed$pdb 12 Check detailed contents on http://dbaboss.com/
  • 13. • SQL> @?/rdbms/admin/catcdb.sql • Session altered. • Enter new password for SYS: • Enter new password for SYSTEM: • Enter temporary tablespace name: TEMP • Once you provide this, it will create root container database with whatever database name you give. Container name for root container DB will be CDB$ROOT. • It will also create seed pluggable container database. Container name will be seed$pdb • • Step 4) Run utlrp.sql to compile invalid objects. • • There will be few invalid objects in database. You can run utlrp.sql to compile the same 13 Check detailed contents on http://dbaboss.com/
  • 14. • Validation • • You can run few commands to validate if you database is container databases and what all containers it has. • • We have a new column in v$database called CDB. If your database is container database it will show as YES • SYS.DEOCDB.PRIMARY>select name, cdb from v$database; • NAME CDB • --------- --- • DEOCDB YES • 1 row selected. • You can also check different containers in your database using following • SYS.DEOCDB.PRIMARY>select CON_ID, NAME, OPEN_MODE, TOTAL_SIZE from v$containers; • CON_ID NAME OPEN_MODE TOTAL_SIZE • ---------- ------------------------------ ---------- ---------- • 1 CDB$ROOT READ WRITE 0 • 2 PDB$SEED READ ONLY 1599078400 • V$CONTAINER is the new view available in 12c. When this is run from root container, it shows all containers CDB as well as PDB. But if you run same command from any PDB, it will show that container. • SYS.DEOCDB.PRIMARY>alter session set container=PDB$SEED; • Session altered. • SYS.DEOCDB.PRIMARY>select CON_ID, NAME, OPEN_MODE, TOTAL_SIZE from v$containers; • CON_ID NAME OPEN_MODE TOTAL_SIZE • ---------- ------------------------------ ---------- ---------- • 2 PDB$SEED READ ONLY 1599078400 14 Check detailed contents on http://dbaboss.com/
  • 15. • Manual Creation through DBCA scripts • Using the DBCA, either during or after the software installation, is the recommended approach to creating CDBs, but it is possible to create them manually. • The simplest way to see how manual creation of a CDB is accomplished is to run the DBCA. Pick "Advanced Mode", select the "Custom Database" option (no template used) and at the end, uncheck the "Create Database" option and check the "Generate Database Creation Scripts" option. The resulting scripts will include one called "CreateDB.sql", with contents similar to this. • SET VERIFY OFF • connect "SYS"/"&&sysPassword" as SYSDBA • set echo on • spool /u01/app/oracle/admin/cdb1/scripts/CreateDB.log append • startup nomount pfile="/u01/app/oracle/admin/cdb1/scripts/init.ora"; • CREATE DATABASE "cdb1" • MAXINSTANCES 8 • MAXLOGHISTORY 1 • MAXLOGFILES 16 • MAXLOGMEMBERS 3 • MAXDATAFILES 1024 • DATAFILE '/u01/app/oracle/oradata/cdb1/system01.dbf' SIZE 700M REUSE • AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED • EXTENT MANAGEMENT LOCAL • SYSAUX DATAFILE '/u01/app/oracle/oradata/cdb1/sysaux01.dbf' SIZE 550M REUSE • AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED • SMALLFILE DEFAULT TEMPORARY TABLESPACE TEMP TEMPFILE '/u01/app/oracle/oradata/cdb1/temp01.dbf' SIZE 20M REUSE • AUTOEXTEND ON NEXT 640K MAXSIZE UNLIMITED 15 Check detailed contents on http://dbaboss.com/
  • 16. • SMALLFILE UNDO TABLESPACE "UNDOTBS1" DATAFILE '/u01/app/oracle/oradata/cdb1/undotbs01.dbf' SIZE 200M REUSE • AUTOEXTEND ON NEXT 5120K MAXSIZE UNLIMITED • CHARACTER SET AL32UTF8 • NATIONAL CHARACTER SET AL16UTF16 • LOGFILE GROUP 1 ('/u01/app/oracle/oradata/cdb1/redo01.log') SIZE 50M, • GROUP 2 ('/u01/app/oracle/oradata/cdb1/redo02.log') SIZE 50M, • GROUP 3 ('/u01/app/oracle/oradata/cdb1/redo03.log') SIZE 50M • USER SYS IDENTIFIED BY "&&sysPassword" USER SYSTEM IDENTIFIED BY "&&systemPassword" • enable pluggable database • seed file_name_convert=('/u01/app/oracle/oradata/cdb1/system01.dbf','/u01/app/oracle/oradata/cdb1/pdbseed/system01.dbf', • '/u01/app/oracle/oradata/cdb1/sysaux01.dbf','/u01/app/oracle/oradata/cdb1/pdbseed/sysaux01.dbf', • '/u01/app/oracle/oradata/cdb1/temp01.dbf','/u01/app/oracle/oradata/cdb1/pdbseed/temp01.dbf', • '/u01/app/oracle/oradata/cdb1/undotbs01.dbf','/u01/app/oracle/oradata/cdb1/pdbseed/undotbs01.dbf'); • spool off • Most of the CREATE DATABASE statement should look familiar. Notice the ENABLE PLUGGABLE DATABASE and SEED FILE_NAME_CONVERT options in bold. • When the ENABLE PLUGGABLE DATABASE clause is present, the database is created as a CDB with both root and seed. • The SEED FILE_NAME_CONVERT clause is used to determine the seed file names, based on the root file names. If you are using Oracle Managed Files (OMF), this clause is not necessary. If you prefer, you can specify the seed datafiles explicitly, rather than using the convert. • SEED • SYSTEM DATAFILE '/u01/app/oracle/oradata/cdb1/pdbseed/system01.dbf' SIZE 700M REUSE • AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED • EXTENT MANAGEMENT LOCAL • SYSAUX DATAFILE '/u01/app/oracle/oradata/cdb1/pdbseed/sysaux01.dbf' SIZE 550M REUSE • AUTOEXTEND ON NEXT 10240K MAXSIZE UNLIMITED 16Check detailed contents on http://dbaboss.com/
  • 17. CREATION OF PDB DATABASES • There are articles specifically about installation of Oracle Database 12c here. • •Oracle Universal Installer (OUI) • •Database Configuration Assistant (DBCA) • ◦Create a Pluggable Database (PDB) using the DBCA • ◦Unplug a Pluggable Database (PDB) using the DBCA • ◦Plugin a Pluggable Database (PDB) using the DBCA • ◦Delete a Pluggable Database (PDB) using the DBCA • ◦Configure a Pluggable Database (PDB) using the DBCA • •SQL Developer • •Cloud Control GRID Infrastructure 12c • •Manual (SQL*Plus) • ◦Create a Pluggable Database (PDB) Manually • ◦Unplug a Pluggable Database (PDB) Manually • ◦Plugin a Pluggable Database (PDB) Manually • ◦Clone a Pluggable Database (PDB) Manually • ◦Clone a Pluggable Database (PDB) Manually (Metadata-Only : NO DATA) • ◦Delete a Pluggable Database (PDB) Manually 17 Check detailed contents on http://dbaboss.com/
  • 18. • Reference links • https://docs.oracle.com/database/121/SQLRF /statements_6010.htm • http://docs.oracle.com/database/121/ADMIN /cdb_plug.htm • http://www.morganslibrary.org/reference/con tainer_db.html 18 Check detailed contents on http://dbaboss.com/
  • 19. • Oracle Universal Installer (OUI) 19 Check detailed contents on http://dbaboss.com/
  • 20. • Database Configuration Assistant (DBCA) • The DBCA includes a new option on the opening "Database Operation" screen that allows you to manage the pluggable databases of an existing container database. Select the "Manage Pluggable Databases" option and click the "Next" button. 20 Check detailed contents on http://dbaboss.com/
  • 21. 21 Check detailed contents on http://dbaboss.com/
  • 22. • Create a Pluggable Database (PDB) using the DBCA • On the "Manage Pluggable Databases" screen shown previously, select the "Create a Pluggable Database" option and click the "Next" button. On the resulting screen, select the container database to house the new pluggable database and click the "Next" button. 22 Check detailed contents on http://dbaboss.com/
  • 23. • Select the "Create a new Pluggable Database" option and click the "Next" button. If you were plugging in a previously unplugged database, you would select the PDB Archive or PDB File Set options to match the format of the files containing the unplugged PDB. 23 Check detailed contents on http://dbaboss.com/
  • 24. • Enter the pluggable database name, database location and admin credentials, then click the "Next" button 24 Check detailed contents on http://dbaboss.com/
  • 25. • If you are happy with the summary information, click the "Finish" button 25 Check detailed contents on http://dbaboss.com/
  • 26. • Wait while the pluggable database is created. Once complete, click the "OK" button on the message dialog and the "Close" button on the main screen. The new pluggable database has been created as a clone of the seed database. 26 Check detailed contents on http://dbaboss.com/
  • 27. SQL Developer • The DBA section of SQL Developer includes tree node called "Container Database". 27 Check detailed contents on http://dbaboss.com/
  • 28. • Right-clicking on the "Container Database" node produces a popup menu showing you what operations are available 28 Check detailed contents on http://dbaboss.com/
  • 29. • Right-clicking on a specific PDB node produces a popup menu showing only those operations that are relevant to that PDB 29 Check detailed contents on http://dbaboss.com/
  • 30. Cloud Control • Cloud Control 12cR3 onward supports pluggable database functionality. Once you click on the container database, the "Oracle Database > Control > Open/Close Pluggable Database" menu option allows you to control the state of the PDBs owned by the CDB. 30 Check detailed contents on http://dbaboss.com/
  • 31. • The "Oracle Database > Provision > Provision Pluggable Database" menu option allows you to perform other operations PDBs owned by the CDB, including cloning, unplugging amongst other things. 31 Check detailed contents on http://dbaboss.com/
  • 32. Manual (SQL*Plus) • To create a new pluggable database from the seed database, all we have to do is tell Oracle where the file should be placed. We can do this using one of two methods. The first method uses the FILE_NAME_CONVERT clause in the CREATE PLUGGABLE DATABASE statement. • CONN / AS SYSDBA • CREATE PLUGGABLE DATABASE pdb2 ADMIN USER pdb_adm IDENTIFIED BY Password1 • FILE_NAME_CONVERT=('/u01/app/oracle/oradata/cdb1/pdbseed/','/u01/app/oracle/oradata/cdb1/pdb2/' ); • Alternatively, we can specify the PDB_FILE_NAME_CONVERT initialization parameter before calling the command without using the FILE_NAME_CONVERT clause. • CONN / AS SYSDBA • ALTER SESSION SET PDB_FILE_NAME_CONVERT='/u01/app/oracle/oradata/cdb1/pdbseed/','/u01/app/oracle/oradata/cdb1/p db3/'; • CREATE PLUGGABLE DATABASE pdb3 ADMIN USER pdb_adm IDENTIFIED BY Password1; • Every time there is a need to convert file locations, either of these two methods will work. For the remainder of the article I will stick to using the FILE_NAME_CONVERT method to cut down on the variations I have to display. • We can see the PDBs are present by querying the DBA_PDBS and V$PDBS views. • COLUMN pdb_name FORMAT A20 32 Check detailed contents on http://dbaboss.com/
  • 33. • SQL>SELECT pdb_name, status • FROM dba_pdbs • ORDER BY pdb_name; • PDB_NAME STATUS • -------------------- ------------- • PDB$SEED NORMAL • PDB1 NORMAL • PDB2 NEW • PDB3 NEW • SQL> • SELECT name, open_mode • FROM v$pdbs • ORDER BY name; • NAME OPEN_MODE • ------------------------------ ---------- • PDB$SEED READ ONLY • PDB1 MOUNTED • PDB2 MOUNTED • PDB3 MOUNTED • SQL> 33 Check detailed contents on http://dbaboss.com/
  • 34. • The PDBs are created with the status of 'NEW'. They must be opened in READ WRITE mode at least once for the integration of the PDB into the CDB to be complete. • ALTER PLUGGABLE DATABASE pdb2 OPEN READ WRITE; • ALTER PLUGGABLE DATABASE pdb3 OPEN READ WRITE; • SELECT pdb_name, status • FROM dba_pdbs • ORDER BY pdb_name; • PDB_NAME STATUS • -------------------- ------------- • PDB$SEED NORMAL • PDB1 NORMAL • PDB2 NORMAL • PDB3 NORMAL • SQL> • SELECT name, open_mode • FROM v$pdbs • ORDER BY name; • NAME OPEN_MODE • ------------------------------ ---------- • PDB$SEED READ ONLY • PDB1 MOUNTED • PDB2 READ WRITE • PDB3 READ WRITE • SQL> 34 Check detailed contents on http://dbaboss.com/