Home » SQL & PL/SQL » SQL & PL/SQL » Database Trigger
Database Trigger [message #343065] Tue, 26 August 2008 03:09 Go to next message
alammas
Messages: 46
Registered: July 2008
Member
Hi,
In database trigger "after logoff on database" i use the following code for update TblLogActivity

Update TblLogActivity set LogOffDate=to_date(sysdate,'YYYY-MM-DD HH24:MI:SS') where UserID=v_username;

Problem is that:
1-If a user login twice at same time then how i can recognize that which one going to logoff(first or secont for Updating)

2-Date is not showing section(HH24:MI:SS)(Data Type is date)

3-Ora_client_ip_address Return IP Address how i can access Client,s computer name

Thanx in advance
Re: Database Trigger [message #343111 is a reply to message #343065] Tue, 26 August 2008 05:41 Go to previous messageGo to next message
Michel Cadot
Messages: 64111
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
1. Use another identifier for instance "session id, serial#" or auditing session id (does not work for SYS)
2. SYSDATE is a date, to_date in a date is silly
3. machine or terminal in v$session or host in userenv context

Regards
Michel
Re: Database Trigger [message #343127 is a reply to message #343111] Tue, 26 August 2008 06:24 Go to previous messageGo to next message
Olivia
Messages: 519
Registered: June 2008
Senior Member

Please find the link below. May be helpful for you!

http://www.orafaq.com/forum/m/340773/125380/#msg_340773
http://www.dba-oracle.com/art_builder_sec_audit.htm


Regards,
Oli
Re: Database Trigger [message #343320 is a reply to message #343065] Tue, 26 August 2008 23:22 Go to previous message
alammas
Messages: 46
Registered: July 2008
Member
Thanx Both of you! Razz
Previous Topic: Error in case function?
Next Topic: address format
Goto Forum:
  


Current Time: Mon Dec 05 14:44:37 CST 2016

Total time taken to generate the page: 0.13002 seconds