CODE
Oracle Code Library
JOBS
Find Or Post Oracle Jobs
FORUM
Oracle Discussion & Chat
PSOUG Home Code Snippets Oracle Reference Oracle Functions PSOUG Forum Oracle Blogs Bookmark and Share
 
 Search the Reference Library pages:  

Free
Oracle Magazine
Subscriptions
and Oracle White Papers

Oracle DBMS_LOBUTIL
Version 11.1
 
General Information
Source {ORACLE_HOME}/rdbms/admin/dbmslobu.sql
First Available 11.1

Data Types
-- dbms_lobutil_inode_t: inode information
CREATE OR REPLACE TYPE dbms_lobutil_inode_t AS OBJECT (
lobid   RAW(10), -- lobid
flags   NUMBER,  -- inode flags
length  NUMBER,  -- lob length
version NUMBER,  -- lob version
extents NUMBER,  -- #extents in inode
lhb     NUMBER   -- lhb dba);
/

-- dbms_lobutil_lobmap_t: lobmap information
CREATE OR REPLACE TYPE dbms_lobutil_lobmap_t AS OBJECT (
lobid  RAW(10), -- lobid
eflag  NUMBER,  -- extent flags
rdba   NUMBER,  -- extent header rdba
nblks  NUMBER,  -- #blocks in extent
offset NUMBER,  -- offset of extent header
length NUMBER   -- logical length of extent);

-- dbms_lobutil_lobextent_t: extent information
CREATE OR REPLACE TYPE dbms_lobutil_lobextent_t AS OBJECT (
rid     VARCHAR(32), -- rowid proxy
row#    NUMBER,      -- rownum proxy
lobid   RAW(10),     -- lobid
extent# NUMBER,      -- extent# [0 .. ] for a lobmap
hole    VARCHAR(1),  -- is the extent a hole? (y/n)
cont    VARCHAR(1),  -- is the extent a superchunk continuation (y/n)
over    VARCHAR(1),  -- is the chunk an overallocation? (y/n)
rdba    NUMBER,      -- rdba of extent start
nblks   NUMBER,      -- #blocks in extent
offset  NUMBER,      -- logical offset of extent start
length  NUMBER       -- logical length of extent);
/

-- dbms_lobutil_lobextents_t: expanded extent map information
CREATE OR REPLACE TYPE dbms_lobutil_lobextents_t AS
TABLE OF dbms_lobutil_lobextent_t;
/

Dependencies
anydata dbms_lobutil_lobextent_t
dbms_obutil_inode_t dbms_lobutil__lobmap_t
dbms_lobutil_lobextents_t  
Object Privileges Execute is granted to PUBLIC
 
GETEXTENTS
Undocumented extent expansion dbms_lobutil.getextents(crs IN sys_refcursor)
RETURN dbms_lobutil_lobextents_t DETERMINISTIC PIPELINED;
TBD
 
GETINODE
Undocumented inode query

Overload 1
dbms_lobutil.getinode(lob_loc IN BLOB) RETURN dbms_lobutil_inode_t;
TBD
Overload 2 dbms_lobutil.getinode(lob_loc IN CLOB CHARACTER SET ANY_CS)
RETURN dbms_lobutil_inode_t;
TBD
 
GETLOBMAP

Undocumented LOB query. Works only with securefiles.

Overload 1

This demo is built to run on the tables created in the SECUREFILES demo
dbms_lobutil.getlobmap(lob_loc IN BLOB, n IN NUMBER)
RETURN dbms_lobutil_lobmap_t;
set serveroutput on

DECLARE
 bvar BLOB;
 x    dbms_lobutil_lobmap_t;
BEGIN
  SELECT bcol
  INTO bvar
  FROM reg_tab
  WHERE rownum = 1;

  x := dbms_lobutil.getlobmap(bvar, 0);
END;
/

DECLARE
 bvar BLOB;
 luty dbms_lobutil_lobmap_t;
BEGIN
  SELECT bcol
  INTO bvar
  FROM sec_tab
  WHERE rownum = 1;

  luty := dbms_lobutil.getlobmap(bvar, 0);

  dbms_output.put_line('LOBID: ' || luty.lobid);
  dbms_output.put_line('Extent Flag: ' || luty.eflag);
  dbms_output.put_line('Extent Hdr: ' || luty.rdba);
  dbms_output.put_line('blocks: ' || luty.nblks);
  dbms_output.put_line('offset: ' || luty.offset);
  dbms_output.put_line('length: ' || luty.length);
END;
/
Overload 2 dbms_lobutil.getlobmap(
lob_loc IN CLOB CHARACTER SET ANY_CS, n IN NUMBER)
RETURN dbms_lobutil_lobmap_t;
TBD
 
Related Topics
DBMS_LOB
SECUREFILES
 
Home      :      Code Library      :      Sponsors      :      Privacy      :      Terms of Use      :      Contact Us [53 users online]    © 2010 psoug.org