Home » RDBMS Server » Server Administration » Audit Trail specific action
icon4.gif  Audit Trail specific action [message #266202] Mon, 10 September 2007 03:28 Go to next message
altafhk
Messages: 45
Registered: June 2007
Location: Islamabad
Member

I audited insert on a table by access whenever not successful. I received records that are not saved. Fine, but I am getting other records of Action_name = 'Session Rec'. I don't want to note in the Aud$.

Can anyone help me!
Re: Audit Trail specific action [message #266207 is a reply to message #266202] Mon, 10 September 2007 03:49 Go to previous messageGo to next message
Michel Cadot
Messages: 68686
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Read this thread: http://www.dba-village.com/village/dvp_forum.OpenThread?ThreadIdA=25798

Regards
Michel
icon13.gif  Re: Audit Trail specific action [message #266480 is a reply to message #266207] Tue, 11 September 2007 00:21 Go to previous messageGo to next message
altafhk
Messages: 45
Registered: June 2007
Location: Islamabad
Member

I read the thread but did not find the solution. Thank you for the reply.
I do not want audit action 103 session rec. Pl see the query:
COL NAME FORMAT 'A10'
COL VALUE FORMAT 'A12'
COL DISPLAY_VALUE FORMAT 'A12'

select NAME, TYPE, VALUE, DISPLAY_VALUE, ISDEFAULT, ISSES_MODIFIABLE, ISSYS_MODIFIABLE, ISINSTANCE_MODIFIABLE, ISMODIFIED, ISADJUSTED, ISDEPRECATED, DESCRIPTION from v$parameter where NUM=911;

NAME TYPE VALUE DISPLAY_VALU ISDEFAULT ISSES ISSYS_MOD ISINS ISMODIFIED ISADJ ISDEP DESCRIPTION
---------- ---------- ------------ ------------ --------- ----- --------- ----- ---------- ----- ----- ------------------------------------------------------------------------------------------------------------------------------------- --------------------------------------------------------------------------------------------------------------------------
audit_trai 2 DB_EXTENDED DB_EXTENDED FALSE FALSE FALSE FALSE FALSE FALSE FALSE enable system auditing
l

Regards,


Re: Audit Trail specific action [message #266496 is a reply to message #266480] Tue, 11 September 2007 00:46 Go to previous messageGo to next message
Michel Cadot
Messages: 68686
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
The thread says why you have this record and it also says that if you have it you can't avoid it.
Anyway, you can delete it if you want.

Regards
Michel
Re: Audit Trail specific action [message #267479 is a reply to message #266496] Thu, 13 September 2007 07:39 Go to previous messageGo to next message
altafhk
Messages: 45
Registered: June 2007
Location: Islamabad
Member

Sir,
I want audit on inserts only. As there are many problems arisen from application end. It is a PHP Apache application with oracle 10g in back end. There is no proper exception handling.. even during entries 1 record saves 2 times by getting nextval in the primary key attribute and all other fields as present in textboxes..

I got tens of records, that are by page not properly rendered etc..
by querying I provide condition
SELECT OBJ_NAME, TIMESTAMP, SQL_TEXT, TERMINAL
FROM DBA_AUDIT_TRAIL
WHERE ACTION_NAME = 'INSERT';

My other request is to find out the terminal on which the transaction is failed. As there is 1 oracle user and we have security through application end, and client request oracle through conn.php means apache; how can I get terminal.

Thank you for two replies.
Re: Audit Trail specific action [message #267491 is a reply to message #267479] Thu, 13 September 2007 08:39 Go to previous messageGo to next message
Michel Cadot
Messages: 68686
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
You have your application to cooperate and forward you the end client data. For instance, application can set client_id which is automatically recorded in audit trail.

Regards
Michel
Re: Audit Trail specific action [message #267788 is a reply to message #267491] Sat, 15 September 2007 00:36 Go to previous messageGo to next message
altafhk
Messages: 45
Registered: June 2007
Location: Islamabad
Member

This is done, but.. what to do with terminal name ie not recorded.
Regards
Re: Audit Trail specific action [message #267796 is a reply to message #267788] Sat, 15 September 2007 00:59 Go to previous messageGo to next message
Michel Cadot
Messages: 68686
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
You can get it from v$session and put it in the client_id, for instance.
You can also not use Oracle audit and use insert trigger to log what you want in your own log table.

Regards
Michel
icon8.gif  Re: Audit Trail specific action [message #268331 is a reply to message #267796] Tue, 18 September 2007 03:36 Go to previous messageGo to next message
altafhk
Messages: 45
Registered: June 2007
Location: Islamabad
Member

But Michel, v$session does not show client_identifier. The user logs in through web browser (front-end security); I think within one session all clients connect with the application. I cannot understand, whose session to kill if I need.
The terminal info is required because my table notes action, login user, pagevisited, datetime. You said, through database trigger; first performance issue, INSERT for whole application; where to get terminal info, if connected through browser with 1 Oracle user. I think I could not convey the message? sorry
Re: Audit Trail specific action [message #268336 is a reply to message #268331] Tue, 18 September 2007 04:14 Go to previous messageGo to next message
Michel Cadot
Messages: 68686
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
If your client are connected through a web browser then Oracle does not see it and this is your application server that has to get and give to Oracle the information you need.

Regards
Michel
icon14.gif  Re: Audit Trail specific action [message #268629 is a reply to message #268336] Wed, 19 September 2007 03:42 Go to previous message
altafhk
Messages: 45
Registered: June 2007
Location: Islamabad
Member

My problem has been solved and yes through application i.e, in PHP coding I used $user_ip =$_SERVER['REMOTE_ADDR'];
I created a table, now it is like this:

select USER_IP, EMPCODE , USER_LOG_DATE, USER_LOG_TIME, USER_LOG_URL, USER_LOG_TABLE, USER_ACTION, QUERY from user_log;

I appreciate cooperation of Michel and the forum.
Regards
Previous Topic: Drop database in Oracle 9i (merged)
Next Topic: Ideal size of Redo logfiles
Goto Forum:
  


Current Time: Thu Sep 19 10:36:16 CDT 2024