[Home] [Help]
432: cursor C_TAB_SYN (P_TABLE_OWNER varchar2, P_TABLE_NAME varchar2) is
433: with p( owner, synonym_name) as
434: (
435: select owner, synonym_name
436: from dba_synonyms
437: where table_name= p_table_name
438: and table_owner = p_table_owner
439: union all
440: select s.owner , s.synonym_name
437: where table_name= p_table_name
438: and table_owner = p_table_owner
439: union all
440: select s.owner , s.synonym_name
441: from dba_synonyms s,
442: p
443: where s.table_name = p.synonym_name
444: and s.table_owner = p.owner
445: and s.table_owner in
634: -- Get APPS synonym of that table or synonym pointing to table EV
635: begin
636: select syn.owner, syn.synonym_name
637: into l_synonym_owner, l_synonym_name
638: from dba_synonyms syn
639: where syn.owner = ad_zd.apps_schema
640: and syn.table_owner = x_table_owner
641: and syn.table_name = l_ev_name
642: and rownum < 2;
929: and d.referenced_type = 'SYNONYM'
930: and d.referenced_owner = 'PUBLIC'
931: and d.referenced_name = p_synonym_name
932: and not exists ( select 1
933: from dba_synonyms
934: where owner = d.owner
935: and synonym_name= p_synonym_name
936: and table_owner = x_table_owner
937: and table_name in (x_table_name, x_ev_name)
970: c_module varchar2(127) := c_package||'fix_public_synonyms';
971:
972: cursor c_pub_syn is
973: select syn.synonym_name
974: from dba_synonyms syn,
975: DBA_TABLES tab
976: where syn.owner='PUBLIC'
977: and syn.table_owner in ( select oracle_username
978: from system.fnd_oracle_userid
1122: select
1123: syn.owner owner
1124: , syn.synonym_name synonym_name
1125: , syn.table_name table_name
1126: from dba_synonyms syn
1127: where syn.table_owner = x_table_owner
1128: and syn.table_name in (x_table_name, x_ev_name)
1129: and syn.owner in
1130: ( select oracle_username
1293: where mv.owner = tab.owner
1294: and mv.container_name = tab.table_name )
1295: and exists /* has apps synonym to base table */
1296: ( select syn.table_owner, syn.table_name
1297: from dba_synonyms syn
1298: where syn.table_owner = tab.owner
1299: and syn.table_name = tab.table_name
1300: and syn.owner = ad_zd.apps_schema )
1301: and not exists /* not an obsolete table */
1324: ( select oracle_username from system.fnd_oracle_userid
1325: where read_only_flag in ('A','E','B') )
1326: and ( exists /* uncoverted synonyms */
1327: ( select syn.synonym_name
1328: from dba_synonyms syn
1329: where syn.owner in
1330: ( select oracle_username from system.fnd_oracle_userid
1331: where read_only_flag in ('A', 'B', 'C', 'E', 'U') )
1332: and syn.table_owner = ev.owner
1387: L_TABLE_NAME varchar2(30);
1388:
1389: cursor C_SYNONYMS(x_table_owner varchar2, x_table_name varchar2) is
1390: select syn.owner owner, syn.synonym_name name
1391: from dba_synonyms syn
1392: where syn.table_owner = x_table_owner
1393: and syn.table_name = ad_zd_table.ev_view(x_table_name)
1394: and syn.owner <> 'PUBLIC';
1395:
2487: l_defer_stmt varchar2(2000);
2488:
2489: cursor C_SYNONYMS(x_table_owner varchar2, x_ev_name varchar2) is
2490: select syn.owner owner, syn.synonym_name name
2491: from dba_synonyms syn
2492: where syn.table_owner = x_table_owner
2493: and syn.table_name = x_ev_name
2494: and syn.owner <> 'PUBLIC';
2495: