Wednesday, October 28, 2015

all_tab_cols / dba_tab_cols and dba_dependencies

The following is to find tables or objects referenced in a procedure.

select
owner, name, type,referenced_owner,referenced_name,referenced_type
from
   dba_dependencies where type='PROCEDURE' and owner='HMA_TM_PROD_GEN2' and REFERENCED_OWNER not in ('SYS','PUBLIC') order by NAME;


Following is to get column details in all tables under a particular schema

select table_name, column_name, data_type,data_length, nullable from dba_tab_cols where owner='HMA_TM_PROD_GEN2' order by table_name;

No comments:

Post a Comment

Featured Post

Apply Patch 22191577 latest GI PSU to RAC and DB homes using Opatch auto or manual steps

Patch 22191577: GRID INFRASTRUCTURE PATCH SET UPDATE 11.2.0.4.160119 (JAN2016) Unzip the patch 22191577 Unzip latest Opatch Version in or...