SlideShare uma empresa Scribd logo
1 de 22
Oracle Database 12c features for
DBA
By:
Karan Kukreja
Points to note before the presentation
• This slide is self made
• I don’t know everything
Features
• Adaptive execution plans during runtime
• PGA_AGGREGATE_LIMIT
• Enhanced Statistics options
• Renaming a datafile online
• Fetch First X Rows only
• Table restoration using rman
• Invisible columns
• Sql statements in rman directly
• preupgrd.sql and parallel upgrade utility
• Real-time ADDM analysis
Adaptive execution plans during
runtime
• Execution of a statement can start with one
plan, and (during execution) switch to
another.
• Correct it in flight.
• It is enabled during the hard parse, and used
during execution.
• As the statement executes, if the embedded
counters for actual cardinality cross those
limits, it will switch plan.
• Estimated outcome
• Actual number of rows
• Look what it did ?
PGA_AGGREGATE_LIMIT
• So far we have been using
PGA_AGGREGATE_TARGET which is like a soft
limit.
• PGA memory consumption can go beyond
PGA_AGGREGATE_TARGET at times.
• PGA_AGGREGATE_LIMIT is a hard limit. If this
limit is reached, Oracle will terminate sessions
consuming the most untunable PGA.
• Jobs that are killed end with a notification : ORA-
04036: PGA memory used by the instance exceeds
PGA_AGGREGATE_LIMIT
• Default value is calculated as below :
• 1. 2 GB
2. Two times of PGA_AGGREGATE_TARGET parameter
• 3. The value of PROCESS parameter * 3M
• In oracle apps , this is set to 0 , which means the
default value, which could be any fro above 3.
• How to find which process caused ORA-04036 ?
• Use below steps :
• dba_hist_active_sess_history and sort by PGA
usage in Desc order.
• The top in the list is the sql_id which has issues.
• Use query in reference URL to find the rows
returned / plan changed when it got bad.
Enhanced Statistics options
• DBMS_STATS.GATHER_SYSTEM_STATS has now an option to gather system
stats for an Exadata machine. ( It actually came in 11.2.0.4 onwards).
• Allows concurrent statistics collection using job scheduler, AQ and
resource manager. Can reduce time to gather stats overall however the
system should have the capacity to take the load.
• Has to be explicitly enabled.
• Cardinality feedback is now renamed to Statistic feedback. *
• Dynamic Sampling has now been renamed to Dynamics Statistics.*
• 2 new types of histograms are introduced , top frequency and hybrid. (
other being frequency and height based).
• Online stats gathering during CTAS and IAS and during partition creation. (
has some restrictions though).
• It is possible to have session-private statistics for global temporary tables.
• * will be covered later
Renaming a datafile online
• Release 12c made is more easy , all steps
taken care by just giving the below command :
• ALTER DATABASE MOVE DATAFILE
'/u01/app/oracle/oradata/cdb1/system01.dbf'
TO '/tmp/system01.dbf';
Fetch First X Rows only
• Prior to 12 c , to get the top 5 the query would be :
SELECT ename, sal FROM
( SELECT ename, sal, RANK() OVER (ORDER BY sal DESC) sal_rank FROM emp )
WHERE sal_rank <= 10;
• IN 12c , that’s taken care using FETCH FIRST N ROWS
ONLY as below :
SELECT val FROM
rownum_order_test
ORDER BY val DESC FETCH FIRST 5 ROWS ONLY;
• 12c also supports queries for pagination , fetching last
20% etc. ( refer to references for more details).
Table restoration using rman
• Table Point In Time Recovery (PITR)
• Table Point In Time Recovery (PITR) to Dump
File
• Table Point In Time Recovery (PITR) in a
Pluggable Database (PDB)
• General syntax :
• RECOVER TABLE 'TEST'.'T1' UNTIL SCN
1853267 AUXILIARY DESTINATION '/u01/aux'
REMAP TABLE 'TEST'.'T1':'T1_PREV';
• Auxiliary is where it will generate an auxiliary
database only with the file it has to extract.
Sql statements in rman directly
preupgrd.sql and parallel upgrade
utility
• Earlier used was utlu121s.sql however that has
been changed to preupgrd.sql
• Apart from verification , it gives a list of changes
to be done as part of fixup scripts.
In Earlier releases there was no option to do an
upgrade in parallel. catupgrd.sql is now replaced
with catctl.pl utility.
Syntax :
cd $ORACLE_12_HOME/perl/bin $ ./perl catctl.pl –n 3 -catupgrd.sql
Real-time ADDM analysis
• Needs OEM 12 c
• Helpful during hung/unresponsive DB time
• Steps :
• Select the Emergency Monitoring option from
the Performance menu on the Access the Database Home page.
• This will show the top blocking sessions in the Hang Analysis table.
• Select the Real-Time ADDM option from the Performance to
perform Real-time ADDM analysis.
• After collecting the performance data, click on the Findings tab to
get the interactive summary of all the findings.
• What is dynamic Sampling ?
• Oracle Database 10g introduced Dynamic
Sampling to allow the optimizer to gather
additional information at parse time if
database statistics were missing, stale or
insufficient to produce a good execution plan.
• Value from 1 to 10 , default value is 2.
• So what is cardinality feedback ?
• When the optimizer generates an execution plan the presence of
missing statistics, stale statistics, complex predicates or complex
operators may trigger the optimizer to monitor the cardinality of
operations in the plan. Once the execution is complete, if there is a
significant difference between the estimated and actual
cardinalities, the actual cardinalities are stored in the SGA for later
use and the statement is marked as reoptimizable. On next
execution the statement is reoptimized using the stored
cardinalities, allowing a better plan to be determined. Cardinality
feedback is statement specific and is lost if the instance is restarted
or the statement is aged out of the shared pool. In Oracle Database
12c, cardinality feedback has been renamed to statistics feedback.
Questions ?
References
• www.support.oracle.com
• https://weidongzhou.wordpress.com/2016/02/25/pga
_aggregate_target-vs-pga_aggregate_limit/
• https://oracle-base.com/articles/12c/concurrent-
statistics-collection-12cr1
• https://oracle-base.com/articles/12c/histograms-
enhancements-12cr1
• https://oracle-base.com/articles/12c/online-statistics-
gathering-for-bulk-loads-12cr1
• https://oracle-base.com/articles/12c/row-limiting-
clause-for-top-n-queries-12cr1

Mais conteúdo relacionado

Mais procurados

Sql server performance tuning
Sql server performance tuningSql server performance tuning
Sql server performance tuningngupt28
 
Oracle Database Performance Tuning Basics
Oracle Database Performance Tuning BasicsOracle Database Performance Tuning Basics
Oracle Database Performance Tuning Basicsnitin anjankar
 
Stored procedure tuning and optimization t sql
Stored procedure tuning and optimization t sqlStored procedure tuning and optimization t sql
Stored procedure tuning and optimization t sqlnishantdavid9
 
Stream Processing with Pipelines and Stored Procedures
Stream Processing with Pipelines  and Stored ProceduresStream Processing with Pipelines  and Stored Procedures
Stream Processing with Pipelines and Stored ProceduresSingleStore
 
Database Performance Tuning
Database Performance Tuning Database Performance Tuning
Database Performance Tuning Arno Huetter
 
Why & how to optimize sql server for performance from design to query
Why & how to optimize sql server for performance from design to queryWhy & how to optimize sql server for performance from design to query
Why & how to optimize sql server for performance from design to queryAntonios Chatzipavlis
 
SAP Migration Overview
SAP Migration OverviewSAP Migration Overview
SAP Migration OverviewSitaram Kotnis
 
PostgreSQL Performance Tables Partitioning vs. Aggregated Data Tables
PostgreSQL Performance Tables Partitioning vs. Aggregated Data TablesPostgreSQL Performance Tables Partitioning vs. Aggregated Data Tables
PostgreSQL Performance Tables Partitioning vs. Aggregated Data TablesSperasoft
 
Proactive performance monitoring with adaptive thresholds
Proactive performance monitoring with adaptive thresholdsProactive performance monitoring with adaptive thresholds
Proactive performance monitoring with adaptive thresholdsJohn Beresniewicz
 
Presentación Oracle Database Migración consideraciones 10g/11g/12c
Presentación Oracle Database Migración consideraciones 10g/11g/12cPresentación Oracle Database Migración consideraciones 10g/11g/12c
Presentación Oracle Database Migración consideraciones 10g/11g/12cRonald Francisco Vargas Quesada
 
Accumulo Summit 2015: Building Aggregation Systems on Accumulo [Leveraging Ac...
Accumulo Summit 2015: Building Aggregation Systems on Accumulo [Leveraging Ac...Accumulo Summit 2015: Building Aggregation Systems on Accumulo [Leveraging Ac...
Accumulo Summit 2015: Building Aggregation Systems on Accumulo [Leveraging Ac...Accumulo Summit
 
Less12 Proactive
Less12 ProactiveLess12 Proactive
Less12 Proactivevivaankumar
 
Oracle Performance Tuning Training | Oracle Performance Tuning
Oracle Performance Tuning Training | Oracle Performance TuningOracle Performance Tuning Training | Oracle Performance Tuning
Oracle Performance Tuning Training | Oracle Performance TuningOracleTrainings
 
PostgreSQL Hangout Replication Features v9.4
PostgreSQL Hangout Replication Features v9.4PostgreSQL Hangout Replication Features v9.4
PostgreSQL Hangout Replication Features v9.4Ashnikbiz
 
SQL Server Tuning to Improve Database Performance
SQL Server Tuning to Improve Database PerformanceSQL Server Tuning to Improve Database Performance
SQL Server Tuning to Improve Database PerformanceMark Ginnebaugh
 
Informix partitioning interval_rolling_window_table
Informix partitioning interval_rolling_window_tableInformix partitioning interval_rolling_window_table
Informix partitioning interval_rolling_window_tableKeshav Murthy
 
Oracle backup and recovery
Oracle backup and recoveryOracle backup and recovery
Oracle backup and recoveryYogiji Creations
 
Making_Good_Enough...Better-Addressing_the_Multiple_Objectives_of_High-Perfor...
Making_Good_Enough...Better-Addressing_the_Multiple_Objectives_of_High-Perfor...Making_Good_Enough...Better-Addressing_the_Multiple_Objectives_of_High-Perfor...
Making_Good_Enough...Better-Addressing_the_Multiple_Objectives_of_High-Perfor...John Gunnels
 

Mais procurados (20)

Sql server performance tuning
Sql server performance tuningSql server performance tuning
Sql server performance tuning
 
Oracle Database Performance Tuning Basics
Oracle Database Performance Tuning BasicsOracle Database Performance Tuning Basics
Oracle Database Performance Tuning Basics
 
Stored procedure tuning and optimization t sql
Stored procedure tuning and optimization t sqlStored procedure tuning and optimization t sql
Stored procedure tuning and optimization t sql
 
Adaptive Query Optimization
Adaptive Query OptimizationAdaptive Query Optimization
Adaptive Query Optimization
 
Stream Processing with Pipelines and Stored Procedures
Stream Processing with Pipelines  and Stored ProceduresStream Processing with Pipelines  and Stored Procedures
Stream Processing with Pipelines and Stored Procedures
 
Database Performance Tuning
Database Performance Tuning Database Performance Tuning
Database Performance Tuning
 
Performance tuning in sql server
Performance tuning in sql serverPerformance tuning in sql server
Performance tuning in sql server
 
Why & how to optimize sql server for performance from design to query
Why & how to optimize sql server for performance from design to queryWhy & how to optimize sql server for performance from design to query
Why & how to optimize sql server for performance from design to query
 
SAP Migration Overview
SAP Migration OverviewSAP Migration Overview
SAP Migration Overview
 
PostgreSQL Performance Tables Partitioning vs. Aggregated Data Tables
PostgreSQL Performance Tables Partitioning vs. Aggregated Data TablesPostgreSQL Performance Tables Partitioning vs. Aggregated Data Tables
PostgreSQL Performance Tables Partitioning vs. Aggregated Data Tables
 
Proactive performance monitoring with adaptive thresholds
Proactive performance monitoring with adaptive thresholdsProactive performance monitoring with adaptive thresholds
Proactive performance monitoring with adaptive thresholds
 
Presentación Oracle Database Migración consideraciones 10g/11g/12c
Presentación Oracle Database Migración consideraciones 10g/11g/12cPresentación Oracle Database Migración consideraciones 10g/11g/12c
Presentación Oracle Database Migración consideraciones 10g/11g/12c
 
Accumulo Summit 2015: Building Aggregation Systems on Accumulo [Leveraging Ac...
Accumulo Summit 2015: Building Aggregation Systems on Accumulo [Leveraging Ac...Accumulo Summit 2015: Building Aggregation Systems on Accumulo [Leveraging Ac...
Accumulo Summit 2015: Building Aggregation Systems on Accumulo [Leveraging Ac...
 
Less12 Proactive
Less12 ProactiveLess12 Proactive
Less12 Proactive
 
Oracle Performance Tuning Training | Oracle Performance Tuning
Oracle Performance Tuning Training | Oracle Performance TuningOracle Performance Tuning Training | Oracle Performance Tuning
Oracle Performance Tuning Training | Oracle Performance Tuning
 
PostgreSQL Hangout Replication Features v9.4
PostgreSQL Hangout Replication Features v9.4PostgreSQL Hangout Replication Features v9.4
PostgreSQL Hangout Replication Features v9.4
 
SQL Server Tuning to Improve Database Performance
SQL Server Tuning to Improve Database PerformanceSQL Server Tuning to Improve Database Performance
SQL Server Tuning to Improve Database Performance
 
Informix partitioning interval_rolling_window_table
Informix partitioning interval_rolling_window_tableInformix partitioning interval_rolling_window_table
Informix partitioning interval_rolling_window_table
 
Oracle backup and recovery
Oracle backup and recoveryOracle backup and recovery
Oracle backup and recovery
 
Making_Good_Enough...Better-Addressing_the_Multiple_Objectives_of_High-Perfor...
Making_Good_Enough...Better-Addressing_the_Multiple_Objectives_of_High-Perfor...Making_Good_Enough...Better-Addressing_the_Multiple_Objectives_of_High-Perfor...
Making_Good_Enough...Better-Addressing_the_Multiple_Objectives_of_High-Perfor...
 

Destaque

Write Less (code) With More (Oracle Database 12c New Features)
Write Less (code) With More (Oracle Database 12c New Features)Write Less (code) With More (Oracle Database 12c New Features)
Write Less (code) With More (Oracle Database 12c New Features)Oren Nakdimon
 
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 FeaturesDeiby Gómez
 
Oracle Database 12c New Features for Developers and DBAs - OTN TOUR LA 2015
Oracle Database 12c  New Features for Developers and DBAs - OTN TOUR LA 2015Oracle Database 12c  New Features for Developers and DBAs - OTN TOUR LA 2015
Oracle Database 12c New Features for Developers and DBAs - OTN TOUR LA 2015Alex Zaballa
 
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...Alex Zaballa
 
Oracle Optimizer: 12c New Capabilities
Oracle Optimizer: 12c New CapabilitiesOracle Optimizer: 12c New Capabilities
Oracle Optimizer: 12c New CapabilitiesGuatemala User Group
 
Mongo db sharding guide
Mongo db sharding guideMongo db sharding guide
Mongo db sharding guideDeysi Gmarra
 
Python Programming - XIII. GUI Programming
Python Programming - XIII. GUI ProgrammingPython Programming - XIII. GUI Programming
Python Programming - XIII. GUI ProgrammingRanel Padon
 
SQL Monitoring in Oracle Database 12c
SQL Monitoring in Oracle Database 12cSQL Monitoring in Oracle Database 12c
SQL Monitoring in Oracle Database 12cTanel Poder
 
Oracle Database Connect 2017 / JPOUG#1
Oracle Database Connect 2017 / JPOUG#1Oracle Database Connect 2017 / JPOUG#1
Oracle Database Connect 2017 / JPOUG#1Noriyoshi Shinoda
 
Oracle database 12c new features
Oracle database 12c new featuresOracle database 12c new features
Oracle database 12c new featuresJakkrapat S.
 
Python 101: Python for Absolute Beginners (PyTexas 2014)
Python 101: Python for Absolute Beginners (PyTexas 2014)Python 101: Python for Absolute Beginners (PyTexas 2014)
Python 101: Python for Absolute Beginners (PyTexas 2014)Paige Bailey
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDBRavi Teja
 

Destaque (20)

Write Less (code) With More (Oracle Database 12c New Features)
Write Less (code) With More (Oracle Database 12c New Features)Write Less (code) With More (Oracle Database 12c New Features)
Write Less (code) With More (Oracle Database 12c New Features)
 
E49322 07
E49322 07E49322 07
E49322 07
 
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
 
Presentation 12c pdb
Presentation 12c pdbPresentation 12c pdb
Presentation 12c pdb
 
Oracle Database 12c New Features for Developers and DBAs - OTN TOUR LA 2015
Oracle Database 12c  New Features for Developers and DBAs - OTN TOUR LA 2015Oracle Database 12c  New Features for Developers and DBAs - OTN TOUR LA 2015
Oracle Database 12c New Features for Developers and DBAs - OTN TOUR LA 2015
 
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
 
Oracle Optimizer: 12c New Capabilities
Oracle Optimizer: 12c New CapabilitiesOracle Optimizer: 12c New Capabilities
Oracle Optimizer: 12c New Capabilities
 
Mongo db sharding guide
Mongo db sharding guideMongo db sharding guide
Mongo db sharding guide
 
Oracle Database 12c : Multitenant
Oracle Database 12c : MultitenantOracle Database 12c : Multitenant
Oracle Database 12c : Multitenant
 
MONGODB
MONGODBMONGODB
MONGODB
 
RMAN – The Pocket Knife of a DBA
RMAN – The Pocket Knife of a DBA RMAN – The Pocket Knife of a DBA
RMAN – The Pocket Knife of a DBA
 
Oracle ASM Training
Oracle ASM TrainingOracle ASM Training
Oracle ASM Training
 
Python Programming - XIII. GUI Programming
Python Programming - XIII. GUI ProgrammingPython Programming - XIII. GUI Programming
Python Programming - XIII. GUI Programming
 
Mongo DB
Mongo DBMongo DB
Mongo DB
 
Mongo db
Mongo dbMongo db
Mongo db
 
SQL Monitoring in Oracle Database 12c
SQL Monitoring in Oracle Database 12cSQL Monitoring in Oracle Database 12c
SQL Monitoring in Oracle Database 12c
 
Oracle Database Connect 2017 / JPOUG#1
Oracle Database Connect 2017 / JPOUG#1Oracle Database Connect 2017 / JPOUG#1
Oracle Database Connect 2017 / JPOUG#1
 
Oracle database 12c new features
Oracle database 12c new featuresOracle database 12c new features
Oracle database 12c new features
 
Python 101: Python for Absolute Beginners (PyTexas 2014)
Python 101: Python for Absolute Beginners (PyTexas 2014)Python 101: Python for Absolute Beginners (PyTexas 2014)
Python 101: Python for Absolute Beginners (PyTexas 2014)
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 

Semelhante a Oracle Database 12c features for DBA

Oracle 12 c new-features
Oracle 12 c new-featuresOracle 12 c new-features
Oracle 12 c new-featuresNavneet Upneja
 
ORACLE 12C-New-Features
ORACLE 12C-New-FeaturesORACLE 12C-New-Features
ORACLE 12C-New-FeaturesNavneet Upneja
 
NoCOUG_201411_Patel_Managing_a_Large_OLTP_Database
NoCOUG_201411_Patel_Managing_a_Large_OLTP_DatabaseNoCOUG_201411_Patel_Managing_a_Large_OLTP_Database
NoCOUG_201411_Patel_Managing_a_Large_OLTP_DatabaseParesh Patel
 
Apache Apex Fault Tolerance and Processing Semantics
Apache Apex Fault Tolerance and Processing SemanticsApache Apex Fault Tolerance and Processing Semantics
Apache Apex Fault Tolerance and Processing SemanticsApache Apex
 
Fault Tolerance and Processing Semantics in Apache Apex
Fault Tolerance and Processing Semantics in Apache ApexFault Tolerance and Processing Semantics in Apache Apex
Fault Tolerance and Processing Semantics in Apache ApexApache Apex Organizer
 
Dynamics ax performance tuning
Dynamics ax performance tuningDynamics ax performance tuning
Dynamics ax performance tuningOutsourceAX
 
Performance Scenario: Diagnosing and resolving sudden slow down on two node RAC
Performance Scenario: Diagnosing and resolving sudden slow down on two node RACPerformance Scenario: Diagnosing and resolving sudden slow down on two node RAC
Performance Scenario: Diagnosing and resolving sudden slow down on two node RACKristofferson A
 
Evolution of Performance Management: Oracle 12c adaptive optimizations - ukou...
Evolution of Performance Management: Oracle 12c adaptive optimizations - ukou...Evolution of Performance Management: Oracle 12c adaptive optimizations - ukou...
Evolution of Performance Management: Oracle 12c adaptive optimizations - ukou...Nelson Calero
 
Aioug vizag oracle12c_new_features
Aioug vizag oracle12c_new_featuresAioug vizag oracle12c_new_features
Aioug vizag oracle12c_new_featuresAiougVizagChapter
 
Dealing With The Optimizer complexity
Dealing With The Optimizer complexityDealing With The Optimizer complexity
Dealing With The Optimizer complexityLiron Amitzi
 
Oracle database 12c new features
Oracle database 12c new featuresOracle database 12c new features
Oracle database 12c new featuresRemote DBA Services
 
How should I monitor my idaa
How should I monitor my idaaHow should I monitor my idaa
How should I monitor my idaaCuneyt Goksu
 
An AMIS Overview of Oracle database 12c (12.1)
An AMIS Overview of Oracle database 12c (12.1)An AMIS Overview of Oracle database 12c (12.1)
An AMIS Overview of Oracle database 12c (12.1)Marco Gralike
 
PostgreSQL 9.5 - Major Features
PostgreSQL 9.5 - Major FeaturesPostgreSQL 9.5 - Major Features
PostgreSQL 9.5 - Major FeaturesInMobi Technology
 
Whitepaper: Exadata Consolidation Success Story
Whitepaper: Exadata Consolidation Success StoryWhitepaper: Exadata Consolidation Success Story
Whitepaper: Exadata Consolidation Success StoryKristofferson A
 
Data Guard Deep Dive UKOUG 2012
Data Guard Deep Dive UKOUG 2012Data Guard Deep Dive UKOUG 2012
Data Guard Deep Dive UKOUG 2012Emre Baransel
 
Introduction to Apache Apex by Thomas Weise
Introduction to Apache Apex by Thomas WeiseIntroduction to Apache Apex by Thomas Weise
Introduction to Apache Apex by Thomas WeiseBig Data Spain
 

Semelhante a Oracle Database 12c features for DBA (20)

Oracle 12 c new-features
Oracle 12 c new-featuresOracle 12 c new-features
Oracle 12 c new-features
 
ORACLE 12C-New-Features
ORACLE 12C-New-FeaturesORACLE 12C-New-Features
ORACLE 12C-New-Features
 
NoCOUG_201411_Patel_Managing_a_Large_OLTP_Database
NoCOUG_201411_Patel_Managing_a_Large_OLTP_DatabaseNoCOUG_201411_Patel_Managing_a_Large_OLTP_Database
NoCOUG_201411_Patel_Managing_a_Large_OLTP_Database
 
Apache Apex Fault Tolerance and Processing Semantics
Apache Apex Fault Tolerance and Processing SemanticsApache Apex Fault Tolerance and Processing Semantics
Apache Apex Fault Tolerance and Processing Semantics
 
Fault Tolerance and Processing Semantics in Apache Apex
Fault Tolerance and Processing Semantics in Apache ApexFault Tolerance and Processing Semantics in Apache Apex
Fault Tolerance and Processing Semantics in Apache Apex
 
Dynamics ax performance tuning
Dynamics ax performance tuningDynamics ax performance tuning
Dynamics ax performance tuning
 
Performance Scenario: Diagnosing and resolving sudden slow down on two node RAC
Performance Scenario: Diagnosing and resolving sudden slow down on two node RACPerformance Scenario: Diagnosing and resolving sudden slow down on two node RAC
Performance Scenario: Diagnosing and resolving sudden slow down on two node RAC
 
OOW13 Exadata and ODI with Parallel
OOW13 Exadata and ODI with ParallelOOW13 Exadata and ODI with Parallel
OOW13 Exadata and ODI with Parallel
 
Evolution of Performance Management: Oracle 12c adaptive optimizations - ukou...
Evolution of Performance Management: Oracle 12c adaptive optimizations - ukou...Evolution of Performance Management: Oracle 12c adaptive optimizations - ukou...
Evolution of Performance Management: Oracle 12c adaptive optimizations - ukou...
 
Aioug vizag oracle12c_new_features
Aioug vizag oracle12c_new_featuresAioug vizag oracle12c_new_features
Aioug vizag oracle12c_new_features
 
Oracle SQL Tuning
Oracle SQL TuningOracle SQL Tuning
Oracle SQL Tuning
 
Dealing With The Optimizer complexity
Dealing With The Optimizer complexityDealing With The Optimizer complexity
Dealing With The Optimizer complexity
 
Oracle database 12c new features
Oracle database 12c new featuresOracle database 12c new features
Oracle database 12c new features
 
How should I monitor my idaa
How should I monitor my idaaHow should I monitor my idaa
How should I monitor my idaa
 
An AMIS Overview of Oracle database 12c (12.1)
An AMIS Overview of Oracle database 12c (12.1)An AMIS Overview of Oracle database 12c (12.1)
An AMIS Overview of Oracle database 12c (12.1)
 
PostgreSQL 9.5 - Major Features
PostgreSQL 9.5 - Major FeaturesPostgreSQL 9.5 - Major Features
PostgreSQL 9.5 - Major Features
 
Whitepaper: Exadata Consolidation Success Story
Whitepaper: Exadata Consolidation Success StoryWhitepaper: Exadata Consolidation Success Story
Whitepaper: Exadata Consolidation Success Story
 
An AMIS overview of database 12c
An AMIS overview of database 12cAn AMIS overview of database 12c
An AMIS overview of database 12c
 
Data Guard Deep Dive UKOUG 2012
Data Guard Deep Dive UKOUG 2012Data Guard Deep Dive UKOUG 2012
Data Guard Deep Dive UKOUG 2012
 
Introduction to Apache Apex by Thomas Weise
Introduction to Apache Apex by Thomas WeiseIntroduction to Apache Apex by Thomas Weise
Introduction to Apache Apex by Thomas Weise
 

Oracle Database 12c features for DBA

  • 1. Oracle Database 12c features for DBA By: Karan Kukreja
  • 2. Points to note before the presentation • This slide is self made • I don’t know everything
  • 3. Features • Adaptive execution plans during runtime • PGA_AGGREGATE_LIMIT • Enhanced Statistics options • Renaming a datafile online • Fetch First X Rows only • Table restoration using rman • Invisible columns • Sql statements in rman directly • preupgrd.sql and parallel upgrade utility • Real-time ADDM analysis
  • 4. Adaptive execution plans during runtime • Execution of a statement can start with one plan, and (during execution) switch to another. • Correct it in flight. • It is enabled during the hard parse, and used during execution. • As the statement executes, if the embedded counters for actual cardinality cross those limits, it will switch plan.
  • 7. • Look what it did ?
  • 8. PGA_AGGREGATE_LIMIT • So far we have been using PGA_AGGREGATE_TARGET which is like a soft limit. • PGA memory consumption can go beyond PGA_AGGREGATE_TARGET at times. • PGA_AGGREGATE_LIMIT is a hard limit. If this limit is reached, Oracle will terminate sessions consuming the most untunable PGA.
  • 9. • Jobs that are killed end with a notification : ORA- 04036: PGA memory used by the instance exceeds PGA_AGGREGATE_LIMIT • Default value is calculated as below : • 1. 2 GB 2. Two times of PGA_AGGREGATE_TARGET parameter • 3. The value of PROCESS parameter * 3M • In oracle apps , this is set to 0 , which means the default value, which could be any fro above 3.
  • 10. • How to find which process caused ORA-04036 ? • Use below steps : • dba_hist_active_sess_history and sort by PGA usage in Desc order. • The top in the list is the sql_id which has issues. • Use query in reference URL to find the rows returned / plan changed when it got bad.
  • 11. Enhanced Statistics options • DBMS_STATS.GATHER_SYSTEM_STATS has now an option to gather system stats for an Exadata machine. ( It actually came in 11.2.0.4 onwards). • Allows concurrent statistics collection using job scheduler, AQ and resource manager. Can reduce time to gather stats overall however the system should have the capacity to take the load. • Has to be explicitly enabled. • Cardinality feedback is now renamed to Statistic feedback. * • Dynamic Sampling has now been renamed to Dynamics Statistics.* • 2 new types of histograms are introduced , top frequency and hybrid. ( other being frequency and height based). • Online stats gathering during CTAS and IAS and during partition creation. ( has some restrictions though). • It is possible to have session-private statistics for global temporary tables. • * will be covered later
  • 12. Renaming a datafile online • Release 12c made is more easy , all steps taken care by just giving the below command : • ALTER DATABASE MOVE DATAFILE '/u01/app/oracle/oradata/cdb1/system01.dbf' TO '/tmp/system01.dbf';
  • 13. Fetch First X Rows only • Prior to 12 c , to get the top 5 the query would be : SELECT ename, sal FROM ( SELECT ename, sal, RANK() OVER (ORDER BY sal DESC) sal_rank FROM emp ) WHERE sal_rank <= 10; • IN 12c , that’s taken care using FETCH FIRST N ROWS ONLY as below : SELECT val FROM rownum_order_test ORDER BY val DESC FETCH FIRST 5 ROWS ONLY; • 12c also supports queries for pagination , fetching last 20% etc. ( refer to references for more details).
  • 14. Table restoration using rman • Table Point In Time Recovery (PITR) • Table Point In Time Recovery (PITR) to Dump File • Table Point In Time Recovery (PITR) in a Pluggable Database (PDB)
  • 15. • General syntax : • RECOVER TABLE 'TEST'.'T1' UNTIL SCN 1853267 AUXILIARY DESTINATION '/u01/aux' REMAP TABLE 'TEST'.'T1':'T1_PREV'; • Auxiliary is where it will generate an auxiliary database only with the file it has to extract.
  • 16. Sql statements in rman directly
  • 17. preupgrd.sql and parallel upgrade utility • Earlier used was utlu121s.sql however that has been changed to preupgrd.sql • Apart from verification , it gives a list of changes to be done as part of fixup scripts. In Earlier releases there was no option to do an upgrade in parallel. catupgrd.sql is now replaced with catctl.pl utility. Syntax : cd $ORACLE_12_HOME/perl/bin $ ./perl catctl.pl –n 3 -catupgrd.sql
  • 18. Real-time ADDM analysis • Needs OEM 12 c • Helpful during hung/unresponsive DB time • Steps : • Select the Emergency Monitoring option from the Performance menu on the Access the Database Home page. • This will show the top blocking sessions in the Hang Analysis table. • Select the Real-Time ADDM option from the Performance to perform Real-time ADDM analysis. • After collecting the performance data, click on the Findings tab to get the interactive summary of all the findings.
  • 19. • What is dynamic Sampling ? • Oracle Database 10g introduced Dynamic Sampling to allow the optimizer to gather additional information at parse time if database statistics were missing, stale or insufficient to produce a good execution plan. • Value from 1 to 10 , default value is 2.
  • 20. • So what is cardinality feedback ? • When the optimizer generates an execution plan the presence of missing statistics, stale statistics, complex predicates or complex operators may trigger the optimizer to monitor the cardinality of operations in the plan. Once the execution is complete, if there is a significant difference between the estimated and actual cardinalities, the actual cardinalities are stored in the SGA for later use and the statement is marked as reoptimizable. On next execution the statement is reoptimized using the stored cardinalities, allowing a better plan to be determined. Cardinality feedback is statement specific and is lost if the instance is restarted or the statement is aged out of the shared pool. In Oracle Database 12c, cardinality feedback has been renamed to statistics feedback.
  • 22. References • www.support.oracle.com • https://weidongzhou.wordpress.com/2016/02/25/pga _aggregate_target-vs-pga_aggregate_limit/ • https://oracle-base.com/articles/12c/concurrent- statistics-collection-12cr1 • https://oracle-base.com/articles/12c/histograms- enhancements-12cr1 • https://oracle-base.com/articles/12c/online-statistics- gathering-for-bulk-loads-12cr1 • https://oracle-base.com/articles/12c/row-limiting- clause-for-top-n-queries-12cr1