Oracle PRVT_COMPRESS
Version 21c

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 Undocumented support for likely for Advanced and/or Hybrid Columnar Compression
AUTHID DEFINER
Dependencies
DBMS_ASSERT SEG$ TABSUBPART$
DBMS_COMPRESSION TAB$ V$IM_SEGMENTS_DETAIL
DBMS_INMEMORY_LIB TABPART$ V$PARAMETER
PRVT_COMPRESSION    
Documented No
First Available Not known
Security Model Owned by SYS with no privileges granted
Source {ORACLE_HOME}/rdbms/admin/prvtcmpr.plb
Subprograms
 
GET_ARCH_COMP
Undocumented prvt_compress.get_arch_comp(
dobjno  IN NUMBER,
dictobj IN NUMBER,
objtype IN NUMBER)
RETURN BOOLEAN;
conn / as sysdba

CREATE TABLE comp_all_oper
COMPRESS FOR ALL OPERATIONS AS
SELECT * FROM tab$;

SELECT o.obj#, o.dataobj#, o.type#
FROM obj$ o
WHERE o.name = 'COMP_ALL_OPER';

      OBJ#   DATAOBJ#      TYPE#
---------- ---------- ----------
     78810      78810          2

BEGIN
  IF prvt_compress.get_arch_comp(78810,78810,2) THEN
    dbms_output.put_line('T');
  ELSE
    dbms_output.put_line('F');
  END IF;
END;
/
BEGIN
*
ERROR at line 1:
ORA-01403: no data found
ORA-06512: at "SYS.PRVT_COMPRESS", line 62
ORA-06512: at line 2


-- it appears that the TYPE# returned in the above query is the what this function
-- wants as replacing the "2" with a "1" eliminates the exception


BEGIN
  IF prvt_compress.get_arch_comp(78810,78810,1) THEN
    dbms_output.put_line('T');
  ELSE
    dbms_output.put_line('F');
  END IF;
END;
/
F
 
GET_COMPATIBLE
Undocumented prvt_compress.get_arch_comp(p_first4 OUT NUMBER);
DECLARE
 outVal NUMBER;
BEGIN
  prvt_compress.get_compatible(outVal);
  dbms_output.put_line(TO_CHAR(outVal));
END;
/
19
 
GET_TS_NUM
Undocumented prvt_compress.get_ts_num(
dobjno  IN NUMBER,
dictobj IN VARCHAR2,
objtype IN VARCHAR2)
RETURN NUMBER;
SQL> SELECT DISTINCT obj#, dataobj#, ts#
  2  FROM tabpart$
  3  WHERE rownum < 6;

      OBJ#   DATAOBJ#        TS#
---------- ---------- ----------
      6445       6445          1
      6451       6451          1
      6461       6461          1
      7584       7584          0
      7585       7585          0

DECLARE
 retVal NUMBER;
BEGIN
  retVal := prvt_compress.get_ts_num(6445, 6445, 'PARTITION');
  dbms_output.put_line(TO_CHAR(retVal));
END;
/
DECLARE
*
ERROR at line 1:
ORA-01403: no data found
ORA-06512: at "SYS.PRVT_COMPRESS", line 81
ORA-06512: at line 4
 
LOAD_TAB_INMEMORY
Undcoumented prvt_compress.load_tab_inmemory(
safe_tabowner IN VARCHAR2,
safe_tabname  IN VARCHAR2,
objd          IN NUMBER,
imc_bytes     IN NUMBER);
TBD

Related Topics
Advanced Compression
Built-in Functions
Built-in Packages
DBMS_COMPRESSION
LOB Compression
PRVT_COMPRESSION
UTL_COMPRESS
What's New In 19c
What's New In 20c-21c

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