SlideShare a Scribd company logo
• @sfonplsql
• https://www.youtube.com/channel/PracticallyPerfectPLSQL
• http://stevenfeuersteinonplsql.blogspot.com/
New(er) Stuff in PL/SQL
Steven Feuerstein, Oracle Developer Advocate
1
New Stuff in the Oracle PL/SQL Language
What’s Included
Autonomous
Database
2 x Databases
20GB Storage Each
Load
Balancing
10 Mbps
Bandwidth
Shape
Storage
2 x 50GB Block
10GB Object
10GB Archive
Compute
2 x VM
1GB Memory
Each
demo
Always Free Database
A Roundup of New PL/SQL Features
18c Qualified expressions for collections and records
Whitelisting with the ACCESSIBLE_BY Clause
More PL/SQL-Only Data Types Cross PL/SQL-to-SQL Interface
Optimizing Function Execution in SQL
The UTL_CALL_STACK Package
Privileges/Access Management for Program Units
Static Expressions In Place of Literals
Marking elements for deprecation
PL/Scope now includes SQL statements in its analysis
How to get this presentation and code
Go to slideshare.net, search "pl/sql
new stuff". View or download the
presentation.
Code referenced in file names:
download this zip…
http://bit.ly/sfdemofiles
Qualified Expressions (Constructors) for
Associative Arrays and Records
In-line assignment of values to our user-defined types!
Nice improvement in developer productivity and code simplicity
DECLARE
TYPE ints_t IS TABLE OF INTEGER
INDEX BY PLS_INTEGER;
l_ints ints_t := ints_t (
1 => 55, 2 => 555, 3 => 5555);
BEGIN
...
END;
DECLARE
TYPE ints_t IS TABLE OF INTEGER
INDEX BY PLS_INTEGER;
l_ints;
BEGIN
l_ints (1) := 55;
l_ints (2) := 555;
l_ints (3) := 5555;
...
END;
PL/Scope: powerful code analysis tool
This compiler-driven tool collects information about identifiers and
statements, and stores it in data dictionary views.
As of 12.2, this includes analysis of SQL statements inside your PL/SQL
code.
Use PL/Scope to answer questions like:
Where is a variable assigned a value in a program?
Which subprograms call another subprogram?
Which SQL statements appear more than once in my application?
Where do inserts, updates, deletes occur against a specific table?
The ACCESSIBLE_BY Clause 12.1
ACCESSIBLE_BY extends the concept of "privacy" for package
subprograms.
Use it to define a "whitelist" of program units that can invoke a
package's subprograms.
When that public procedure really shouldn’t be used
12c_accessible_by.sql
PACKAGE private_pkg
ACCESSIBLE BY (public_pkg)
IS
PROCEDURE do_this;
PROCEDURE do_that;
END;
PACKAGE BODY public_pkg
IS
PROCEDURE do_only_this
IS
BEGIN
private_pkg.do_this;
private_pkg.do_that;
END;
END;
More PL/SQL-Only Data Types Cross
PL/SQL-to-SQL Interface
Prior to 12c, PL/SQL-only datatypes could not be bound in dynamic
SQL statements, restricted what functions could be called in SQL, etc.
Now, those constraints are greatly relaxed.
Bind records and associative arrays
Use TABLE operator with associative arrays
Can bind Booleans with dynamic PL/SQL, but you cannot bind Booleans into
SQL statements.
TABLE with associative arrays!
12c_table*.sql 12c_bind*.sql
Optimizing Function Execution in SQL
That seems like an awfully good idea!
Two methods:
WITH clause that defines a function
UDF pragma that gives more options to the compiler
WITH FUNCTION: define a function directly within your SQL
statement.
Say goodbye to nasty context switch!
For all those user-defined functions
12c_with_function*.sql 12c_udf*.sql
The UTL_CALL_STACK Package
Prior to 12c, you could obtain several kinds of "stacks" through
individual function calls:
DBMS_UTILITY.FORMAT_CALL_STACK - "How did I get here?"
DBMS_UTILITY.FORMAT_ERROR_STACK - "What is the error
message/stack?"
DBMS_UTILITY.FORMAT_ERROR_BACKTRACE - "On what line was my error
raised?"
Now, the UTL_CALL_STACK package supports all that and a much
better API to the info in the stack.
Improved execution stack granularity and more
12c_utl_call_stack*.sql
Static Expressions In Place of Literals
Static PL/SQL expressions are allowed where only literals were
allowed.
You no longer have to hard-code maximum lengths for VARCHAR2
variables and other data types.
You can even use the built-in ORA_MAX_NAME_LEN for the new
extended name lengths.
No more VARCHAR2(32767)!
IS
my_big_var VARCHAR2 (ORA_MAX_NAME_LEN + 2);
my_qualified_var VARCHAR2 (2 * (ORA_MAX_NAME_LEN +2) + 1);
BEGIN
my_big_var := '"Table_Name";
my_qualified_var := "Schema_Name"."Table_Name";
122_expressions.sql
Goodbye, "Tiny" Name Lengths!
Instead of 30 bytes you can now go all the way up to 128.
But this doesn't mean you should.
Most beneficial for:
Migrations from other databases to Oracle
Multi-byte character sets
Being able to squeak just over that 30 character barrier and no longer having
to compromise readability
Now your identifiers can go on_and_on_and_on_and_on_and_on_and...
122_long_identifiers.sql
Goodbye, Tiny SQL VARCHAR2!
It sure has been irritating that PL/SQL supports VARCHAR2s up to
32K in size (after which , you must switch over to CLOBs), while in
SQL, the maximum was 4000.
Now, SQL's VARCHAR2 and NVARCHAR2 have been extended to 32K
as well!
Note: SQL has these maximum sizes only if the MAX_STRING_SIZE
initialization parameter is set to EXTENDED.
And one more impedance between PL/SQL and SQL
12c_sql_varchar2.sql
Kill Off Old, Dead (should be Zombie) Code.
In 12.2, you can now document via a pragma code that has been
deprecated.
You can then use compile-time warnings to:
identify usages of deprecated code
make it impossible to compile program units that use deprecated code
But don't make PLW-06019 an error. That simply documents the use
of the pragma.
But how do you find it?
CREATE OR REPLACE PACKAGE old_pkg AUTHID DEFINER
AS
PRAGMA DEPRECATE (old_pkg, 'Use new_pkg instead!');
PROCEDURE proc;
END;
Grant Roles to Program Units (back to 12.1)
Grant roles to program units, so you fine-tune the privileges available
to the invoker of a program unit.
Helpful when you don't want the invoker to inherit all of the definer's
privileges.
Roles granted to a program unit do not affect compilation.
Instead, they affect the privilege checking of SQL statements that the unit
issues at run time.
Unit executes with privileges of both its own roles and any other currently
enabled roles.
Nice usability enhancement
12c_grant_role_units.sql 12c_roles_for_program_units.sql
Most helpful when unit executing dynamic SQL
BEQUEATH CURRENT_USER for Views
Prior to 12.1, if your view executed a function, it would always be run
under the privileges of the view's owner, and not that of the function.
Even if the function was defined with AUTHID CURRENT_USER
Add the BEQUEATH CURRENT_USER clause and then the invoker
right's mode of the function will be "honored."
Tying up a loose end
12c_bequeath.sql
INHERIT PRIVILEGES and INHERIT ANY PRIVILEGES
More fine-tuning for privilege management!
You can override AUTHID and BEQUEATH settings by revoking
INHERIT PRIVILEGES.
On a schema-level basis
You can say, in effect: "All schemas but SCOTT can use my privileges
when running X."
After upgrade, all works as before.
INHERT PRIVILEGES granted to all schemas
Yes, there’s more!
12c_inherit_privileges.sql
And is that it?
Support for JSON in PL/SQL via new pre-defined JSON types
Block code coverage
Improvements to DBMS_HPROF, the hierarchical profiler
DBMS_SQL support for PL/SQL types
No, there's more, but there's no more time.
Copyright © 2014 Oracle and/or its affiliates. All rights reserved. |
Deepen Your PL/SQL and SQL
Expertise
Take advantage of our community websites.
Oracle AskTOM – https://asktom.oracle.com
Q&A site, Office Hours with database experts, and much more
Oracle Dev Gym – https://devgym.oracle.com
Quizzes, workouts and classes for an active learning experience
Oracle LiveSQL – https://livesql.oracle.com
24x7 access to the latest release of Oracle Database, plus a script library
and tutorials
Questions? Comments?
New Stuff in the Oracle PL/SQL Language

More Related Content

PPTX
Turbocharge SQL Performance in PL/SQL with Bulk Processing
PDF
Database Automation with MySQL Triggers and Event Schedulers
PDF
Best practices for_large_oracle_apps_r12_implementations
DOCX
Oracle Database 12c "New features"
PPTX
Oracle Data Redaction - EOUC
PPTX
Flex Cluster e Flex ASM - GUOB Tech Day - OTN TOUR LA Brazil 2014
PPTX
Oracle Database 12c - New Features for Developers and DBAs
PDF
Improving the Performance of PL/SQL function calls from SQL
Turbocharge SQL Performance in PL/SQL with Bulk Processing
Database Automation with MySQL Triggers and Event Schedulers
Best practices for_large_oracle_apps_r12_implementations
Oracle Database 12c "New features"
Oracle Data Redaction - EOUC
Flex Cluster e Flex ASM - GUOB Tech Day - OTN TOUR LA Brazil 2014
Oracle Database 12c - New Features for Developers and DBAs
Improving the Performance of PL/SQL function calls from SQL

What's hot (18)

PPTX
Oracle Database 12c Release 2 - New Features On Oracle Database Exadata Expre...
PDF
In Memory Database In Action by Tanel Poder and Kerry Osborne
PPT
07 Using Oracle-Supported Package in Application Development
PPTX
Oracle Database 12c New Features for Developers and DBAs - OTN TOUR LA 2015
PPTX
High Performance Plsql
PDF
Native REST Web Services with Oracle 11g
PPTX
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
PPTX
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
PDF
Oracle SQL Tuning
PPT
01 oracle architecture
PDF
Oracle 12c New Features for Developers
PPTX
End-to-end Troubleshooting Checklist for Microsoft SQL Server
PDF
Controlling execution plans 2014
PDF
Cloudera Impala Source Code Explanation and Analysis
PPT
06 Using More Package Concepts
PPTX
Best New Features of Oracle Database 12c
PPTX
Performance Management in Oracle 12c
PDF
Extending MySQL Enterprise Monitor
Oracle Database 12c Release 2 - New Features On Oracle Database Exadata Expre...
In Memory Database In Action by Tanel Poder and Kerry Osborne
07 Using Oracle-Supported Package in Application Development
Oracle Database 12c New Features for Developers and DBAs - OTN TOUR LA 2015
High Performance Plsql
Native REST Web Services with Oracle 11g
OOW16 - Oracle Database 12c - The Best Oracle Database 12c New Features for D...
OTN TOUR 2016 - DBA Commands and Concepts That Every Developer Should Know
Oracle SQL Tuning
01 oracle architecture
Oracle 12c New Features for Developers
End-to-end Troubleshooting Checklist for Microsoft SQL Server
Controlling execution plans 2014
Cloudera Impala Source Code Explanation and Analysis
06 Using More Package Concepts
Best New Features of Oracle Database 12c
Performance Management in Oracle 12c
Extending MySQL Enterprise Monitor
Ad

Similar to New Stuff in the Oracle PL/SQL Language (20)

PPTX
New PLSQL in Oracle Database 12c
PPT
IEEE Day 2013 Oracle Database 12c: new features for developers
PPTX
Oracle Database 12c - New Features for Developers and DBAs
PDF
Plpgsql russia-pgconf
PPT
Oracle_PLSQL.ppt ..
PPT
Oracle_PLSQL (1).ppt .
PPT
10gplsqlslide-120704232925-phJKKJJKKJpapp01.ppt
PDF
PostgreSQL Server Programming 2nd Edition Usama Dar
PPTX
pl/sql online Training|sql online Training | iTeknowledge
PDF
Exploring plsql new features best practices september 2013
PPTX
Plsql guide 2
PDF
PostgreSQL Server Programming Second Edition Usama Dar Hannu Krosing Jim Mlod...
PPTX
PLSQLmy Updated (1).pptx
PDF
Unit 4 rdbms study_material
PDF
Get PostgreSQL Server Programming - Second Edition Dar free all chapters
PDF
PostgreSQL Server Programming 2nd Edition Usama Dar
PPTX
Ch as pbdasdadssadsadsadasdasdasdas fdt .pptx
PDF
PDF
New PLSQL in Oracle Database 12c
IEEE Day 2013 Oracle Database 12c: new features for developers
Oracle Database 12c - New Features for Developers and DBAs
Plpgsql russia-pgconf
Oracle_PLSQL.ppt ..
Oracle_PLSQL (1).ppt .
10gplsqlslide-120704232925-phJKKJJKKJpapp01.ppt
PostgreSQL Server Programming 2nd Edition Usama Dar
pl/sql online Training|sql online Training | iTeknowledge
Exploring plsql new features best practices september 2013
Plsql guide 2
PostgreSQL Server Programming Second Edition Usama Dar Hannu Krosing Jim Mlod...
PLSQLmy Updated (1).pptx
Unit 4 rdbms study_material
Get PostgreSQL Server Programming - Second Edition Dar free all chapters
PostgreSQL Server Programming 2nd Edition Usama Dar
Ch as pbdasdadssadsadsadasdasdasdas fdt .pptx
Ad

More from Steven Feuerstein (19)

PDF
New(er) Stuff in PL/SQL
PDF
Six simple steps to unit testing happiness
PDF
Speakers at Nov 2019 PL/SQL Office Hours session
PDF
AskTOM Office Hours on Database Triggers
PDF
PL/SQL Guilty Pleasures
PDF
Oracle Application Express and PL/SQL: a world-class combo
PDF
Error Management Features of PL/SQL
PDF
JSON and PL/SQL: A Match Made in Database
PDF
OLD APEX and PL/SQL
PDF
High Performance PL/SQL
PDF
Oracle PL/SQL 12c and 18c New Features + RADstack + Community Sites
PDF
AskTOM Office Hours - Dynamic SQL in PL/SQL
PPT
Database Developers: the most important developers on earth?
PDF
Unit Testing Oracle PL/SQL Code: utPLSQL, Excel and More
PDF
Impact Analysis with PL/Scope
PDF
All About PL/SQL Collections
PPTX
The Amazing and Elegant PL/SQL Function Result Cache
PPTX
Take Full Advantage of the Oracle PL/SQL Compiler
PPTX
utPLSQL: Unit Testing for Oracle PL/SQL
New(er) Stuff in PL/SQL
Six simple steps to unit testing happiness
Speakers at Nov 2019 PL/SQL Office Hours session
AskTOM Office Hours on Database Triggers
PL/SQL Guilty Pleasures
Oracle Application Express and PL/SQL: a world-class combo
Error Management Features of PL/SQL
JSON and PL/SQL: A Match Made in Database
OLD APEX and PL/SQL
High Performance PL/SQL
Oracle PL/SQL 12c and 18c New Features + RADstack + Community Sites
AskTOM Office Hours - Dynamic SQL in PL/SQL
Database Developers: the most important developers on earth?
Unit Testing Oracle PL/SQL Code: utPLSQL, Excel and More
Impact Analysis with PL/Scope
All About PL/SQL Collections
The Amazing and Elegant PL/SQL Function Result Cache
Take Full Advantage of the Oracle PL/SQL Compiler
utPLSQL: Unit Testing for Oracle PL/SQL

Recently uploaded (20)

PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PPTX
Cloud computing and distributed systems.
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Approach and Philosophy of On baking technology
PPTX
Big Data Technologies - Introduction.pptx
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PPT
Teaching material agriculture food technology
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
Programs and apps: productivity, graphics, security and other tools
NewMind AI Weekly Chronicles - August'25 Week I
Advanced methodologies resolving dimensionality complications for autism neur...
Review of recent advances in non-invasive hemoglobin estimation
Reach Out and Touch Someone: Haptics and Empathic Computing
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Cloud computing and distributed systems.
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Spectral efficient network and resource selection model in 5G networks
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Approach and Philosophy of On baking technology
Big Data Technologies - Introduction.pptx
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Teaching material agriculture food technology
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Dropbox Q2 2025 Financial Results & Investor Presentation
MIND Revenue Release Quarter 2 2025 Press Release
Diabetes mellitus diagnosis method based random forest with bat algorithm
Unlocking AI with Model Context Protocol (MCP)
Programs and apps: productivity, graphics, security and other tools

New Stuff in the Oracle PL/SQL Language

  • 1. • @sfonplsql • https://www.youtube.com/channel/PracticallyPerfectPLSQL • http://stevenfeuersteinonplsql.blogspot.com/ New(er) Stuff in PL/SQL Steven Feuerstein, Oracle Developer Advocate 1
  • 3. What’s Included Autonomous Database 2 x Databases 20GB Storage Each Load Balancing 10 Mbps Bandwidth Shape Storage 2 x 50GB Block 10GB Object 10GB Archive Compute 2 x VM 1GB Memory Each demo
  • 5. A Roundup of New PL/SQL Features 18c Qualified expressions for collections and records Whitelisting with the ACCESSIBLE_BY Clause More PL/SQL-Only Data Types Cross PL/SQL-to-SQL Interface Optimizing Function Execution in SQL The UTL_CALL_STACK Package Privileges/Access Management for Program Units Static Expressions In Place of Literals Marking elements for deprecation PL/Scope now includes SQL statements in its analysis
  • 6. How to get this presentation and code Go to slideshare.net, search "pl/sql new stuff". View or download the presentation. Code referenced in file names: download this zip… http://bit.ly/sfdemofiles
  • 7. Qualified Expressions (Constructors) for Associative Arrays and Records In-line assignment of values to our user-defined types! Nice improvement in developer productivity and code simplicity DECLARE TYPE ints_t IS TABLE OF INTEGER INDEX BY PLS_INTEGER; l_ints ints_t := ints_t ( 1 => 55, 2 => 555, 3 => 5555); BEGIN ... END; DECLARE TYPE ints_t IS TABLE OF INTEGER INDEX BY PLS_INTEGER; l_ints; BEGIN l_ints (1) := 55; l_ints (2) := 555; l_ints (3) := 5555; ... END;
  • 8. PL/Scope: powerful code analysis tool This compiler-driven tool collects information about identifiers and statements, and stores it in data dictionary views. As of 12.2, this includes analysis of SQL statements inside your PL/SQL code. Use PL/Scope to answer questions like: Where is a variable assigned a value in a program? Which subprograms call another subprogram? Which SQL statements appear more than once in my application? Where do inserts, updates, deletes occur against a specific table?
  • 9. The ACCESSIBLE_BY Clause 12.1 ACCESSIBLE_BY extends the concept of "privacy" for package subprograms. Use it to define a "whitelist" of program units that can invoke a package's subprograms. When that public procedure really shouldn’t be used 12c_accessible_by.sql PACKAGE private_pkg ACCESSIBLE BY (public_pkg) IS PROCEDURE do_this; PROCEDURE do_that; END; PACKAGE BODY public_pkg IS PROCEDURE do_only_this IS BEGIN private_pkg.do_this; private_pkg.do_that; END; END;
  • 10. More PL/SQL-Only Data Types Cross PL/SQL-to-SQL Interface Prior to 12c, PL/SQL-only datatypes could not be bound in dynamic SQL statements, restricted what functions could be called in SQL, etc. Now, those constraints are greatly relaxed. Bind records and associative arrays Use TABLE operator with associative arrays Can bind Booleans with dynamic PL/SQL, but you cannot bind Booleans into SQL statements. TABLE with associative arrays! 12c_table*.sql 12c_bind*.sql
  • 11. Optimizing Function Execution in SQL That seems like an awfully good idea! Two methods: WITH clause that defines a function UDF pragma that gives more options to the compiler WITH FUNCTION: define a function directly within your SQL statement. Say goodbye to nasty context switch! For all those user-defined functions 12c_with_function*.sql 12c_udf*.sql
  • 12. The UTL_CALL_STACK Package Prior to 12c, you could obtain several kinds of "stacks" through individual function calls: DBMS_UTILITY.FORMAT_CALL_STACK - "How did I get here?" DBMS_UTILITY.FORMAT_ERROR_STACK - "What is the error message/stack?" DBMS_UTILITY.FORMAT_ERROR_BACKTRACE - "On what line was my error raised?" Now, the UTL_CALL_STACK package supports all that and a much better API to the info in the stack. Improved execution stack granularity and more 12c_utl_call_stack*.sql
  • 13. Static Expressions In Place of Literals Static PL/SQL expressions are allowed where only literals were allowed. You no longer have to hard-code maximum lengths for VARCHAR2 variables and other data types. You can even use the built-in ORA_MAX_NAME_LEN for the new extended name lengths. No more VARCHAR2(32767)! IS my_big_var VARCHAR2 (ORA_MAX_NAME_LEN + 2); my_qualified_var VARCHAR2 (2 * (ORA_MAX_NAME_LEN +2) + 1); BEGIN my_big_var := '"Table_Name"; my_qualified_var := "Schema_Name"."Table_Name"; 122_expressions.sql
  • 14. Goodbye, "Tiny" Name Lengths! Instead of 30 bytes you can now go all the way up to 128. But this doesn't mean you should. Most beneficial for: Migrations from other databases to Oracle Multi-byte character sets Being able to squeak just over that 30 character barrier and no longer having to compromise readability Now your identifiers can go on_and_on_and_on_and_on_and_on_and... 122_long_identifiers.sql
  • 15. Goodbye, Tiny SQL VARCHAR2! It sure has been irritating that PL/SQL supports VARCHAR2s up to 32K in size (after which , you must switch over to CLOBs), while in SQL, the maximum was 4000. Now, SQL's VARCHAR2 and NVARCHAR2 have been extended to 32K as well! Note: SQL has these maximum sizes only if the MAX_STRING_SIZE initialization parameter is set to EXTENDED. And one more impedance between PL/SQL and SQL 12c_sql_varchar2.sql
  • 16. Kill Off Old, Dead (should be Zombie) Code. In 12.2, you can now document via a pragma code that has been deprecated. You can then use compile-time warnings to: identify usages of deprecated code make it impossible to compile program units that use deprecated code But don't make PLW-06019 an error. That simply documents the use of the pragma. But how do you find it? CREATE OR REPLACE PACKAGE old_pkg AUTHID DEFINER AS PRAGMA DEPRECATE (old_pkg, 'Use new_pkg instead!'); PROCEDURE proc; END;
  • 17. Grant Roles to Program Units (back to 12.1) Grant roles to program units, so you fine-tune the privileges available to the invoker of a program unit. Helpful when you don't want the invoker to inherit all of the definer's privileges. Roles granted to a program unit do not affect compilation. Instead, they affect the privilege checking of SQL statements that the unit issues at run time. Unit executes with privileges of both its own roles and any other currently enabled roles. Nice usability enhancement 12c_grant_role_units.sql 12c_roles_for_program_units.sql Most helpful when unit executing dynamic SQL
  • 18. BEQUEATH CURRENT_USER for Views Prior to 12.1, if your view executed a function, it would always be run under the privileges of the view's owner, and not that of the function. Even if the function was defined with AUTHID CURRENT_USER Add the BEQUEATH CURRENT_USER clause and then the invoker right's mode of the function will be "honored." Tying up a loose end 12c_bequeath.sql
  • 19. INHERIT PRIVILEGES and INHERIT ANY PRIVILEGES More fine-tuning for privilege management! You can override AUTHID and BEQUEATH settings by revoking INHERIT PRIVILEGES. On a schema-level basis You can say, in effect: "All schemas but SCOTT can use my privileges when running X." After upgrade, all works as before. INHERT PRIVILEGES granted to all schemas Yes, there’s more! 12c_inherit_privileges.sql
  • 20. And is that it? Support for JSON in PL/SQL via new pre-defined JSON types Block code coverage Improvements to DBMS_HPROF, the hierarchical profiler DBMS_SQL support for PL/SQL types No, there's more, but there's no more time.
  • 21. Copyright © 2014 Oracle and/or its affiliates. All rights reserved. | Deepen Your PL/SQL and SQL Expertise Take advantage of our community websites. Oracle AskTOM – https://asktom.oracle.com Q&A site, Office Hours with database experts, and much more Oracle Dev Gym – https://devgym.oracle.com Quizzes, workouts and classes for an active learning experience Oracle LiveSQL – https://livesql.oracle.com 24x7 access to the latest release of Oracle Database, plus a script library and tutorials