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: generating scripts

Re: generating scripts

From: Matt B. <mcb_at_fightspam.sd.znet.com>
Date: 2000/06/26
Message-ID: <slgct9cojev136@corp.supernews.com>#1/1

"SP" <spant1_at_aol.com> wrote in message
news:ZXS55.415$0x.13764_at_nuq-read.news.verio.net...
> How can I generate scripts of all or any of the objects in a database?

Use TOAD or SQL*Station.

Or from SQL*Plus:

set pagesize 0 heading off feedback off trimspool on linesize 2000 (or any reasonably large number) echo off

spool myfile.sql
select text
from dba_source
where owner = nvl(&the_owner_you_want,owner) and name = nvl(&the_object_you_want,name) order by owner, name, type, line;
spool off

You might still need to clean up the "spool off" from your output file as well as the original spool command.

-Matt Received on Mon Jun 26 2000 - 00:00:00 CDT

Original text of this message

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