Re: [Info-ingres] jdbc-query tracing/logging
- From: martin.bowes@xxxxxxxxxxxxx
- Date: Fri, 15 Jul 2005 13:30:27 +0100
Hi eteunisse
Sounds to me like you could make good use of the security
auditing feature that captures query_text for the given user.
Check in CBF that you have security auditing turned on. If not,
you'll have to configure it and restart the installation.
You should also have a script setup to ensure that the log files
created are siphoned off to some storage location on the switch_log. I
can give you one of those if you want.
Then sql iidbdb << SQL_END
enable security_audit query_text;
alter user <your_user> with security_audit=(query_text);
\p\g
SQL_END
The log files created can then be registered and examined for
details - which is a little messy - but is basically some code like:
sql iidbdb << SQL_END
register table $this_table (
audittime date not null,
auditevent char(24) not null,
auditstatus char(1) not null,
user_name char(32) not null,
real_name char(32) not null,
database char(32) not null,
sessionid char(16) not null,
detailinfo varchar(256) not null,
detailnum integer4 not null,
querytext_sequence integer4 not null
) as import from '$from_file' <---Just insert the name of your file
with DBMS=sxa, rows=40000;",
\p\g
SQL_END
You can then start cutting that registered table apart and
sticking togethor all the query pieces.
I've done this on JDBC connections with some success. Its a little sticky
here or there but you'll soon get the idea.
Martin Bowes
--
Random Duckman Quote #26:
Cornfed - Duckman had been reduced to the state of a gibbering,
mindless
idiot. In many ways this was an improvement - but his pro country
music attitude was starting to worry me.
.
- References:
- jdbc-query tracing/logging
- From: eteunisse
- jdbc-query tracing/logging
- Prev by Date: RE: Calling Ingres Database Procedures through .Net Data Provider
- Next by Date: Re: jdbc-query tracing/logging
- Previous by thread: jdbc-query tracing/logging
- Next by thread: Re: jdbc-query tracing/logging
- Index(es):