Hello All:
I have a statement that actually works, albeit not the best looking, but was fast:
However, I wanted to filter out only tables that actually contain data, so I joined the original to DBA_TABLES where NUM_ROWS > 0 like so:
Now the code is so slow and sometimes give the Error: ORA-01652: unable to extend temp segment by 128 in tablespace TEMP.
Please, can you help too this statement.
Thanks in advance.
I have a statement that actually works, albeit not the best looking, but was fast:
Code:
select owner, table_name, column_name from dba_tab_columns where (column_name like '%ADDRESS%' OR column_name like '%DOB%'OR column_name like '%NAME%'OR column_name like '%PHONE%'OR column_name like '%PHN%') and owner not in ('SYS','SYSTEM','OUTLN','DBSNMP','WMSYS','DBA_MONITOR','WEBSYS','XDB', 'CTXSYS', 'EXFSYS', 'DMSYS','ORDSYS','OLAPSYS','SYSMAN','MDSYS','PERFSTAT', 'SCOTT', 'WKSYS','FLOWS_030000','WK_TEST','FLOWS_FILES','RMAN','ODM','SIEBEL') and column_name not in ('PROD_NAME','PRODUCT_NAME', 'GROUP_NAME','DPT_NAME','APP_NAME', 'BLOCK_NAME','BUILDING_NAME', 'CHEMICAL_NAME') AND table_name not like '%SYS%' and table_name not like'%ORGANIZATIONS%' and table_name not like'%BIN%' and table_name not like'%TRIGGER%' and table_name not like'%AUTOINV%' and table_name not like'%SERVICE_TYPE%' and table_name not like'%AQ%' and table_name not like'%QS%' and table_name not like'%MV%' and table_name not like'%JAVA%' and table_name not like'%PEER%'
However, I wanted to filter out only tables that actually contain data, so I joined the original to DBA_TABLES where NUM_ROWS > 0 like so:
Code:
select t.owner, c.table_name, c.column_name from dba_tables t,dba_tab_columns c where t.owner = c.owner and (c.column_name like '%ADDRESS%' OR c.column_name like '%DOB%'OR c.column_name like '%NAME%'OR c.column_name like '%PHONE%'OR c.column_name like '%PHN%') and t.owner not in ('SYS','SYSTEM','OUTLN','DBSNMP','WMSYS','DBA_MONITOR','WEBSYS','XDB', 'CTXSYS', 'EXFSYS', 'DMSYS','ORDSYS','OLAPSYS','SYSMAN','MDSYS','PERFSTAT', 'SCOTT', 'WKSYS','FLOWS_030000','WK_TEST','FLOWS_FILES','RMAN','ODM','SIEBEL') and c.column_name not in ('PROD_NAME','PRODUCT_NAME', 'GROUP_NAME','DPT_NAME','APP_NAME', 'BLOCK_NAME','BUILDING_NAME', 'CHEMICAL_NAME') and t.num_rows>0 AND c.table_name not like '%SYS%' and c.table_name not like'%ORGANIZATIONS%' and c.table_name not like'%BIN%' and c.table_name not like'%TRIGGER%' and c.table_name not like'%AUTOINV%' and c.table_name not like'%SERVICE_TYPE%' and c.table_name not like'%AQ%' and c.table_name not like'%QS%' and c.table_name not like'%MV%' and c.table_name not like'%JAVA%' and c.table_name not like'%PEER%'
Now the code is so slow and sometimes give the Error: ORA-01652: unable to extend temp segment by 128 in tablespace TEMP.
Please, can you help too this statement.
Thanks in advance.