ONMODE -Y on the client side
Posted in 2018
Topics: Installation, Setup & Upgrades, Server Administration, Versions, Editions & End-of-Life
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.
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.