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

Home -> Community -> Usenet -> c.d.o.misc -> Re: script to recreate all views - problem with 'text' column in user_views

Re: script to recreate all views - problem with 'text' column in user_views

From: Alistair <alistair.thomson_at_sphinxcst.co.uk>
Date: Wed, 23 Jan 2002 09:32:40 -0000
Message-ID: <a2m00j$sjq$1@thorium.cix.co.uk>


Why not take an export and use that to create the views? If its just the views you're interested in you could take an export with rows=no (very quick) and then either run the import to build the views or edit the syntax out of the export.

Alistair

"Richard Shea" <richardshea_at_fastmail.fm> wrote in message news:282f826a.0201221517.44ac31c4_at_posting.google.com...
> Hi - I want a script which will recreate all views in a schema. I've
> written :
>
> set long 4000
> set heading off
> set line 4000
> select 'create or replace view ' || view_name, ' as ', text from
> user_views
>
> which seems to be halfway there but now I need (I think) to put a '/'
> at then end of each command. Can anyone tell me how to do that ?
>
> While I'm asking I think having to set the line/long length to a given
> width in order to not truncate is a bit clunky too is there a better
> way to deal with the 'text' column (which has a type of 'long') ?
>
> thanks
>
> Richard Shea.
>
>
> PS: Thinking about alternatives to this approach I'm on a W2K box so I
> can't easily use the various (unix based) scripts to unmangle an EXP
> output and although I've got a copy of TOAD (albeit the free version)
> I can't see a way to select all views at one go in order to have them
> all scripted - maybe I've missed that ?
Received on Wed Jan 23 2002 - 03:32:40 CST

Original text of this message

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