Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Getting source with wrapped lines????

Re: Getting source with wrapped lines????

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Mon, 21 Sep 1998 00:23:39 GMT
Message-ID: <360b9bd8.9032978@192.86.155.100>


A copy of this was sent to Lisa Thompson <mctate_at_tva.gov> (if that email address didn't require changing) On Sun, 20 Sep 1998 11:25:38 -0500, you wrote:

>Hi,
>
>I'm a DBA and constantly put in new code for programmers. As a
>precaution, I like to save the existing code in case it has to be put
>back. I use the "set wrap on" in SQLPLUS and spool a file to list the
>source into. Whenever, I go to the spooled file, I have to manually go
>in and take out extra end-of-line characters where lines were supposed
>to have wrapped. Does anyone have a better tip for how save source code
>for package headers/bodies/triggers/procedures/functions that will
>really wrap lines. I've tried this on my Windows95 desktop with SQLPLUS
>3.2 and on my Unix server. The spool files come out the same--no
>wrapped lines.
>

How about instead of wrapping - we preserve the source as the developer coded it? I like to use:

set linesize 1000
set trimspool on
set termout off
set heading off
set feedback off
spool code.sql
select text from user_source where ....; spool off

the linesize of 1000 (hopefully you don't have code with 1000 chars on one line) should be sufficient. trimspool causes the extra 920 or so blanks at the end of the line to not appear in the spool file (so the lines will only be as long as they need to be)...

>I have some DBA tool softwares, but they truncate the output on large
>objects for some reason. I haven't tried Developer2000 or any of the
>Oracle brand tools, though.
>
>Thanks,
>Melisa Thompson
>Browns Ferry Nuclear Plant - DBA
 

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA

--
http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation  

Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Sun Sep 20 1998 - 19:23:39 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US