oracle 数据库中如何获得对所关注用户的操作日志

来源:百度知道 编辑:UC知道 时间:2024/06/18 18:56:48
Oracle10g数据库中有A用户,对库中的关键表有修改删除等权限,请问数据库是否提供用户操作日志对A帐号的所有操作进行记录?
如果提供应该怎么进行设置,请提供相应的命令行或具体设置
非常感谢!

中文打字太慢,所以就用英文回答。

The answer by the first respondent is totally wrong. ARCHIVELOG/NONARCHIVELOG has nothing to do with what you ask for. ARCHIVELOG/NONARCHIVELOG is about the recoverbility of the database, but what you want is "Auditing" in Oracle, which is about monitoring users' activities in database.

The auditing mechanism for Oracle is extremely flexible, so I'll only talk about performing full auditing on a single user.

1. Database server setup

To allow auditing on the server you must:

Set "audit_trail = true" in the init.ora file.
Run the $ORACLE_HOME/rdbms/admin/cataudit.sql script while connected as SYS.

2. Audit Options

Assuming that the "AAA" user is to be audited:

CONNECT sys/password AS SYSDBA

AUDIT ALL BY AAA BY ACCESS;
AUDIT SELECT TABLE, UPDATE TABLE, INSERT TABLE, DELETE TABLE BY AAA BY ACCESS;
AUDIT EXECUTE PROCED