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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Informix Trace Follow-Up??

Status
Not open for further replies.

aljubicic

Programmer
Nov 7, 2002
82
AU
This is just a follow up Question to my previous one, which was to find a way to trace INSERTS, DELETES and UPDATES on an on an informix dynamic server on linux system.

The following was suggested to me from Shriyan(which worked great - Thanks very much)

*****************************************************
You can turn on auditing in one of the following:
1) onaudit -l 1
2) ADTMODE 1 #Auditing mode (configuration para)

Specify the directory for audit dump files:
1) onaudit -p /usr1/dbaudit
2) ADTPATH /usr1/dbaudit (configuration para)

Trace the manipulations (INSERT,UPDATE,DELETE) of the user jonathan.

onaudit -a -u jonathan -e +INRW,UPRW,DLRW

TIP: If the user list is huge, produce the input instructions in a form of a file. Each line of the instruction file should be in the form:
targetmask templatemask events

For example:
jonathan - +INRW,UPRW,DLRW
hari _sec2 +ALTB,DLRW -CRTR

To analyze the Audit File:
onshowaudit -u jonathan
****************************************************

From this the following output was produced......

ONLN:2002-11-14 13:19:37.000:TRAINING01-DG:448:authtest:auth:0:UPRW:authority:118:6291523:257:6291523:257
ONLN:2002-11-14 13:19:37.000:TRAINING01-DG:448:authtest:auth:0:INRW:authority:409:6291835:62721
ONLN:2002-11-14 13:19:37.000:TRAINING01-DG:448:authtest:auth:0:INRW:authority:409:6291835:62977
ONLN:2002-11-14 13:19:37.000:TRAINING01-DG:448:authtest:auth:0:INRW:authority:409:6291835:63489
ONLN:2002-11-14 13:19:37.000:TRAINING01-DG:448:authtest:auth:0:INRW:authority:409:6291835:63745
ONLN:2002-11-14 13:19:37.000:TRAINING01-DG:448:authtest:auth:0:UPRW:authority:409:6291835:62721:6291835:62721



From this I have the following questions:

i) Can I also trace any Selects that are performed on the database? If so what is the syntax?
ii) What does this output mean? I have a very good idea as to the content and what it represents, but I'd like to be sure. Does it relate back to tables and/or columns in the database, and if ti doesn't ,is obtaining this information possible?
iii) After the first dump of this I could only trace Updates. For some reason I could not trace Inserts. Is there a reason for this, or am I doing something wrong?
iv) How do I reset/start new log files? (Using -n parameter, does not seem to work)
v) Is there a document or file that has a listing of ALL of the onaudit parameters (not by just typing onaudit.

An urgent response to this would be greatly appreciated.

 
aljubicic:

Refer the followings for your queries.

1. onaudit -a -u joe -e +RDRW

2. CREATE TABLE frag_logs
( adttag CHAR(4),
date_time DATETIME year TO fraction(3),
hostname CHAR(18),
pid INT,
server CHAR(18),
username CHAR(8),
errno INT,
code CHAR(4),
dbname CHAR(18),
tabid INT,
objname CHAR(18),
extra_1 INT,
partno INT,
row_num INT,
login CHAR(8),
flags INT,
extra_2 VARCHAR(160,1)
);

3. You may see/set the parameters in $INFORMIXDIR/aaodir/adtcfg.SERVERNUM file.

4. onaudit -n or set the contents in $INFORMIXDIR/aaodir/adtcfg.SERVERNUM

5.
Regards,
Shriyan
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top