convenient for who views all error msg
[@more@] create table SQLERRTAB
(
SQLNO VARCHAR2(10),
SQLERRTEXT VARCHAR2(4000)
)
DECLARE
err_msg VARCHAR2(1200);
BEGIN
--dbms_output.enable (1000000);
FOR err_num IN 0.. 100000
LOOP
err_msg := SQLERRM (-err_num);
IF err_msg NOT LIKE '%Message '||err_num||' not found%' AND err_msg NOT LIKE '% non-ORACLE exception %' THEN
insert into SQLERRTAB VALUES ('ORA-'||LPAD(ERR_NUM,5,'0'),ERR_MSG);
END IF;
END LOOP;
END;
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/66865/viewspace-905423/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/66865/viewspace-905423/