SlideShare une entreprise Scribd logo
1  sur  13
ORACLE DATABASE 12C
New Features with CDB, PDB overview
(Reference – Oracle documentation)
Check detailed contents on
http://dbaboss.com/ 1
New Features
• Restoring a table with rman.
• In preceding versions, it was not achievable to restore a table or partition using
existing physical backups. In order to restore a particular object, you must have
logical backup. With 12c R1, you can recover a particular table or partition to a
point-in-time or SCN from RMAN backups in the event of a table drop or truncate.
• When a table or partition recovery is initiated via RMAN, the subsequent action is
performed:
• Required backup sets are identified to recover the table/partition
• An auxiliary database will be constructed to a point-in-time temporarily in the
process of recovering the table/partition
• Required table/partitions will be then exported to a dumpfile using the data
pumps
• Optionally, you can import the table/partitions in the source database
• Rename option while recovery
An example of a table point-in-time recovery via RMAN (ensure you already have a
full database backup from earlier):
Check detailed contents on
http://dbaboss.com/
2
• RMAN> connect target "username/password as SYSBACKUP";
RMAN> RECOVER TABLE username.tablename UNTIL TIME 'TIMESTAMP…'
AUXILIARY DESTINATION '/u01/tablerecovery'
DATAPUMP DESTINATION '/u01/dpump'
DUMP FILE 'tablename.dmp'
NOTABLEIMPORT -- this option avoids importing the table automatically.
REMAP TABLE 'username.tablename': 'username.new_table_name'; -- can rename table with
this option.
• Important notes:
• Ensure satisfactory free space available under /u01 filesystem for auxiliary database and also
to keep the data pump file
• A full database backup must be exists, or at least the SYSTEM related tablespaces
• The following limitations/restrictions are applied on table/partition recovery in RMAN:
• SYS user table/partition can’t be recovered
• Tables/partitions stored under SYSAUX and SYSTEM tablespaces can’t be recovered
• Recovery of a table is not possible when REMAP option used to recovery a table that contains
NOT NULL constraints
Check detailed contents on
http://dbaboss.com/
3
• How to execute SQL statement in RMAN
• In 12c, you can now achieve any SQL and PL/SQL commands in RMAN
without the need of a SQL prefix: you can execute any SQL and PLS/SQL
commands directly from RMAN. How you can execute SQL statements in
RMAN:
• RMAN> SELECT username, machine FROM v$session;
• RMAN> ALTER TABLESPACE users ADD DATAFILE SIZE 12991m;
Check detailed contents on
http://dbaboss.com/
4
• DDL logging
• There was no path choice available to log the DDL action in the previous releases.
In 12cR1, you can now log the DDL action into xml and log files. This will be very
useful to know when the drop or create command was executed and by who. The
ENABLE_DDL_LOGGING initiation parameter must be aligned in order to turn on
this feature. The parameter can be set at the database or session levels. When this
parameter is enabled, all DDL commands are logged in an xml and a log file under
the $ORACLE_BASE/diag/rdbms/DBNAME/log|ddl location. An xml file contains
information, such as DDL command, IP address, timestamp etc. This helps to
identify when a user or table dropped or when a DDL statement is triggered.
•
• To enable DDL logging
• SQL> ALTER SYSTEM|SESSION SET ENABLE_DDL_LOGGING=TRUE;
• The following DDL statements are likely to be recorded in the xml/log file:
• •CREATE|ALTER|DROP|TRUNCATE TABLE
• •DROP USER
• •CREATE|ALTER|DROP PACKAGE|FUNCTION|VIEW|SYNONYM|SEQUENCE
Check detailed contents on
http://dbaboss.com/
5
• Online rename and relocation of an active data file
• Unlike in the previous releases, a data file migration or renaming in Oracle database 12c R1 no
longer requires a number of steps i.e. putting the tablespace in READ ONLY mode, followed by data
file offline action. In 12c R1, a data file can be renamed or moved online simply using the ALTER
DATABASE MOVE DATAFILE SQL statement. While the data file is being transported, the end user
can perform queries, DML and DDL tasks. Moreover, data files can be migrated between storages
e.g. from non-ASM to ASM and vice versa.
•
• Change name a data file:
• SQL> ALTER DATABASE MOVE DATAFILE '/u00/data03/users01.dbf' TO '/u00/data/users_01.dbf';
• Migrate a data file from non-ASM to ASM:
• SQL> ALTER DATABASE MOVE DATAFILE '/u00/data03/users_01.dbf' TO '+DG_DATA';
• Migrate a data file from one ASM disk group to another:
• SQL> ALTER DATABASE MOVE DATAFILE '+DG_DATA/DBNAME/DATAFILE/users_01.dbf ' TO
'+DG_DATA_02';
• Overwrite the data file with the same name, if it exists at the new location:
• SQL> ALTER DATABASE MOVE DATAFILE '/u00/data03/users_01.dbf' TO
'/u00/data_new/users_01.dbf' REUSE;
• Copy the file to a new location whilst retaining the old copy in the old location:
• SQL> ALTER DATABASE MOVE DATAFILE '/u00/data03/users_01.dbf' TO
'/u00/data_new/users_01.dbf' KEEP;
• You can monitor the progress while a data file being moved by querying the v$session_longops
dynamic view. Additionally, you can also refer the alert.log of the database where Oracle writes the
details about action being taken place.
Check detailed contents on
http://dbaboss.com/
6
OS
GROUP
Database
Privilege
Short description
BACKUP
DBA
SYSBACKUP This group allows operating system users to have a limited
set of database backup and recovery related administrative
privileges
DGDBA SYSDG This group allows a group of operating sytem users to have
a limited set of privileges to administer and monitor Oracle
Data Guard
KMDBA SYSKM This allows operating sytem users to have a limited set of
privileges for encryption key management such as Oracle
Wallet Manager management, since, by default, Oracle 12c
encapsulates features such as database vault
Check detailed contents on
http://dbaboss.com/
7
Overview of CDB
• From a physical viewpoint, a CDB has essentially the same structure as a non-
CDB, except that each PDB has its own set of tablespaces (including its own
SYSTEM and SYSAUX tablespaces) and data files.
• One control file
• A CDB has one online redo log and one set of archived redo log files.
• One or more sets of temp files
• By default, the CDB has a single default temporary tablespace named TEMP
that every PDB uses. You may choose to create a different default temporary
tablespace. Only a temporary tablespace that you create while connected to
the root can serve as a default temporary tablespace for the CDB. For an
distinct PDB, you may override the CDB-wide temporary tablespace by
creating a local temporary named TEMP, and then setting it as the default.
• One set of undo data files
Check detailed contents on
http://dbaboss.com/
8
• In a single-instance CDB, only one active undo tablespace exists. For an
Oracle RAC CDB, one active undo tablespace exists for each instance. Only
a common user who has the suitable privileges and whose current
container is the root can create an undo tablespace. All undo tablespaces
are visible in the data dictionaries and related views of all containers.
• A set of system data files for every container.
• The primary physical difference between CDBs and non-CDBs is the system
data files. A non-CDB has only one set of system data files. In contrast, the
root and each PDB in a CDB has its own SYSTEM and SYSAUX tablespaces
and its own complete set of dictionary tables relating the objects in itself.
• In a typical use case, each PDB has its own set of non-system data files.
These data files comprise the data for user-defined schemas and objects
in the PDB.
• The storage of the data dictionary within the PDB permits it to be
portable. You can easily plug and unplug a PDB into a CDB.
Check detailed contents on
http://dbaboss.com/
9
Overview of PDB
• Individually PDB has its own private data dictionary for customer-created database
objects; CDB on the other hand as a whole has the data dictionary for the Oracle-
supplied system each data dictionary defines its own namespace. In other words,
there is global Data dictionary (CDB level) and local one (PDB level).
• There is a new split data dictionary architecture that allows a PDB to be quickly
unplugged from one CDB and plugged into a different CDB
• Each PDB sees a read-only definition of the Oracle-supplied system
• There are global database initialization parameters on CDB level and local ones.
PDB parameters belong only to you particular PDB and will be persistent even after
you unplug you PDB.
• Database users can be global (CDB) or local (PDB only). SYS and SYSTEM users
exist in both DBs right at the beginning. If you create a new user in CDB you will
see it in PDB also. In case of creation of a user on PDB level it will stay local.
• Temporary tablespaces can be global or local
Check detailed contents on
http://dbaboss.com/
10
• Redo logs and Undo tablspace are only global (on CDB level)
• Data Guard acts on the CDB as a whole; RMAN scheduled backups
are done for the CDB as a whole; you can back up a selected PDB
whenever you want to; you can do point-in-time
• An application connects, with no code changes, to a PDB; the
system administrator connects to the CDB; the service named in the
connect string specifies the destination PDB
• A PDB allows a clear declarative definition of an application; one
PDB knows nothing of the other PDBs within the same CDB; each
PDB is a hermetically sealed container. That ensures new level of DB
independence and robust security
Check detailed contents on
http://dbaboss.com/
11
Question and Answer
• Now can we Point-In-Time recovery be conducted at Pluggable Database (PDB) level?
• Yes, it will be possible.
• Now can we have database services be created inside a Pluggable Database (PDB)?
• Of course you can have many services within a PDB. Each will denote the PDB within which it is defined as
the initial current container. Use the usual methods to create, maintain, and drop additional services in a
PDB. A PDB’s default service must not be dropped. Of course, service names should be unique across all
the databases that are registered with a particular listener.
• Now can we have local TEMPORARY tablespace at Pluggable Database (PDB) level?
• In spite, during the PDB formation only SYSTEM and SYSAUX tablespaces created, you can create local
temporary tablespace later for each PDB. UNDO tablespace can NOT be local and stays on the CDB level.
• Why is conventional database mode will be still available in 12c database and later versions?
• Yes, on Oracle 12c you will have two choices of creating a usual old-fashioned Oracle database (non-CDB)
or creating a Container Database (CDB) that will hold all your Pluggable Databases (PDB) that you will
create or plug later. However, based on my information non-CDB mode will be available only in 12c release
1 for compatibility reasons and will be discontinued in 12cR2.
Check detailed contents on
http://dbaboss.com/
12
• Why or not Oracle 12c database have only one container?
Yes and No! In fact, Oracle considers a CDB as well as all PDBs as containers. Every
container has own name. For example a single Container Database (CDB) has a
container name CDB$Root. Each Pluggable database has a container name alike to the
PDB name. On CDB level by default your current container is CDB$Root but you can
switch between PDBs’ containers also. On CDB level you can modified current
container with following SQL
alter session set container = mine_cdb
or verify current container with below SQL:
select Sys_Context('Userenv', 'Con_Name') "current container" from dual;
• Why cloning a PDB from one in a dissimilar CDB supported?
So far it is not seen it in 12c Beta 2, but Oracle intends to provision it in the final
version. You’ll identify the source CDB by creating a database link to it from the CDB in
which you will produce the clone.
• Why online PDB cloning supported?
• Not in 12c Beta2, but Oracle intentions to eliminate this constraint in the final
version by using the same approach that allows online RMAN backup: by re-
constructing any blocks that change during the time it takes to copy the source
PDB’s datafiles.
•
Check detailed contents on
http://dbaboss.com/
13

Contenu connexe

Tendances

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
 
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
 
DB2 LUW - Backup and Recovery
DB2 LUW - Backup and RecoveryDB2 LUW - Backup and Recovery
DB2 LUW - Backup and Recovery
imranasayed
 
Oracle db architecture
Oracle db architectureOracle db architecture
Oracle db architecture
Simon Huang
 
Less04 database instance
Less04 database instanceLess04 database instance
Less04 database instance
Amit Bhalla
 

Tendances (20)

Plugging in oracle database 12c pluggable databases
Plugging in   oracle database 12c pluggable databasesPlugging in   oracle database 12c pluggable databases
Plugging in oracle database 12c pluggable databases
 
Using oracle12c pluggable databases to archive
Using oracle12c pluggable databases to archiveUsing oracle12c pluggable databases to archive
Using oracle12c pluggable databases to archive
 
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
 
Oracle 12c Multitenant architecture
Oracle 12c Multitenant architectureOracle 12c Multitenant architecture
Oracle 12c Multitenant architecture
 
Oracle 12c Multi Tenant
Oracle 12c Multi TenantOracle 12c Multi Tenant
Oracle 12c Multi Tenant
 
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
 
SharePoint Storage Best Practices
SharePoint Storage Best PracticesSharePoint Storage Best Practices
SharePoint Storage Best Practices
 
Oracle Architecture
Oracle ArchitectureOracle Architecture
Oracle Architecture
 
Hbase in action - Chapter 09: Deploying HBase
Hbase in action - Chapter 09: Deploying HBaseHbase in action - Chapter 09: Deploying HBase
Hbase in action - Chapter 09: Deploying HBase
 
Less01 Dba1
Less01 Dba1Less01 Dba1
Less01 Dba1
 
Sql server backup internals
Sql server backup internalsSql server backup internals
Sql server backup internals
 
DB2 LUW - Backup and Recovery
DB2 LUW - Backup and RecoveryDB2 LUW - Backup and Recovery
DB2 LUW - Backup and Recovery
 
Oracle db architecture
Oracle db architectureOracle db architecture
Oracle db architecture
 
HBase In Action - Chapter 04: HBase table design
HBase In Action - Chapter 04: HBase table designHBase In Action - Chapter 04: HBase table design
HBase In Action - Chapter 04: HBase table design
 
Oracle architecture
Oracle architectureOracle architecture
Oracle architecture
 
HBase In Action - Chapter 10 - Operations
HBase In Action - Chapter 10 - OperationsHBase In Action - Chapter 10 - Operations
HBase In Action - Chapter 10 - Operations
 
Less04 database instance
Less04 database instanceLess04 database instance
Less04 database instance
 
Non-Relational Postgres
Non-Relational PostgresNon-Relational Postgres
Non-Relational Postgres
 
Storage Systems for big data - HDFS, HBase, and intro to KV Store - Redis
Storage Systems for big data - HDFS, HBase, and intro to KV Store - RedisStorage Systems for big data - HDFS, HBase, and intro to KV Store - Redis
Storage Systems for big data - HDFS, HBase, and intro to KV Store - Redis
 
Oracle 21c: New Features and Enhancements of Data Pump & TTS
Oracle 21c: New Features and Enhancements of Data Pump & TTSOracle 21c: New Features and Enhancements of Data Pump & TTS
Oracle 21c: New Features and Enhancements of Data Pump & TTS
 

Similaire à Presentation day2 oracle12c

COUG_AAbate_Oracle_Database_12c_New_Features
COUG_AAbate_Oracle_Database_12c_New_FeaturesCOUG_AAbate_Oracle_Database_12c_New_Features
COUG_AAbate_Oracle_Database_12c_New_Features
Alfredo Abate
 
Oracle 12 c new-features
Oracle 12 c new-featuresOracle 12 c new-features
Oracle 12 c new-features
Navneet Upneja
 
Oracle 12c New Features_RMAN_slides
Oracle 12c New Features_RMAN_slidesOracle 12c New Features_RMAN_slides
Oracle 12c New Features_RMAN_slides
Saiful
 

Similaire à Presentation day2 oracle12c (20)

Oracle database 12c intro
Oracle database 12c introOracle database 12c intro
Oracle database 12c intro
 
What is new on 12c for Backup and Recovery? Presentation
What is new on 12c for Backup and Recovery? PresentationWhat is new on 12c for Backup and Recovery? Presentation
What is new on 12c for Backup and Recovery? Presentation
 
Under The Hood of Pluggable Databases by Alex Gorbachev, Pythian, Oracle OpeW...
Under The Hood of Pluggable Databases by Alex Gorbachev, Pythian, Oracle OpeW...Under The Hood of Pluggable Databases by Alex Gorbachev, Pythian, Oracle OpeW...
Under The Hood of Pluggable Databases by Alex Gorbachev, Pythian, Oracle OpeW...
 
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)
 
What’s new in oracle 12c recovery manager (rman)
What’s new in oracle 12c recovery manager (rman)What’s new in oracle 12c recovery manager (rman)
What’s new in oracle 12c recovery manager (rman)
 
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)
 
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
 
Best practices for DB2 for z/OS log based recovery
Best practices for DB2 for z/OS log based recoveryBest practices for DB2 for z/OS log based recovery
Best practices for DB2 for z/OS log based recovery
 
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
 
Db2 Important questions to read
Db2 Important questions to readDb2 Important questions to read
Db2 Important questions to read
 
Oracle database 12c introduction- Satyendra Pasalapudi
Oracle database 12c introduction- Satyendra PasalapudiOracle database 12c introduction- Satyendra Pasalapudi
Oracle database 12c introduction- Satyendra Pasalapudi
 
RMAN in 12c: The Next Generation (PPT)
RMAN in 12c: The Next Generation (PPT)RMAN in 12c: The Next Generation (PPT)
RMAN in 12c: The Next Generation (PPT)
 
Db2 recovery IDUG EMEA 2013
Db2 recovery IDUG EMEA 2013Db2 recovery IDUG EMEA 2013
Db2 recovery IDUG EMEA 2013
 
COUG_AAbate_Oracle_Database_12c_New_Features
COUG_AAbate_Oracle_Database_12c_New_FeaturesCOUG_AAbate_Oracle_Database_12c_New_Features
COUG_AAbate_Oracle_Database_12c_New_Features
 
Oracle 12 c new-features
Oracle 12 c new-featuresOracle 12 c new-features
Oracle 12 c new-features
 
NA14G05 - A DB2 DBAs Guide to pureScale.pdf
NA14G05 - A DB2 DBAs Guide to pureScale.pdfNA14G05 - A DB2 DBAs Guide to pureScale.pdf
NA14G05 - A DB2 DBAs Guide to pureScale.pdf
 
Oracle DBA
Oracle DBAOracle DBA
Oracle DBA
 
Complete first chapter rdbm 17332
Complete first chapter rdbm 17332Complete first chapter rdbm 17332
Complete first chapter rdbm 17332
 
Oracle 12c New Features_RMAN_slides
Oracle 12c New Features_RMAN_slidesOracle 12c New Features_RMAN_slides
Oracle 12c New Features_RMAN_slides
 
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
 

Dernier

Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get CytotecAbortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Riyadh +966572737505 get cytotec
 
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
amitlee9823
 
Determinants of health, dimensions of health, positive health and spectrum of...
Determinants of health, dimensions of health, positive health and spectrum of...Determinants of health, dimensions of health, positive health and spectrum of...
Determinants of health, dimensions of health, positive health and spectrum of...
shambhavirathore45
 
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
AroojKhan71
 
Vip Model Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
Vip Model  Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...Vip Model  Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
Vip Model Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
shivangimorya083
 

Dernier (20)

Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 nightCheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
Cheap Rate Call girls Sarita Vihar Delhi 9205541914 shot 1500 night
 
April 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's AnalysisApril 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's Analysis
 
Mature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptxMature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptx
 
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get CytotecAbortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
 
BabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxBabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptx
 
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
 
BigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxBigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptx
 
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
 
Smarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxSmarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptx
 
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
 
Accredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdfAccredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdf
 
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
 
Determinants of health, dimensions of health, positive health and spectrum of...
Determinants of health, dimensions of health, positive health and spectrum of...Determinants of health, dimensions of health, positive health and spectrum of...
Determinants of health, dimensions of health, positive health and spectrum of...
 
VidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxVidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptx
 
Discover Why Less is More in B2B Research
Discover Why Less is More in B2B ResearchDiscover Why Less is More in B2B Research
Discover Why Less is More in B2B Research
 
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
 
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort ServiceBDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
 
Vip Model Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
Vip Model  Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...Vip Model  Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
Vip Model Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
 
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779Best VIP Call Girls Noida Sector 22 Call Me: 8448380779
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779
 

Presentation day2 oracle12c

  • 1. ORACLE DATABASE 12C New Features with CDB, PDB overview (Reference – Oracle documentation) Check detailed contents on http://dbaboss.com/ 1
  • 2. New Features • Restoring a table with rman. • In preceding versions, it was not achievable to restore a table or partition using existing physical backups. In order to restore a particular object, you must have logical backup. With 12c R1, you can recover a particular table or partition to a point-in-time or SCN from RMAN backups in the event of a table drop or truncate. • When a table or partition recovery is initiated via RMAN, the subsequent action is performed: • Required backup sets are identified to recover the table/partition • An auxiliary database will be constructed to a point-in-time temporarily in the process of recovering the table/partition • Required table/partitions will be then exported to a dumpfile using the data pumps • Optionally, you can import the table/partitions in the source database • Rename option while recovery An example of a table point-in-time recovery via RMAN (ensure you already have a full database backup from earlier): Check detailed contents on http://dbaboss.com/ 2
  • 3. • RMAN> connect target "username/password as SYSBACKUP"; RMAN> RECOVER TABLE username.tablename UNTIL TIME 'TIMESTAMP…' AUXILIARY DESTINATION '/u01/tablerecovery' DATAPUMP DESTINATION '/u01/dpump' DUMP FILE 'tablename.dmp' NOTABLEIMPORT -- this option avoids importing the table automatically. REMAP TABLE 'username.tablename': 'username.new_table_name'; -- can rename table with this option. • Important notes: • Ensure satisfactory free space available under /u01 filesystem for auxiliary database and also to keep the data pump file • A full database backup must be exists, or at least the SYSTEM related tablespaces • The following limitations/restrictions are applied on table/partition recovery in RMAN: • SYS user table/partition can’t be recovered • Tables/partitions stored under SYSAUX and SYSTEM tablespaces can’t be recovered • Recovery of a table is not possible when REMAP option used to recovery a table that contains NOT NULL constraints Check detailed contents on http://dbaboss.com/ 3
  • 4. • How to execute SQL statement in RMAN • In 12c, you can now achieve any SQL and PL/SQL commands in RMAN without the need of a SQL prefix: you can execute any SQL and PLS/SQL commands directly from RMAN. How you can execute SQL statements in RMAN: • RMAN> SELECT username, machine FROM v$session; • RMAN> ALTER TABLESPACE users ADD DATAFILE SIZE 12991m; Check detailed contents on http://dbaboss.com/ 4
  • 5. • DDL logging • There was no path choice available to log the DDL action in the previous releases. In 12cR1, you can now log the DDL action into xml and log files. This will be very useful to know when the drop or create command was executed and by who. The ENABLE_DDL_LOGGING initiation parameter must be aligned in order to turn on this feature. The parameter can be set at the database or session levels. When this parameter is enabled, all DDL commands are logged in an xml and a log file under the $ORACLE_BASE/diag/rdbms/DBNAME/log|ddl location. An xml file contains information, such as DDL command, IP address, timestamp etc. This helps to identify when a user or table dropped or when a DDL statement is triggered. • • To enable DDL logging • SQL> ALTER SYSTEM|SESSION SET ENABLE_DDL_LOGGING=TRUE; • The following DDL statements are likely to be recorded in the xml/log file: • •CREATE|ALTER|DROP|TRUNCATE TABLE • •DROP USER • •CREATE|ALTER|DROP PACKAGE|FUNCTION|VIEW|SYNONYM|SEQUENCE Check detailed contents on http://dbaboss.com/ 5
  • 6. • Online rename and relocation of an active data file • Unlike in the previous releases, a data file migration or renaming in Oracle database 12c R1 no longer requires a number of steps i.e. putting the tablespace in READ ONLY mode, followed by data file offline action. In 12c R1, a data file can be renamed or moved online simply using the ALTER DATABASE MOVE DATAFILE SQL statement. While the data file is being transported, the end user can perform queries, DML and DDL tasks. Moreover, data files can be migrated between storages e.g. from non-ASM to ASM and vice versa. • • Change name a data file: • SQL> ALTER DATABASE MOVE DATAFILE '/u00/data03/users01.dbf' TO '/u00/data/users_01.dbf'; • Migrate a data file from non-ASM to ASM: • SQL> ALTER DATABASE MOVE DATAFILE '/u00/data03/users_01.dbf' TO '+DG_DATA'; • Migrate a data file from one ASM disk group to another: • SQL> ALTER DATABASE MOVE DATAFILE '+DG_DATA/DBNAME/DATAFILE/users_01.dbf ' TO '+DG_DATA_02'; • Overwrite the data file with the same name, if it exists at the new location: • SQL> ALTER DATABASE MOVE DATAFILE '/u00/data03/users_01.dbf' TO '/u00/data_new/users_01.dbf' REUSE; • Copy the file to a new location whilst retaining the old copy in the old location: • SQL> ALTER DATABASE MOVE DATAFILE '/u00/data03/users_01.dbf' TO '/u00/data_new/users_01.dbf' KEEP; • You can monitor the progress while a data file being moved by querying the v$session_longops dynamic view. Additionally, you can also refer the alert.log of the database where Oracle writes the details about action being taken place. Check detailed contents on http://dbaboss.com/ 6
  • 7. OS GROUP Database Privilege Short description BACKUP DBA SYSBACKUP This group allows operating system users to have a limited set of database backup and recovery related administrative privileges DGDBA SYSDG This group allows a group of operating sytem users to have a limited set of privileges to administer and monitor Oracle Data Guard KMDBA SYSKM This allows operating sytem users to have a limited set of privileges for encryption key management such as Oracle Wallet Manager management, since, by default, Oracle 12c encapsulates features such as database vault Check detailed contents on http://dbaboss.com/ 7
  • 8. Overview of CDB • From a physical viewpoint, a CDB has essentially the same structure as a non- CDB, except that each PDB has its own set of tablespaces (including its own SYSTEM and SYSAUX tablespaces) and data files. • One control file • A CDB has one online redo log and one set of archived redo log files. • One or more sets of temp files • By default, the CDB has a single default temporary tablespace named TEMP that every PDB uses. You may choose to create a different default temporary tablespace. Only a temporary tablespace that you create while connected to the root can serve as a default temporary tablespace for the CDB. For an distinct PDB, you may override the CDB-wide temporary tablespace by creating a local temporary named TEMP, and then setting it as the default. • One set of undo data files Check detailed contents on http://dbaboss.com/ 8
  • 9. • In a single-instance CDB, only one active undo tablespace exists. For an Oracle RAC CDB, one active undo tablespace exists for each instance. Only a common user who has the suitable privileges and whose current container is the root can create an undo tablespace. All undo tablespaces are visible in the data dictionaries and related views of all containers. • A set of system data files for every container. • The primary physical difference between CDBs and non-CDBs is the system data files. A non-CDB has only one set of system data files. In contrast, the root and each PDB in a CDB has its own SYSTEM and SYSAUX tablespaces and its own complete set of dictionary tables relating the objects in itself. • In a typical use case, each PDB has its own set of non-system data files. These data files comprise the data for user-defined schemas and objects in the PDB. • The storage of the data dictionary within the PDB permits it to be portable. You can easily plug and unplug a PDB into a CDB. Check detailed contents on http://dbaboss.com/ 9
  • 10. Overview of PDB • Individually PDB has its own private data dictionary for customer-created database objects; CDB on the other hand as a whole has the data dictionary for the Oracle- supplied system each data dictionary defines its own namespace. In other words, there is global Data dictionary (CDB level) and local one (PDB level). • There is a new split data dictionary architecture that allows a PDB to be quickly unplugged from one CDB and plugged into a different CDB • Each PDB sees a read-only definition of the Oracle-supplied system • There are global database initialization parameters on CDB level and local ones. PDB parameters belong only to you particular PDB and will be persistent even after you unplug you PDB. • Database users can be global (CDB) or local (PDB only). SYS and SYSTEM users exist in both DBs right at the beginning. If you create a new user in CDB you will see it in PDB also. In case of creation of a user on PDB level it will stay local. • Temporary tablespaces can be global or local Check detailed contents on http://dbaboss.com/ 10
  • 11. • Redo logs and Undo tablspace are only global (on CDB level) • Data Guard acts on the CDB as a whole; RMAN scheduled backups are done for the CDB as a whole; you can back up a selected PDB whenever you want to; you can do point-in-time • An application connects, with no code changes, to a PDB; the system administrator connects to the CDB; the service named in the connect string specifies the destination PDB • A PDB allows a clear declarative definition of an application; one PDB knows nothing of the other PDBs within the same CDB; each PDB is a hermetically sealed container. That ensures new level of DB independence and robust security Check detailed contents on http://dbaboss.com/ 11
  • 12. Question and Answer • Now can we Point-In-Time recovery be conducted at Pluggable Database (PDB) level? • Yes, it will be possible. • Now can we have database services be created inside a Pluggable Database (PDB)? • Of course you can have many services within a PDB. Each will denote the PDB within which it is defined as the initial current container. Use the usual methods to create, maintain, and drop additional services in a PDB. A PDB’s default service must not be dropped. Of course, service names should be unique across all the databases that are registered with a particular listener. • Now can we have local TEMPORARY tablespace at Pluggable Database (PDB) level? • In spite, during the PDB formation only SYSTEM and SYSAUX tablespaces created, you can create local temporary tablespace later for each PDB. UNDO tablespace can NOT be local and stays on the CDB level. • Why is conventional database mode will be still available in 12c database and later versions? • Yes, on Oracle 12c you will have two choices of creating a usual old-fashioned Oracle database (non-CDB) or creating a Container Database (CDB) that will hold all your Pluggable Databases (PDB) that you will create or plug later. However, based on my information non-CDB mode will be available only in 12c release 1 for compatibility reasons and will be discontinued in 12cR2. Check detailed contents on http://dbaboss.com/ 12
  • 13. • Why or not Oracle 12c database have only one container? Yes and No! In fact, Oracle considers a CDB as well as all PDBs as containers. Every container has own name. For example a single Container Database (CDB) has a container name CDB$Root. Each Pluggable database has a container name alike to the PDB name. On CDB level by default your current container is CDB$Root but you can switch between PDBs’ containers also. On CDB level you can modified current container with following SQL alter session set container = mine_cdb or verify current container with below SQL: select Sys_Context('Userenv', 'Con_Name') "current container" from dual; • Why cloning a PDB from one in a dissimilar CDB supported? So far it is not seen it in 12c Beta 2, but Oracle intends to provision it in the final version. You’ll identify the source CDB by creating a database link to it from the CDB in which you will produce the clone. • Why online PDB cloning supported? • Not in 12c Beta2, but Oracle intentions to eliminate this constraint in the final version by using the same approach that allows online RMAN backup: by re- constructing any blocks that change during the time it takes to copy the source PDB’s datafiles. • Check detailed contents on http://dbaboss.com/ 13