SlideShare ist ein Scribd-Unternehmen logo
1 von 7
Pluggable Database Tutorial Part 1
Osama Mustafa Page 1
[oracle@test12c Desktop]$ sqlplus / as sysdba
SQL*Plus: Release 12.1.0.1.0 Production on Wed Jul 3 19:05:10 2013
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production
With the Partitioning, OLAP, Advanced Analytics, Real Application Testing
and Unified Auditing options
SQL>show con_name
CON_NAME
-------------------
CDB$ROOT
Where
CON_NAME:
Displays the name of the Container to which you are connected when connected to a
Consolidated Database. For non-consolidated database, it will return "Non Consolidated".
SQL>show con_id
CON_ID
------------
1
Where
CON_ID: Displays the id of the Container to which you are connected when connected to a
Consolidated Database. If issued when connected to a non-Consolidated Database, this command
returns 0.
Pluggable Database Tutorial Part 1
Osama Mustafa Page 2
Now I want to check how Name for my my pluggable database , while installation i chosen five
container with prefix db_
SQL>select name, con_id from v$active_services order by 1;
NAME CON_ID
SYS$BACKGROUND 1
SYS$USERS 1
db12c 1
db12cXDB 1
Db_1 2
Db_2 3
Listener will look like the below:
Example how to connect Container, In my case i didn't create service in tnsnames.ora i am using
easy connect:
SQL>conn sys/sys@localhost:1521/db_1 as sysdba
Connected.
SQL>show con_name
CON_NAME
----------------
DB_1
SQL>show con_id
Pluggable Database Tutorial Part 1
Osama Mustafa Page 3
CON_ID
------------
3
Work On Pluggable Database:
After create Container and enable pluggable database, we need to add new one since container
empty.
Under /u01/app/oracle/oradata ,create new folder
[oracle@test12c db12c]$ mkdir test
[oracle@test12c db12c]$ chmod -R 775 test
Sqlplus / as sysdba
SQL >create pluggable database TEST admin user admin identified by admin
file_name_convert=
('/u01/app/oracle/oradata/db12c/pdbseed/','/u01/app/oracle/oradata/db12c/test/');
Pluggable database created.
SQL>select pdb_name, status from cdb_pdbs;
PDB_NAME Status
----------------------- ------------
PDB$SEED NORMAL
TEST NEW
SQL>select name, open_mode from v$pdbs;
NAME OPEN_MODE
------------------------------ ----------
PDB$SEED READ ONLY
TEST MOUNTED
SQL>select name, con_id from v$active_services order by 1;
NAME CON_ID
----------------------------------------------
SYS$BACKGROUND 1
SYS$USERS 1
db12c 1
db12cXDB 1
TEST 3
Pluggable Database Tutorial Part 1
Osama Mustafa Page 4
Now Con_id=3 , Most of Oracle Data Dictionary contains new_column called con_id , to check
datafile related to new pluaggable database :
SQL>select name from v$datafile where con_id=3 ;
NAME
--------------------------------------------------------------------------------
/u01/app/oracle/oradata/db12c/gls/system01.dbf
/u01/app/oracle/oradata/db12c/gls/sysaux01.dbf
Manage Oracle Container and Pluggable Database :
If you need to shutdown container, it will not be different as before:
SQL>show con_name
CON_NAME
------------------------------
CDB$ROOT
SQL>shutdown ;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL>startup ;
ORACLE instance started.
Total System Global Area 1252663296 bytes
Fixed Size 2287864 bytes
Variable Size 788530952 bytes
Database Buffers 452984832 bytes
Redo Buffers 8859648 bytes
Database mounted.
Database opened.
Check status for PDB :
SQL>select name, open_mode from v$pdbs;
NAME OPEN_MODE
------------------------------ ----------
PDB$SEED READ ONLY
TEST MOUNTED
Pluggable Database Tutorial Part 1
Osama Mustafa Page 5
If you the above Status for Test Database you will see it as mounted state which mean we cannot
create anything yet on database, Let's Open it
SQL>alter pluggable database TEST open;
Pluggable database altered.
SQL>select name,open_mode from v$pdbs ;
NAME OPEN_MODE
------------------------------ ----------
PDB$SEED READ ONLY
TEST READ WRITE
The same for close Option
SQL>alter pluggable database TEST close immediate;
Pluggable database altered.
SQL>select name,open_mode from v$pdbs ;
NAME OPEN_MODE
------------------------------ ----------
PDB$SEED READ ONLY
TEST MOUNTED
Now you can open/close all pluggable database :
SQL >Alter pluggable database all Open;
SQL >Alter pluggable database all close ;
SQL>select tablespace_name, con_id from cdb_tablespaces where con_id=3 ;
TABLESPACE_NAME CON_ID
------------------------------ ----------
SYSTEM 3
SYSAUX 3
TEMP 3
to get data file
SQL>select file_name, con_id from cdb_data_files where con_id=3 ;
NAME
--------------------------------------------------------------------------------
/u01/app/oracle/oradata/db12c/gls/system01.dbf
/u01/app/oracle/oradata/db12c/gls/sysaux01.dbf
Pluggable Database Tutorial Part 1
Osama Mustafa Page 6
SQL>select file_name, con_id from cdb_temp_files where con_id=3;
FILE_NAME CON_ID
------------------------------------------
/u01/app/oracle/oradata/db12c/gls/pdbseed_temp01.dbf 3
If you do the below query to create table space, it will not be created under TEST database,
therefore it will be created on root :
SQL >create tablespace cdata datafile '/u01/app/oracle/oradata/db12c/gls/test.dbf' SIZE
30M;
SQL>select tablespace_name, con_id from cdb_tablespaces order by
con_id;
TABLESPACE_NAME CON_ID
------------------------------ ----------
SYSTEM 1
CDATA 1
SYSAUX 1
TEMP 1
UNDOTBS1 1
USERS 1
SYSTEM 2
TEMP 2
SYSAUX 2
SYSTEM 3
SYSAUX 3
TEMP 3
12 rows selected.
Same for temp tablespace :
SQL>create temporary tablespace root_temp tempfile
'/u01/app/oracle/oradata/db12c/temp_01.dbf' SIZE 30M;
If you need to create Tablespace in pluggable database follow the below, you have to options
 connect to pluggable database in our case test using tnsnames.ora or easy connect
o connect sys/sys@localhost:1521/test
 alter session command line
o alter session set container= <Name>
Pluggable Database Tutorial Part 1
Osama Mustafa Page 7
SQL>alter session set container=TEST;
Session altered.
SQL>create tablespace pdb_test datafile
'/u01/app/oracle/oradata/db12c/TEST/test_pdb.dbf' SIZE 20M;
Tablespace created.
SQL>select tablespace_name, con_id from cdb_tablespaces order by con_id;
TABLESPACE_NAME CON_ID
------------------------------ ----------
SYSTEM 3
SYSAUX 3
TEMP 3
PDB_TEST 3
Same for temporary table space, next post i will provide another manage for pluggable database.
Reference:
1- oracle Documentation Here
2- Oracle Documentation Here

Weitere ähnliche Inhalte

Was ist angesagt?

Are You Ready for 12c? Data Migration and Upgrade Best Practices
Are You Ready for 12c? Data Migration and Upgrade Best PracticesAre You Ready for 12c? Data Migration and Upgrade Best Practices
Are You Ready for 12c? Data Migration and Upgrade Best PracticesPerformance Tuning Corporation
 
Install oracle grid infrastructure on linux 6.6
Install oracle grid infrastructure on linux 6.6Install oracle grid infrastructure on linux 6.6
Install oracle grid infrastructure on linux 6.6Osama Mustafa
 
Installing oracle timesten database On Linux
Installing oracle timesten database On Linux Installing oracle timesten database On Linux
Installing oracle timesten database On Linux Osama Mustafa
 
Eouc 12 on 12c osama mustafa
Eouc 12 on 12c osama mustafaEouc 12 on 12c osama mustafa
Eouc 12 on 12c osama mustafaOsama Mustafa
 
Install and upgrade Oracle grid infrastructure 12.1.0.2
Install and upgrade Oracle grid infrastructure 12.1.0.2Install and upgrade Oracle grid infrastructure 12.1.0.2
Install and upgrade Oracle grid infrastructure 12.1.0.2Biju Thomas
 
Oracle api gateway installation as cluster and single node
Oracle api gateway installation as cluster and single nodeOracle api gateway installation as cluster and single node
Oracle api gateway installation as cluster and single nodeOsama Mustafa
 
Step by Step Restore rman to different host
Step by Step Restore rman to different hostStep by Step Restore rman to different host
Step by Step Restore rman to different hostOsama Mustafa
 
Step by Step to Install oracle grid 11.2.0.3 on solaris 11.1
Step by Step to Install oracle grid 11.2.0.3 on solaris 11.1Step by Step to Install oracle grid 11.2.0.3 on solaris 11.1
Step by Step to Install oracle grid 11.2.0.3 on solaris 11.1Osama Mustafa
 
Oracle business intelligence enterprise edition 11g
Oracle business intelligence enterprise edition 11gOracle business intelligence enterprise edition 11g
Oracle business intelligence enterprise edition 11guzzal basak
 
Oracle Linux 7 Beta First Look (Installations)
Oracle Linux 7 Beta First Look (Installations)Oracle Linux 7 Beta First Look (Installations)
Oracle Linux 7 Beta First Look (Installations)Osama Mustafa
 
Install oracle solaris 11.2 using gui
Install oracle solaris 11.2 using guiInstall oracle solaris 11.2 using gui
Install oracle solaris 11.2 using guiOsama Mustafa
 
Oracle data guard configuration in 12c
Oracle data guard configuration in 12cOracle data guard configuration in 12c
Oracle data guard configuration in 12cuzzal basak
 
10 ways to improve your rman script
10 ways to improve your rman script10 ways to improve your rman script
10 ways to improve your rman scriptMaris Elsins
 

Was ist angesagt? (20)

Are You Ready for 12c? Data Migration and Upgrade Best Practices
Are You Ready for 12c? Data Migration and Upgrade Best PracticesAre You Ready for 12c? Data Migration and Upgrade Best Practices
Are You Ready for 12c? Data Migration and Upgrade Best Practices
 
12c on RHEL7
12c on RHEL712c on RHEL7
12c on RHEL7
 
Ebs clone r12.2.4
Ebs clone r12.2.4Ebs clone r12.2.4
Ebs clone r12.2.4
 
Install oracle grid infrastructure on linux 6.6
Install oracle grid infrastructure on linux 6.6Install oracle grid infrastructure on linux 6.6
Install oracle grid infrastructure on linux 6.6
 
Installing oracle timesten database On Linux
Installing oracle timesten database On Linux Installing oracle timesten database On Linux
Installing oracle timesten database On Linux
 
12c installation
12c installation12c installation
12c installation
 
Eouc 12 on 12c osama mustafa
Eouc 12 on 12c osama mustafaEouc 12 on 12c osama mustafa
Eouc 12 on 12c osama mustafa
 
Install and upgrade Oracle grid infrastructure 12.1.0.2
Install and upgrade Oracle grid infrastructure 12.1.0.2Install and upgrade Oracle grid infrastructure 12.1.0.2
Install and upgrade Oracle grid infrastructure 12.1.0.2
 
Oracle api gateway installation as cluster and single node
Oracle api gateway installation as cluster and single nodeOracle api gateway installation as cluster and single node
Oracle api gateway installation as cluster and single node
 
Step by Step Restore rman to different host
Step by Step Restore rman to different hostStep by Step Restore rman to different host
Step by Step Restore rman to different host
 
Step by Step to Install oracle grid 11.2.0.3 on solaris 11.1
Step by Step to Install oracle grid 11.2.0.3 on solaris 11.1Step by Step to Install oracle grid 11.2.0.3 on solaris 11.1
Step by Step to Install oracle grid 11.2.0.3 on solaris 11.1
 
Oracle business intelligence enterprise edition 11g
Oracle business intelligence enterprise edition 11gOracle business intelligence enterprise edition 11g
Oracle business intelligence enterprise edition 11g
 
Oracle Linux 7 Beta First Look (Installations)
Oracle Linux 7 Beta First Look (Installations)Oracle Linux 7 Beta First Look (Installations)
Oracle Linux 7 Beta First Look (Installations)
 
21 Rac
21 Rac21 Rac
21 Rac
 
Install oracle solaris 11.2 using gui
Install oracle solaris 11.2 using guiInstall oracle solaris 11.2 using gui
Install oracle solaris 11.2 using gui
 
61 Rac
61 Rac61 Rac
61 Rac
 
Oracle data guard configuration in 12c
Oracle data guard configuration in 12cOracle data guard configuration in 12c
Oracle data guard configuration in 12c
 
41 Pdfsam
41 Pdfsam41 Pdfsam
41 Pdfsam
 
10 ways to improve your rman script
10 ways to improve your rman script10 ways to improve your rman script
10 ways to improve your rman script
 
141 Rac
141 Rac141 Rac
141 Rac
 

Andere mochten auch

Oracle Compute Cloud Service vs. Amazon Web Services EC2 : A Hands-On Review
Oracle Compute Cloud Service vs. Amazon Web Services EC2 : A Hands-On ReviewOracle Compute Cloud Service vs. Amazon Web Services EC2 : A Hands-On Review
Oracle Compute Cloud Service vs. Amazon Web Services EC2 : A Hands-On ReviewRevelation Technologies
 
competitive pricing in business market
competitive pricing in business marketcompetitive pricing in business market
competitive pricing in business marketwelcometofacebook
 
25605 tutorial migrasi database dari my sql ke oracle ( kelompok 9 )
25605 tutorial migrasi database dari my sql ke oracle ( kelompok 9 )25605 tutorial migrasi database dari my sql ke oracle ( kelompok 9 )
25605 tutorial migrasi database dari my sql ke oracle ( kelompok 9 )Hendry Aryadi
 
firm performance presentation(INDUSTRAT)
firm performance presentation(INDUSTRAT)firm performance presentation(INDUSTRAT)
firm performance presentation(INDUSTRAT)welcometofacebook
 
Database reports generation(database)
Database reports generation(database)Database reports generation(database)
Database reports generation(database)welcometofacebook
 
Migrasi database mysql ke oracle-sql developer
Migrasi database mysql ke oracle-sql developerMigrasi database mysql ke oracle-sql developer
Migrasi database mysql ke oracle-sql developerIqbal Arfandi
 
Aws S3 uploading tricks 2016
Aws S3 uploading tricks 2016Aws S3 uploading tricks 2016
Aws S3 uploading tricks 2016Bogdan Naydenov
 
Oracle smart flash cache
Oracle smart flash cacheOracle smart flash cache
Oracle smart flash cachexiangrong
 
Exadata Smart Scan - What is so smart about it?
Exadata Smart Scan  - What is so smart about it?Exadata Smart Scan  - What is so smart about it?
Exadata Smart Scan - What is so smart about it?Uwe Hesse
 
Tutorial Migrasi Database dari Microsoft SQL Server ke Oracle Database
Tutorial Migrasi Database dari Microsoft SQL Server ke Oracle DatabaseTutorial Migrasi Database dari Microsoft SQL Server ke Oracle Database
Tutorial Migrasi Database dari Microsoft SQL Server ke Oracle DatabaseHari Kurnia
 
Oracl DBA lab manual
Oracl DBA lab manualOracl DBA lab manual
Oracl DBA lab manualAbdulla Shaik
 
Oracle sql tutorial
Oracle sql tutorialOracle sql tutorial
Oracle sql tutorialMohd Tousif
 
Review Oracle OpenWorld 2015 - Overview, Main themes, Announcements and Future
Review Oracle OpenWorld 2015 - Overview, Main themes, Announcements and FutureReview Oracle OpenWorld 2015 - Overview, Main themes, Announcements and Future
Review Oracle OpenWorld 2015 - Overview, Main themes, Announcements and FutureLucas Jellema
 
Tell Me Something About Yourself - Job Interview Answers.
Tell Me Something About Yourself - Job Interview Answers.Tell Me Something About Yourself - Job Interview Answers.
Tell Me Something About Yourself - Job Interview Answers.Uttam Agrawal
 

Andere mochten auch (20)

Oracle Compute Cloud Service vs. Amazon Web Services EC2 : A Hands-On Review
Oracle Compute Cloud Service vs. Amazon Web Services EC2 : A Hands-On ReviewOracle Compute Cloud Service vs. Amazon Web Services EC2 : A Hands-On Review
Oracle Compute Cloud Service vs. Amazon Web Services EC2 : A Hands-On Review
 
competitive pricing in business market
competitive pricing in business marketcompetitive pricing in business market
competitive pricing in business market
 
Oracle tutorial
Oracle tutorialOracle tutorial
Oracle tutorial
 
25605 tutorial migrasi database dari my sql ke oracle ( kelompok 9 )
25605 tutorial migrasi database dari my sql ke oracle ( kelompok 9 )25605 tutorial migrasi database dari my sql ke oracle ( kelompok 9 )
25605 tutorial migrasi database dari my sql ke oracle ( kelompok 9 )
 
firm performance presentation(INDUSTRAT)
firm performance presentation(INDUSTRAT)firm performance presentation(INDUSTRAT)
firm performance presentation(INDUSTRAT)
 
Database reports generation(database)
Database reports generation(database)Database reports generation(database)
Database reports generation(database)
 
Migrasi database mysql ke oracle-sql developer
Migrasi database mysql ke oracle-sql developerMigrasi database mysql ke oracle-sql developer
Migrasi database mysql ke oracle-sql developer
 
Oracle Database View
Oracle Database ViewOracle Database View
Oracle Database View
 
Cloud Trends 2017
Cloud Trends 2017Cloud Trends 2017
Cloud Trends 2017
 
Aws S3 uploading tricks 2016
Aws S3 uploading tricks 2016Aws S3 uploading tricks 2016
Aws S3 uploading tricks 2016
 
Oracle smart flash cache
Oracle smart flash cacheOracle smart flash cache
Oracle smart flash cache
 
Exadata Smart Scan - What is so smart about it?
Exadata Smart Scan  - What is so smart about it?Exadata Smart Scan  - What is so smart about it?
Exadata Smart Scan - What is so smart about it?
 
Tutorial Migrasi Database dari Microsoft SQL Server ke Oracle Database
Tutorial Migrasi Database dari Microsoft SQL Server ke Oracle DatabaseTutorial Migrasi Database dari Microsoft SQL Server ke Oracle Database
Tutorial Migrasi Database dari Microsoft SQL Server ke Oracle Database
 
AWR & ASH Analysis
AWR & ASH AnalysisAWR & ASH Analysis
AWR & ASH Analysis
 
Oracl DBA lab manual
Oracl DBA lab manualOracl DBA lab manual
Oracl DBA lab manual
 
Oracle sql tutorial
Oracle sql tutorialOracle sql tutorial
Oracle sql tutorial
 
Oracle Tablespace - Basic
Oracle Tablespace - BasicOracle Tablespace - Basic
Oracle Tablespace - Basic
 
Review Oracle OpenWorld 2015 - Overview, Main themes, Announcements and Future
Review Oracle OpenWorld 2015 - Overview, Main themes, Announcements and FutureReview Oracle OpenWorld 2015 - Overview, Main themes, Announcements and Future
Review Oracle OpenWorld 2015 - Overview, Main themes, Announcements and Future
 
Tell Me Something About Yourself - Job Interview Answers.
Tell Me Something About Yourself - Job Interview Answers.Tell Me Something About Yourself - Job Interview Answers.
Tell Me Something About Yourself - Job Interview Answers.
 
Oracle Database Trigger
Oracle Database TriggerOracle Database Trigger
Oracle Database Trigger
 

Ähnlich wie Pluggable database tutorial

The first bug on Oracle Database 12c: how to create a pdb by cloning a remote...
The first bug on Oracle Database 12c: how to create a pdb by cloning a remote...The first bug on Oracle Database 12c: how to create a pdb by cloning a remote...
The first bug on Oracle Database 12c: how to create a pdb by cloning a remote...Marco Vigelini
 
Oracle12c Pluggable Database Hands On - TROUG 2014
Oracle12c Pluggable Database Hands On - TROUG 2014Oracle12c Pluggable Database Hands On - TROUG 2014
Oracle12c Pluggable Database Hands On - TROUG 2014Özgür Umut Vurgun
 
Database decommission process
Database decommission processDatabase decommission process
Database decommission processK Kumar Guduru
 
12c db upgrade from 11.2.0.4
12c db upgrade from 11.2.0.412c db upgrade from 11.2.0.4
12c db upgrade from 11.2.0.4uzzal basak
 
12c: Testing audit features for Data Pump (Export & Import) and RMAN jobs
12c: Testing audit features for Data Pump (Export & Import) and RMAN jobs12c: Testing audit features for Data Pump (Export & Import) and RMAN jobs
12c: Testing audit features for Data Pump (Export & Import) and RMAN jobsMonowar Mukul
 
br_test_lossof-datafile_10g.doc
br_test_lossof-datafile_10g.docbr_test_lossof-datafile_10g.doc
br_test_lossof-datafile_10g.docLucky Ally
 
oracle cloud with 2 nodes processing
oracle cloud with 2 nodes processingoracle cloud with 2 nodes processing
oracle cloud with 2 nodes processingmahdi ahmadi
 
How to create a pluggable database by cloning an existing local pdb
How to create a pluggable database by cloning an existing local pdbHow to create a pluggable database by cloning an existing local pdb
How to create a pluggable database by cloning an existing local pdbMarco Vigelini
 
New Features for Multitenant in Oracle Database 21c
New Features for Multitenant in Oracle Database 21cNew Features for Multitenant in Oracle Database 21c
New Features for Multitenant in Oracle Database 21cMarkus Flechtner
 
Oracle 12c Automatic Data Optimization (ADO) - ILM
Oracle 12c Automatic Data Optimization (ADO) - ILMOracle 12c Automatic Data Optimization (ADO) - ILM
Oracle 12c Automatic Data Optimization (ADO) - ILMMonowar Mukul
 
TrinityCore server install guide
TrinityCore server install guideTrinityCore server install guide
TrinityCore server install guideSeungmin Shin
 
Odv oracle customer_demo
Odv oracle customer_demoOdv oracle customer_demo
Odv oracle customer_demoViaggio Italia
 
Oracle 12c Multi Tenant
Oracle 12c Multi TenantOracle 12c Multi Tenant
Oracle 12c Multi TenantRed Stack Tech
 
Oracle database 12.2 new features
Oracle database 12.2 new featuresOracle database 12.2 new features
Oracle database 12.2 new featuresAlfredo Krieg
 
IOUG Collaborate 2015 - PDB Cloning Using SQL Commands
IOUG Collaborate 2015 - PDB Cloning Using SQL CommandsIOUG Collaborate 2015 - PDB Cloning Using SQL Commands
IOUG Collaborate 2015 - PDB Cloning Using SQL CommandsLeighton Nelson
 

Ähnlich wie Pluggable database tutorial (20)

The first bug on Oracle Database 12c: how to create a pdb by cloning a remote...
The first bug on Oracle Database 12c: how to create a pdb by cloning a remote...The first bug on Oracle Database 12c: how to create a pdb by cloning a remote...
The first bug on Oracle Database 12c: how to create a pdb by cloning a remote...
 
Oracle12c Pluggable Database Hands On - TROUG 2014
Oracle12c Pluggable Database Hands On - TROUG 2014Oracle12c Pluggable Database Hands On - TROUG 2014
Oracle12c Pluggable Database Hands On - TROUG 2014
 
Database decommission process
Database decommission processDatabase decommission process
Database decommission process
 
12c db upgrade from 11.2.0.4
12c db upgrade from 11.2.0.412c db upgrade from 11.2.0.4
12c db upgrade from 11.2.0.4
 
12c: Testing audit features for Data Pump (Export & Import) and RMAN jobs
12c: Testing audit features for Data Pump (Export & Import) and RMAN jobs12c: Testing audit features for Data Pump (Export & Import) and RMAN jobs
12c: Testing audit features for Data Pump (Export & Import) and RMAN jobs
 
br_test_lossof-datafile_10g.doc
br_test_lossof-datafile_10g.docbr_test_lossof-datafile_10g.doc
br_test_lossof-datafile_10g.doc
 
oracle cloud with 2 nodes processing
oracle cloud with 2 nodes processingoracle cloud with 2 nodes processing
oracle cloud with 2 nodes processing
 
Db health check
Db health checkDb health check
Db health check
 
Physical_Standby_Database_R12.2.4
Physical_Standby_Database_R12.2.4Physical_Standby_Database_R12.2.4
Physical_Standby_Database_R12.2.4
 
How to create a pluggable database by cloning an existing local pdb
How to create a pluggable database by cloning an existing local pdbHow to create a pluggable database by cloning an existing local pdb
How to create a pluggable database by cloning an existing local pdb
 
oracle dba
oracle dbaoracle dba
oracle dba
 
New Features for Multitenant in Oracle Database 21c
New Features for Multitenant in Oracle Database 21cNew Features for Multitenant in Oracle Database 21c
New Features for Multitenant in Oracle Database 21c
 
Oracle 12c Automatic Data Optimization (ADO) - ILM
Oracle 12c Automatic Data Optimization (ADO) - ILMOracle 12c Automatic Data Optimization (ADO) - ILM
Oracle 12c Automatic Data Optimization (ADO) - ILM
 
TrinityCore server install guide
TrinityCore server install guideTrinityCore server install guide
TrinityCore server install guide
 
Odv oracle customer_demo
Odv oracle customer_demoOdv oracle customer_demo
Odv oracle customer_demo
 
Less04 Instance
Less04 InstanceLess04 Instance
Less04 Instance
 
Oracle 12c Multi Tenant
Oracle 12c Multi TenantOracle 12c Multi Tenant
Oracle 12c Multi Tenant
 
Oracle database 12.2 new features
Oracle database 12.2 new featuresOracle database 12.2 new features
Oracle database 12.2 new features
 
IOUG Collaborate 2015 - PDB Cloning Using SQL Commands
IOUG Collaborate 2015 - PDB Cloning Using SQL CommandsIOUG Collaborate 2015 - PDB Cloning Using SQL Commands
IOUG Collaborate 2015 - PDB Cloning Using SQL Commands
 
Firebird
FirebirdFirebird
Firebird
 

Mehr von Osama Mustafa

Case study for software architect
Case study for software architectCase study for software architect
Case study for software architectOsama Mustafa
 
Does cloud mean the end of the dba
Does cloud mean the end of the dbaDoes cloud mean the end of the dba
Does cloud mean the end of the dbaOsama Mustafa
 
Using git hub for your code
Using git hub for your codeUsing git hub for your code
Using git hub for your codeOsama Mustafa
 
Java business service
Java business serviceJava business service
Java business serviceOsama Mustafa
 
Steps creating data_integration_services
Steps creating data_integration_servicesSteps creating data_integration_services
Steps creating data_integration_servicesOsama Mustafa
 
Build, Deploy and Run Node Js Application on Azure using Docker
Build, Deploy and Run Node Js Application on Azure using DockerBuild, Deploy and Run Node Js Application on Azure using Docker
Build, Deploy and Run Node Js Application on Azure using DockerOsama Mustafa
 
Helping implementer dealing with famous siebel based system messages and er...
Helping implementer dealing with famous siebel   based system messages and er...Helping implementer dealing with famous siebel   based system messages and er...
Helping implementer dealing with famous siebel based system messages and er...Osama Mustafa
 
Weblogic 101 for dba
Weblogic  101 for dbaWeblogic  101 for dba
Weblogic 101 for dbaOsama Mustafa
 
Oracle obia 11.1.1.10.1 installation
Oracle obia 11.1.1.10.1 installation Oracle obia 11.1.1.10.1 installation
Oracle obia 11.1.1.10.1 installation Osama Mustafa
 
Oracle Enterprise manager 13c Installation
Oracle Enterprise manager 13c InstallationOracle Enterprise manager 13c Installation
Oracle Enterprise manager 13c InstallationOsama Mustafa
 
Erp installation r12.2
Erp installation r12.2Erp installation r12.2
Erp installation r12.2Osama Mustafa
 
Install oracle siebel on windows 2008 r2
Install oracle siebel on windows 2008 r2Install oracle siebel on windows 2008 r2
Install oracle siebel on windows 2008 r2Osama Mustafa
 
How to apply new patch on siebel 8.2.2.4
How to apply new patch on siebel 8.2.2.4How to apply new patch on siebel 8.2.2.4
How to apply new patch on siebel 8.2.2.4Osama Mustafa
 
J2ee user managment using dwh builder
J2ee user managment using dwh builderJ2ee user managment using dwh builder
J2ee user managment using dwh builderOsama Mustafa
 
How to add storage to esxi 5.5
How to add storage to esxi 5.5How to add storage to esxi 5.5
How to add storage to esxi 5.5Osama Mustafa
 

Mehr von Osama Mustafa (20)

Case study for software architect
Case study for software architectCase study for software architect
Case study for software architect
 
DevOps for database
DevOps for databaseDevOps for database
DevOps for database
 
Does cloud mean the end of the dba
Does cloud mean the end of the dbaDoes cloud mean the end of the dba
Does cloud mean the end of the dba
 
Using git hub for your code
Using git hub for your codeUsing git hub for your code
Using git hub for your code
 
DevOps Project
DevOps Project DevOps Project
DevOps Project
 
Java business service
Java business serviceJava business service
Java business service
 
Steps creating data_integration_services
Steps creating data_integration_servicesSteps creating data_integration_services
Steps creating data_integration_services
 
Build, Deploy and Run Node Js Application on Azure using Docker
Build, Deploy and Run Node Js Application on Azure using DockerBuild, Deploy and Run Node Js Application on Azure using Docker
Build, Deploy and Run Node Js Application on Azure using Docker
 
Helping implementer dealing with famous siebel based system messages and er...
Helping implementer dealing with famous siebel   based system messages and er...Helping implementer dealing with famous siebel   based system messages and er...
Helping implementer dealing with famous siebel based system messages and er...
 
Weblogic and docker
Weblogic and dockerWeblogic and docker
Weblogic and docker
 
Weblogic 101 for dba
Weblogic  101 for dbaWeblogic  101 for dba
Weblogic 101 for dba
 
Oracle obia 11.1.1.10.1 installation
Oracle obia 11.1.1.10.1 installation Oracle obia 11.1.1.10.1 installation
Oracle obia 11.1.1.10.1 installation
 
Oracle Enterprise manager 13c Installation
Oracle Enterprise manager 13c InstallationOracle Enterprise manager 13c Installation
Oracle Enterprise manager 13c Installation
 
Erp installation r12.2
Erp installation r12.2Erp installation r12.2
Erp installation r12.2
 
OBIA Installation
OBIA Installation OBIA Installation
OBIA Installation
 
Install oracle siebel on windows 2008 r2
Install oracle siebel on windows 2008 r2Install oracle siebel on windows 2008 r2
Install oracle siebel on windows 2008 r2
 
Oracle autovue
Oracle autovueOracle autovue
Oracle autovue
 
How to apply new patch on siebel 8.2.2.4
How to apply new patch on siebel 8.2.2.4How to apply new patch on siebel 8.2.2.4
How to apply new patch on siebel 8.2.2.4
 
J2ee user managment using dwh builder
J2ee user managment using dwh builderJ2ee user managment using dwh builder
J2ee user managment using dwh builder
 
How to add storage to esxi 5.5
How to add storage to esxi 5.5How to add storage to esxi 5.5
How to add storage to esxi 5.5
 

Kürzlich hochgeladen

What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr LapshynFwdays
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 

Kürzlich hochgeladen (20)

What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
"Federated learning: out of reach no matter how close",Oleksandr Lapshyn
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 

Pluggable database tutorial

  • 1. Pluggable Database Tutorial Part 1 Osama Mustafa Page 1 [oracle@test12c Desktop]$ sqlplus / as sysdba SQL*Plus: Release 12.1.0.1.0 Production on Wed Jul 3 19:05:10 2013 Copyright (c) 1982, 2013, Oracle. All rights reserved. Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 - 64bit Production With the Partitioning, OLAP, Advanced Analytics, Real Application Testing and Unified Auditing options SQL>show con_name CON_NAME ------------------- CDB$ROOT Where CON_NAME: Displays the name of the Container to which you are connected when connected to a Consolidated Database. For non-consolidated database, it will return "Non Consolidated". SQL>show con_id CON_ID ------------ 1 Where CON_ID: Displays the id of the Container to which you are connected when connected to a Consolidated Database. If issued when connected to a non-Consolidated Database, this command returns 0.
  • 2. Pluggable Database Tutorial Part 1 Osama Mustafa Page 2 Now I want to check how Name for my my pluggable database , while installation i chosen five container with prefix db_ SQL>select name, con_id from v$active_services order by 1; NAME CON_ID SYS$BACKGROUND 1 SYS$USERS 1 db12c 1 db12cXDB 1 Db_1 2 Db_2 3 Listener will look like the below: Example how to connect Container, In my case i didn't create service in tnsnames.ora i am using easy connect: SQL>conn sys/sys@localhost:1521/db_1 as sysdba Connected. SQL>show con_name CON_NAME ---------------- DB_1 SQL>show con_id
  • 3. Pluggable Database Tutorial Part 1 Osama Mustafa Page 3 CON_ID ------------ 3 Work On Pluggable Database: After create Container and enable pluggable database, we need to add new one since container empty. Under /u01/app/oracle/oradata ,create new folder [oracle@test12c db12c]$ mkdir test [oracle@test12c db12c]$ chmod -R 775 test Sqlplus / as sysdba SQL >create pluggable database TEST admin user admin identified by admin file_name_convert= ('/u01/app/oracle/oradata/db12c/pdbseed/','/u01/app/oracle/oradata/db12c/test/'); Pluggable database created. SQL>select pdb_name, status from cdb_pdbs; PDB_NAME Status ----------------------- ------------ PDB$SEED NORMAL TEST NEW SQL>select name, open_mode from v$pdbs; NAME OPEN_MODE ------------------------------ ---------- PDB$SEED READ ONLY TEST MOUNTED SQL>select name, con_id from v$active_services order by 1; NAME CON_ID ---------------------------------------------- SYS$BACKGROUND 1 SYS$USERS 1 db12c 1 db12cXDB 1 TEST 3
  • 4. Pluggable Database Tutorial Part 1 Osama Mustafa Page 4 Now Con_id=3 , Most of Oracle Data Dictionary contains new_column called con_id , to check datafile related to new pluaggable database : SQL>select name from v$datafile where con_id=3 ; NAME -------------------------------------------------------------------------------- /u01/app/oracle/oradata/db12c/gls/system01.dbf /u01/app/oracle/oradata/db12c/gls/sysaux01.dbf Manage Oracle Container and Pluggable Database : If you need to shutdown container, it will not be different as before: SQL>show con_name CON_NAME ------------------------------ CDB$ROOT SQL>shutdown ; Database closed. Database dismounted. ORACLE instance shut down. SQL>startup ; ORACLE instance started. Total System Global Area 1252663296 bytes Fixed Size 2287864 bytes Variable Size 788530952 bytes Database Buffers 452984832 bytes Redo Buffers 8859648 bytes Database mounted. Database opened. Check status for PDB : SQL>select name, open_mode from v$pdbs; NAME OPEN_MODE ------------------------------ ---------- PDB$SEED READ ONLY TEST MOUNTED
  • 5. Pluggable Database Tutorial Part 1 Osama Mustafa Page 5 If you the above Status for Test Database you will see it as mounted state which mean we cannot create anything yet on database, Let's Open it SQL>alter pluggable database TEST open; Pluggable database altered. SQL>select name,open_mode from v$pdbs ; NAME OPEN_MODE ------------------------------ ---------- PDB$SEED READ ONLY TEST READ WRITE The same for close Option SQL>alter pluggable database TEST close immediate; Pluggable database altered. SQL>select name,open_mode from v$pdbs ; NAME OPEN_MODE ------------------------------ ---------- PDB$SEED READ ONLY TEST MOUNTED Now you can open/close all pluggable database : SQL >Alter pluggable database all Open; SQL >Alter pluggable database all close ; SQL>select tablespace_name, con_id from cdb_tablespaces where con_id=3 ; TABLESPACE_NAME CON_ID ------------------------------ ---------- SYSTEM 3 SYSAUX 3 TEMP 3 to get data file SQL>select file_name, con_id from cdb_data_files where con_id=3 ; NAME -------------------------------------------------------------------------------- /u01/app/oracle/oradata/db12c/gls/system01.dbf /u01/app/oracle/oradata/db12c/gls/sysaux01.dbf
  • 6. Pluggable Database Tutorial Part 1 Osama Mustafa Page 6 SQL>select file_name, con_id from cdb_temp_files where con_id=3; FILE_NAME CON_ID ------------------------------------------ /u01/app/oracle/oradata/db12c/gls/pdbseed_temp01.dbf 3 If you do the below query to create table space, it will not be created under TEST database, therefore it will be created on root : SQL >create tablespace cdata datafile '/u01/app/oracle/oradata/db12c/gls/test.dbf' SIZE 30M; SQL>select tablespace_name, con_id from cdb_tablespaces order by con_id; TABLESPACE_NAME CON_ID ------------------------------ ---------- SYSTEM 1 CDATA 1 SYSAUX 1 TEMP 1 UNDOTBS1 1 USERS 1 SYSTEM 2 TEMP 2 SYSAUX 2 SYSTEM 3 SYSAUX 3 TEMP 3 12 rows selected. Same for temp tablespace : SQL>create temporary tablespace root_temp tempfile '/u01/app/oracle/oradata/db12c/temp_01.dbf' SIZE 30M; If you need to create Tablespace in pluggable database follow the below, you have to options  connect to pluggable database in our case test using tnsnames.ora or easy connect o connect sys/sys@localhost:1521/test  alter session command line o alter session set container= <Name>
  • 7. Pluggable Database Tutorial Part 1 Osama Mustafa Page 7 SQL>alter session set container=TEST; Session altered. SQL>create tablespace pdb_test datafile '/u01/app/oracle/oradata/db12c/TEST/test_pdb.dbf' SIZE 20M; Tablespace created. SQL>select tablespace_name, con_id from cdb_tablespaces order by con_id; TABLESPACE_NAME CON_ID ------------------------------ ---------- SYSTEM 3 SYSAUX 3 TEMP 3 PDB_TEST 3 Same for temporary table space, next post i will provide another manage for pluggable database. Reference: 1- oracle Documentation Here 2- Oracle Documentation Here