DECLARE vErrorCode NUMBER; vErrorMsg VARCHAR2(200); vCurrentUser VARCHAR2(8); vInfo VARCHAR2(100) BEGIN /*Some code processes*/ EXCEPTION WHEN OTHERS THEN vErrorCode:= SQLCODE; vErrorMsg := SQLERRM; vCurrentUser := USER; vInfo := 'Error encountered on ' || TO_CHAR(SYSDATE) || ' by database user ' || vCurrentUser; INSERT INTO LOG_TABLE(CODE, MSG, INFO) VALUES(vErrorCode, vErrorMsg, vInfo); END;
Saturday, April 3, 2010
#Oracle error handling
at 12:30 AM
Labels: Oracle, Oracle Query, PL/SQL
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment