Reader small image

You're reading from  Advanced Oracle PL/SQL Developer's Guide (Second Edition) - Second Edition

Product typeBook
Published inFeb 2016
Reading LevelIntermediate
Publisher
ISBN-139781785284809
Edition2nd Edition
Languages
Right arrow
Author (1)
Saurabh K. Gupta
Saurabh K. Gupta
author image
Saurabh K. Gupta

Saurabh K. Gupta is a seasoned database technologist with extensive experience in designing high performance and highly available database applications. His technology focus has been centered around Oracle Database architecture, Oracle Cloud platform, Database In-Memory, Database Consolidation, Multitenant, Exadata, Big Data, and Hadoop. He has authored the first edition of this book. He is an active speaker at technical conferences from Oracle Technology Network, IOUG Collaborate'15, AIOUG Sangam, and Tech Days. Connect with him on his twitter handle (or SAURABHKG) or through his technical blog www.sbhoracle. wordpress.com, with comments, suggestions, and feedback regarding this book.
Read more about Saurabh K. Gupta

Right arrow

Oracle Database 12c enhancements to PL/SQL subprograms


Oracle Database Release 12c includes a number of PL/SQL feature enhancements. These enhancements are focused on improving the usability of PL/SQL as a language. Although the next chapter will discuss many more new features in detail, it is worthwhile to mention a few of them that are exclusively related to Oracle PL/SQL subprograms.

  • Defining PL/SQL subprograms in the SELECT statement: Although PL/SQL allows the invoking of a function from the SELECT statement, the context switch from SQL to the PL/SQL engine degraded the performance. Oracle 12c allows creating PL/SQL units in the WITH clause of a subquery and using it in the SELECT statement. The new approach to calling functions in SQL statements enhances the performance as there is no context switching across the engines. In addition, these functions are not stored in the database schema.

  • Granting roles to program units: One of the challenges in PL/SQL before Oracle 12c was that a program unit had to be created with definers rights, if it was intended to be executed by all users. A user with a lower set of privileges could perform the unauthorized changes. With Oracle 12c, granting roles to PL/SQL program units adds a levels of safety. You can now create program units with invoker's rights and control the privileges, which are required to run the program, through a role.

  • Protecting PL/SQL unit access through the ACCESSIBLE BY clause: With Oracle 12c, you can restrict access to a PL/SQL unit by unauthorized programs. A subprogram (a procedure, function or a package) can optionally include an ACCESSIBLE BY clause to define a white list of PL/SQL program units that can invoke it.

Previous PageNext Page
You have been reading a chapter from
Advanced Oracle PL/SQL Developer's Guide (Second Edition) - Second Edition
Published in: Feb 2016Publisher: ISBN-13: 9781785284809
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Author (1)

author image
Saurabh K. Gupta

Saurabh K. Gupta is a seasoned database technologist with extensive experience in designing high performance and highly available database applications. His technology focus has been centered around Oracle Database architecture, Oracle Cloud platform, Database In-Memory, Database Consolidation, Multitenant, Exadata, Big Data, and Hadoop. He has authored the first edition of this book. He is an active speaker at technical conferences from Oracle Technology Network, IOUG Collaborate'15, AIOUG Sangam, and Tech Days. Connect with him on his twitter handle (or SAURABHKG) or through his technical blog www.sbhoracle. wordpress.com, with comments, suggestions, and feedback regarding this book.
Read more about Saurabh K. Gupta