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: Script to re-create views

Re: Script to re-create views

From: Manmohan Mann <m_mann_at_hotmail.com>
Date: 24 Mar 1999 01:05:03 GMT
Message-ID: <36F83A8B.31681988@hotmail.com>


Hi,

You got the basics.

A couple of gotchas to watch out for.

  1. Use 'set long 2000' or a higher number to make sure you pick up the entire TEXT. You can 'select max(text_length) from user_views' to determine what number it should be.
  2. The TEXT might not be "clean" and might cause problems. If you ever try to get the view definition from a export, you will no what I mean. Another problem might be character translation if the characterset is different between your source and destination databases.

Mainly, because of a characterset issue, I had to spool the contents of your statement to a file and manually clean it up before executing on a target database.

Hope this helps,

Manmohan Mann

Julia Cristina Varela de Montoya wrote:
>
> Can anyone share to me a script to generate and re-create the views for
> a schema (or re-create in another database)? I think I can do it with
> SELECT 'CREATE OR REPLACE VIEW ' || VIEW_NAME || ' AS ' || TEXT || '/' FROM
> USER_VIEWS; but that seems simple and may I find problems with with it?
>
> Thank you very much.
Received on Tue Mar 23 1999 - 19:05:03 CST

Original text of this message

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