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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: How to Find Every View In Which a Column is Used.

RE: How to Find Every View In Which a Column is Used.

From: Khedr, Waleed <Waleed.Khedr_at_FMR.COM>
Date: Thu, 11 Apr 2002 14:15:23 -0800
Message-ID: <F001.0044290D.20020411141523@fatcity.com>


Ugly way:

1- Select the list of valid views.
2- Rename the table.
3- Create new table with the same name but missing the column (empty table).
4- Compile all views.
5- Invalid views are using this column.

Regards,

Waleed

-----Original Message-----
Sent: Thursday, April 11, 2002 5:19 PM
To: Multiple recipients of list ORACLE-L

"MacGregor, Ian A." wrote:
>
> The dependencies tables do not go down to the column level. If I want to
know all views that access the sal column of scott.emp how do I do this. I can find out the name of the views which access the table via "dependencies", get the view text and parse it by eye. But I don't want to do that. I want the database to do so. I can use dbms_dql.parse, dbms_sql.describe columns, and the text of the view; however, this method does not work very well if the view contains a function or an operation on the column.
>
> Oracle must hold this information somewhere after a statement is parsed,
but where ?
>
> Ian

Ian,

   To the best of my knowledge, the 'per column' dependency is not stored in the dictionary. The finest grain is the dependence of the view on the table. And as you pointed out, the description gives you the column name, which is arbitrary.
 No way out but parsing a LONG column :-P.

-- 
Regards,

Stephane Faroult
Oriole Software
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Stephane Faroult
  INET: sfaroult_at_oriole.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Khedr, Waleed
  INET: Waleed.Khedr_at_FMR.COM

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Thu Apr 11 2002 - 17:15:23 CDT

Original text of this message

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