Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Enabling Security and Auditing Options

Status
Not open for further replies.

mscim

MIS
Feb 25, 2003
22
SG
Hi,

Can anyone give me a general overview how I can enable Oracle Server Security and Auditing features. I want to keep a log of

a: Login and logout time of each user of the database

b: Keep a record of each time certain fields in a table is updated, the time and user who updated it.

Thanks in advance.
 
There is a command in SQL called 'audit'. I use 'audit connect' to keep a record of logins, logouts, and failed connect attempts. Be aware that a command like this can cause your SYS.AUD$ table to grow prodigiously.
I have not investigated whether the audit command can track to the field level, but you can use a table trigger to perform this level of capture.

HTH,
Mike
 
There is also a lot of 3rd party audit software that can alleviate the often tedious process of sorting through your audit logs for desired information. I use SecurityExpressions. Sometimes it's worth investing in a timesaver product...
 
As with tracking DML changes to certain column, I have created a trigger to track down the users.

select terminal into v_host
from DBA_AUDIT_SESSION
where sessionid = sys_context('USERENV','SESSIONID');

insert into audit_mytable values
( :eek:ld.name, :eek:ld.job, :eek:ld.salary, :eek:ld.address,
:new.name, :new.job, :eek:ld.salary, :new.address,
sysdate, user, v_host
);
End;

How can I improve this trigger by capturing the user OS login ?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top