CREATE OR REPLACE PROCEDURE SYSTEM.Analyze_Schema(owner_name varchar2,inc_idx_flag boolean) IS
--tmpVar NUMBER;
CREATE OR REPLACE PROCEDURE SYSTEM.Analyze_Schema(owner_name varchar2,inc_idx_flag boolean) IS
--tmpVar NUMBER;
/******************************************************************************
NAME: Analyze_Schema
PURPOSE: Analyze schema,If inc_idx_flag is true,then analyze all tables
& indexes of the owner,else analyze all tables only.
Automatically available Auto Replace Keywords:
Object Name: Analyze_Schema
Sysdate: 2005/3/16
Date and Time: 2005/3/16, 下午 03:24:29, and 2005/3/16 下午 03:24:29
Username: (set in TOAD Options, Procedure Editor)
Table Name: (set in the "New PL/SQL Object" dialog)
******************************************************************************/
BEGIN
-- tmpVar := 0;
DBMS_STATS.delete_schema_stats(ownname=>owner_name);
DBMS_STATS.gather_schema_stats(ownname=>owner_name,cascade=>inc_idx_flag);
-- EXCEPTION
-- WHEN OTHERS THEN
-- -- Consider logging the error and then re-raise
-- RAISE;
END Analyze_Schema;
/
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7567263/viewspace-976959/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/7567263/viewspace-976959/