Oracle Pragma RESTRICT REFERENCES
Version 26ai

General Information
Library Note Morgan's Library Page Header
The best Oracle News for FY2026

Oracle Database 26ai will be available on generic Linux platforms in January and soon on AIX and Windows
Description This pragma asserts that a user-defined subprogram does not read or write database tables or package variables. The RESTRICT_REFERENCES pragma is deprecated. Oracle recommends using DETERMINISTIC and PARALLEL_ENABLE instead of RESTRICT_REFERENCES.

https://docs.oracle.com/en/database/oracle/oracle-database/19/lnpls/RESTRICT_REFERENCES-pragma.html
Acronym Definitions
RNDS Reads No Database State (Does not query tables)
RNPS Reads No Package State (Does not read package variables)
WNDS Writes No Database State (Does not modify tables)
WNPS Writes No Package State (Does not alter the value of package variables)
$ORACLE_HOME/rdbms/admin Code Samples
CATCDBVIEWS.SQL DBMSSCH.SQL PIDIAN.SQL
CATMACP.SQL DBMSSESS.SQL PLITBLM.SQL
CATODCI.SQL DBMSSPC.SQL PLSPUR.SQL
CATXDBS.SQL DBMSSPU.SQL PRIVOWA.SQL
DBMSIOTC.SQL DBMSSQL.SQL PRVTOLSOPQ.PLB
DBMSLOB.SQL DBMSSTAT.SQL PUBHT.SQL
DBMSLOBU.SQL DBMSSTDX.SQL PUBOWA.SQL
DBMSOBTK.SQL DBMSSUPP.SQL PUBUTIL.SQL
DBMSOTPT.SQL DBMSUTIL.SQL UTLFILE.SQL
DBMSPIPE.SQL DBMSWRR_STATE.SQL UTLHTTP.SQL
DBMSRAND.SQL MGDUS.SQL UTLPG.SQL
DBMSRWID.SQL OLSU21.SQL UTLRAW.SQL
 
Syntax
Synax and usage PRAGMA RESTRICT_REFERENCES(<subprogram | method | DEFAULT>, [RNDS] [WNDS] [RNPS] [WNPS] [TRUST]);


method is a type object MEMBER subprogram
CREATE OR REPLACE PACKAGE dbms_wrr_state AS
 PRAGMA restrict_references (dbms_wrr_state, WNDS);
 capture_on BOOLEAN := FALSE;
 replay_on  BOOLEAN := FALSE;
END; -- spec only, no body
/

Related Topics
Deterministic
Parallel Enable
Pragma UDF (User Defined Function)
Functions
Packages
Pipelined Table Functions
Pragmas
Procedures
What's New In 21c
What's New In 26ai

Morgan's Library Page Footer
This site is maintained by Daniel Morgan. Last Updated: This site is protected by copyright and trademark laws under U.S. and International law. © 1998-2026 Daniel A. Morgan All Rights Reserved