>>최성준 님께서 쓰시길<<
::
:: >>신성욱 님께서 쓰시길<<
::
:: :: trigger 내용
:: ::
:: :: create or replace trigger bookinfo_print_after_insert
:: :: after insert on dupbook
:: :: for each row
:: ::
:: :: begin
:: :: bookpackage.full_info;
:: :: insert into kkk(bookid, bookname, bookmaker)
:: :: values(':new.bookid',':new.bookname',':new.bookmaker');
:: ::
:: :: dbms_output.put_line('Insert completed !!');
:: :: end;
:: :: /
:: ::
:: ::
:: :: SQL> l
:: :: 1 insert into dupbook (bookid, bookname, bookmaker)
:: :: 2* values(43,'aaa','bbb')
:: :: SQL> /
:: :: insert into dupbook (bookid, bookname, bookmaker)
:: :: *
:: :: ERROR at line 1:
:: :: ORA-20000: ORU-10027: buffer overflow, limit of 20000 bytes
:: :: ORA-06512: at "SYS.DBMS_OUTPUT", line 106
:: :: ORA-06512: at "SYS.DBMS_OUTPUT", line 65
:: :: ORA-06512: at "TOOMANY.BOOKPACKAGE", line 27
:: :: ORA-06512: at "TOOMANY.BOOKINFO_PRINT_AFTER_INSERT", line 2
:: :: ORA-04088: error during execution of trigger
:: :: 'TOOMANY.BOOKINFO_PRINT_AFTER_INSERT'
:: ::
:: :: 이 트리거를 drop 시키고 인서트 문을 실행하면 정상적으로 동작합니다.
:: ORA-20000는 syntax에러
:: insert into kkk(bookid, bookname, bookmaker)
:: values(':new.bookid',':new.bookname',':new.bookmaker'); <--
:: 변경
:: values(:new.bookid,:new.bookname,:new.bookmaker);
그리고 또하나 말하자면 트리거에 dbms_output 을 사용해도 되나요?
( 저는 아직 본 적이 없어서리... )
이 DBMS_OUPUT 패키지의 버퍼에 너무 많은 데이타가 들어가려고
하다가 buffer overflow, limit of 20000 bytes 에러가 발생한 것
같네요.
|