8i | 9i | 10g | 11g | 12c | 13c | 18c | Misc | PL/SQL | SQL | RAC | WebLogic | Linux

Home » Articles » 12c » Here

PL/SQL New Features and Enhancements in Oracle Database 12c Release 1 (12.1)

Oracle 12c includes a number of PL/SQL new features and enhancements, many of which have been covered in separate articles on this site. This article serves as a link to all of those, as well as introducing some of the more minor features listed in the Changes in Oracle Database 12c Release 1 section of the PL/SQL Language Reference manual.

Topics covered in this article:

Topics covered in separate articles on this site:

Invoker Rights Functions Can Be Result-Cached

The PL/SQL Function Result Cache was introduced in Oracle 11g Release 1. One of the restrictions on its use was that invoker rights functions could not be cached. This restriction has been removed in Oracle Database 12c Release 1.

Libraries Defined Using Directory Objects and Credentials

In previous versions of the database, libraries were defined with an explicit path and were run by extproc as the Oracle software owner.

In Oracle 12c, the CREATE LIBRARY statement has been enhanced to allow libraries to be optionally defined using directory objects and credentials (DBMS_CREDENTIAL).

-- Pre-12c : Still valid in 12c.
CREATE OR REPLACE LIBRARY my_lib IS '/path/to/my_lib.so';
/

-- 12c : Using Directory to specify path to object.
CREATE OR REPLACE DIRECTORY my_dir AS '/path/to/";

CREATE LIBRARY my_lib AS 'my_lib.so' IN my_dir;
/

--12c : Using credential.
BEGIN
  DBMS_CREDENTIAL.create_credential(
    credential_name => 'my_cred',
    username        => 'me',
    password        => 'my_password');
END;
/

CREATE OR REPLACE LIBRARY my_lib IS '/path/to/my_lib.so' CREDENTIAL my_cred;
/

New Predefined Inquiry Directives ($$PLSQL_UNIT_OWNER, $$PLSQL_UNIT_TYPE)

Oracle introduced Conditional Compilation in Oracle 10g. Oracle database 12c includes two new Predefined Inquiry Directives called $$PLSQL_UNIT_OWNER and $$PLSQL_UNIT_TYPE, so the list now includes the following.

PLSQL_DEBUG Compilation Parameter is Deprecated

The compilation parameter PLSQL_DEBUG is now deprecated. Using PLSQL_OPTIMIZE_LEVEL=1 now includes compilation of PL/SQL for debugging. This change in functionality of the PLSQL_OPTIMIZE_LEVEL is not listed in parameter documentation itself, but it is mentioned in the PL/SQL Compilation Parameters list.

PL/SQL Packages and Types Reference

Although not directly listed as PL/SQL new features, the PL/SQL Packages and Types Reference manual is always filled with lots of changes for each database release. It is worth spending some time looking at the changes that have been introduced with the new release.

For more information see:

Hope this helps. Regards Tim...

Back to the Top.