아래와 같은 프로시저를 실행하면 오류메시지가 뜹니다. 오렌지나 토드를 사용했습니다.
고수님들 도움 부탁드립니다.
=========================================================
DECLARE
CURSOR c1 IS
SELECT ROWID FROM BASE.CATTLE
WHERE BASE_YMD <= '20150630'
and ROWNUM <=150000; -- 데이터 삭제 조건 지정
nCNT number := 0;
sMSG varchar2(100) := ' ';
BEGIN
BEGIN
FOR cur_rec IN c1 LOOP
delete from BASE.CATTLE
where rowid = cur_rec.rowid;
nCNT := nCNT + 1;
-- 중간 commit 수행
if mod(nCNT, 50000) =0 then
sMSG := ' '||to_char(sysdate,'MM-DD HH24:MI:SS')||to_char(nCNT,'999,999,990')
||' Row Deleted';
sys.dbms_system.ksdwrt(2, sMSG);
commit;
end if;
END LOOP;
EXCEPTION
WHEN OTHERS THEN
sMSG := ' '||to_char(sysdate,'YYYY-MM-DD HH24:MI:SS')||to_char(nCNT,'999,999,990')
||' Row Deleted';
sys.dbms_system.ksdwrt(2, sMSG);
DBMS_OUTPUT.PUT_LINE(sMSG );
sMSG := ' '||to_char(sysdate,'YYYY-MM-DD HH24:MI:SS')||'-'||SQLERRM;
sys.dbms_system.ksdwrt(2, sMSG);
DBMS_OUTPUT.PUT_LINE(sMSG );
END;
COMMIT;
DBMS_OUTPUT.PUT_LINE('Delete Cnt = ' || nCNT);
END;
==========================================================
오류메시지
Error at line 1
ORA-06550: line 19, column 16:
PLS-00201: identifier 'SYS.DBMS_SYSTEM' must be declared
ORA-06550: line 19, column 16:
PL/SQL: Statement ignored
ORA-06550: line 28, column 11:
PLS-00201: identifier 'SYS.DBMS_SYSTEM' must be declared
ORA-06550: line 28, column 11:
PL/SQL: Statement ignored
ORA-06550: line 31, column 11:
PLS-00201: identifier 'SYS.DBMS_SYSTEM' must be declared
ORA-06550: line 31, column 11:
PL/SQL: Statement ignored