10g中的警报日志信息

时间:2014-08-14 12:45:52

标签: oracle10g alert

我需要澄清一下 在数据库,表空间和回滚段上创建,更改和删除SQL语句。 与ALERT LOG。相关。

警报日志是否包含有关表格中“CREATE”或“DROP”的信息? 警报日志是否包含有关“WHO CREATED”或“WHO DROPPPED”表格的信息?

P.S。 Windows 2003操作系统上的数据库版本是10.2.0.4。

1 个答案:

答案 0 :(得分:1)

有两种方式:第一种是审计

SQL> conn / as sysdba
Connected.
SQL> SHOW PARAMETER AUDIT

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
audit_file_dest                      string      C:\ORACLEXE\APP\ORACLE\ADMIN\XE\ADUMP
audit_sys_operations                 boolean     FALSE
audit_trail                          string      NONE
SQL> ALTER SYSTEM SET audit_trail=db SCOPE=SPFILE;

System altered.

SQL> startup force
ORACLE instance started.

Total System Global Area 1068937216 bytes
Fixed Size                  2260048 bytes
Variable Size             616563632 bytes
Database Buffers          444596224 bytes
Redo Buffers                5517312 bytes
Database mounted.
Database opened.

SQL> AUDIT ALL BY hr BY ACCESS;

Audit succeeded.

SQL> conn hr/hr
Connected.
SQL> create table ttt(id number);

Table created.

SQL> drop table ttt;

Table dropped.

SQL> conn / as sysdba
Connected.

SQL> ed
Wrote file afiedt.buf

  1  SELECT username
  2       , extended_timestamp
  3       , owner
  4       , obj_name
  5       , action_name
  6    FROM dba_audit_trail
  7*  order by 2
SQL> /

USERNAME   EXTENDED_TIMESTAMP                  OWNER      OBJ_NAME   ACTION_NAME
---------- ----------------------------------- ---------- ---------- ----------------------------
HR         14.08.14 18:00:35,606000 +04:00                           LOGON
HR         14.08.14 18:00:48,651000 +04:00     HR         TTT        CREATE TABLE
HR         14.08.14 18:00:54,425000 +04:00     HR         TTT        DROP TABLE
HR         14.08.14 18:00:59,311000 +04:00                           LOGOFF

其次是DBMS_LOGMNR包。