Home » Other » Client Tools » SPOOL (Oracle 10.2.0.3)
SPOOL [message #556562] Tue, 05 June 2012 06:02 Go to next message
pointers
Messages: 451
Registered: May 2008
Senior Member
Hi,

I am pulling out the metadata using dbms_metadata using sqlplus and spool.
select dbms_metadata.get_ddl('PACKAGE','PKG_TEST','SALESABCD') from dual;


I have used the below seetings.

set feedback off
set long 1000000
set trimspool on
SET LINESIZE 32767
SET HEADING  OFF 
set PAGESIZE 40000
set verify off 
set termout off
spool hello.txt


but when I see the output of the spool file the lines are distributed in seperate lines something like below (a sample where line is split across lines).
/*----------------- History of Change  ------------------------------------------
------------

As you see above the line size is set to 32767 but still it is not effective.
Could you please advice if i need to add something.

Regards,
Pointers
Re: SPOOL [message #556564 is a reply to message #556562] Tue, 05 June 2012 06:10 Go to previous messageGo to next message
pointers
Messages: 451
Registered: May 2008
Senior Member
Hi,

I got the solution by using an column alias and extra setting like below.

select dbms_metadata.get_ddl('PACKAGE','PKG_TEST','SALESABCD') a from dual;
column a format a200


1. Is there any other setting we can do to achive this
2. But why do we need to use column format though i have mentioned line size

Thank you very much in advance

Regards,
Pointers
Re: SPOOL [message #556565 is a reply to message #556564] Tue, 05 June 2012 06:11 Go to previous message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
set longchunksize 32767

Regards
Michel
Previous Topic: our UNIX user in group "dba" but can't connect as SYS
Next Topic: toad error
Goto Forum:
  


Current Time: Fri Mar 29 03:03:05 CDT 2024