DBAsupport.com Forums - Powered by vBulletin
Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Views Based on which tables ?

  1. #1
    Join Date
    Feb 2002
    Posts
    267
    HI,
    Is there any way to find out on which
    tables the views are built on.
    Regards
    sonia

  2. #2
    Join Date
    Apr 2002
    Posts
    291
    Hi
    If you have TOAD then extract the script of that view and you can find out from which tables it's built.

    thanks
    PNRDBA

  3. #3
    Join Date
    Feb 2002
    Posts
    70
    You can get the information of view from user_tab_columns table.

    Retrieve Table_name, column_name from user_tab_columns for table_name like 'Viewname'

    Thanks
    ________________
    ShanDJ

  4. #4
    Join Date
    Feb 2002
    Posts
    267
    Hi,
    I am working on unix machine and i don't
    think TOAD is available on unix; is there
    any other way ?
    regards
    sonia

  5. #5
    Join Date
    Sep 2001
    Location
    Düsseldorf, Germany.
    Posts
    588
    Originally posted by pnrdba
    Hi
    If you have TOAD then extract the script of that view and you can find out from which tables it's built.

    thanks
    Without TOAD its not possible

    You can use TEXT column from any of these dba_views, user_views, all_views

    TEXT column stores the defination of view

    Sameer

  6. #6
    Join Date
    Jan 2002
    Location
    Up s**t creek
    Posts
    1,525
    If you don't have TOAD you can select the TEXT from the USE R_VIEWS view.

    e.g.

    SELECT text
    FROM user_views
    WHERE view_name = 'my_view';

    Regards
    Jim
    Oracle Certified Professional
    "Build your reputation by helping other people build theirs."

    "Sarcasm may be the lowest form of wit but its still funny"

    Click HERE to vist my website!

  7. #7
    Join Date
    Feb 2002
    Posts
    70
    select table_name, column_name from user_tab_columns where table_name like 'Viewname';

    Thanks
    ________________
    ShanDJ

  8. #8
    Join Date
    Dec 2000
    Location
    Ljubljana, Slovenia
    Posts
    4,439
    Originally posted by shandj
    select table_name, column_name from user_tab_columns where table_name like 'Viewname';
    This doesn't tell you anything about underlyning tables - the TABLE_NAME in the above query is in fact the name of the view 'Viewname'.

    Maybe you could use any variant of the following:

    SELECT referenced_name FROM DBA_DEPENDENCIES
    WHERE owner='VIEW_OWNER'
    AND name = 'MY_VIEW'
    AND referenced_type = 'TABLE';

    Although the query itself might be terribly slow and inefficient.
    Jurij Modic
    ASCII a stupid question, get a stupid ANSI
    24 hours in a day .... 24 beer in a case .... coincidence?

  9. #9
    Join Date
    Jan 2001
    Posts
    642
    ********************************************

    Hi,
    I am working on unix machine and i don't
    think TOAD is available on unix; is there
    any other way ?
    regards
    sonia
    *********************************************


    With TOAD, you can connect to any oracle DB that you will be able to access from local windows box. It's merely a front end tool...

    There can't be Toad for WIN,T for U, T for Linux etc...

    Badrinath
    There is always a better way to do the things.

  10. #10
    Join Date
    Feb 2002
    Posts
    267
    Originally posted by badrinathn
    ********************************************

    Hi,
    I am working on unix machine and i don't
    think TOAD is available on unix; is there
    any other way ?
    regards
    sonia
    *********************************************


    With TOAD, you can connect to any oracle DB that you will be able to access from local windows box. It's merely a front end tool...

    There can't be Toad for WIN,T for U, T for Linux etc...

    Badrinath
    Mr Badrinath,
    i know that it is a tool,
    and as far as my company is concerned, we dont have a single
    machine running on windows.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width