Solved

How to format output of dbms_metdata???

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
PL/SQL LOOP CURSOR 3 58
How to return an OUT parameter from and ORACLE 3 57
Wrap Oraccle SQL*Plus executable Command 4 69
Read only access to a Procedure in oracle? 4 48
Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
Via a live example, show how to take different types of Oracle backups using RMAN.

920 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

16 Experts available now in Live!

Get 1:1 Help Now