ACE Director Alum Daniel Morgan, founder of Morgan's Library, is scheduling
complimentary technical Workshops on Database Security for the first 30
Oracle Database customers located anywhere in North America, EMEA, LATAM, or
APAC that send an email to
asra_us@oracle.com. Request a Workshop for
your organization today.
Purpose
This package provides the API for configuring quarantine thresholds for SQL statements and their execution plans. SQL statements that cross the quarantine thresholds are terminated and quarantined.
The quarantined SQL statements are not allowed to run again in a database.
Oracle Licensing Note: Use of this PL/SQL package is only permitted on
ExaCC and ExaCS.
As tempting as it may be ... do not deploy this capability in any other
environment until Oracle makes doing so legal.
AUTHID
CURRENT_USER
Constants
Name
Data Type
Value
General
ALWAYS_QUARANTINE
VARCHAR2(30)
'4294967295'
DROP_THRESHOLD
VARCHAR2(30)
'0'
Dependencies
DBMS_SMB
DBMS_SQLCONTROL_LIB
DBMS_SYS_ERROR
DBMS_SMB_INTERNAL
DBMS_SQLQ_INTERNAL
Documented
Yes
Exceptions
Error Code
Reason
ORA-06564
Object does not exist
ORA-13825
missing SQL statement text
ORA-31684
Object type SQL Quarantine already exists
ORA-38133
Invalid parameter value specified
ORA-38134
Invalid parameter value specified
First Available
19.1
Security Model
Owned by SYS with EXECUTE granted to PUBLIC.
The ADMINISTER SQL MANAGEMENT OBJECT privilege is required.
The grant to PUBLIC is horrifying. Yes the Admin privilege is required but puts this power into the hands of many users that have no business having the ability to perform a DDOS attack.
Creates a staging table to pack SQL quarantine configurations
dbms_sqlq.create_stgtab_quarantine(
staging_table_name IN VARCHAR2,
staging_table_owner IN VARCHAR2 DEFAULT NULL,
tablespace_name IN VARCHAR2 DEFAULT NULL);
Packs SQL quarantine configurations into a staging table
dbms_sqlq.pack_stgtab_quarantine(
staging_table_name IN VARCHAR2,
staging_table_owner IN VARCHAR2 DEFAULT NULL,
name IN VARCHAR2 DEFAULT '%',
sql_text IN VARCHAR2 DEFAULT '%',
enabled IN VARCHAR2 DEFAULT NULL)
RETURN NUMBER;
SELECT dbms_sqlq.pack_stgtab_quarantine('UW_QSTAGING', 'UWCLASS')
FROM dual;
Unpacks SQL quarantine configurations from a staging table
dbms_sqlq.unpack_stgtab_quarantine(
staging_table_name IN VARCHAR2,
staging_table_owner IN VARCHAR2 DEFAULT NULL,
name IN VARCHAR2 DEFAULT '%',
sql_text IN VARCHAR2 DEFAULT '%',
enabled IN VARCHAR2 DEFAULT NULL)
RETURN NUMBER;
SELECT dbms_sqlq.unpack_stgtab_quarantine('UW_QSTAGING', 'UWCLASS')
FROM dual;