If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Informix > how to log sql commands

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-27-06, 18:31
firmadankt firmadankt is offline
Registered User
 
Join Date: May 2006
Posts: 3
how to log sql commands

Hello,

is there a way to watch or log all sql-commands from all users or clients, which are connected to the database?

I'm working with informix dynamix server 10.0.

Thanks for helping me!
Reply With Quote
  #2 (permalink)  
Old 05-29-06, 10:35
gurey gurey is offline
Registered User
 
Join Date: Aug 2003
Location: Argentina
Posts: 780
Hi,

Look in sysmaster:syssqlstat.

Gustavo.
Reply With Quote
  #3 (permalink)  
Old 05-30-06, 16:45
jwain jwain is offline
Registered User
 
Join Date: Aug 2003
Location: Allentown pa
Posts: 41
You can ue onlog to look at the logs that are still on the server. The best way is if it is for SOC compliancy is to use Informix trusted server facility. You can create a mask for delete, updates etc etc etc. use the onaudit command for that
__________________
Jeff Wain
Reply With Quote
  #4 (permalink)  
Old 06-07-06, 19:59
firmadankt firmadankt is offline
Registered User
 
Join Date: May 2006
Posts: 3
ok, thanks for reply. In the table sysmaster:syssqlstat is nothing I can use. Perhaps there is some configuration missing.

The onaudit command seems to be the solution, but I don't know how to use it. I looked at the IBM-manual, but it seems to complicated.

Is there no easy way to watch all sql-commands that any user made to the database, for example watching a log-file, or using a tool, such as a sql-monito or something like that. I don't understand the complexity of this desire.

Or can you give me some help using the onaudit-command to log all commands?!

Thanks!
Reply With Quote
  #5 (permalink)  
Old 06-07-06, 20:31
jwain jwain is offline
Registered User
 
Join Date: Aug 2003
Location: Allentown pa
Posts: 41
I'll post some examples on onaudit and how to play with the mask tomorrow
__________________
Jeff Wain
Reply With Quote
  #6 (permalink)  
Old 06-08-06, 09:37
firmadankt firmadankt is offline
Registered User
 
Join Date: May 2006
Posts: 3
That would be nice.

Thanks
Reply With Quote
  #7 (permalink)  
Old 06-08-06, 10:32
jwain jwain is offline
Registered User
 
Join Date: Aug 2003
Location: Allentown pa
Posts: 41
onaudit -a -u _default -e +ACTB - adds access table to mask this will show all table access I would not use this I would look at informix trusted facility mgr mask list and add only update inserts delets etc. There i a table that shows the 4 char code for that. To remove a mask its onaudit -a -u _default -e -ADCK would remove add chunk audit.

onaudit -n start new audit file
onaudit -p /dir/for/logs
Then just turn it on onaudit -l 1 -on onaudit -l 0 -off. If you ant to test I would add access table audit to my mask specify where the files are then turn it on. The log should start right away with access tble audit on. You can read informix trusted facilit mgr manual. Its very small only about 80 or so pages
__________________
Jeff Wain
Reply With Quote
  #8 (permalink)  
Old 06-09-06, 09:28
jwain jwain is offline
Registered User
 
Join Date: Aug 2003
Location: Allentown pa
Posts: 41
Did that help you out?
__________________
Jeff Wain
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On