Solved

How to format output of dbms_metdata???

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

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

Suggested Solutions

Title # Comments Views Activity
'G_F01' is not a procedure or is undefined 3 34
use lov values 2 61
SQL2016 to ORACLE11G linked-server 6 28
Using SQL*PLUS issue with where statement with trunc function 3 27
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 …
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 explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.

840 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