Auditing the tables [message #11077] |
Thu, 04 March 2004 23:12 |
sugan
Messages: 7 Registered: March 2004
|
Junior Member |
|
|
Hi,
How do we audit the oracle tables without using triggers..
Thanks,
Sugan
|
|
|
Re: Auditing the tables [message #11078 is a reply to message #11077] |
Fri, 05 March 2004 00:45 |
Frank Naude
Messages: 4587 Registered: April 1998
|
Senior Member |
|
|
You can use Oracle's auditing facility. Look at this example:
SQL> conn / as sysdba
Connected.
SQL> ALTER SYSTEM SET set audit_trail=db SCOPE=spfile;
System altered.
SQL> STARTUP FORCE;
ORACLE instance started.
Total System Global Area 289406976 bytes
Fixed Size 1301536 bytes
Variable Size 262677472 bytes
Database Buffers 25165824 bytes
Redo Buffers 262144 bytes
Database mounted.
Database opened.
SQL> AUDIT TABLE;
Audit succeeded.
SQL> conn scott/tiger
Connected.
SQL> CREATE TABLE tab1 (col1 DATE);
Table created.
SQL> SELECT os_username, username, userhost, terminal, owner, obj_name, action_name
2 FROM user_audit_trail;
OS_USERNAME
--------------------------------------------------------------------------------
USERNAME
------------------------------
USERHOST
--------------------------------------------------------------------------------
TERMINAL
--------------------------------------------------------------------------------
OWNER
------------------------------
OBJ_NAME
--------------------------------------------------------------------------------
ACTION_NAME
----------------------------
oracle
SCOTT
LANfear
pts/14
SCOTT
TAB1
CREATE TABLE
Best regards.
Frank
|
|
|
Re: Auditing the tables [message #11081 is a reply to message #11078] |
Fri, 05 March 2004 01:04 |
sugan
Messages: 7 Registered: March 2004
|
Junior Member |
|
|
Thanks Frank,
But i want to know what is my old value and which field is changed from which value to which value.
In trigger, we can take old values and new values.
Without using triggers how can we find the old values and new values ?
Thanks,
Sugan
|
|
|