Home » RDBMS Server » Server Administration » Information regarding audit trail for changes in tables
|
Re: Information regarding audit trail for changes in tables [message #172498 is a reply to message #171931] |
Tue, 16 May 2006 20:28 |
krystian.zieja
Messages: 12 Registered: May 2006 Location: Poland
|
Junior Member |
|
|
I think you are asking about LogMiner please correct me if I am wrong. Log Minner enables you to read archive redo logs and online redo logs. Below I prepare for you small example (I used the online redo logs but it works the same with archive redo logs.
mob@MOB92.WORLD> create table emp_audit as select * from scott.emp;
Table created.
mob@MOB92.WORLD> update emp_audit set sal = 1.1 * sal where empno=7369;
1 row updated.
mob@MOB92.WORLD> delete emp_audit where ename = 'WARD';
1 row deleted.
sys@MOB92.WORLD> exec dbms_logmnr.add_logfile(logfilename=>'C:\ORACLE\ORADATA\MOB92\REDO01.LOG', options => dbms_logmnr.new)
sys@MOB92.WORLD> exec dbms_logmnr.add_logfile(logfilename=>'C:\ORACLE\ORADATA\MOB92\REDO02.LOG', options=>dbms_logmnr.addfile)
sys@MOB92.WORLD> select timestamp, username, seg_name, sql_redo
2 from v$logmnr_contents
3 where seg_name = 'EMP_AUDIT';
17-MAY-06 MOB
EMP_AUDIT
insert into "MOB"."EMP_AUDIT"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values ('7876','ADAMS','CLERK','7788',TO_DATE('1
2-JAN-83', 'DD-MON-R
R'),'1100',NULL,'20');
17-MAY-06 MOB
EMP_AUDIT
insert into "MOB"."EMP_AUDIT"("EMPNO","ENAME","JOB","MGR","HIREDATE","SAL","COMM","DEPTNO") values ('7900','JAMES','CLERK','7698',TO_DATE('0
3-DEC-81', 'DD-MON-R
R'),'950',NULL,'30');
….
Output truncated
You can also use auditing – your question is not to descriptive
Best Regards
Krystian Zieja / mob
|
|
|
Goto Forum:
Current Time: Sun Jan 26 14:53:02 CST 2025
|