Solved

How to format output of dbms_metdata???

Posted on 2007-11-23
5
950 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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.

810 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