dba_errorlog_trg.sql

来自「Java写的ERP系统」· SQL 代码 · 共 37 行

SQL
37
字号
/*ORACLE>*/
CREATE OR REPLACE TRIGGER Compiere.DBA_ErrorLog_Trg
AFTER ServerError 
	ON DATABASE
/*************************************************************************
 * The contents of this file are subject to the Compiere License.  You may
 * obtain a copy of the License at    http://www.compiere.org/license.html 
 * Software is on an  "AS IS" basis,  WITHOUT WARRANTY OF ANY KIND, either 
 * express or implied. See the License for details. Code: Compiere ERP+CPM
 * Copyright (C) 1999-2001 Jorg Janke, ComPiere, Inc. All Rights Reserved.
 *************************************************************************
 * $Id: DBA_ErrorLog_Trg.sql,v 1.4 2002/10/21 04:49:47 jjanke Exp $
 ***
 * Title:	Server Error Info
 * Description:
 *			Hardcoded schema (only once in the system)
 ************************************************************************/
DECLARE
	v_Code		NUMBER(10);
	v_Msg		VARCHAR2(2000);
	v_Info		DBA_ErrorLog.Info%TYPE;
BEGIN
	v_Code := ora_server_error(1);	--	top
	v_Msg := SQLErrM (- v_Code);
	v_Info := ora_sysevent || ' ' || ora_dict_obj_name;
	--
	INSERT INTO DBA_ErrorLog (DBA_ErrorLog_ID, Created, Code, Msg, Info)
	VALUES	(DBA_ErrorLog_Seq.NextVal, SysDate, v_CODE, v_Msg, v_Info);
	COMMIT;
END DBA_ErrorLog_Trg;
/*<ORACLE*/
/
/*ORACLE>*/
ALTER TRIGGER Compiere.DBA_ErrorLog_Trg DISABLE
/*<ORACLE*/
/

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?