DBA Data[Home] [Help]

APPS.MSC_CL_PURGE_STAGING dependencies on MSC_UTIL

Line 84: MSC_UTIL.LOG_MSG(MSC_UTIL.G_LVL_DEBUG_1,'Sql statements executed-'||lv_sql_stmt);

80: END IF;
81:
82:
83:
84: MSC_UTIL.LOG_MSG(MSC_UTIL.G_LVL_DEBUG_1,'Sql statements executed-'||lv_sql_stmt);
85:
86:
87:
88: BEGIN

Line 95: MSC_UTIL.LOG_MSG(MSC_UTIL.G_LVL_WARNING,lv_errtxt);

91: EXCEPTION
92:
93: WHEN table_not_found THEN
94: lv_errtxt := substr(SQLERRM,1,240) ;
95: MSC_UTIL.LOG_MSG(MSC_UTIL.G_LVL_WARNING,lv_errtxt);
96: exit;
97:
98: WHEN synonym_translation_invalid THEN
99: lv_errtxt := substr(SQLERRM,1,240) ;

Line 100: MSC_UTIL.LOG_MSG(MSC_UTIL.G_LVL_WARNING,lv_errtxt);

96: exit;
97:
98: WHEN synonym_translation_invalid THEN
99: lv_errtxt := substr(SQLERRM,1,240) ;
100: MSC_UTIL.LOG_MSG(MSC_UTIL.G_LVL_WARNING,lv_errtxt);
101: exit;
102:
103: WHEN OTHERS THEN
104: lv_errtxt := substr(SQLERRM,1,240) ;

Line 105: MSC_UTIL.LOG_MSG(MSC_UTIL.G_LVL_WARNING,lv_errtxt);

101: exit;
102:
103: WHEN OTHERS THEN
104: lv_errtxt := substr(SQLERRM,1,240) ;
105: MSC_UTIL.LOG_MSG(MSC_UTIL.G_LVL_WARNING,lv_errtxt);
106: exit;
107:
108: END;
109:

Line 117: MSC_UTIL.LOG_MSG(MSC_UTIL.G_LVL_DEBUG_1,'No. of rows deleted from '|| lv_tablename ||' - '||lv_total);

113:
114: COMMIT;
115: end loop;
116:
117: MSC_UTIL.LOG_MSG(MSC_UTIL.G_LVL_DEBUG_1,'No. of rows deleted from '|| lv_tablename ||' - '||lv_total);
118:
119:
120: END LOOP;
121: CLOSE table_names;

Line 129: MSC_UTIL.LOG_MSG(MSC_UTIL.G_LVL_WARNING,lv_errtxt);

125:
126: WHEN OTHERS THEN
127:
128: lv_errtxt := substr(SQLERRM,1,240) ;
129: MSC_UTIL.LOG_MSG(MSC_UTIL.G_LVL_WARNING,lv_errtxt);
130:
131: END delete_records;
132:
133:

Line 152: MSC_UTIL.LOG_MSG(MSC_UTIL.G_LVL_DEBUG_1,'Entered to check whether purge possible for the instance-'||pINSTANCE_CODE);

148: FROM msc_apps_instances
149: WHERE INSTANCE_CODE= pINSTANCE_CODE
150: FOR UPDATE;
151:
152: MSC_UTIL.LOG_MSG(MSC_UTIL.G_LVL_DEBUG_1,'Entered to check whether purge possible for the instance-'||pINSTANCE_CODE);
153:
154:
155:
156:

Line 161: MSC_UTIL.LOG_MSG(MSC_UTIL.G_LVL_DEBUG_1,ERRBUF);

157: IF lv_staging_table_status= G_ST_PULLING THEN
158: FND_MESSAGE.SET_NAME('MSC', 'MSC_ST_ERROR_PULLING');
159: ERRBUF:= FND_MESSAGE.GET;
160:
161: MSC_UTIL.LOG_MSG(MSC_UTIL.G_LVL_DEBUG_1,ERRBUF);
162:
163:
164: IF ( pINSTANCE_ID <> -1 )
165: THEN

Line 180: MSC_UTIL.LOG_MSG(MSC_UTIL.G_LVL_DEBUG_1,ERRBUF);

176: ELSIF lv_staging_table_status= G_ST_COLLECTING THEN
177: FND_MESSAGE.SET_NAME('MSC', 'MSC_ST_ERROR_LOADING');
178: ERRBUF:= FND_MESSAGE.GET;
179:
180: MSC_UTIL.LOG_MSG(MSC_UTIL.G_LVL_DEBUG_1,ERRBUF);
181:
182:
183: IF ( pINSTANCE_ID <> -1 )
184: THEN

Line 198: MSC_UTIL.LOG_MSG(MSC_UTIL.G_LVL_DEBUG_1,ERRBUF);

194: ELSIF lv_staging_table_status= G_ST_PRE_PROCESSING THEN
195: FND_MESSAGE.SET_NAME('MSC', 'MSC_ST_ERROR_PRE_PROCESSING');
196: ERRBUF:= FND_MESSAGE.GET;
197:
198: MSC_UTIL.LOG_MSG(MSC_UTIL.G_LVL_DEBUG_1,ERRBUF);
199:
200:
201: IF ( pINSTANCE_ID <> -1 )
202: THEN

Line 318: MSC_UTIL.LOG_MSG(MSC_UTIL.G_LVL_WARNING,ERRBUF);

314: FETCH table_names INTO lv_table_name;
315: IF ( table_names%ROWCOUNT = 0 ) THEN
316: FND_MESSAGE.SET_NAME('MSC','MSC_PS_INVALID_LOOKUP');
317: ERRBUF:= FND_MESSAGE.GET;
318: MSC_UTIL.LOG_MSG(MSC_UTIL.G_LVL_WARNING,ERRBUF);
319: v_program_status := G_ERROR;
320:
321: CLOSE table_names;
322: ELSE -- IF ( table_names%ROWCOUNT = 0 ) THEN

Line 347: MSC_UTIL.LOG_MSG(MSC_UTIL.G_LVL_DEBUG_1,'Value of lv_st_status_flag-'||lv_st_status_flag);

343: END IF;
344: -- Counting number of instances for which st_status is G_ST_PULLING , G_ST_COLLECTING and G_ST_PRE_PROCESSING
345: SELECT count(*) INTO lv_st_status_flag FROM msc_apps_instances WHERE st_status IN ( G_ST_PULLING,G_ST_COLLECTING,G_ST_PRE_PROCESSING ) AND ((instance_id=lv_p_instance_id) OR (lv_p_instance_id=-1));
346:
347: MSC_UTIL.LOG_MSG(MSC_UTIL.G_LVL_DEBUG_1,'Value of lv_st_status_flag-'||lv_st_status_flag);
348:
349: END IF;
350:
351: -- Setting the truncation flag

Line 362: MSC_UTIL.LOG_MSG(MSC_UTIL.G_LVL_DEBUG_1,'Truncation flag is YES. Entering in truncation LOOP');

358:
359:
360: IF (lv_trunc_flag=SYS_YES) THEN
361:
362: MSC_UTIL.LOG_MSG(MSC_UTIL.G_LVL_DEBUG_1,'Truncation flag is YES. Entering in truncation LOOP');
363:
364:
365: UPDATE msc_apps_instances
366: SET st_status= G_ST_PURGING;

Line 377: MSC_UTIL.LOG_MSG(MSC_UTIL.G_LVL_DEBUG_1,lv_table_name);

373:
374: LOOP
375: FETCH table_names INTO lv_table_name;
376: EXIT WHEN table_names%NOTFOUND;
377: MSC_UTIL.LOG_MSG(MSC_UTIL.G_LVL_DEBUG_1,lv_table_name);
378:
379:
380:
381: BEGIN

Line 384: MSC_UTIL.LOG_MSG(MSC_UTIL.G_LVL_DEBUG_1,'Sql statements to be executed-'||lv_sql_stmt);

380:
381: BEGIN
382: lv_sql_stmt := 'TRUNCATE TABLE '||v_applsys_schema||'.'||lv_table_name|| '';
383:
384: MSC_UTIL.LOG_MSG(MSC_UTIL.G_LVL_DEBUG_1,'Sql statements to be executed-'||lv_sql_stmt);
385:
386:
387:
388:

Line 395: MSC_UTIL.LOG_MSG(MSC_UTIL.G_LVL_WARNING,lv_errtxt);

391: EXCEPTION
392:
393: WHEN table_not_found THEN
394: lv_errtxt := substr(SQLERRM,1,240) ;
395: MSC_UTIL.LOG_MSG(MSC_UTIL.G_LVL_WARNING,lv_errtxt);
396:
397:
398: WHEN OTHERS THEN
399: lv_errtxt := substr(SQLERRM,1,240) ;

Line 400: MSC_UTIL.LOG_MSG(MSC_UTIL.G_LVL_WARNING,lv_errtxt);

396:
397:
398: WHEN OTHERS THEN
399: lv_errtxt := substr(SQLERRM,1,240) ;
400: MSC_UTIL.LOG_MSG(MSC_UTIL.G_LVL_WARNING,lv_errtxt);
401:
402:
403: END;
404:

Line 416: MSC_UTIL.LOG_MSG(MSC_UTIL.G_LVL_DEBUG_1,'Truncation flag is NO. Entered in DELETION LOOP');

412: ELSE
413:
414: commit; -- To break the lock on the records, acquired while opening the cursor p or q
415:
416: MSC_UTIL.LOG_MSG(MSC_UTIL.G_LVL_DEBUG_1,'Truncation flag is NO. Entered in DELETION LOOP');
417:
418:
419: OPEN instance_codes(lv_p_instance_id);
420: LOOP

Line 424: MSC_UTIL.LOG_MSG(MSC_UTIL.G_LVL_DEBUG_1,lv_p_instance_code);

420: LOOP
421: FETCH instance_codes INTO lv_p_instance_code,lv_instance_type,lv_st_status;
422: EXIT WHEN instance_codes%NOTFOUND;
423:
424: MSC_UTIL.LOG_MSG(MSC_UTIL.G_LVL_DEBUG_1,lv_p_instance_code);
425:
426:
427: IF (lv_p_del_rej_rec=SYS_YES) THEN
428:

Line 429: MSC_UTIL.LOG_MSG(MSC_UTIL.G_LVL_DEBUG_1,'Deleting without checking the ST_STATUS');

425:
426:
427: IF (lv_p_del_rej_rec=SYS_YES) THEN
428:
429: MSC_UTIL.LOG_MSG(MSC_UTIL.G_LVL_DEBUG_1,'Deleting without checking the ST_STATUS');
430:
431:
432:
433:

Line 442: MSC_UTIL.LOG_MSG(MSC_UTIL.G_LVL_DEBUG_1,'Deleting after checking the ST_STATUS');

438:
439: IF ( is_purge_possible( ERRBUF,RETCODE,lv_p_instance_code,lv_p_instance_id) ) THEN
440:
441:
442: MSC_UTIL.LOG_MSG(MSC_UTIL.G_LVL_DEBUG_1,'Deleting after checking the ST_STATUS');
443:
444:
445: delete_records(lv_p_instance_code,lv_p_del_rej_rec);
446:

Line 450: MSC_UTIL.LOG_MSG(MSC_UTIL.G_LVL_DEBUG_1,' Instance type is LEGACY ,so setting st_status to empty');

446:
447:
448: IF ( lv_instance_type = G_INS_OTHER ) THEN
449:
450: MSC_UTIL.LOG_MSG(MSC_UTIL.G_LVL_DEBUG_1,' Instance type is LEGACY ,so setting st_status to empty');
451:
452:
453: UPDATE msc_apps_instances
454: SET st_status=G_ST_EMPTY

Line 460: MSC_UTIL.LOG_MSG(MSC_UTIL.G_LVL_DEBUG_1,'Instance type is ERP ,so setting st_status to previous st_status-'||lv_st_status);

456: COMMIT;
457:
458: ELSE
459:
460: MSC_UTIL.LOG_MSG(MSC_UTIL.G_LVL_DEBUG_1,'Instance type is ERP ,so setting st_status to previous st_status-'||lv_st_status);
461:
462:
463: UPDATE msc_apps_instances
464: SET st_status=lv_st_status

Line 493: MSC_UTIL.LOG_MSG(MSC_UTIL.G_LVL_WARNING,lv_errtxt);

489: ERRBUF := SQLERRM;
490: RETCODE := SQLCODE;
491:
492: lv_errtxt := substr(SQLERRM,1,240) ;
493: MSC_UTIL.LOG_MSG(MSC_UTIL.G_LVL_WARNING,lv_errtxt);
494:
495: END launch_purge;
496:
497: --===================================================================

Line 1951: MSC_UTIL.LOG_MSG(MSC_UTIL.G_D_DEBUG_1,'inside purge staging table ');

1947:
1948:
1949:
1950: BEGIN
1951: MSC_UTIL.LOG_MSG(MSC_UTIL.G_D_DEBUG_1,'inside purge staging table ');
1952:
1953: SELECT decode(nvl(fnd_profile.value('MSC_PURGE_ST_CONTROL'),'N'),'Y',1,2)
1954: INTO lv_control_flag
1955: FROM dual;

Line 1962: MSC_UTIL.LOG_MSG(MSC_UTIL.G_D_DEBUG_1,'instance_type='||lv_instance_type);

1958: SELECT instance_type, lrtype
1959: INTO lv_instance_type, lv_last_refresh_type
1960: FROM msc_apps_instances
1961: WHERE instance_id= p_instance_id;
1962: MSC_UTIL.LOG_MSG(MSC_UTIL.G_D_DEBUG_1,'instance_type='||lv_instance_type);
1963: END IF;
1964: lv_pbs := nvl(TO_NUMBER(FND_PROFILE.VALUE('MRP_PURGE_BATCH_SIZE')), 2000);
1965: MSC_UTIL.LOG_MSG(MSC_UTIL.G_D_DEBUG_1,'before loop');
1966: FOR c_rec IN c_tab_list

Line 1965: MSC_UTIL.LOG_MSG(MSC_UTIL.G_D_DEBUG_1,'before loop');

1961: WHERE instance_id= p_instance_id;
1962: MSC_UTIL.LOG_MSG(MSC_UTIL.G_D_DEBUG_1,'instance_type='||lv_instance_type);
1963: END IF;
1964: lv_pbs := nvl(TO_NUMBER(FND_PROFILE.VALUE('MRP_PURGE_BATCH_SIZE')), 2000);
1965: MSC_UTIL.LOG_MSG(MSC_UTIL.G_D_DEBUG_1,'before loop');
1966: FOR c_rec IN c_tab_list
1967: LOOP
1968:
1969: lv_prod_short_name := AD_TSPACE_UTIL.get_product_short_name(to_number(c_rec.application_id));

Line 1971: MSC_UTIL.LOG_MSG(MSC_UTIL.G_D_DEBUG_1,'Schema name - ' || lv_schema);

1967: LOOP
1968:
1969: lv_prod_short_name := AD_TSPACE_UTIL.get_product_short_name(to_number(c_rec.application_id));
1970: lv_retval := FND_INSTALLATION.GET_APP_INFO (lv_prod_short_name, lv_dummy1, lv_dummy2, lv_schema);
1971: MSC_UTIL.LOG_MSG(MSC_UTIL.G_D_DEBUG_1,'Schema name - ' || lv_schema);
1972:
1973:
1974: IF (p_Blind_Purge = SYS_YES) OR
1975: (lv_control_flag = 1 AND lv_instance_type <> G_INS_OTHER AND c_rec.part_type <> 'L') THEN -- do a blind purge

Line 1977: MSC_UTIL.LOG_MSG(MSC_UTIL.G_D_DEBUG_1,'lv_sql_stmt1 - ' || lv_sql_stmt);

1973:
1974: IF (p_Blind_Purge = SYS_YES) OR
1975: (lv_control_flag = 1 AND lv_instance_type <> G_INS_OTHER AND c_rec.part_type <> 'L') THEN -- do a blind purge
1976: lv_sql_stmt:= 'TRUNCATE TABLE ' || lv_schema || '.' || c_rec.table_name||' DROP STORAGE';
1977: MSC_UTIL.LOG_MSG(MSC_UTIL.G_D_DEBUG_1,'lv_sql_stmt1 - ' || lv_sql_stmt);
1978:
1979: EXECUTE IMMEDIATE lv_sql_stmt;
1980:
1981: ELSIF (lv_instance_type = G_INS_OTHER) OR (c_rec.part_type <> 'L') THEN

Line 1985: MSC_UTIL.LOG_MSG(MSC_UTIL.G_D_DEBUG_1,'lv_sql_stmt1 - ' || lv_sql_stmt);

1981: ELSIF (lv_instance_type = G_INS_OTHER) OR (c_rec.part_type <> 'L') THEN
1982: lv_sql_stmt:= ' DELETE ' || lv_schema || '.' || c_rec.table_name
1983: || ' WHERE sr_instance_id = ' || p_instance_id
1984: || ' AND rownum < ' || lv_pbs;
1985: MSC_UTIL.LOG_MSG(MSC_UTIL.G_D_DEBUG_1,'lv_sql_stmt1 - ' || lv_sql_stmt);
1986: LOOP
1987: EXECUTE IMMEDIATE lv_sql_stmt;
1988: EXIT WHEN SQL%ROWCOUNT = 0;
1989: COMMIT;

Line 1997: MSC_UTIL.LOG_MSG(MSC_UTIL.G_D_DEBUG_1,'lv_sql_stmt2 - ' || lv_sql_stmt);

1993:
1994: lv_sql_stmt:= 'ALTER TABLE ' || lv_schema || '.' || c_rec.table_name
1995: || ' TRUNCATE PARTITION ' || SUBSTR(c_rec.table_name, 8) || '_' || p_instance_id;
1996:
1997: MSC_UTIL.LOG_MSG(MSC_UTIL.G_D_DEBUG_1,'lv_sql_stmt2 - ' || lv_sql_stmt);
1998: EXECUTE IMMEDIATE lv_sql_stmt;
1999: END IF;
2000:
2001: END LOOP;

Line 2002: MSC_UTIL.LOG_MSG(MSC_UTIL.G_D_STATUS,'exiting purge staging table ');

1998: EXECUTE IMMEDIATE lv_sql_stmt;
1999: END IF;
2000:
2001: END LOOP;
2002: MSC_UTIL.LOG_MSG(MSC_UTIL.G_D_STATUS,'exiting purge staging table ');
2003:
2004:
2005:
2006: EXCEPTION

Line 2009: MSC_UTIL.LOG_MSG(MSC_UTIL.G_D_STATUS,SQLERRM);

2005:
2006: EXCEPTION
2007: WHEN OTHERS THEN
2008: IF SQLCODE IN (-01578,-26040) THEN
2009: MSC_UTIL.LOG_MSG(MSC_UTIL.G_D_STATUS,SQLERRM);
2010: MSC_UTIL.LOG_MSG(MSC_UTIL.G_D_STATUS,'To rectify this problem -');
2011: MSC_UTIL.LOG_MSG(MSC_UTIL.G_D_STATUS,'Run concurrent program "Truncate Planning Staging Tables" ');
2012: END IF;
2013: RAISE;

Line 2010: MSC_UTIL.LOG_MSG(MSC_UTIL.G_D_STATUS,'To rectify this problem -');

2006: EXCEPTION
2007: WHEN OTHERS THEN
2008: IF SQLCODE IN (-01578,-26040) THEN
2009: MSC_UTIL.LOG_MSG(MSC_UTIL.G_D_STATUS,SQLERRM);
2010: MSC_UTIL.LOG_MSG(MSC_UTIL.G_D_STATUS,'To rectify this problem -');
2011: MSC_UTIL.LOG_MSG(MSC_UTIL.G_D_STATUS,'Run concurrent program "Truncate Planning Staging Tables" ');
2012: END IF;
2013: RAISE;
2014: END PURGE_STAGING_TABLES_SUB;

Line 2011: MSC_UTIL.LOG_MSG(MSC_UTIL.G_D_STATUS,'Run concurrent program "Truncate Planning Staging Tables" ');

2007: WHEN OTHERS THEN
2008: IF SQLCODE IN (-01578,-26040) THEN
2009: MSC_UTIL.LOG_MSG(MSC_UTIL.G_D_STATUS,SQLERRM);
2010: MSC_UTIL.LOG_MSG(MSC_UTIL.G_D_STATUS,'To rectify this problem -');
2011: MSC_UTIL.LOG_MSG(MSC_UTIL.G_D_STATUS,'Run concurrent program "Truncate Planning Staging Tables" ');
2012: END IF;
2013: RAISE;
2014: END PURGE_STAGING_TABLES_SUB;
2015: PROCEDURE TRUNCATE_STAGING_TABLES(ERRBUF OUT NOCOPY VARCHAR2,

Line 2024: MSC_UTIL.LOG_MSG(MSC_UTIL.G_D_STATUS,SQLERRM);

2020: p_Blind_Purge => SYS_YES);
2021: EXCEPTION
2022: WHEN OTHERS THEN
2023: RETCODE := G_ERROR;
2024: MSC_UTIL.LOG_MSG(MSC_UTIL.G_D_STATUS,SQLERRM);
2025: RAISE;
2026: END TRUNCATE_STAGING_TABLES;
2027: END msc_cl_purge_staging ;