Академический Документы
Профессиональный Документы
Культура Документы
Part 1
There is a lot of excitement about Oracle upcoming Release of 12c i.e. 12c Release 2. I thought of
collating the information available on the web and put it all together to bring some awareness about what is coming in 12c
Release 2. Have published Part-2 which contains a lot of information about other 12cR2 new features.
Before we begin with 12c Release 2, lets recollect what major New Features were present in Oracle 12c R1. I wanted to
start with this as many of us are still using 11G and are in transition phase to upgrade the databases to 12c.
SET COLINVISIBLE ON
CREATE TABLE INV (COL1 NUMBER,CL2 NUMBER INVISIBLE);
7) 12c onwards now you can have an identity for a columns where the data in the column is auto generated.
CREATE TABLE IDEN (COL1 NUMBER GENERATED ALWAYS AS IDENTITY (START WITH 1000 INCREMENT BY
10));
10) New Join syntax, Lateral Clause for inline Views called Lateral Views.
Definition: A lateral view is a view that references columns from a table that is not inside the view.
The above Statement Succeeds with the usage of LATERAL Keyword.
select * from ..... offset 10 rows fetch first 0.1 percent rows only
select * from ..... offset 10 rows fetch first 0.1 percent rows with ties
15) Now developer can Create a Function or Procedure within a SQL inside WITH Clause.
WITH
PROCEDURE|FUNCTION test1 (…)
BEGIN
<logic>
END;
17) In-Database-Archiving - This option enables to mark records in a table as not active(called later archive
records). As default archive records are not visible in Oracle sessions. The records can be later compressed
or deleted.
The reason to add such option was to keep both versions of records (active and not active) in the same
table instead of making backup(not active) on tape and delete them(not active) from a table.
CREATE TABLE test_tbl( id NUMBER) ROW ARCHIVAL;
2. OPTIMIZER
1) Partial Join Evaluation.
This is a useful feature which gets automatically used by Oracle 12c Optimizer, In Pre-Release to 12c we used IN
or EXISTS operator to to accomplish the same but 12c onwards we can use regular joins which can evaluated partially
once it finds the information it is looking for.
Ref : http://blog.dbi-services.com/partial-join-evaluation-in-oracle-12c/
1. Adaptive Plans
2. Adaptive Parallel Distribution Methods
3. Adaptive Statistics
6) Hybrid Histograms
3. DBA - Administration
There has been significant enhancement of features in Administration as well. Few of the useful ones are as follows:
3) DDL Logging.
4) Temporary Undo.
10) Data Redaction: This new feature enables to easily prevent the display of sensitive data to end-users by
performing redaction in each application. It’s very simple to implement and very efficient. Data are
modified on the-fly right before results are returned to applications.
11) Oracle Caching mode: It enables to force caching of all segments into buffer cache automatically(when
the segments are accessed).
ALTER DATABASE FORCE FULL DATABASE CACHING;
13) Zone Maps: For full table access, zone maps allow I/O pruning of data based on the physical location of the data
on disk, acting like an anti-index.
There are many other new features introduced in Oracle 12C Release 1, but with new release of Oracle 12c i.e. Oracle
12c Release 2 more new features have been introduced and are interesting.
2) Oracle have now introduced Oracle LIVE-SQL. You can create your own login and use the same, this don't require a
database to run your queries. It is a very good tool for developers to test many functionalities of oracle without having a
database.
https://livesql.oracle.com
2. DBA-Administration
1) Pluggable Databases: With the release of 12c you could only get 252 pluggable database per managed database
instance. Oracle now increased that number dramatically to 4096.
Hot Cloning: In 12c R1 pluggable databases offered us with the opportunity to clone databases and put them
elsewhere which was really helpful. Now Oracle has gone even further and with Release 2 onwards you can get a running
database cloned towards a new instance, without shutting it down or losing data.
Tenant Relocation: Tenant(PDB) can now be relocated online, then unplug/plug operation introduced in 12c
Release 1.
2) Application Container: Most Pluggable Databases share application objects mostly code and metadata. Oracle 12c
R2 introduced something called as Application Container to add this as a feature.
This fulfils the cloud objective, As in previous release even with the addition of the pluggable databases we still needed to
update the applications in all the separate databases. Now one can have their own separate database / pluggable
database and share completely the same application logic.
It really makes management easier; all you need to do is to apply updates to the shared application container.
3) SQL in Silicon- Super Server: Adds co-processors to all 32 cores of the SPARC M7 that offload and accelerate
important data functions, dramatically improving efficiency and performance of database applications. Critical functions
accelerated by these new co-processors include memory de-compression, memory scan, range scan, filtering, and join
assist. Offloading these functions to co-processors greatly increases the efficiency of each CPU core, lowers memory
utilization. This enables
- 3x Faster Joins.
- 10x Faster Expressions
- 60X Faster JSON.
3) Sharding : Sharding is an application-managed scaling technique using many independent databases. The data is split
into multiple databases (called shards). Each database holds a subset of the data, this can be either be range or hash.
You can also split the shards into multiple shards as the data volume or access to this data grows. Shards then can be
replicated for availability and scalability reasons.
Sharding be really nicely used for applications that require extreme scalability.
4) Oracle now increased that number of pluggable database in one CDB to 4096.
5) AWR reports are now available on Active Data Guard standby databases.
I will share the new features of Oracle 12c Release 2 in much details in Part-2 of this post.
SQL> select lpad(' ',lvl,' ')||logical_file file_name from X$DBGDIREXT where rownum
<=20;
In this Part i will try to highlight most of the 12cR2 features which i found to be most awaited ones for DBA's .
I will divide this post in sections like Admin, Backup/Recovery, Performance/Tuning, Grid, RAC, and Network...
The post is not intended to collate all the new features, If you want to read about all of that which have changed in this
release probably you might want to read the New Features Guide:
http://docs.oracle.com/database/122/NEWFT/GUID-6213395A-CFDD-4D42-8970-F8FA062CC4FA.htm#NEWFT-GUID-
6213395A-CFDD-4D42-8970-F8FA062CC4FA
Section 1 : SQL
1. Sqlplus Command Line:
1.1 History :
Starting this release you can set the History environment variable to on and get this history of last 100 executed queries
by default.
SQL> history
1 show history
2 show user
3 desc dual
* 4 select * from dual;
2. Globalization Support:
With the new Oracle Database 12c Release 2 (12.2) ability to declare collations for columns, you can declare a column
to always be compared in a case-insensitive way. Oracle Database supports case-insensitive collations, such
as BINARY_CI or GENERIC_M_CI.
This feature can help developers declare data as case-insensitive and do not have to add explicit uppercasing operations
to SQL statements or create function based indexes.
Example:
I will add more specific contents to each topic here in upcoming blogs when I am done with my test cases on the same. I
am in process of evaluating the same and will come up with best practises and other advantages and disadvantages as
well...
Interestingly I would also like to evaluate this technology against other No-Sql databases which uses Sharding.
Object quarantine isolates an object that has raised an error and monitors the object for impacts on the
system.
Example: This query shows the resources that are currently quarantined.
The conversion of table can be done in online and offline mode. Below example represents Online operation to convert a
non-partition table to partition one.
Example:
Example:
Example:
Database altered.
FLASHBACK_ON
------------------
YES
SQL> flashback pluggable database pdb1 to timestamp systimestamp - interval '20' minute;
Flashback complete.
Section 4: Networking
Like Shared Server and Dedicated Server Architecture, DRCP is yet another connection management
framework which enables less utilization of resources and giving performance benefits. Majorly for applications
which use connection pooling.
When the first request is received from a client, the Connection Broker picks an available pooled server and
hands off the client connection to the pooled server. If no pooled servers are available,
the Connection Broker creates one. If the pool has reached its maximum size, the client request is placed on
the wait queue until a pooled server is available. Releasing database resources involves releasing the pooled
server to the pool.
For instance, when a client requires database access, the connection broker picks up a server process from
the pool and hands it off to the client. The client is directly connected to the server process until the request is
served. After the server has finished, the server process is released into the pool. The connection from the
client is restored to the broker. Session memory is allocated from the PGA.
Section 5 : Analytics
Analytic Views
Oracle describes Analytic views to provide a fast and efficient way to create analytic queries of data stored in existing
database tables and views. The diagram depicts the pictorial representation of Analytic view.
The model is made up of three objects.
Dimension Attribute - Defines a dimension along with the hierarchical levels also multiple hierarchies are
possible.
Hierarchy - Defines the hierarchical structure of a dimension with parent/child.
Analytic View - Brings together the hierarchies and defines the measures.
Section 6 : Security
Internal tablespace encryption
Now it is possible to encrypt internal tablespace i.e. system, sysaux, undo as well.
Complex queries sometimes process the same query block multiple times. To avoid this scenario, Oracle Database can
create temporary tables for the query results and store them in memory for the duration of the cursor called Cursor
Duration Temp Tables. For complex operations this optimization enhances the materialization of intermediate results
from repetitively used subqueries which improve performance and optimize I/O.
When the database uses cursor-duration temporary tables, the keyword CURSOR DURATION MEMORY appears in the
execution plan.
https://docs.oracle.com/database/122/TGSQL/query-transformations.htm#TGSQL-GUID-C1AE164B-E99F-418A-9B2A-
1ADB036048DF
Using this feature enables DBA or privileged user to monitor a session and find details about the operation
going on.
Creating a database operation involves supplying a name and defining its beginning and end times.
Start a database operation by using the DBMS_SQL_MONITOR.BEGIN_OPERATION function, and end it by using
the DBMS_SQL_MONITOR.END_OPERATION procedure.
To begin the operation in a different session, specify the combination of SID and SERIAL#.
Example:
Summary
I have tried to jotted down the new Oracle 12.2 Features. Hope you find this article useful. I am still in process
of going through documentation and will soon start testing the same. There are still a lot of other features like
SQL, Hot Cloning, Rman, Performance Tuning and Security which can be useful in day to day DBA/
Development. I will come up with detailed discussions on few of the important features in my next Blog.
Oracle 12c Release 2 New Features-
Part 3
In my previous post Part-2 i only highlighted the most useful features but in this post i will target all other new
features which brings in significant difference to this release.
1. Architecture
1.1 Read/Write and Read-Only Instances
Starting with Oracle 12.2.0.1 , a new initialization parameter has been introduced which can open the database in Read
Only Mode. In past only standby databases were capable of doing so but with 12cR2 DBA can set
the INSTANCE_MODE initialization parameter to READ_ONLY, Default being READ_WRITE.
2. Maximizing Availability
2.1 Restore Point :
Restore points can now be created in PDB's called PDB Restore Points. These restore points are specific to
PDB's.
You must be wondering what's Sparse Backup , its nothing but taking level 1 backup on Clone/Snapshot DB i.e. backing
up only changed data.
To know more about Clone DB which works on copy on write technology read Oracle Documentation. There is also a
whitepaper which gives more insights about the same.
http://www.oracle.com/technetwork/server-storage/hardware-solutions/o13-022-rapid-cloning-db-1919816.pdf
RMAN restores sparse data files from sparse backups and then recovers them from archive and redo logs. You can perform a complete
or a point-in-time recovery on sparse data files.
- Automated remote trail file recovery by pump automatically handles when a target system is restored to a previous point in time.
This feature also handles most cases where target trail files are deleted or corrupted by automatically regenerating the missing target
trail data when the source trail data is available, and by intelligently skipping any duplicate transactions when applying the change
data.
http://docs.oracle.com/database/122/HAOVW/ha-features.htm#HAOVW11979
Syntax:
- In SQL Language , Developer can write Query to convert Structure Data into Json format.
- Application Containers, If you have a real use case these Application containers will come real handy when designing
the application with multiple depended PDB's accessing common objects.
Summary
This was my last installment to Oracle 12c Release 2 New Feature Topic. I leave rest of the features for you to go through
and get more insights on..
In my upcoming blogs i will start Blogging about practical use and use cases of these new features.