SERVERERROR 触发器是一种数据库(database)级别的触发器,在Oracle错误发生后触发,但是不包含以下ORA错误:
ORA-00600 Oracle internal error
ORA-01034 Oracle not available
ORA-01422 Exact fetch returns more than requested number of rows
ORA-01423 Error encountered while checking for extra rows in an exact fetch
ORA-04030 Out-of-process memory when trying to allocate N bytes
作为DBA需要时时监控并及时处理Oracle数据库发生的错误,用SERVERERROR触发器可以快速捕捉到错误,实施过程如下:
1.创建错误日志表
SQL> DESC t_log
Name Type Nullable Default Comments
------ -------------- -------- ---