恰好我这win7上也装了个Oracle 10g(10.2.0.3.0),照着做了一把,发现同样的问题,普通用户的审计记录在dba_audit_trail可以查到,记录sys用户审计信息的audit目录D:ORACLEPRODUCT10.2.0ADMINORCLADUMP却一直为空,什么原因?
答案来自metalink,对于windows系统,对sys用户的审计信息并不存在AUDIT_FILE_DEST参数指定的目录里,而是在windows的事件管理器中。
(Navigation Path: Computer Management -> Event View -> Windows Logs -> Application)
本机audit参数设置(对于windows ,审计sys用户只需要设置audit_sys_operations为true即可;unix还需audit_file_dest):
SQL> show parameter audit
NAME TYPE VALUE
------------------------------------ --------------------------------- ------------------------------
audit_file_dest string D:ORACLEPRODUCT10.2.0ADMINORCLADUMP
audit_sys_operations boolean TRUE
audit_trail string DB
SQL>
metalink解释:
Exception: As 'AUDIT_FILE_DEST' is invalid on Windows, all Oracle audit trail information on Windows is recorded in the Windows event viewer.
Audit SYS User Operations [ID 174340.1]