Archives

You are currently viewing archive for June 2009
Category: Oracle
Posted by: hajime osako
Scheduler Reference

SELECT JOB_NAME, STATUS, ERROR#
FROM DBA_SCHEDULER_JOB_RUN_DETAILS WHERE JOB_NAME = 'MY_JOB1';
Category: Oracle
Posted by: hajime osako
Category: Oracle
Posted by: hajime osako
データベース統計情報 - オラクル・Oracleをマスターするための基本と仕組み

SET SERVEROUTPUT ON SIZE 1000000
DECLARE
vMsg VARCHAR(250);
vList DBMS_STATS.OBJECTTAB;
BEGIN
DBMS_STATS.GATHER_DATABASE_STATS(
OPTIONS => 'LIST EMPTY'
,OBJLIST => vList
);
FOR i IN 1..vList.COUNT LOOP
vMsg := vList(i).OWNNAME;
vMsg := vMsg || ',' || vList(i).OBJTYPE;
vMsg := vMsg || ',' || vList(i).OBJNAME;
vMsg := vMsg || ',' || vList(i).PARTNAME;
vMsg := vMsg || ',' || vList(i).SUBPARTNAME;
-- vMsg := vMsg || ',' || vList(i).CONFIDENCE;
-- (パッケージ定義に未使用項目とある)
DBMS_OUTPUT.PUT_LINE(vMsg);
END LOOP;
END;
/