Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Table of Contents

Export database.

...

Example : expdp test/test@123@xe schemas=test_schema DIRECTORY=DATA_PUMP_DIR DUMPFILE=TEST-BACKUP-29-May-2019.DMP flashback_time=systimestamp

User creation and permissions.

...

Code Block
languagesql
SELECT USERNAME, DEFAULT_TABLESPACE FROM DBA_USERS;

Retrieve the value of the 'DATA_PUMP_DIR' variable.

...

Note: Before running query run set long 10000 commandcommands.

SQL to retrieve the blob value in text format in Oracle.

Example : Extract the form XML stored in the dyextn_containers table. 

Code Block
languagesql
select UTL_RAW.CAST_TO_VARCHAR2(DBMS_LOB.SUBSTR(XML, 2000,1)) form_xml from dyextn_containers where dbms_lob.instr (xml, utl_raw.cast_to_raw ('<form_name>'), 2000, 1) > 0;

Note: At a time we can only retrieve 2000 bytes only, 2000 is no of bites to print, and 1 is offset. If someone wants to print data after 2000th byte replace replaces 1 with 2001 next 2000 bytes will get printed.