DBA Data[Home] [Help]

APPS.FND_STATS dependencies on DBMS_OUTPUT

Line 133: dbms_output.put_line(tmp_str);

129: ||names(i)
130: ||' NOMONITORING';
131: END IF;
132: EXECUTE IMMEDIATE tmp_str;
133: dbms_output.put_line(tmp_str);
134: END LOOP;
135: END IF; -- if schemaname ='ALL'
136: elsif ((db_versn > 90 ) AND
137: (

Line 229: -- dbms_output.put_line('Request_id is '||request_id);

225: INTO request_id_l
226: FROM dual;
227:
228: END IF;
229: -- dbms_output.put_line('Request_id is '||request_id);
230: -- dbms_output.put_line('Effective Request_id is '||request_id_l);
231: -- l_message := 'Request_id is '||cur_request_id|| 'Effective Request_id is '||request_id_l;
232: -- FND_FILE.put_line(FND_FILE.log,l_message);
233: RETURN request_id_l;

Line 230: -- dbms_output.put_line('Effective Request_id is '||request_id_l);

226: FROM dual;
227:
228: END IF;
229: -- dbms_output.put_line('Request_id is '||request_id);
230: -- dbms_output.put_line('Effective Request_id is '||request_id_l);
231: -- l_message := 'Request_id is '||cur_request_id|| 'Effective Request_id is '||request_id_l;
232: -- FND_FILE.put_line(FND_FILE.log,l_message);
233: RETURN request_id_l;
234: END;

Line 586: dbms_output.put_line(SUBSTR(p_str,1,250));

582: /************************************************************************/
583: PROCEDURE dlog(p_str IN VARCHAR2)
584: IS
585: BEGIN
586: dbms_output.put_line(SUBSTR(p_str,1,250));
587: FND_FILE.put_line(FND_FILE.log,p_str);
588: END dlog;
589: /************************************************************************/
590: /* Procedure: GATHER_TABLE_STATS_PVT */

Line 1440: dbms_output.put_line('stats on table '

1436: END LOOP;
1437: /* end of individual tables */
1438: FOR rec_cur IN lock_stats_tab(upper(schemaname)) -- added by saleem to display warning for tables with locked stats
1439: LOOP
1440: dbms_output.put_line('stats on table '
1441: || rec_cur.table_name
1442: || 'is locked ');
1443: dlog('stats on table '
1444: || rec_cur.table_name

Line 1571: dbms_output.put_line('stats on table '

1567: END LOOP;
1568: /* end of individual tables */
1569: FOR rec_cur IN lock_stats_tab(upper(schemaname)) -- added by saleem to display warning for tables with locked stats
1570: LOOP
1571: dbms_output.put_line('stats on table '
1572: || rec_cur.table_name
1573: || 'is locked ');
1574: dlog('stats on table '
1575: || rec_cur.table_name

Line 1673: dbms_output.put_line('stats on table '

1669: END IF;
1670: END LOOP;
1671: FOR rec_cur IN lock_stats_tab(upper(schemaname)) -- added by saleem to display warning for tables with locked stats
1672: LOOP
1673: dbms_output.put_line('stats on table '
1674: || rec_cur.table_name
1675: || ' is locked ');
1676: dlog('stats on table '
1677: || rec_cur.table_name

Line 1695: --dbms_output.put_line('start of schema = '|| c_schema.sname);

1691: ELSE
1692: /* This is for ALL schema */
1693: FOR c_schema IN schema_cur
1694: LOOP
1695: --dbms_output.put_line('start of schema = '|| c_schema.sname);
1696: -- make a recursive call to gather_schema_stats
1697: -- changes done for bug 11835452
1698: GATHER_SCHEMA_STATS_SQLPLUS(schemaname=>c_schema.sname , estimate_percent=>NVL(estimate_percent,def_estimate_pcnt) ,
1699: degree=>degree , internal_flag=>internal_flag , Errors=> Errors , request_id=>request_id , hmode=>stathist ,

Line 1703: dbms_output.put_line('stats on table ' || rec_cur.table_name || 'is locked ');

1699: degree=>degree , internal_flag=>internal_flag , Errors=> Errors , request_id=>request_id , hmode=>stathist ,
1700: OPTIONS=>OPTIONS , modpercent=>modpercent , invalidate=> invalidate );
1701: /* for rec_cur in lock_stats_tab -- added by saleem
1702: loop
1703: dbms_output.put_line('stats on table ' || rec_cur.table_name || 'is locked ');
1704: dlog('stats on table ' || rec_cur.table_name || 'is locked ');
1705: s_message := 'stats on table ' || rec_cur.table_name || ' is locked ' ;
1706: fnd_file.put_line(FND_FILE.log,s_message);
1707: end loop; */

Line 2323: dbms_output.put_line('stats on table '

2319: END LOOP;
2320: /* end of individual tables */
2321: FOR rec_cur IN lock_stats_tab(upper(schemaname)) -- added by saleem to display warning for tables with locked stats
2322: LOOP
2323: dbms_output.put_line('stats on table '
2324: || rec_cur.table_name
2325: || 'is locked ');
2326: dlog('stats on table '
2327: || rec_cur.table_name

Line 2452: dbms_output.put_line('stats on table '

2448: END LOOP;
2449: /* end of individual tables */
2450: FOR rec_cur IN lock_stats_tab(upper(schemaname)) -- added by saleem to display warning for tables with locked stats
2451: LOOP
2452: dbms_output.put_line('stats on table '
2453: || rec_cur.table_name
2454: || ' is locked ');
2455: dlog('stats on table '
2456: || rec_cur.table_name

Line 2532: dbms_output.put_line('stats on table '

2528: END IF;
2529: END LOOP;
2530: FOR rec_cur IN lock_stats_tab(upper(schemaname)) -- added by saleem to display warning for tables with locked stats
2531: LOOP
2532: dbms_output.put_line('stats on table '
2533: || rec_cur.table_name
2534: || ' is locked ');
2535: dlog('stats on table '
2536: || rec_cur.table_name

Line 2553: --dbms_output.put_line('start of schema = '|| c_schema.sname);

2549: ELSE
2550: /* This is for ALL schema */
2551: FOR c_schema IN schema_cur
2552: LOOP
2553: --dbms_output.put_line('start of schema = '|| c_schema.sname);
2554: -- make a recursive call to gather_schema_stats
2555: -- changes done for bug 11835452
2556: GATHER_SCHEMA_STATS(schemaname=>c_schema.sname , estimate_percent=>NVL(estimate_percent,def_estimate_pcnt) , degree=>degree , internal_flag=>internal_flag ,
2557: --Errors=> Errors ,-- commented for error handling

Line 2828: dbms_output.put_line(method);

2824: || c_rec.column_name
2825: ||' SIZE '
2826: || c_rec.hsize ;
2827: END LOOP;
2828: dbms_output.put_line(method);
2829: -- code from this line to next 55lines is for building method_opt for extnstats
2830: $IF DBMS_DB_VERSION.VER_LE_9_2 $THEN
2831: NULL;
2832: $ELSE

Line 2837: dbms_output.put_line('getting into extended stats');

2833: $IF DBMS_DB_VERSION.VER_LE_10_2 $THEN
2834: NULL;
2835: $ELSE
2836: --IF (db_versn >= 110) THEN
2837: dbms_output.put_line('getting into extended stats');
2838: --Build up the method_opt if extended stats cols are present
2839: method := method ;
2840: FOR c_rec IN extenstats_cursor(ownname,tabname,partname)
2841: LOOP

Line 2891: --dbms_output.put_line('SINGLE:'||method||'granularity='||granularity);

2887: method := 'FOR ALL COLUMNS SIZE 1' ;
2888: END IF;
2889: IF (method = 'FOR ALL COLUMNS SIZE 1') THEN
2890: BEGIN
2891: --dbms_output.put_line('SINGLE:'||method||'granularity='||granularity);
2892: -- changes done for bug 11835452
2893: FND_STATS.GATHER_TABLE_STATS_PVT(ownname => ownname, tabname => tabname,
2894: partname => partname, method_opt => method, estimate_percent => NVL(adj_percent,def_estimate_pcnt), degree => degree_parallel,
2895: CASCADE => CASCADE, granularity => granularity, invalidate=> invalidate );

Line 2898: -- dbms_output.put_line('about to raise'||sqlcode||' --- '||sqlerrm);

2894: partname => partname, method_opt => method, estimate_percent => NVL(adj_percent,def_estimate_pcnt), degree => degree_parallel,
2895: CASCADE => CASCADE, granularity => granularity, invalidate=> invalidate );
2896: EXCEPTION
2897: WHEN OTHERS THEN
2898: -- dbms_output.put_line('about to raise'||sqlcode||' --- '||sqlerrm);
2899: -- Error code for external table error is ora-20000 which is the same as the code
2900: -- for exist_insufficient error. Because of that, we have to resort to the following
2901: -- if check on the error message.
2902: IF(SUBSTR(sqlerrm,instr(sqlerrm,',')+2)= 'sampling on external table is not supported') THEN

Line 2910: -- dbms_output.put_line('FOR ALL COLUMNS SIZE 1 '||method);

2906: END IF;
2907: END;
2908: ELSE -- call it with histogram cols.
2909: BEGIN
2910: -- dbms_output.put_line('FOR ALL COLUMNS SIZE 1 '||method);
2911: -- changes done for bug 11835452
2912: FND_STATS.GATHER_TABLE_STATS_PVT(ownname => ownname, tabname => tabname, partname => partname, method_opt => 'FOR ALL COLUMNS SIZE 1 '
2913: ||method, estimate_percent => NVL(adj_percent,def_estimate_pcnt), degree => degree_parallel, CASCADE => CASCADE, granularity => granularity, invalidate=> invalidate );
2914: EXCEPTION

Line 2943: --dbms_output.put_line('SINGLE:'||method||'granularity='||granularity);

2939: -- FND_STATS.GATHER_TABLE_STATS twice, once for histogram
2940: -- and once for just the table stats.
2941: IF (method = 'FOR ALL COLUMNS SIZE 1') THEN
2942: BEGIN
2943: --dbms_output.put_line('SINGLE:'||method||'granularity='||granularity);
2944: -- changes done for bug 11835452
2945: FND_STATS.GATHER_TABLE_STATS_PVT(ownname => ownname, tabname => tabname,
2946: partname => partname, method_opt => method, estimate_percent => NVL(adj_percent,def_estimate_pcnt), degree => degree_parallel,
2947: CASCADE => CASCADE, granularity => granularity, invalidate=> invalidate );

Line 2954: --dbms_output.put_line('DOUBLE 1:'||method||'granularity='||granularity);

2950: raise;
2951: END;
2952: ELSE -- call it twice
2953: BEGIN
2954: --dbms_output.put_line('DOUBLE 1:'||method||'granularity='||granularity);
2955: -- changes done for bug 11835452
2956: FND_STATS.GATHER_TABLE_STATS_PVT(ownname => ownname, tabname => tabname,
2957: partname => partname, method_opt => 'FOR ALL COLUMNS SIZE 1', estimate_percent => NVL(adj_percent,def_estimate_pcnt),
2958: degree => degree_parallel, CASCADE => CASCADE, granularity => granularity, invalidate=> invalidate );

Line 2964: --dbms_output.put_line('DOUBLE 2:'||method||'granularity='||granularity);

2960: WHEN OTHERS THEN
2961: raise;
2962: END;
2963: BEGIN
2964: --dbms_output.put_line('DOUBLE 2:'||method||'granularity='||granularity);
2965: -- changes done for bug 11835452
2966: FND_STATS.GATHER_TABLE_STATS_PVT(ownname => ownname, tabname => tabname,
2967: partname => partname, method_opt => method, estimate_percent => NVL(adj_percent,def_estimate_pcnt), degree => degree_parallel,
2968: CASCADE => FALSE, granularity => granularity, invalidate=> invalidate );

Line 3002: -- dbms_output.put_line('FOR ALL COLUMNS SIZE 1 '||method);

2998: || c_rec.hsize ;
2999: END LOOP;
3000: IF (method = 'FOR ALL COLUMNS SIZE 1') THEN
3001: BEGIN
3002: -- dbms_output.put_line('FOR ALL COLUMNS SIZE 1 '||method);
3003: -- changes done for bug 11835452
3004: FND_STATS.GATHER_TABLE_STATS_PVT(ownname => ownname, tabname => tabname, partname => partname, method_opt => 'FOR ALL COLUMNS SIZE 1 '
3005: ||method, estimate_percent => NVL(adj_percent,def_estimate_pcnt), degree => degree_parallel, CASCADE => CASCADE, granularity => granularity, invalidate=> invalidate );
3006: EXCEPTION

Line 3222: --dbms_output.put_line('appl_id = '||t_rec.application_id||',table='||t_rec.table_name);

3218: -- get the tables for the given schema
3219: FOR t_rec IN tab_cursor(ownname)
3220: LOOP
3221: -- Insert/update the fnd_stats_hist table
3222: --dbms_output.put_line('appl_id = '||t_rec.application_id||',table='||t_rec.table_name);
3223: IF(upper(stathist) <> 'NONE') THEN
3224: BEGIN
3225: FND_STATS.UPDATE_HIST(schemaname=>ownname, objectname=>ownname, objecttype=>'HIST', partname=>NULL, columntablename=>NULL, degree=>degree_parallel, upd_ins_flag=>'S' );
3226: END;

Line 3243: --dbms_output.put_line(' method = '|| method);

3239: ||' SIZE '
3240: || c_rec.hsize;
3241: END LOOP ;
3242: /* c_rec */
3243: --dbms_output.put_line(' method = '|| method);
3244: BEGIN
3245: -- changes done for bug 11835452
3246: FND_STATS.GATHER_TABLE_STATS_PVT ( ownname => ownname, tabname => t_rec.table_name, estimate_percent => NVL(percent,def_estimate_pcnt),
3247: method_opt => method, degree => degree_parallel, CASCADE => FALSE, invalidate => invalidate );

Line 3265: --dbms_output.put_line('start of schema = '|| s_rec.sname);

3261: ELSE
3262: /* ownname = 'ALL' */
3263: FOR s_rec IN schema_cur
3264: LOOP
3265: --dbms_output.put_line('start of schema = '|| s_rec.sname);
3266: -- get the tables for the given schema
3267: FOR t_rec IN tab_cursor(s_rec.sname)
3268: LOOP
3269: -- Insert/update the fnd_stat_hist table

Line 3270: --dbms_output.put_line('appl_id = '||t_rec.application_id||',table='||t_rec.table_name);

3266: -- get the tables for the given schema
3267: FOR t_rec IN tab_cursor(s_rec.sname)
3268: LOOP
3269: -- Insert/update the fnd_stat_hist table
3270: --dbms_output.put_line('appl_id = '||t_rec.application_id||',table='||t_rec.table_name);
3271: IF(upper(stathist) <> 'NONE') THEN
3272: BEGIN
3273: FND_STATS.UPDATE_HIST(schemaname=>s_rec.sname, objectname=>s_rec.sname, objecttype=>'HIST', partname=>NULL, columntablename=>NULL, degree=>degree_parallel, upd_ins_flag=>'S' );
3274: END;

Line 3291: --dbms_output.put_line(' method = '|| method);

3287: ||' SIZE '
3288: || c_rec.hsize;
3289: END LOOP ;
3290: /* c_rec */
3291: --dbms_output.put_line(' method = '|| method);
3292: BEGIN
3293: -- changes done for bug 11835452
3294: FND_STATS.GATHER_TABLE_STATS_PVT ( ownname => s_rec.sname,
3295: tabname => t_rec.table_name, estimate_percent => NVL(percent,def_estimate_pcnt), method_opt => method,

Line 3917: dbms_output.put_line('Table-Name Column-Name Histogram Tot-Count Max-Count');

3913: mytablelist := REPLACE(tablelist,' ','');
3914: IF (percent < 0 OR percent > 100) THEN
3915: raise_application_error(-20001,'percent must be between 0 and 100');
3916: END IF;
3917: dbms_output.put_line('Table-Name Column-Name Histogram Tot-Count Max-Count');
3918: dbms_output.put_line('==========================================================================================================');
3919: WHILE (instr(mytablelist,',') > 0)
3920: LOOP
3921: Table_List(table_counter) := SUBSTR(mytablelist,1,instr(mytablelist,',') - 1) ;

Line 3918: dbms_output.put_line('==========================================================================================================');

3914: IF (percent < 0 OR percent > 100) THEN
3915: raise_application_error(-20001,'percent must be between 0 and 100');
3916: END IF;
3917: dbms_output.put_line('Table-Name Column-Name Histogram Tot-Count Max-Count');
3918: dbms_output.put_line('==========================================================================================================');
3919: WHILE (instr(mytablelist,',') > 0)
3920: LOOP
3921: Table_List(table_counter) := SUBSTR(mytablelist,1,instr(mytablelist,',') - 1) ;
3922: Table_List(table_counter+1) := NULL;

Line 3973: dbms_output.put_line(rpad(upper(abs_tablename),40,' ')

3969: END;
3970: abs_tablename := c_rec.own
3971: ||'.'
3972: ||c_rec.tab;
3973: dbms_output.put_line(rpad(upper(abs_tablename),40,' ')
3974: ||rpad(c_rec.col,30,' ')
3975: || rpad(hist,10,' ')
3976: ||lpad(TO_CHAR(total_cnt),9,' ')
3977: ||lpad(TO_CHAR(max_cnt),9,' '));

Line 4322: dbms_output.put_line('===================================================================================================');

4318: FROM dba_tables
4319: WHERE table_name = tableName
4320: AND owner = schema;
4321:
4322: dbms_output.put_line('===================================================================================================');
4323: dbms_output.put_line(' Table '
4324: || tableName);
4325: dbms_output.put_line('===================================================================================================');
4326: dbms_output.put_line(rpad('last analyzed', 18, ' ')

Line 4323: dbms_output.put_line(' Table '

4319: WHERE table_name = tableName
4320: AND owner = schema;
4321:
4322: dbms_output.put_line('===================================================================================================');
4323: dbms_output.put_line(' Table '
4324: || tableName);
4325: dbms_output.put_line('===================================================================================================');
4326: dbms_output.put_line(rpad('last analyzed', 18, ' ')
4327: || rpad('sample_size', 12, ' ')

Line 4325: dbms_output.put_line('===================================================================================================');

4321:
4322: dbms_output.put_line('===================================================================================================');
4323: dbms_output.put_line(' Table '
4324: || tableName);
4325: dbms_output.put_line('===================================================================================================');
4326: dbms_output.put_line(rpad('last analyzed', 18, ' ')
4327: || rpad('sample_size', 12, ' ')
4328: ||rpad('num_rows', 20, ' ')
4329: ||rpad('blocks', 10, ' '));

Line 4326: dbms_output.put_line(rpad('last analyzed', 18, ' ')

4322: dbms_output.put_line('===================================================================================================');
4323: dbms_output.put_line(' Table '
4324: || tableName);
4325: dbms_output.put_line('===================================================================================================');
4326: dbms_output.put_line(rpad('last analyzed', 18, ' ')
4327: || rpad('sample_size', 12, ' ')
4328: ||rpad('num_rows', 20, ' ')
4329: ||rpad('blocks', 10, ' '));
4330: dbms_output.put_line(rpad(TO_CHAR(last_analyzed, 'MM-DD-YYYY hh24:mi'), 18, ' ')

Line 4330: dbms_output.put_line(rpad(TO_CHAR(last_analyzed, 'MM-DD-YYYY hh24:mi'), 18, ' ')

4326: dbms_output.put_line(rpad('last analyzed', 18, ' ')
4327: || rpad('sample_size', 12, ' ')
4328: ||rpad('num_rows', 20, ' ')
4329: ||rpad('blocks', 10, ' '));
4330: dbms_output.put_line(rpad(TO_CHAR(last_analyzed, 'MM-DD-YYYY hh24:mi'), 18, ' ')
4331: || rpad(sample_size, 12, ' ')
4332: || rpad(num_rows, 20, ' ')
4333: ||blocks);
4334: dbms_output.put_line(' ');

Line 4334: dbms_output.put_line(' ');

4330: dbms_output.put_line(rpad(TO_CHAR(last_analyzed, 'MM-DD-YYYY hh24:mi'), 18, ' ')
4331: || rpad(sample_size, 12, ' ')
4332: || rpad(num_rows, 20, ' ')
4333: ||blocks);
4334: dbms_output.put_line(' ');
4335: EXCEPTION
4336: WHEN no_data_found THEN
4337: dbms_output.put_line('=================================================================================================');
4338: dbms_output.put_line('Table not found; Owner: '

Line 4337: dbms_output.put_line('=================================================================================================');

4333: ||blocks);
4334: dbms_output.put_line(' ');
4335: EXCEPTION
4336: WHEN no_data_found THEN
4337: dbms_output.put_line('=================================================================================================');
4338: dbms_output.put_line('Table not found; Owner: '
4339: || schema
4340: ||', name: '
4341: || tableName);

Line 4338: dbms_output.put_line('Table not found; Owner: '

4334: dbms_output.put_line(' ');
4335: EXCEPTION
4336: WHEN no_data_found THEN
4337: dbms_output.put_line('=================================================================================================');
4338: dbms_output.put_line('Table not found; Owner: '
4339: || schema
4340: ||', name: '
4341: || tableName);
4342: dbms_output.put_line('=================================================================================================');

Line 4342: dbms_output.put_line('=================================================================================================');

4338: dbms_output.put_line('Table not found; Owner: '
4339: || schema
4340: ||', name: '
4341: || tableName);
4342: dbms_output.put_line('=================================================================================================');
4343: END table_stats;
4344: /************************************************************************/
4345: /* Procedure: index_stats */
4346: /* Desciption: Internal procedures used by verify_stats. Gets info about*/

Line 4393: dbms_output.put_line(val1

4389: val3:= rpad(distinct_keys, 9, ' ')
4390: || rpad(avg_leaf_blocks_per_key, 8, ' ');
4391: val4:= rpad(avg_data_blocks_per_key, 8, ' ')
4392: || rpad(clustering_factor, 9, ' ');
4393: dbms_output.put_line(val1
4394: || val2
4395: || val3
4396: || val4);
4397: END index_stats;

Line 4406: dbms_output.put_line('----------------------------------------------------------------------------------------------------');

4402: /************************************************************************/
4403: PROCEDURE histo_header
4404: IS
4405: BEGIN
4406: dbms_output.put_line('----------------------------------------------------------------------------------------------------');
4407: dbms_output.put_line(' Histogram Stats');
4408: dbms_output.put_line(rpad('Schema', 15, ' ')
4409: ||rpad('Table Name', 31, ' ')
4410: ||rpad('Status', 12, ' ')

Line 4407: dbms_output.put_line(' Histogram Stats');

4403: PROCEDURE histo_header
4404: IS
4405: BEGIN
4406: dbms_output.put_line('----------------------------------------------------------------------------------------------------');
4407: dbms_output.put_line(' Histogram Stats');
4408: dbms_output.put_line(rpad('Schema', 15, ' ')
4409: ||rpad('Table Name', 31, ' ')
4410: ||rpad('Status', 12, ' ')
4411: ||rpad('last analyzed', 18, ' ')

Line 4408: dbms_output.put_line(rpad('Schema', 15, ' ')

4404: IS
4405: BEGIN
4406: dbms_output.put_line('----------------------------------------------------------------------------------------------------');
4407: dbms_output.put_line(' Histogram Stats');
4408: dbms_output.put_line(rpad('Schema', 15, ' ')
4409: ||rpad('Table Name', 31, ' ')
4410: ||rpad('Status', 12, ' ')
4411: ||rpad('last analyzed', 18, ' ')
4412: || 'Column Name');

Line 4413: dbms_output.put_line('----------------------------------------------------------------------------------------------------');

4409: ||rpad('Table Name', 31, ' ')
4410: ||rpad('Status', 12, ' ')
4411: ||rpad('last analyzed', 18, ' ')
4412: || 'Column Name');
4413: dbms_output.put_line('----------------------------------------------------------------------------------------------------');
4414: END;
4415: /************************************************************************/
4416: /* Procedure: index_header */
4417: /* Desciption: Internal procedures used by verify_stats. Prints header */

Line 4435: dbms_output.put_line(val1

4431: val3 := rpad('DK', 9, ' ')
4432: || rpad('LB/key', 8, ' ');
4433: val4 := rpad('DB/key', 8, ' ')
4434: ||rpad('CF', 9, ' ');
4435: dbms_output.put_line(val1
4436: || val2
4437: || val3
4438: || val4);
4439: dbms_output.put_line('----------------------------------------------------------------------------------------------------');

Line 4439: dbms_output.put_line('----------------------------------------------------------------------------------------------------');

4435: dbms_output.put_line(val1
4436: || val2
4437: || val3
4438: || val4);
4439: dbms_output.put_line('----------------------------------------------------------------------------------------------------');
4440: END;
4441: /************************************************************************/
4442: /* Procedure: histo_stats */
4443: /* Desciption: Internal procedures used by verify_stats. Gets info about*/

Line 4476: dbms_output.put_line(rpad(schema, 15, ' ')

4472: last_analyzed := each_histo.last_analyzed;
4473: status := 'present';
4474: EXIT;
4475: END LOOP;
4476: dbms_output.put_line(rpad(schema, 15, ' ')
4477: || rpad(tableName, 31, ' ')
4478: || rpad(status, 12, ' ')
4479: || rpad(TO_CHAR(last_analyzed, 'DD-MM-YYYY hh24:mi'), 18, ' ')
4480: || columnName);

Line 4483: dbms_output.put_line('=================================================================================================');

4479: || rpad(TO_CHAR(last_analyzed, 'DD-MM-YYYY hh24:mi'), 18, ' ')
4480: || columnName);
4481: EXCEPTION
4482: WHEN no_data_found THEN
4483: dbms_output.put_line('=================================================================================================');
4484: dbms_output.put_line('Histogram not found; Owner: '
4485: || schema
4486: ||', name: '
4487: || tableName

Line 4484: dbms_output.put_line('Histogram not found; Owner: '

4480: || columnName);
4481: EXCEPTION
4482: WHEN no_data_found THEN
4483: dbms_output.put_line('=================================================================================================');
4484: dbms_output.put_line('Histogram not found; Owner: '
4485: || schema
4486: ||', name: '
4487: || tableName
4488: || ', column name: '

Line 4490: dbms_output.put_line('=================================================================================================');

4486: ||', name: '
4487: || tableName
4488: || ', column name: '
4489: || columnName);
4490: dbms_output.put_line('=================================================================================================');
4491: END histo_stats;
4492: /************************************************************************/
4493: /* Procedure: file_tail */
4494: /* Desciption: Internal procedures used by verify_stats. Prints legend */

Line 4500: dbms_output.put_line(' ');

4496: /************************************************************************/
4497: PROCEDURE file_tail
4498: IS
4499: BEGIN
4500: dbms_output.put_line(' ');
4501: dbms_output.put_line(' ');
4502: dbms_output.put_line('Legend:');
4503: dbms_output.put_line('LB : Leaf Blocks');
4504: dbms_output.put_line('DK : Distinct Keys');

Line 4501: dbms_output.put_line(' ');

4497: PROCEDURE file_tail
4498: IS
4499: BEGIN
4500: dbms_output.put_line(' ');
4501: dbms_output.put_line(' ');
4502: dbms_output.put_line('Legend:');
4503: dbms_output.put_line('LB : Leaf Blocks');
4504: dbms_output.put_line('DK : Distinct Keys');
4505: dbms_output.put_line('DB : Data Blocks');

Line 4502: dbms_output.put_line('Legend:');

4498: IS
4499: BEGIN
4500: dbms_output.put_line(' ');
4501: dbms_output.put_line(' ');
4502: dbms_output.put_line('Legend:');
4503: dbms_output.put_line('LB : Leaf Blocks');
4504: dbms_output.put_line('DK : Distinct Keys');
4505: dbms_output.put_line('DB : Data Blocks');
4506: dbms_output.put_line('CF : Clustering Factor');

Line 4503: dbms_output.put_line('LB : Leaf Blocks');

4499: BEGIN
4500: dbms_output.put_line(' ');
4501: dbms_output.put_line(' ');
4502: dbms_output.put_line('Legend:');
4503: dbms_output.put_line('LB : Leaf Blocks');
4504: dbms_output.put_line('DK : Distinct Keys');
4505: dbms_output.put_line('DB : Data Blocks');
4506: dbms_output.put_line('CF : Clustering Factor');
4507: END;

Line 4504: dbms_output.put_line('DK : Distinct Keys');

4500: dbms_output.put_line(' ');
4501: dbms_output.put_line(' ');
4502: dbms_output.put_line('Legend:');
4503: dbms_output.put_line('LB : Leaf Blocks');
4504: dbms_output.put_line('DK : Distinct Keys');
4505: dbms_output.put_line('DB : Data Blocks');
4506: dbms_output.put_line('CF : Clustering Factor');
4507: END;
4508: /************************************************************************/

Line 4505: dbms_output.put_line('DB : Data Blocks');

4501: dbms_output.put_line(' ');
4502: dbms_output.put_line('Legend:');
4503: dbms_output.put_line('LB : Leaf Blocks');
4504: dbms_output.put_line('DK : Distinct Keys');
4505: dbms_output.put_line('DB : Data Blocks');
4506: dbms_output.put_line('CF : Clustering Factor');
4507: END;
4508: /************************************************************************/
4509: /* Procedure: column_stats */

Line 4506: dbms_output.put_line('CF : Clustering Factor');

4502: dbms_output.put_line('Legend:');
4503: dbms_output.put_line('LB : Leaf Blocks');
4504: dbms_output.put_line('DK : Distinct Keys');
4505: dbms_output.put_line('DB : Data Blocks');
4506: dbms_output.put_line('CF : Clustering Factor');
4507: END;
4508: /************************************************************************/
4509: /* Procedure: column_stats */
4510: /* Desciption: Internal procedures used by verify_stats. Gets info about*/

Line 4526: dbms_output.put_line('----------------------------------------------------------------------------------------------------');

4522: val2 VARCHAR2(255);
4523: val3 VARCHAR2(255);
4524: BEGIN
4525: IF (first_col = true) THEN
4526: dbms_output.put_line('----------------------------------------------------------------------------------------------------');
4527: dbms_output.put_line(' Column Stats');
4528: val1 := rpad('Column name', 31, ' ')
4529: || rpad('sample_size', 12, ' ');
4530: val2 := rpad('num_distinct', 14, ' ')

Line 4527: dbms_output.put_line(' Column Stats');

4523: val3 VARCHAR2(255);
4524: BEGIN
4525: IF (first_col = true) THEN
4526: dbms_output.put_line('----------------------------------------------------------------------------------------------------');
4527: dbms_output.put_line(' Column Stats');
4528: val1 := rpad('Column name', 31, ' ')
4529: || rpad('sample_size', 12, ' ');
4530: val2 := rpad('num_distinct', 14, ' ')
4531: || rpad('num_nulls', 14, ' ');

Line 4534: dbms_output.put_line(val1

4530: val2 := rpad('num_distinct', 14, ' ')
4531: || rpad('num_nulls', 14, ' ');
4532: val3 := rpad('density', 12, ' ')
4533: || rpad('last analyzed', 18, ' ');
4534: dbms_output.put_line(val1
4535: ||val2
4536: ||val3);
4537: dbms_output.put_line('----------------------------------------------------------------------------------------------------');
4538: END IF;

Line 4537: dbms_output.put_line('----------------------------------------------------------------------------------------------------');

4533: || rpad('last analyzed', 18, ' ');
4534: dbms_output.put_line(val1
4535: ||val2
4536: ||val3);
4537: dbms_output.put_line('----------------------------------------------------------------------------------------------------');
4538: END IF;
4539: val1 := rpad(column_name, 31, ' ')
4540: || rpad(sample_size, 12, ' ');
4541: val2 := rpad(num_distinct, 14, ' ')

Line 4545: dbms_output.put_line(val1

4541: val2 := rpad(num_distinct, 14, ' ')
4542: || rpad(TRUNC(num_nulls), 14, ' ');
4543: val3 := rpad(TRUNC(density, 9), 12, ' ')
4544: || rpad(TO_CHAR(last_analyzed, 'MM-DD-YYYY hh24:mi'), 18, ' ');
4545: dbms_output.put_line(val1
4546: || val2
4547: || val3);
4548: END;
4549:

Line 4586: dbms_output.put_line(extntn);

4582: extntn :='(' || upper(colname1) || ',' || upper(colname2) || ',' || upper(colname3) || ',' || upper(colname4) ||')' ;
4583: Else
4584: extntn:='(' || upper(colname1) || ',' || upper(colname2) || ')';
4585: END IF ;
4586: dbms_output.put_line(extntn);
4587: IF upper(action) = 'INSERT' THEN
4588: BEGIN
4589: -- Check for existence of the table first
4590: -- break out if it doesn't exist

Line 4671: DBMS_OUTPUT.PUT_LINE(l_cg_name);

4667: END IF ; */
4668: l_cg_name := DBMS_STATS.create_extended_stats(ownname => owner,
4669: tabname => tabname,
4670: extension => extntn);
4671: DBMS_OUTPUT.PUT_LINE(l_cg_name);
4672: EXCEPTION
4673: WHEN DUP_VAL_ON_INDEX THEN
4674: NULL;
4675: END;

Line 4795: dbms_output.enable(1000000);

4791: first_index BOOLEAN;
4792: first_col BOOLEAN;
4793: verify_stats_exception EXCEPTION;
4794: BEGIN
4795: dbms_output.enable(1000000);
4796: -- read all input params into plsql vars
4797: MySchema := upper(schemaName);
4798: MyTableList := REPLACE(upper(TableList), ' ', '');
4799: -- clean up input data

Line 4816: dbms_output.put_line('MyTableList '

4812: IF operation = 'table' THEN
4813: -- initialize Table_list
4814: WHILE (instr(MyTableList,',') > 0)
4815: LOOP
4816: dbms_output.put_line('MyTableList '
4817: || mytableList);
4818: Table_Name(table_counter) := SUBSTR(mytablelist,1,instr(mytablelist,',') - 1) ;
4819: ownerIndex := instr(Table_Name(table_counter), '.');
4820: IF ownerIndex <> 0 THEN

Line 4896: dbms_output.put_line('verify_stats(schema_name varchar2 default null,

4892: END LOOP;
4893: file_tail();
4894: EXCEPTION
4895: WHEN verify_stats_exception THEN
4896: dbms_output.put_line('verify_stats(schema_name varchar2 default null,
4897: table_list varchar2 default null, days_old number default null,
4898: column_stats boolean defualt false)');
4899: END ;
4900: /* end of verify_stats*/

Line 4919: -- dbms_output.put_line('Database version is '||db_versn);

4915: end if;
4916:
4917: -- Initialize cur_request_id
4918: cur_request_id:=GET_REQUEST_ID;
4919: -- dbms_output.put_line('Database version is '||db_versn);
4920: EXCEPTION
4921: WHEN OTHERS THEN
4922: db_versn:=81; -- Just in case, default it to 8i
4923: END FND_STATS;