DBA Data[Home] [Help]

APPS.AD_FILE_SYS_SNAPSHOTS_PKG dependencies on AD_PATCH_HIST_SNAPS_TEMP

Line 101: fnd_stats.gather_table_stats(G_UN_FND, 'ad_patch_hist_snaps_temp');

97: -- prior use. For that, first commit.
98:
99: commit;
100:
101: fnd_stats.gather_table_stats(G_UN_FND, 'ad_patch_hist_snaps_temp');
102:
103: if G_DEBUG then
104: put_line('Inserting candidate bugs into temp table');
105: end if;

Line 109: --rows from ad_patch_hist_snaps_temp

105: end if;
106:
107: --bug3537094. The following insert should be used instead
108: --Also removed 2 delete stmt which deletes unknown and duplicate
109: --rows from ad_patch_hist_snaps_temp
110:
111: insert into ad_patch_hist_snaps_temp (action_code, bug_id)
112: select distinct L_BUGSTAT_EXPL_ACT_CD, prb.bug_id
113: from ad_patch_run_bugs prb, ad_patch_hist_snaps_temp t

Line 111: insert into ad_patch_hist_snaps_temp (action_code, bug_id)

107: --bug3537094. The following insert should be used instead
108: --Also removed 2 delete stmt which deletes unknown and duplicate
109: --rows from ad_patch_hist_snaps_temp
110:
111: insert into ad_patch_hist_snaps_temp (action_code, bug_id)
112: select distinct L_BUGSTAT_EXPL_ACT_CD, prb.bug_id
113: from ad_patch_run_bugs prb, ad_patch_hist_snaps_temp t
114: where prb.patch_run_id = t.patch_run_id
115: and t.action_code = p_action_code

Line 113: from ad_patch_run_bugs prb, ad_patch_hist_snaps_temp t

109: --rows from ad_patch_hist_snaps_temp
110:
111: insert into ad_patch_hist_snaps_temp (action_code, bug_id)
112: select distinct L_BUGSTAT_EXPL_ACT_CD, prb.bug_id
113: from ad_patch_run_bugs prb, ad_patch_hist_snaps_temp t
114: where prb.patch_run_id = t.patch_run_id
115: and t.action_code = p_action_code
116: and (prb.applied_flag = 'Y' or prb.reason_not_applied = L_ADPBNAAS);
117:

Line 131: FND_STATS.Gather_Table_Stats(G_UN_FND, 'ad_patch_hist_snaps_temp');

127: if G_DEBUG then
128: put_line('Gathering stats');
129: end if;
130:
131: FND_STATS.Gather_Table_Stats(G_UN_FND, 'ad_patch_hist_snaps_temp');
132:
133: if G_DEBUG then
134: put_line('Inserting new bugfixes in the curr-vw snapshot');
135: end if;

Line 154: from ad_patch_hist_snaps_temp t

150: t.bug_id,
151: 'EXPLICIT',
152: 'Y',
153: sysdate, sysdate, 5, 5
154: from ad_patch_hist_snaps_temp t
155: where t.action_code = L_BUGSTAT_EXPL_ACT_CD
156: and not exists (select 'Bug not yet recorded in the curr-vw'
157: from ad_snapshot_bugfixes sb2
158: where sb2.snapshot_id = p_snapshot_id

Line 183: from ad_patch_hist_snaps_temp t

179: sb.last_update_date = sysdate,
180: sb.last_updated_by = 5
181: where sb.snapshot_id = p_snapshot_id
182: and sb.bugfix_id in (select t.bug_id
183: from ad_patch_hist_snaps_temp t
184: where t.action_code = L_BUGSTAT_EXPL_ACT_CD)
185: and (sb.bug_status <> 'EXPLICIT' or
186: sb.success_flag <> 'Y');
187:

Line 216: from ad_patch_hist_snaps_temp t

212: ad_snapshot_bugfixes_s.nextval,
213: p_global_snapshot_id, t.bug_id,
214: 'EXPLICIT', 'Y',
215: sysdate, sysdate, 5, 5
216: from ad_patch_hist_snaps_temp t
217: where t.action_code = L_BUGSTAT_EXPL_ACT_CD
218: and not exists (select 'Bug not yet recorded in the curr-vw'
219: from ad_snapshot_bugfixes sb2
220: where sb2.snapshot_id = p_global_snapshot_id

Line 245: from ad_patch_hist_snaps_temp t

241: sb.last_updated_by = 5,
242: sb.inconsistent_flag = null
243: where sb.snapshot_id = p_global_snapshot_id
244: and sb.bugfix_id in (select t.bug_id
245: from ad_patch_hist_snaps_temp t
246: where t.action_code = L_BUGSTAT_EXPL_ACT_CD)
247: and (sb.bug_status <> 'EXPLICIT' or
248: sb.success_flag <> 'Y');
249:

Line 270: delete from ad_patch_hist_snaps_temp

266:
267:
268: if p_delete_junk_created then
269:
270: delete from ad_patch_hist_snaps_temp
271: where action_code = L_BUGSTAT_EXPL_ACT_CD;
272:
273: end if;
274:

Line 321: insert into ad_patch_hist_snaps_temp

317: if G_DEBUG then
318: put_line('About to insert PR-IDs into temp table - 2');
319: end if;
320:
321: insert into ad_patch_hist_snaps_temp
322: (
323: patch_run_id, action_code
324: )
325: select

Line 330: from ad_patch_hist_snaps_temp

326: patch_run_id, G_PR_ID_ACT_CD2
327: from ad_patch_runs
328: where appl_top_id = l_appl_top_id
329: and patch_run_id not in (select patch_run_id
330: from ad_patch_hist_snaps_temp
331: where action_code in (G_PR_ID_ACT_CD,
332: G_PR_ID_ACT_CD2));
333:
334: if G_DEBUG then

Line 362: delete from ad_patch_hist_snaps_temp

358: p_delete_junk_created => TRUE);
359:
360: -- Now delete all G_PR_ID_ACT_CD2 rows from temp table
361:
362: delete from ad_patch_hist_snaps_temp
363: where action_code = G_PR_ID_ACT_CD2;
364:
365: end if;
366:

Line 593: ', ad_patch_hist_snaps_temp t ' ||

589: 'from ad_snapshot_files sf, ad_file_versions afv ';
590:
591: if p_limit_to_candidate_files then
592: l_str2 :=
593: ', ad_patch_hist_snaps_temp t ' ||
594: 'where t.file_id = sf.file_id '||
595: 'and t.action_code in (:1, :2, :3) and ';
596: else
597: l_str2 := ' where ';

Line 1014: delete from ad_patch_hist_snaps_temp;

1010: where pr.patch_run_id = p_patch_run_id
1011: and pr.appl_top_id = p_appl_top_id;
1012: end if;
1013:
1014: delete from ad_patch_hist_snaps_temp;
1015:
1016: if G_DEBUG then
1017: put_line('About to insert PR-ID into temp table');
1018: end if;

Line 1020: insert into ad_patch_hist_snaps_temp

1016: if G_DEBUG then
1017: put_line('About to insert PR-ID into temp table');
1018: end if;
1019:
1020: insert into ad_patch_hist_snaps_temp
1021: (
1022: action_code, patch_run_id
1023: )
1024: select G_PR_ID_ACT_CD, pr.patch_run_id

Line 1139: insert into ad_patch_hist_snaps_temp

1135: if G_DEBUG then
1136: put_line('About to insert PR-IDs into temp table');
1137: end if;
1138:
1139: insert into ad_patch_hist_snaps_temp
1140: (
1141: patch_run_id, action_code
1142: )
1143: select

Line 1148: from ad_patch_hist_snaps_temp

1144: patch_run_id, G_PR_ID_ACT_CD
1145: from ad_patch_runs
1146: where appl_top_id = p_appl_top_id
1147: and patch_run_id not in (select patch_run_id
1148: from ad_patch_hist_snaps_temp
1149: where action_code = G_PR_ID_ACT_CD);
1150:
1151: if G_DEBUG then
1152: put_line('Inserted '||to_char(sql%rowcount)||' PR-ID rows');

Line 1162: fnd_stats.gather_table_stats(G_UN_FND, 'ad_patch_hist_snaps_temp');

1158: -- prior use. For that, first commit.
1159:
1160: commit;
1161:
1162: fnd_stats.gather_table_stats(G_UN_FND, 'ad_patch_hist_snaps_temp');
1163:
1164: -- set some flags, that help us fine-tune SQL's down the line
1165:
1166: l_only_one_driver_row := FALSE;

Line 1171: from ad_patch_hist_snaps_temp;

1167: l_copy_actions_exist := TRUE;
1168:
1169: select nvl(count(*), 0)
1170: into l_count
1171: from ad_patch_hist_snaps_temp;
1172:
1173: if l_count = 0 then
1174: goto return_success;
1175: elsif l_count = 1 then

Line 1186: from ad_patch_hist_snaps_temp t,

1182:
1183: begin
1184: select 1
1185: into l_count
1186: from ad_patch_hist_snaps_temp t,
1187: ad_patch_runs pr,
1188: ad_patch_drivers pd
1189: where t.patch_run_id = pr.patch_run_id
1190: and pr.patch_driver_id = pd.patch_driver_id

Line 1443: insert into ad_patch_hist_snaps_temp

1439: Case 1: 1 patch-run
1440: ------
1441: The SQL to use is:
1442:
1443: insert into ad_patch_hist_snaps_temp
1444: (patch_run_id, action_code, file_id, file_version_id,
1445: app_short_name, filename,
1446: version_segment1, version_segment2,
1447: version_segment3, version_segment4,

Line 1476: from ad_patch_hist_snaps_temp t, ad_patch_runs pr,

1472: max(afv.version_segment7), max(afv.version_segment8),
1473: max(afv.version_segment9), max(afv.version_segment10),
1474: max(afv.translation_level), max(prba.dest_file_id),
1475: max(prba.file_type_flag)
1476: from ad_patch_hist_snaps_temp t, ad_patch_runs pr,
1477: ad_patch_run_bugs prb, ad_patch_run_bug_actions prba,
1478: ad_patch_common_actions pca, ad_file_versions afv, ad_files f
1479: where pr.patch_run_id = t.patch_run_id
1480: and pr.appl_top_id = :at_id

Line 1503: insert into ad_patch_hist_snaps_temp

1499: analytic function ROW_NUMBER.
1500:
1501: The SQL to use is:
1502:
1503: insert into ad_patch_hist_snaps_temp
1504: (patch_run_id, action_code, file_id, file_version_id,
1505: app_short_name, filename,
1506: version_segment1, version_segment2,
1507: version_segment3, version_segment4,

Line 1550: from ad_patch_hist_snaps_temp t, ad_patch_runs pr,

1546: afv.version_segment5 desc, afv.version_segment6 desc,
1547: afv.version_segment7 desc, afv.version_segment8 desc,
1548: afv.version_segment9 desc, afv.version_segment10 desc,
1549: afv.translation_level desc nulls last) as r1
1550: from ad_patch_hist_snaps_temp t, ad_patch_runs pr,
1551: ad_patch_run_bugs prb, ad_patch_run_bug_actions prba,
1552: ad_patch_common_actions pca, ad_file_versions afv, ad_files f
1553: where pr.patch_run_id = t.patch_run_id
1554: and pr.appl_top_id = :at_id

Line 1571: ad_patch_hist_snaps_temp t

1567:
1568: Next, the second SQL (UPDATE stmt) is explained below:
1569:
1570: update
1571: ad_patch_hist_snaps_temp t
1572: set t.action_code = :none_cd
1573: where t.action_code = :clib_cd
1574: and not exists (select
1575: 'libin action exists for this .o (ie. its archived)'

Line 1588: 'insert into ad_patch_hist_snaps_temp '||

1584:
1585: */
1586:
1587: l_ins_stmt1 :=
1588: 'insert into ad_patch_hist_snaps_temp '||
1589: '(patch_run_id, action_code, file_id, file_version_id, '||
1590: 'app_short_name, filename, '||
1591: 'version_segment1, version_segment2, '||
1592: 'version_segment3, version_segment4, '||

Line 1602: 'from ad_patch_hist_snaps_temp t, ad_patch_runs pr, '||

1598:
1599: l_hint := ' ';
1600:
1601: l_from_where :=
1602: 'from ad_patch_hist_snaps_temp t, ad_patch_runs pr, '||
1603: 'ad_patch_run_bugs prb, ad_patch_run_bug_actions prba, '||
1604: 'ad_patch_common_actions pca, ad_file_versions afv, ad_files f '||
1605: 'where pr.patch_run_id = t.patch_run_id '||
1606: 'and pr.appl_top_id = :at_id '||

Line 1742: FND_STATS.Gather_Table_Stats(G_UN_FND, 'ad_patch_hist_snaps_temp');

1738: -- Gather stats regardless of # of rows inserted. For that first commit.
1739:
1740: commit;
1741:
1742: FND_STATS.Gather_Table_Stats(G_UN_FND, 'ad_patch_hist_snaps_temp');
1743:
1744: -- Now issue the 2nd SQL (the UPDATE stmt, to flag the unarchived C object
1745: -- libraries as such)
1746:

Line 1748: ad_patch_hist_snaps_temp t

1744: -- Now issue the 2nd SQL (the UPDATE stmt, to flag the unarchived C object
1745: -- libraries as such)
1746:
1747: update
1748: ad_patch_hist_snaps_temp t
1749: set t.action_code = L_ARCH_NONE_ACT_CD
1750: where t.action_code = L_ARCH_CLIB_ACT_CD
1751: and not exists (select
1752: 'libin action exists for this .o (ie. its archived)'

Line 1766: ad_patch_hist_snaps_temp t

1762:
1763: -- Next, update the CLIB_ARCH_FILE_ID column in the temp table.
1764:
1765: update
1766: ad_patch_hist_snaps_temp t
1767: set t.clib_arch_file_id =
1768: (
1769: select f.file_id
1770: from ad_files f

Line 1792: -- Update information in ad_patch_hist_snaps_temp about the

1788: '.o', '.a', 'st.lib')
1789: )
1790: where t.action_code = L_ARCH_CLIB_ACT_CD;
1791:
1792: -- Update information in ad_patch_hist_snaps_temp about the
1793: -- irep_gathered_flag. Since ad_patch_hist_snaps_temp table
1794: -- has information about files which were patched (or newly
1795: -- introduced), set/reset the irep_gathered_flag to 'N' and
1796: -- the last_patched_date to sysdate. The irep_gathered_flag

Line 1793: -- irep_gathered_flag. Since ad_patch_hist_snaps_temp table

1789: )
1790: where t.action_code = L_ARCH_CLIB_ACT_CD;
1791:
1792: -- Update information in ad_patch_hist_snaps_temp about the
1793: -- irep_gathered_flag. Since ad_patch_hist_snaps_temp table
1794: -- has information about files which were patched (or newly
1795: -- introduced), set/reset the irep_gathered_flag to 'N' and
1796: -- the last_patched_date to sysdate. The irep_gathered_flag
1797: -- signifies that these files (with the flag set to 'N') have

Line 1806: put_line('Updating irep_gathered_flag data in ad_patch_hist_snaps_temp');

1802: --
1803: -- Bug 3807737 - sgadag.
1804:
1805: if G_DEBUG then
1806: put_line('Updating irep_gathered_flag data in ad_patch_hist_snaps_temp');
1807: end if;
1808:
1809:
1810: update ad_patch_hist_snaps_temp t

Line 1810: update ad_patch_hist_snaps_temp t

1806: put_line('Updating irep_gathered_flag data in ad_patch_hist_snaps_temp');
1807: end if;
1808:
1809:
1810: update ad_patch_hist_snaps_temp t
1811: set t.irep_gathered_flag = 'N';
1812:
1813:
1814: -- Rupsingh Bug 3675019. 06/07/2004

Line 1858: from ad_patch_hist_snaps_temp t

1854: sysdate, sysdate,
1855: 5, 5, p_appl_top_id,
1856: t.irep_gathered_flag,
1857: sysdate
1858: from ad_patch_hist_snaps_temp t
1859: where t.action_code in (L_ARCH_NONE_ACT_CD, L_ARCH_CLIB_ACT_CD,
1860: L_ARCH_AZIP_ACT_CD)
1861: and not exists (select 'Already exists'
1862: from ad_snapshot_files sf

Line 1921: from ad_patch_hist_snaps_temp t

1917: 'P',
1918: sysdate, sysdate,
1919: 5, 5, p_appl_top_id,
1920: l_inconsistent_flag
1921: from ad_patch_hist_snaps_temp t
1922: where
1923: t.action_code in (L_ARCH_NONE_ACT_CD, L_ARCH_CLIB_ACT_CD,
1924: L_ARCH_AZIP_ACT_CD)
1925: and not exists (select 'Already exists'

Line 1968: from ad_patch_hist_snaps_temp t

1964: (sf.file_version_id, sf.update_source_id,
1965: sf.dest_file_id, sf.file_type_flag, sf.irep_gathered_flag) =
1966: (select t.file_version_id, t.patch_run_id,
1967: t.dest_file_id, t.file_type_flag, t.irep_gathered_flag
1968: from ad_patch_hist_snaps_temp t
1969: where t.file_id = sf.file_id),
1970: sf.update_type = 'P',
1971: sf.last_update_date = sysdate,
1972: sf.last_updated_by = 5,

Line 1976: from ad_patch_hist_snaps_temp t2

1972: sf.last_updated_by = 5,
1973: sf.last_patched_date = sysdate
1974: where sf.snapshot_id = l_snapshot_id
1975: and sf.file_id in (select t2.file_id
1976: from ad_patch_hist_snaps_temp t2
1977: where t2.action_code in (L_ARCH_NONE_ACT_CD,
1978: L_ARCH_CLIB_ACT_CD, L_ARCH_AZIP_ACT_CD))
1979: and exists
1980: (

Line 1982: from ad_patch_hist_snaps_temp t, ad_file_versions fv_old

1978: L_ARCH_CLIB_ACT_CD, L_ARCH_AZIP_ACT_CD))
1979: and exists
1980: (
1981: select 'File exists in curr-vw with lower version'
1982: from ad_patch_hist_snaps_temp t, ad_file_versions fv_old
1983: where sf.file_id = t.file_id
1984: and t.file_version_id = fv_old.file_version_id (+)
1985: and sf.file_version_id = fv_old.file_version_id (+)
1986: -- Update only if patch version is higher (code copied from adfilutb.pls)

Line 2056: ad_patch_hist_snaps_temp t

2052: from ad_patch_common_actions pca,
2053: ad_patch_run_bug_actions prba,
2054: ad_patch_run_bugs prb,
2055: ad_patch_runs pr,
2056: ad_patch_hist_snaps_temp t
2057: where pr.patch_run_id = t.patch_run_id and
2058: pr.appl_top_id = p_appl_top_id and
2059: t.action_code = G_PR_ID_ACT_CD and
2060: pr.patch_run_id = prb.patch_run_id and

Line 2215: delete from ad_patch_hist_snaps_temp

2211: --
2212:
2213: -- First, delete unwanted rows from the temp table.
2214:
2215: delete from ad_patch_hist_snaps_temp
2216: where action_code <> G_PR_ID_ACT_CD;
2217:
2218: commit;
2219: