Solved

How to format output of dbms_metdata???

Posted on 2007-11-23
5
948 Views
Last Modified: 2013-12-18
Dear All,

can some tell me how to format the output of dbms_metdata?

My output is as follows:

[/pre]
  CREATE INDEX "FINNBANKLEA"."LEA_AGREEMENT_DTL_IDX6" ON "FINNBANKLEA"."LEA_AGREEMENT_DTL" ("STATUS", "BRANCHID", "AGREEMENTID")
  PCTFREE 10 INITRANS 2 MAXTRANS 255 NOLOGGING COMPUTE STATISTICS
  STORAGE(INITIAL 1048576 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
  PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
  TABLESPACE "FINNINDX" ;
[/post]

Also I used following setting:

[/pre]
set verify off
set echo off
set trims on
set linesize 1000
set heading off
set pagesize 10000
set long 500000
column Output format a1000
column XXXX format a1000

exec DBMS_METADATA.SET_TRANSFORM_PARAM (DBMS_METADATA.SESSION_TRANSFORM, 'PRETTY', true) /

execute DBMS_METADATA.SET_TRANSFORM_PARAM(DBMS_METADATA.SESSION_TRANSFORM,'SQLTERMINATOR',true)
[/post]


Thanks in advance.

0
Comment
Question by:someone_genius
5 Comments
 

Author Comment

by:someone_genius
ID: 20339828
any comments friends.
0
 
LVL 73

Accepted Solution

by:
sdstuber earned 50 total points
ID: 20340519
there's no parameters for doing so.
You can do your own simple formatting with search and replace
of space with newline characters or something like that, but otherwise nothing.

There's really no need to format. The metadata output should be syntactically fine
0
 
LVL 11

Assisted Solution

by:Akenathon
Akenathon earned 50 total points
ID: 20342419
There are entire applications devoted just to formatting SQL, look into Quest's "SQL Formatter", which BTW comes with TOAD. It does a very good job and has lots of settings to let you choose capitalization, indentation, newline placement... moreover, it can optionally add warnings if it finds code that may have SEMANTIC problems!
0
 
LVL 1

Expert Comment

by:Computer101
ID: 20910333
Forced accept.

Computer101
Community Support Moderator
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Subquery in Oracle: Sub queries are one of advance queries in oracle. Types of advance queries: •      Sub Queries •      Hierarchical Queries •      Set Operators Sub queries are know as the query called from another query or another subquery. It can …
Truncate is a DDL Command where as Delete is a DML Command. Both will delete data from table, but what is the difference between these below statements truncate table <table_name> ?? delete from <table_name> ?? The first command cannot be …
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now