Oracle DBMS_TABLE_DATA
Version 21c

General Information
Library Note Morgan's Library Page Header
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 procedures that can be used to retrieve the byte value of a single column, or a series of columns, in any table. These procedures, along with a publicly documented meta-data structure for columns, can be used to retrieve the row content for row data on which the hash or user signature is computed.

It appears likely that this package is connected to Blockchain tables.
AUTHID CURRENT_USER
Data Types TYPE column_list IS VARRAY(1024) OF VARCHAR2(128);
Dependencies
DBMS_ASSERT DBMS_TABLE_DATA_LIB PLITBLM
 DBMS_LOB DBMS_UTILITY  
Documented Yes
Exceptions
Error Code Reason
ORA-05745 no data found from <table_name> column <column_name> at row specified by rowid '<rowid>'
First Available 20c
Pragma PRAGMA SUPPLEMENTAL_LOG_DATA(default, READ_ONLY);
Security Model Owned by SYS with EXECUTE granted to PUBLIC
Source {ORACLE_HOME}/rdbms/admin/dbmstbdat.sql
Subprograms
 
GET_BYTES_FOR_COLUMN (new 20c)
Undocumented dbms_table_data.get_bytes_for_column(
schema_name IN     VARCHAR2,
table_name  IN     VARCHAR2,
row_id      IN     ROWID,
column_name IN     VARCHAR2,
column_data IN OUT BLOB);
SELECT rowid, name
FROM obj$
WHERE rownum < 6;

ROWID              NAME
------------------ ------------------
AAAAASAABAAAADyAAD ACCESS$
AAAAASAABAAAA5ZAA3 ACLMV$
AAAAASAABAAAECBAAZ ACLMV$_BASE_VIEW
AAAAASAABAAAECBAAY ACLMV$_MVINFO
AAAAASAABAAAA5ZAA9 ACLMV$_REFLOG

DECLARE
 ridIN   ROWID := 'AAAAASAABAAAADyAAD';
 outVal  BLOB := EMPTY_BLOB();
BEGIN
  dbms_table_data.get_bytes_for_column(USER, 'TAB$', ridIN, 'SPARE3', outVal);

  dbms_output.put_line(TO_CHAR(dbms_lob.getLength(outVal)));
END;
/
1

PL/SQL procedure successfully completed.
 
GET_BYTES_FOR_COLUMNS (new 20c)
Undocumented dbms_table_data.get_bytes_for_columns(
schema_name  IN     VARCHAR2,
table_name   IN     VARCHAR2,
row_id       IN     ROWID,
column_names IN     COLUMN_LIST,
column_data  IN OUT BLOB);
SELECT rowid, name
FROM obj$
WHERE rownum < 6;

ROWID              NAME
------------------ ------------------
AAAAASAABAAAADyAAD ACCESS$
AAAAASAABAAAA5ZAA3 ACLMV$
AAAAASAABAAAECBAAZ ACLMV$_BASE_VIEW
AAAAASAABAAAECBAAY ACLMV$_MVINFO
AAAAASAABAAAA5ZAA9 ACLMV$_REFLOG

DECLARE
 colList dbms_table_data.column_list := dbms_table_data.column_list();
 ridIN   ROWID := 'AAAAASAABAAAADyAAD';
 outVal  BLOB := EMPTY_BLOB();
BEGIN
  colList.extend(2);
  colList(1) := 'NAME';
  colList(2) := 'SUBNAME';
  dbms_table_data.get_bytes_for_columns(USER, 'OBJ$', ridIN, colList, outVal);

  dbms_output.put_line(TO_CHAR(dbms_lob.getLength(outVal)));
END;
/
7

PL/SQL procedure successfully completed.
 
GET_BYTES_FOR_ROW (new 20c)
Undocumented dbms_table_data.get_bytes_for_row(
schema_name IN     VARCHAR2,
table_name  IN     VARCHAR2,
row_id      IN     ROWID,
column_data IN OUT BLOB);
SELECT rowid, name
FROM obj$
WHERE rownum < 6;

ROWID              NAME
------------------ ------------------
AAAAASAABAAAADyAAD ACCESS$
AAAAASAABAAAA5ZAA3 ACLMV$
AAAAASAABAAAECBAAZ ACLMV$_BASE_VIEW
AAAAASAABAAAECBAAY ACLMV$_MVINFO
AAAAASAABAAAA5ZAA9 ACLMV$_REFLOG

DECLARE
 ridIN  ROWID := 'AAAAASAABAAAADyAAD';
 outVal BLOB := EMPTY_BLOB();
BEGIN
  dbms_table_data.get_bytes_for_row(USER, 'OBJ$', ridIN, outVal);

  dbms_output.put_line(TO_CHAR(dbms_lob.getLength(outVal)));
END;
/
72

PL/SQL procedure successfully completed.

Related Topics
Built-in Functions
Built-in Packages
Database Security
BlockChain Tables
DBMS_BLOCKCHAIN_TABLE
DBMS_BLOCKCHAIN_UTL
DBMS_USER_CERTS
What's New In 21c
What's New In 23c

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-2023 Daniel A. Morgan All Rights Reserved
  DBSecWorx