Oracle DBMS_PSP
Version 19.3

General Information
Library Note Morgan's Library Page Header
Which has the higher priority in your organization: Deploying a new database or securing the ones you already have? Looking for a website, and resources, dedicated solely to securing Oracle databases? Check out DBSecWorx.
Purpose Utility routines for the compilation of PL/SQL Server Pages (PSP).

PSP pages may exist in two different sources. They may either be stored in a document table or they may be stored temporarily in memory. When this package is invoked to compile a PSP page into a PL/SQL stored procedure, it tries to locate the specified page from those that has been stored in memory. If it cannot be found, the package will then look for page from the document table.
AUTHID CURRENT_USER
Constants
Name Data Type Value
 Text Content Buffer Size
TEXT_SIZE PLS_INTEGER 2000
 Name Size
NAME_SIZE PLS_INTEGER 256
Data Types TYPE text_table IS TABLE OF VARCHAR2(2000)
INDEX BY BINARY_INTEGER;

-- PSP page name and PL/SQL procedure name table
TYPE name_table IS TABLE OF VARCHAR2(256)
INDEX BY BINARY_INTEGER;

-- Page length table
TYPE length_table IS TABLE OF PLS_INTEGER
INDEX BY BINARY_INTEGER;

-- Page compilation error info
TYPE page_error IS RECORD (
name     VARCHAR2(256),    -- name of PSP page that causes the error
line     PLS_INTEGER,      -- line where the error occurs
position PLS_INTEGER,      -- position where the error occurs
text     VARCHAR2(4000));  -- the error message

TYPE page_errors IS TABLE OF page_error
INDEX BY BINARY_INTEGER;
Dependencies
DBMS_ASSERT DBMS_STANDARD USER_ERRORS
DBMS_OUTPUT PLITBLM UTL_RAW
DBMS_SQL    
Documented No
First Available 1999
Security Model Owned by SYS with EXECUTE granted to PUBLIC
Source {ORACLE_HOME}/rdbms/admin/dbmspsp.sql
Subprograms
 
ADD_IN_MEMORY_PAGE
Add a PSP page in memory. If the page is not found in memory, looks in the document table. The page added will be kept in memory until clear_in_memory_pages() is called, or the session ends. dbms_psp.add_in_memory_page(
name    IN VARCHAR2,
content IN text_table);
TBD
 
ADD_IN_MEMORY_PAGES
Add multiple PSP pages in memory. If the pages are not found, looks in the document table. The pages added will be kept in memory until clear_in_memory_pages() is called, session ends. dbms_psp.add_in_memory_pages(
names    IN name_table,
contents IN text_table,
lengths  IN length_table);
TBD
 
CLEAR_IN_MEMORY_PAGES
Clears all PSP pages in memory dbms_psp.clear_in_memory_pages;
exec dbms_psp.clear_in_memory_pages;
 
COMPILE_PAGE
Compiles a PSP page to a PL/SQL stored procedure

Overload 1
dbms_psp.compile_page(
name    IN  VARCHAR2,
errors  OUT page_errors,
replace IN  BOOLEAN DEFAULT FALSE)
RETURN VARCHAR2;
TBD
Compiles a PSP page to a PL/SQL stored procedure while keeping the page in memory. Intended to be used solely by the LOADPSP utility.

Overload 2
dbms_psp.compile_page(
name     IN  VARCHAR2,
content  IN  text_table,
replace  IN  PLS_INTEGER,
is_error OUT PLS_INTEGER)
RETURN VARCHAR2;
TBD
Compiles a PSP page to a PL/SQL stored procedure. Intended to be used solely by the LOADPSP utility.

Overload 3
dbms_psp.compile_page(
name     IN  VARCHAR2,
replace  IN  BOOLEAN,
is_error OUT BOOLEAN)
RETURN VARCHAR2;
TBD
 
COMPILE_PAGES
Compiles multiple PSP pages to PL/SQL stored procedures dbms_psp.compile_pages(
names   IN  name_table,
errors  OUT page_errors,
replace IN  BOOLEAN DEFAULT FALSE)
RETURN name_table;
TBD
 
SET_DOCUMENT_TABLE
Sets document table information. DBMS_PSP locates PSP pages from the document table as specified. This API must be called in every database session as this package does not retain new settings when a session closes. dbms_psp.set_document_table(
name_col    IN VARCHAR2 DEFAULT 'name',
content_col IN VARCHAR2 DEFAULT 'content');
exec dbms_psp.set_document_table;

Related Topics
Built-in Functions
Built-in Packages
What's New In 18c
What's New In 19c

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