Translating with DrWatson… this can take a few seconds the first time.
This is a genuine, complex translation. DrWatson protects commands, error codes, and log output while naturally translating the surrounding text. It’s translated once and saved.
Ruben Garcia wanted to emulate onmode -Y for a session from a client-only machine (12.10). Benjamin Thompson said onmode is server-only and suggested a sysdbopen procedure to enable SET EXPLAIN. Ruben needed only short traces. Art Kagel said to connect to sysadmin and run EXECUTE FUNCTION task('onmode','Y', session id, level, file path), after granting connect on sysadmin.
Auto-generated by Claude from the posts below — may be imperfect; read the full thread.
RUBéN GARCíA — — source: IIUG Forums & Mailing Lists
Hi everyone,
I'm interesting on making a script who emules the "onmode -Y" for one sessión,
but just in a machine which has only installed the IDS client(Version 12.10).
Does anyone know how to do it?
Best regards.
"onmode -Y" turns on SET EXPLAIN for given session. "onmode" isn't distributed
with the client software and connects to an instance's shared memory so is
strictly server only.
Presumably you don't control what the client is doing otherwise the obvious
thing to do would be to run "SET EXPLAIN ON" inside the client's session. You
could instead create a "sysdbopen" procedure to do this when the client logs
on:
https://www.ibm.com/support/knowledgecenter/en/SSGU8G_12.1.0/com.ibm.sqls.doc/id
s_sqs_1799.htm
This is the best and only solution I can think of.
Ben.
↪ replying to BENJAMIN THOMPSON
RUBéN GARCíA — — source: IIUG Forums & Mailing Lists
Hi Benjamin,
First of all thanks for the reply. My situation is a little bit different, i
have some proccess on the client side that they're executed when i can not
launch onmode -Y on the server side, some of them are giving problems, and i
want to give the person who launch all the proccess a script for tracing the
proccess he think that they're not running ok, sonm your solution doesn't fit
to me, because i just want to trace few minutes not all the session.
Best regards
Your client side can use any SQL tools to connect to the sysadmin database and
run the onmode -Y API function:
EXECUTE FUNCTION task("onmode","Y","32","0","/a/file/path/for/sqexplain.file");
Here "32" is the session id, "0" is the trace level, and the last argument is
the optional file path on the server into which to write the sqexplain output.
You will have to grant connect privilege on sysadmin to this user.
We use strictly necessary cookies to make this site work. With your
consent we’d also use optional cookies for analytics and marketing. You can accept all,
reject all, or choose. Read our Cookie Policy.