DBA Data[Home] [Help]

APPS.MSC_CL_PURGE_STAGING dependencies on MSC_UTIL

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

344: END IF;
345: -- Counting number of instances for which st_status is G_ST_PULLING , G_ST_COLLECTING and G_ST_PRE_PROCESSING
346: 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));
347:
348: MSC_UTIL.LOG_MSG(MSC_UTIL.G_LVL_DEBUG_1,'Value of lv_st_status_flag-'||lv_st_status_flag);
349:
350: END IF;
351:
352: -- Setting the truncation flag

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Line 461: 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);

457: COMMIT;
458:
459: ELSE
460:
461: 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);
462:
463:
464: UPDATE msc_apps_instances
465: SET st_status=lv_st_status

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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