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: Views

Re: Views

From: Jonathan Gennick <gennick_at_worldnet.att.net>
Date: Sat, 25 Apr 1998 02:45:51 GMT
Message-ID: <6hrior$476@bgtnsc03.worldnet.att.net>


On Thu, 23 Apr 1998 22:31:26 -0600, elcoco_at_tmx.com.ni wrote:

>I have lost views, how can i retrieve?
>Excuse my English. Thks.

I'm not sure what you mean. Have you just lost the SQL CREATE VIEW commands? Do you still have the views defined in your database? If so, then you can query the ALL_VIEWS table to get the SQL. For example:

SQL> set long 500
SQL> l
  1 select text from sys.all_views
  2* where view_name='DBA_VIEWS'
SQL> / TEXT



select u.name, o.name, v.textlength, v.text, t.typetextlength, t.typetext,

       t.oidtextlength, t.oidtext, t.typeowner, t.typename from sys.obj$ o, sys.view$ v, sys.user$ u, sys.typed_view$ t

where o.obj# = v.obj#
  and o.obj# = t.obj#(+)
  and o.owner# = u.user#


If you have lost both the views and the SQL used to create them, then I hope you have a backup. If you have any old export files, you might be able to extract the views from those.

Jonathan Received on Fri Apr 24 1998 - 21:45:51 CDT

Original text of this message

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