SlideShare a Scribd company logo
Vinay Raj Malla
Oracle DBA
Miracle Software Systems
Oracle Architecture & Oracle 12c
New features
Agenda
• Oracle Architecture.
• Oracle 12c new features
Session objectives
• Learn features of Oracle Database 12c that are not top, but would
help you!
• As a 11g DBA, what you should know when working with 12c
database (changed behaviour or additional functionality)
• Many features discussed at high level –once you know what to look
for, “search” always works! (have <90 seconds for each feature)
Oracle 12c new features
• READ Privilege (12.1.0.2)
• Temporary Undo
• Online Data File Move
• Last Login Time
• Cascaded TRUNCATE
• Limit PGA
• Listener Registration
• More DB Writer Processes
• More DB Writer Processes
• Faster (Approximate) Count –12.1.0.2
• Bigger VARCHAR2
• DDL Logging
• Viewing DDL Log
• Multi-threaded Processes
• Invisible Columns
• Row Limiting Clause
Oracle 12c new features
• Connecting Lower Version Clients.
• Database Express 12c.
• Database Express home.
• Data Pump NOLOGGING Import.
• Data Pump Export Views As Tables
• Datapump sqlfile
• SQL*Loader Express Mode
• RMAN Notables
Oracle 12c new features
• RMAN Restore Table
• RMAN Active Duplicate Using Backupset
• RMAN Catalog Requires EE
• Sqlcl
Oracle 12c new features
Oracle Architecture
Oracle 12c enhancements
• READ Object Privilege, READ ANY TABLE system privilege
• SELECT privilege also includes privilege to lock
- LOCK TABLE <table_name> IN EXCLUSIVE MODE;
- SELECT ... FROM <table_name> FOR UPDATE;
• READ privilege is more secure, a true READ ONLY privilege!
• Grants and Revokes work similar to SELECT grants.
• No, there is no READ statement to go with the privilege, you still use the SELECT statement
SQL> GRANT READ ON XX.XXLE_CUSTOMERS_T TO smith;
SQL> GRANT READ ANY TABLE TO peter;
SQL> REVOKE READ ON XX.XXLE_SUPPLIERS_VW FROM smith;
SQL> REVOKE READ ANY TABLE FROM peter;
SQL> REVOKE READ ANY TABLE FROM peter;
READ Privilege (12.1.0.2)
Temporary Undo
• By default, undo information on global temporary-table DML operations are
stored in the undo tablespace, similar to undo operations on persistent tables.
• New parameter TEMP_UNDO_ENABLED
• Undo information generated by DML operations on temporary tables stored in the temporary tablespace;
therefore, no redo is generated for the undo operation.
• Reduces the amount of undo data stored in the undo tablespaces, and the amount of redo from the undo.
• Parameter is session modifiable
-- Session level
ALTER SESSION SET TEMP_UNDO_ENABLED = TRUE;
ALTER SESSION SET TEMP_UNDO_ENABLED = FALSE;
-- System level
ALTER SYSTEM SET TEMP_UNDO_ENABLED = TRUE;
ALTER SYSTEM SET TEMP_UNDO_ENABLED = FALSE;
Temporary Undo
Online Data File Move
• File move (rename) in 11g
• Take tablespaceoffline
• Use OS command to copy or move file –DBA does copy outside database
• Use SQL to update the controlfile
• ALTER DATABASE RENAME FILE or
• ALTER TABLESPACE … RENAME DATAFILE
• Bring tablespaceonline
• To move files belonging the SYSTEM, do in MOUNT mode.
• File move in 12c
• Just one step – no unavailability!
• ALTER DATABASE MOVE DATAFILE 'x' TO 'y'
• The “TO” clause is optional –if omitted, file is moved to DB_CREATE_FILE_DEST as OMF.
More to File Move in 12c…
• Files belonging to SYSTEM tablespace can be moved using ALTER DATABASE MOVE DATAFILE,
online!
• MOVE DATAFILE syntax allows only 1 file move at a time. You can still move multiple files with
ALTER DATABASE RENAME FILE or ALTER TABLESPACE RENAME DATAFILE options –but offline
mode.
• File can be moved from file system to ASM disk group, and vice versa.
• File can be moved from one diskgroup to another in ASM.
• Optional KEEP clause to keep the data file at the source.
• More to File Move in 12c…
Last Login Time
Security related values in the USER$ table are [as existed in 11gR2]:
• CTIME: Date & Time when user was created
• PTIME: Date & Time when user password was last changed
• LTIME: Date & Time when the user account was locked
• LCOUNT: Number of failed login attempts
• SPARE4: Encrypted case sensitive password 11g version
• PASSWORD: Encrypted case insensitive password 10g version
Added in Oracle Database 12c:
• SPARE6: Last login time of the user.
• Displayed when you invoke SQL*Plus
• Last Login Time
SQL>$ sqlplus hr/hr
SQL*Plus: Release 12.1.0.1.0 Production on Tue Jul 9 23:34:32 2013
Copyright (c) 1982, 2013, Oracle. All rights reserved.
Last Successful login time: Tue Jun 09 2016 23:34:22 -05:00
Connected to:
Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 -64bit Production
With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
Cascaded TRUNCATE
• New CASCADE clause for TRUNCATE
• Truncates all child tables that reference truncated table.
• Foreign key must be defined with ON DELETE CASCADE option
• Foreign key must be in ENABLED status.
• Children, grand children are truncated
• In Oracle Database 11gR2 and earlier versions, the TRUNCATE statement had the following two restrictions along
with few others.
• You cannot truncate the parent table of an enabled foreign key constraint. You must disable the constraint before
truncating the table. An exception is that you can truncate the table if the integrity constraint is self-referential.
• You cannot truncate the parent table of a reference-partitioned table. You must first drop the reference-
partitioned child table.
Limit PGA
• New parameter PGA_AGGREGATE_LIMIT
• Specifies a limit on the aggregate PGA memory consumed by the instance
• PGA_AGGREGATE_TARGET maintains the same behavior as 11g -specifies the target
aggregate PGA memory available to all server processes attached to the instance.
Listener Registration
• New mandatory background process LREG
• Registers information about the database instance and dispatcher processes with
the Oracle Net Listener
• When an instance starts, LREG polls the listener to determine whether it is
running. If the listener is running, then LREG passes it relevant parameters. If it is
not running, then LREG periodically attempts to contact it.
• Manual listener registration using ALTER SYSTEM REGISTER –same as in 11g.
• In 11g, PMON process had this responsibility.
More DB Writer Processes
• There can be up to 100 Database Writer Processes (configured using
DB_WRITER_PROCESSES parameter).
• The names of the first 36 Database Writer Processes are DBW0-DBW9 and DBWa-
DBWz.
• The names of the 37th through 100th Database Writer Processes are BW36-
BW99.
• Useful for systems that modify data heavily.
• In 11gR2, the limit was 36.
Faster (Approximate) Count –12.1.0.2
• New function APPROX_COUNT_DISTINCT (<expr>)
• Returns the approximate number of rows that contain distinct values of <expr>.
• Alternative to the COUNT (DISTINCT <expr>) function, which returns the exact
number of rows that contain distinct values of <expr>.
• APPROX_COUNT_DISTINCT processes large amounts of data significantly faster
than COUNT, with negligible deviation from the exact result.
• SQL> SELECT APPROX_COUNT_DISTINCT (item_id) AS "Items Ordered" FROM
order_lines;
Changing MAX_STRING_SIZE
• ALTER PLUGGABLE DATABASE CLOSE [IMMEDIATE]
• ALTER PLUGGABLE DATABASE OPEN UPGRADE
• Change the setting of MAX_STRING_SIZE to EXTENDED
• Run the ?/rdbms/admin/utl32k.sql script as SYSDBA.
• ALTER PLUGGABLE DATABASE CLOSE
• ALTER PLUGGABLE DATABASE OPEN
DDL Logging
• ENABLE_DDL_LOGGING
• Introduced in 11g
• Writes DDL statements to Alert log
• What’s different in 12c?
• Instead of alert log, writes to DDL log directory in ADR
• <ADR Home>/log/ddl
• File log.xml
• The Catch:
• Either Database Lifecycle Management Pack or Change
Management Pack must be licensed
• DDL Logging
$ cat log.xml
<msgtime='2014-04-29T16:48:23.352-07:00'
org_id='oracle' comp_id='rdbms'
msg_id='opiexe:4181:2946163730' type='UNKNOWN'
group='diag_adl'
level='16' host_id='emcc.example.com'
host_addr='10.0.2.15'
version='1'>
<txt>create table sample_test(n number)
</txt>
</msg>
Viewing DDL Log
• Use adrci: New option –SHOW LOG
• Default shows all logs –ddl, debug and test
• Filter ddllogs using –l. Further filter using the –p option
• Try “help show log” to see all predicate string options with -p
• Viewing DDL Log
• adrci> show log -l ddl-p "message_textlike '%sampl%'"
ADR Home = /u02/app/oracle/diag/rdbms/ocadb1/ocadb1:
****************************************************************
Output the results to file: /tmp/utsout_4170_140592_1.ado
adrci>
2016-04-29 16:48:23.352000 -07:00
create table sample_test(n number)
2016-06-09 16:48:31.853000 -07:00
drop table sample
Multi-threaded Processes
• New Parameter: THREADED_EXECUTION (YES/NO)
• Allows multiple background processes to share a single OS process on Unix, similar to Windows.
• In default process models, SPID and STID columns of V$PROCESS will have the same values,
whereas in multithreaded models, each SPID (process) will have multiple STID (threads) values.
• The EXECUTION_TYPE column in V$PROCESS will show THREAD.
• V$BGPROCESS shows the background processes.
• Listener.ora should have DEDICATED_THROUGH_BROKER_<listener-name>=ON
• Cannot Login ‘/ AS SYSDBA’
• Must use SYS AS SYSDBA
Invisible Columns
• Columns can be invisible (ALTER TABLE, CREATE TABLE syntax –INVISIBLE)
• Not supported on temporary and external tables
• Specify explicitly in INSERT, SELECT clauses
• SQL*Plus: SET COLINVISIBLE ON
When you make an INVISIBLE column in Oracle 12c database to VISIBLE, the COL# is assigned the
highest available. Thus the column becomes the last column in the table (not storage, only display).
So, if you accidentally make a column INVISIBLE and correct it by changing to VISIBLE, the column
order changes. So, if the application uses "SELECT *" or "INSERT" without column names, they might
break!
• New clause in SELECT statement
• Follows the ORDER BY clause
• [ OFFSET offset{ ROW | ROWS } ]
• [ FETCH {FIRST | NEXT} [ {rowcount| percent PERCENT} ]
• { ROW | ROWS } { ONLY | WITH TIES } ]
• OFFSET clause is used to skip the specified number of rows before the limiting begins.
• FETCH clause can specify the number of rows to return or a percentage of rows to return.
• ONLY specifies to return exact number or percent of rows to return.
• WITH TIES specifies to return all rows that have the same sort keys as the last row of the row-limited result
set.
Row Limiting Clause
Row Limiting Examples
Security Defaults
• AUDIT_SYS_OPERATIONS defaults to TRUE in #Oracle12c
• AUDIT_ADMIN and AUDIT_VIEWER Security Roles
• utlpwdmg.sql script creates ora12c_verify_function and
ora12c_strong_verify_function
• RESOURCE Role No Longer Grants the UNLIMITED TABLESPACE Privilege
• Default Unified Audit Policy Enabled. Failed logins are written to
UNIFIED_AUDIT_TRAIL.
• The ORA_LOGON_FAILURES unified audit policy for new databases, tracks failed
logons only.
• AUDSYS schema will be used solely for storage of the unified audit trail data table.
Connecting Lower Version Clients
• SQLNET.ALLOWED_LOGON_VERSION_CLIENT
• SQLNET.ALLOWED_LOGON_VERSION_SERVER
• Replaced SQLNET.ALLOWED_LOGON_VERSION
Database Express 12c
• Database Control is history…
• Requires XDB. EM Express is a servlet built on top of Oracle XML DB.
• Deafultport is 5500, can be changed using DBMS_XDB_CONFIG.setHTTPsPort(<port>) procedure
• URL is https://<hostname>:5500/em
• Available only when the database is open
• The EM_EXPRESS_BASIC role enables users to connect to EM Express and to view the pages in read-only mode.
• The EM_EXPRESS_ALL role enables users to connect to EM Express and use all the functionality.
• While creating Oracle Database 12c database, DBCA picks a free port from 5500 to 5599 for Enterprise Manager Express. If
you want a specific port to be used, set the environment variable DBEXPRESS_HTTPS_PORT before starting Oracle
Universal Installer (OUI) or Database Configuration Assistant (DBCA).
DB Express Home
Data Pump NOLOGGING Import
• Import without generating archived logs
• TRANSFORM=DISABLE_ARCHIVE_LOGGING:Y[:TABLE|INDEX]
• Sets object to NOLOGGIG before import and reverts to original setting after import.
• Choose to disable logging for tables (Y:TABLE), indexes (Y:INDEX), or both (Y).
• $ impdp DIRECTORY=dump_dirDUMPFILE=ex2.dmp LOGFILE=ex2.log SCHEMAS=ball
TRANSFORM=DISABLE_ARCHIVE_LOGGING:Y:TABLE
• $ impdp DIRECTORY=dump_dirDUMPFILE=ex1.dmp LOGFILE=ex1.log SCHEMAS=basket
TRANSFORM=DISABLE_ARCHIVE_LOGGING:Y TRANSFORM=DISABLE_ARCHIVE_LOGGING:N:INDEX
This feature provides a great relief when importing large tables, and reduces the excessive redo
generation, which results in quicker imports. This attribute applies to tables and indexes.
Data Pump Export Views As Tables
• Export one or more views as tables
• VIEWS_AS_TABLES=[schema_name.]view_name[:table_name], ...
• Table_name specifies the name of a table to serve as the source of the metadata
for the exported view.
• Data Pump performs a table-mode export.
• Useful to get a subset of data exported.
• Also available in “impdp” to use in the network mode of import.
SQL*Loader Express Mode
• SQL*Loader in #DB12c has a new option that does not require the user to create a
SQL*Loader control file.
• Instead, command-line parameters are used to specify how the data file is loaded, and
SQL*Loader automatically chooses the best method with which to load the data.
• Data files formatted as comma-separated values (CSV) to both SQL*Loader and external
tables are supported.
• The new parameter, TABLE, turns on express mode. The value of the TABLE parameter is the
name of the table that SQL*Loader will load.
• If no data file is specified, then looks for file namedtablename.dat in the current directory
• Sqlldr username TABLE=EMPLOYEES
RMAN Notables
• “Describe” in RMAN, similar to SQL*Plus.
• Most SQL statements can be run in RMAN without the “SQL” prefix (and messing
with quotes around the SQL!!).
• SYSBACKUP Administration Role –Start replacing scripts where SYSDBA is used.
RMAN> SELECT username,machine FROM v$session;
RMAN> ALTER TABLESPACE users ADD DATAFILE SIZE 121m;
RMAN Restore Tables
• The biggest RMAN feature is restore table from backup.
RMAN>RECOVER TABLE SCOTT.EMP, SCOTT.DEPT
UNTIL TIME 'SYSDATE-1'
AUXILIARY DESTINATION '/t1/tdb'
DATAPUMP DESTINATION '/t1/dump'
DUMP FILE 'emp_dept_dump.dat'
REMAP TABLE 'HR'.'EMP':'EMP_RECVR';
--NOTABLEIMPORT;
• When NOTABLEIMPORT option is used, RMAN performs the restore/recover and creates the
export dump file, but does not perform the import.
RMAN Catalog Requires EE
• Starting with 12c, the RMAN catalog database requires Enterprise Edition.
• Covered under the Infrastructure Repository License (no need for additional license).
• RMAN
• Oracle Enterprise Manager Cloud Control
• Automatic Workload Repository (AWR) Warehouse
• Global Data Services Catalog
• Grid Infrastructure Management Repository
• https://blogs.oracle.com/UPGRADE/entry/rman_catalog_requires_ee_in
• http://docs.oracle.com/database/121/DBLIC/editions.htm#DBLIC119
Database upgrade improvements
• A new and much improved pre-upgrade information script, preupgrd.sql,
replaces the legacy utlu[121]s.sql script in 12c R1.
• Apart from the preupgrade checks verification, the script is capable of addressing
the various issues – in the form of fixup scripts – that are raised during the pre-
post upgrade process.
DB In-memory
In-Memory Scan speed
Sqlcl features
 Alias
 CD : allow you to change path once connected to SQLcl, it seems that relatives path are not supported.
• CTAS
• DDL, DDL >sql
• INFO/INFO+
• FORMAT FILE
• HISTORY
• LOAD
• set sqlformat csv/ XML/json/insert/ansiconsole..
Sqlcl features
References
• https://docs.oracle.com/database/121/NEWFT/chapter12102.htm#N
EWFT003
• Biju Thomas Blog
• http://oracleinaction.com/undo-and-redo-in-oracle/
• https://oracle-base.com/articles/12c/articles-12c
Thank You

More Related Content

PDF
Awr + 12c performance tuning
PDF
Performance Tuning intro
PDF
Oracle Performance Tuning Fundamentals
PDF
Simplifying EBS 12.2 ADOP - Collaborate 2019
PPT
OOUG - Oracle Performance Tuning with AAS
PDF
Collaborate 2019 - How to Understand an AWR Report
PDF
Oracle Database Performance Tuning Concept
PPTX
Oracle AWR Data mining
Awr + 12c performance tuning
Performance Tuning intro
Oracle Performance Tuning Fundamentals
Simplifying EBS 12.2 ADOP - Collaborate 2019
OOUG - Oracle Performance Tuning with AAS
Collaborate 2019 - How to Understand an AWR Report
Oracle Database Performance Tuning Concept
Oracle AWR Data mining

What's hot (20)

PDF
GLOC 2014 NEOOUG - Oracle Database 12c New Features
PDF
Analyzing and Interpreting AWR
PDF
Oracle SQL Tuning
PPTX
Oracle database 12.2 new features
PDF
Crating a Robust Performance Strategy
PDF
Oracle db performance tuning
PPTX
AWR DB performance Data Mining - Collaborate 2015
DOCX
Oracle Database 12c "New features"
PDF
Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...
PPTX
Best New Features of Oracle Database 12c
PPTX
Oracle performance tuning_sfsf
PDF
How to find what is making your Oracle database slow
PDF
Troubleshooting Complex Performance issues - Oracle SEG$ contention
PDF
Average Active Sessions RMOUG2007
PDF
Average Active Sessions - OaktableWorld 2013
PDF
Awr1page - Sanity checking time instrumentation in AWR reports
PDF
Oracle Performance Tools of the Trade
PPTX
Oracle Database Performance Tuning Basics
PPTX
Top 10 tips for Oracle performance
PDF
Oracle Exadata Performance: Latest Improvements and Less Known Features
GLOC 2014 NEOOUG - Oracle Database 12c New Features
Analyzing and Interpreting AWR
Oracle SQL Tuning
Oracle database 12.2 new features
Crating a Robust Performance Strategy
Oracle db performance tuning
AWR DB performance Data Mining - Collaborate 2015
Oracle Database 12c "New features"
Hotsos 2011: Mining the AWR repository for Capacity Planning, Visualization, ...
Best New Features of Oracle Database 12c
Oracle performance tuning_sfsf
How to find what is making your Oracle database slow
Troubleshooting Complex Performance issues - Oracle SEG$ contention
Average Active Sessions RMOUG2007
Average Active Sessions - OaktableWorld 2013
Awr1page - Sanity checking time instrumentation in AWR reports
Oracle Performance Tools of the Trade
Oracle Database Performance Tuning Basics
Top 10 tips for Oracle performance
Oracle Exadata Performance: Latest Improvements and Less Known Features
Ad

Viewers also liked (20)

PDF
COUG_AAbate_Oracle_Database_12c_New_Features
PDF
Oracle12 - The Top12 Features by NAYA Technologies
PPTX
Introduce to Spark sql 1.3.0
PPTX
Spark etl
PPTX
AMIS Oracle OpenWorld 2015 Review – part 3- PaaS Database, Integration, Ident...
PPTX
SPARQL and Linked Data Benchmarking
PPTX
Data Science at Scale: Using Apache Spark for Data Science at Bitly
PPTX
Spark meetup v2.0.5
PDF
Pandas, Data Wrangling & Data Science
PDF
Data Science with Spark
PDF
Always Valid Inference (Ramesh Johari, Stanford)
PPTX
Building a Unified Data Pipline in Spark / Apache Sparkを用いたBig Dataパイプラインの統一
PPTX
Exadata 12c New Features RMOUG
PDF
Advanced Data Science on Spark-(Reza Zadeh, Stanford)
PDF
What is new on 12c for Backup and Recovery? Presentation
PDF
Reactive microservices with play and akka
PDF
ETL to ML: Use Apache Spark as an end to end tool for Advanced Analytics
PDF
Spark Summit East 2015 Keynote -- Databricks CEO Ion Stoica
PDF
Fast and Simplified Streaming, Ad-Hoc and Batch Analytics with FiloDB and Spa...
PDF
Oracle RAC 12c Overview
COUG_AAbate_Oracle_Database_12c_New_Features
Oracle12 - The Top12 Features by NAYA Technologies
Introduce to Spark sql 1.3.0
Spark etl
AMIS Oracle OpenWorld 2015 Review – part 3- PaaS Database, Integration, Ident...
SPARQL and Linked Data Benchmarking
Data Science at Scale: Using Apache Spark for Data Science at Bitly
Spark meetup v2.0.5
Pandas, Data Wrangling & Data Science
Data Science with Spark
Always Valid Inference (Ramesh Johari, Stanford)
Building a Unified Data Pipline in Spark / Apache Sparkを用いたBig Dataパイプラインの統一
Exadata 12c New Features RMOUG
Advanced Data Science on Spark-(Reza Zadeh, Stanford)
What is new on 12c for Backup and Recovery? Presentation
Reactive microservices with play and akka
ETL to ML: Use Apache Spark as an end to end tool for Advanced Analytics
Spark Summit East 2015 Keynote -- Databricks CEO Ion Stoica
Fast and Simplified Streaming, Ad-Hoc and Batch Analytics with FiloDB and Spa...
Oracle RAC 12c Overview
Ad

Similar to Aioug vizag oracle12c_new_features (20)

PPTX
Oracle 12c
PPT
12c Database new features
PPTX
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
PPTX
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
PPT
ORACLE 12C-New-Features
PPTX
Oracle database 12c new features
PDF
Oracle 12 c new-features
PPTX
Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...
PPTX
Oracle Database 12c New Features for Developers and DBAs - OTN TOUR LA 2015
PPTX
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
PPTX
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
PPTX
Oracle Database 12c - New Features for Developers and DBAs
PPTX
Oracle Database 12c - New Features for Developers and DBAs
PPTX
An AMIS Overview of Oracle database 12c (12.1)
PDF
PDF
Oracle 12c New Features for Developers
PPTX
Database models and DBMS languages
PPSX
Oracle database 12c new features
PDF
2008 Collaborate IOUG Presentation
PDF
IBM DB2 for z/OS Administration Basics
 
Oracle 12c
12c Database new features
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 12C-New-Features
Oracle database 12c new features
Oracle 12 c new-features
Oracle Database 12c - The Best Oracle Database 12c Tuning Features for Develo...
Oracle Database 12c New Features for Developers and DBAs - OTN TOUR LA 2015
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
Oracle Database 12c - New Features for Developers and DBAs
Oracle Database 12c - New Features for Developers and DBAs
An AMIS Overview of Oracle database 12c (12.1)
Oracle 12c New Features for Developers
Database models and DBMS languages
Oracle database 12c new features
2008 Collaborate IOUG Presentation
IBM DB2 for z/OS Administration Basics
 

Recently uploaded (20)

PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
Big Data Technologies - Introduction.pptx
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
cuic standard and advanced reporting.pdf
PDF
NewMind AI Monthly Chronicles - July 2025
PDF
Review of recent advances in non-invasive hemoglobin estimation
PPTX
Cloud computing and distributed systems.
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
Machine learning based COVID-19 study performance prediction
“AI and Expert System Decision Support & Business Intelligence Systems”
Mobile App Security Testing_ A Comprehensive Guide.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
NewMind AI Weekly Chronicles - August'25 Week I
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Unlocking AI with Model Context Protocol (MCP)
Big Data Technologies - Introduction.pptx
Digital-Transformation-Roadmap-for-Companies.pptx
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Network Security Unit 5.pdf for BCA BBA.
cuic standard and advanced reporting.pdf
NewMind AI Monthly Chronicles - July 2025
Review of recent advances in non-invasive hemoglobin estimation
Cloud computing and distributed systems.
Dropbox Q2 2025 Financial Results & Investor Presentation
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Understanding_Digital_Forensics_Presentation.pptx
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
Machine learning based COVID-19 study performance prediction

Aioug vizag oracle12c_new_features

  • 1. Vinay Raj Malla Oracle DBA Miracle Software Systems Oracle Architecture & Oracle 12c New features
  • 2. Agenda • Oracle Architecture. • Oracle 12c new features
  • 3. Session objectives • Learn features of Oracle Database 12c that are not top, but would help you! • As a 11g DBA, what you should know when working with 12c database (changed behaviour or additional functionality) • Many features discussed at high level –once you know what to look for, “search” always works! (have <90 seconds for each feature)
  • 4. Oracle 12c new features • READ Privilege (12.1.0.2) • Temporary Undo • Online Data File Move • Last Login Time • Cascaded TRUNCATE • Limit PGA • Listener Registration • More DB Writer Processes
  • 5. • More DB Writer Processes • Faster (Approximate) Count –12.1.0.2 • Bigger VARCHAR2 • DDL Logging • Viewing DDL Log • Multi-threaded Processes • Invisible Columns • Row Limiting Clause Oracle 12c new features
  • 6. • Connecting Lower Version Clients. • Database Express 12c. • Database Express home. • Data Pump NOLOGGING Import. • Data Pump Export Views As Tables • Datapump sqlfile • SQL*Loader Express Mode • RMAN Notables Oracle 12c new features
  • 7. • RMAN Restore Table • RMAN Active Duplicate Using Backupset • RMAN Catalog Requires EE • Sqlcl Oracle 12c new features
  • 10. • READ Object Privilege, READ ANY TABLE system privilege • SELECT privilege also includes privilege to lock - LOCK TABLE <table_name> IN EXCLUSIVE MODE; - SELECT ... FROM <table_name> FOR UPDATE; • READ privilege is more secure, a true READ ONLY privilege! • Grants and Revokes work similar to SELECT grants. • No, there is no READ statement to go with the privilege, you still use the SELECT statement SQL> GRANT READ ON XX.XXLE_CUSTOMERS_T TO smith; SQL> GRANT READ ANY TABLE TO peter; SQL> REVOKE READ ON XX.XXLE_SUPPLIERS_VW FROM smith; SQL> REVOKE READ ANY TABLE FROM peter; SQL> REVOKE READ ANY TABLE FROM peter; READ Privilege (12.1.0.2)
  • 11. Temporary Undo • By default, undo information on global temporary-table DML operations are stored in the undo tablespace, similar to undo operations on persistent tables.
  • 12. • New parameter TEMP_UNDO_ENABLED • Undo information generated by DML operations on temporary tables stored in the temporary tablespace; therefore, no redo is generated for the undo operation. • Reduces the amount of undo data stored in the undo tablespaces, and the amount of redo from the undo. • Parameter is session modifiable -- Session level ALTER SESSION SET TEMP_UNDO_ENABLED = TRUE; ALTER SESSION SET TEMP_UNDO_ENABLED = FALSE; -- System level ALTER SYSTEM SET TEMP_UNDO_ENABLED = TRUE; ALTER SYSTEM SET TEMP_UNDO_ENABLED = FALSE; Temporary Undo
  • 13. Online Data File Move • File move (rename) in 11g • Take tablespaceoffline • Use OS command to copy or move file –DBA does copy outside database • Use SQL to update the controlfile • ALTER DATABASE RENAME FILE or • ALTER TABLESPACE … RENAME DATAFILE • Bring tablespaceonline • To move files belonging the SYSTEM, do in MOUNT mode. • File move in 12c • Just one step – no unavailability! • ALTER DATABASE MOVE DATAFILE 'x' TO 'y' • The “TO” clause is optional –if omitted, file is moved to DB_CREATE_FILE_DEST as OMF.
  • 14. More to File Move in 12c… • Files belonging to SYSTEM tablespace can be moved using ALTER DATABASE MOVE DATAFILE, online! • MOVE DATAFILE syntax allows only 1 file move at a time. You can still move multiple files with ALTER DATABASE RENAME FILE or ALTER TABLESPACE RENAME DATAFILE options –but offline mode. • File can be moved from file system to ASM disk group, and vice versa. • File can be moved from one diskgroup to another in ASM. • Optional KEEP clause to keep the data file at the source. • More to File Move in 12c…
  • 15. Last Login Time Security related values in the USER$ table are [as existed in 11gR2]: • CTIME: Date & Time when user was created • PTIME: Date & Time when user password was last changed • LTIME: Date & Time when the user account was locked • LCOUNT: Number of failed login attempts • SPARE4: Encrypted case sensitive password 11g version • PASSWORD: Encrypted case insensitive password 10g version Added in Oracle Database 12c: • SPARE6: Last login time of the user. • Displayed when you invoke SQL*Plus • Last Login Time SQL>$ sqlplus hr/hr SQL*Plus: Release 12.1.0.1.0 Production on Tue Jul 9 23:34:32 2013 Copyright (c) 1982, 2013, Oracle. All rights reserved. Last Successful login time: Tue Jun 09 2016 23:34:22 -05:00 Connected to: Oracle Database 12c Enterprise Edition Release 12.1.0.1.0 -64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
  • 16. Cascaded TRUNCATE • New CASCADE clause for TRUNCATE • Truncates all child tables that reference truncated table. • Foreign key must be defined with ON DELETE CASCADE option • Foreign key must be in ENABLED status. • Children, grand children are truncated • In Oracle Database 11gR2 and earlier versions, the TRUNCATE statement had the following two restrictions along with few others. • You cannot truncate the parent table of an enabled foreign key constraint. You must disable the constraint before truncating the table. An exception is that you can truncate the table if the integrity constraint is self-referential. • You cannot truncate the parent table of a reference-partitioned table. You must first drop the reference- partitioned child table.
  • 17. Limit PGA • New parameter PGA_AGGREGATE_LIMIT • Specifies a limit on the aggregate PGA memory consumed by the instance • PGA_AGGREGATE_TARGET maintains the same behavior as 11g -specifies the target aggregate PGA memory available to all server processes attached to the instance.
  • 18. Listener Registration • New mandatory background process LREG • Registers information about the database instance and dispatcher processes with the Oracle Net Listener • When an instance starts, LREG polls the listener to determine whether it is running. If the listener is running, then LREG passes it relevant parameters. If it is not running, then LREG periodically attempts to contact it. • Manual listener registration using ALTER SYSTEM REGISTER –same as in 11g. • In 11g, PMON process had this responsibility.
  • 19. More DB Writer Processes • There can be up to 100 Database Writer Processes (configured using DB_WRITER_PROCESSES parameter). • The names of the first 36 Database Writer Processes are DBW0-DBW9 and DBWa- DBWz. • The names of the 37th through 100th Database Writer Processes are BW36- BW99. • Useful for systems that modify data heavily. • In 11gR2, the limit was 36.
  • 20. Faster (Approximate) Count –12.1.0.2 • New function APPROX_COUNT_DISTINCT (<expr>) • Returns the approximate number of rows that contain distinct values of <expr>. • Alternative to the COUNT (DISTINCT <expr>) function, which returns the exact number of rows that contain distinct values of <expr>. • APPROX_COUNT_DISTINCT processes large amounts of data significantly faster than COUNT, with negligible deviation from the exact result. • SQL> SELECT APPROX_COUNT_DISTINCT (item_id) AS "Items Ordered" FROM order_lines;
  • 21. Changing MAX_STRING_SIZE • ALTER PLUGGABLE DATABASE CLOSE [IMMEDIATE] • ALTER PLUGGABLE DATABASE OPEN UPGRADE • Change the setting of MAX_STRING_SIZE to EXTENDED • Run the ?/rdbms/admin/utl32k.sql script as SYSDBA. • ALTER PLUGGABLE DATABASE CLOSE • ALTER PLUGGABLE DATABASE OPEN
  • 22. DDL Logging • ENABLE_DDL_LOGGING • Introduced in 11g • Writes DDL statements to Alert log • What’s different in 12c? • Instead of alert log, writes to DDL log directory in ADR • <ADR Home>/log/ddl • File log.xml • The Catch: • Either Database Lifecycle Management Pack or Change Management Pack must be licensed • DDL Logging $ cat log.xml <msgtime='2014-04-29T16:48:23.352-07:00' org_id='oracle' comp_id='rdbms' msg_id='opiexe:4181:2946163730' type='UNKNOWN' group='diag_adl' level='16' host_id='emcc.example.com' host_addr='10.0.2.15' version='1'> <txt>create table sample_test(n number) </txt> </msg>
  • 23. Viewing DDL Log • Use adrci: New option –SHOW LOG • Default shows all logs –ddl, debug and test • Filter ddllogs using –l. Further filter using the –p option • Try “help show log” to see all predicate string options with -p • Viewing DDL Log • adrci> show log -l ddl-p "message_textlike '%sampl%'" ADR Home = /u02/app/oracle/diag/rdbms/ocadb1/ocadb1: **************************************************************** Output the results to file: /tmp/utsout_4170_140592_1.ado adrci> 2016-04-29 16:48:23.352000 -07:00 create table sample_test(n number) 2016-06-09 16:48:31.853000 -07:00 drop table sample
  • 24. Multi-threaded Processes • New Parameter: THREADED_EXECUTION (YES/NO) • Allows multiple background processes to share a single OS process on Unix, similar to Windows. • In default process models, SPID and STID columns of V$PROCESS will have the same values, whereas in multithreaded models, each SPID (process) will have multiple STID (threads) values. • The EXECUTION_TYPE column in V$PROCESS will show THREAD. • V$BGPROCESS shows the background processes. • Listener.ora should have DEDICATED_THROUGH_BROKER_<listener-name>=ON • Cannot Login ‘/ AS SYSDBA’ • Must use SYS AS SYSDBA
  • 25. Invisible Columns • Columns can be invisible (ALTER TABLE, CREATE TABLE syntax –INVISIBLE) • Not supported on temporary and external tables • Specify explicitly in INSERT, SELECT clauses • SQL*Plus: SET COLINVISIBLE ON When you make an INVISIBLE column in Oracle 12c database to VISIBLE, the COL# is assigned the highest available. Thus the column becomes the last column in the table (not storage, only display). So, if you accidentally make a column INVISIBLE and correct it by changing to VISIBLE, the column order changes. So, if the application uses "SELECT *" or "INSERT" without column names, they might break!
  • 26. • New clause in SELECT statement • Follows the ORDER BY clause • [ OFFSET offset{ ROW | ROWS } ] • [ FETCH {FIRST | NEXT} [ {rowcount| percent PERCENT} ] • { ROW | ROWS } { ONLY | WITH TIES } ] • OFFSET clause is used to skip the specified number of rows before the limiting begins. • FETCH clause can specify the number of rows to return or a percentage of rows to return. • ONLY specifies to return exact number or percent of rows to return. • WITH TIES specifies to return all rows that have the same sort keys as the last row of the row-limited result set. Row Limiting Clause
  • 28. Security Defaults • AUDIT_SYS_OPERATIONS defaults to TRUE in #Oracle12c • AUDIT_ADMIN and AUDIT_VIEWER Security Roles • utlpwdmg.sql script creates ora12c_verify_function and ora12c_strong_verify_function • RESOURCE Role No Longer Grants the UNLIMITED TABLESPACE Privilege • Default Unified Audit Policy Enabled. Failed logins are written to UNIFIED_AUDIT_TRAIL. • The ORA_LOGON_FAILURES unified audit policy for new databases, tracks failed logons only. • AUDSYS schema will be used solely for storage of the unified audit trail data table.
  • 29. Connecting Lower Version Clients • SQLNET.ALLOWED_LOGON_VERSION_CLIENT • SQLNET.ALLOWED_LOGON_VERSION_SERVER • Replaced SQLNET.ALLOWED_LOGON_VERSION
  • 30. Database Express 12c • Database Control is history… • Requires XDB. EM Express is a servlet built on top of Oracle XML DB. • Deafultport is 5500, can be changed using DBMS_XDB_CONFIG.setHTTPsPort(<port>) procedure • URL is https://<hostname>:5500/em • Available only when the database is open • The EM_EXPRESS_BASIC role enables users to connect to EM Express and to view the pages in read-only mode. • The EM_EXPRESS_ALL role enables users to connect to EM Express and use all the functionality. • While creating Oracle Database 12c database, DBCA picks a free port from 5500 to 5599 for Enterprise Manager Express. If you want a specific port to be used, set the environment variable DBEXPRESS_HTTPS_PORT before starting Oracle Universal Installer (OUI) or Database Configuration Assistant (DBCA).
  • 32. Data Pump NOLOGGING Import • Import without generating archived logs • TRANSFORM=DISABLE_ARCHIVE_LOGGING:Y[:TABLE|INDEX] • Sets object to NOLOGGIG before import and reverts to original setting after import. • Choose to disable logging for tables (Y:TABLE), indexes (Y:INDEX), or both (Y). • $ impdp DIRECTORY=dump_dirDUMPFILE=ex2.dmp LOGFILE=ex2.log SCHEMAS=ball TRANSFORM=DISABLE_ARCHIVE_LOGGING:Y:TABLE • $ impdp DIRECTORY=dump_dirDUMPFILE=ex1.dmp LOGFILE=ex1.log SCHEMAS=basket TRANSFORM=DISABLE_ARCHIVE_LOGGING:Y TRANSFORM=DISABLE_ARCHIVE_LOGGING:N:INDEX This feature provides a great relief when importing large tables, and reduces the excessive redo generation, which results in quicker imports. This attribute applies to tables and indexes.
  • 33. Data Pump Export Views As Tables • Export one or more views as tables • VIEWS_AS_TABLES=[schema_name.]view_name[:table_name], ... • Table_name specifies the name of a table to serve as the source of the metadata for the exported view. • Data Pump performs a table-mode export. • Useful to get a subset of data exported. • Also available in “impdp” to use in the network mode of import.
  • 34. SQL*Loader Express Mode • SQL*Loader in #DB12c has a new option that does not require the user to create a SQL*Loader control file. • Instead, command-line parameters are used to specify how the data file is loaded, and SQL*Loader automatically chooses the best method with which to load the data. • Data files formatted as comma-separated values (CSV) to both SQL*Loader and external tables are supported. • The new parameter, TABLE, turns on express mode. The value of the TABLE parameter is the name of the table that SQL*Loader will load. • If no data file is specified, then looks for file namedtablename.dat in the current directory • Sqlldr username TABLE=EMPLOYEES
  • 35. RMAN Notables • “Describe” in RMAN, similar to SQL*Plus. • Most SQL statements can be run in RMAN without the “SQL” prefix (and messing with quotes around the SQL!!). • SYSBACKUP Administration Role –Start replacing scripts where SYSDBA is used. RMAN> SELECT username,machine FROM v$session; RMAN> ALTER TABLESPACE users ADD DATAFILE SIZE 121m;
  • 36. RMAN Restore Tables • The biggest RMAN feature is restore table from backup. RMAN>RECOVER TABLE SCOTT.EMP, SCOTT.DEPT UNTIL TIME 'SYSDATE-1' AUXILIARY DESTINATION '/t1/tdb' DATAPUMP DESTINATION '/t1/dump' DUMP FILE 'emp_dept_dump.dat' REMAP TABLE 'HR'.'EMP':'EMP_RECVR'; --NOTABLEIMPORT; • When NOTABLEIMPORT option is used, RMAN performs the restore/recover and creates the export dump file, but does not perform the import.
  • 37. RMAN Catalog Requires EE • Starting with 12c, the RMAN catalog database requires Enterprise Edition. • Covered under the Infrastructure Repository License (no need for additional license). • RMAN • Oracle Enterprise Manager Cloud Control • Automatic Workload Repository (AWR) Warehouse • Global Data Services Catalog • Grid Infrastructure Management Repository • https://blogs.oracle.com/UPGRADE/entry/rman_catalog_requires_ee_in • http://docs.oracle.com/database/121/DBLIC/editions.htm#DBLIC119
  • 38. Database upgrade improvements • A new and much improved pre-upgrade information script, preupgrd.sql, replaces the legacy utlu[121]s.sql script in 12c R1. • Apart from the preupgrade checks verification, the script is capable of addressing the various issues – in the form of fixup scripts – that are raised during the pre- post upgrade process.
  • 41. Sqlcl features  Alias  CD : allow you to change path once connected to SQLcl, it seems that relatives path are not supported.
  • 42. • CTAS • DDL, DDL >sql • INFO/INFO+ • FORMAT FILE • HISTORY • LOAD • set sqlformat csv/ XML/json/insert/ansiconsole.. Sqlcl features
  • 43. References • https://docs.oracle.com/database/121/NEWFT/chapter12102.htm#N EWFT003 • Biju Thomas Blog • http://oracleinaction.com/undo-and-redo-in-oracle/ • https://oracle-base.com/articles/12c/articles-12c