Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Views
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
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