SET CURRENT SQLID=MDMUSER;
I know this is a DB2 z/OS construct, and I can't seem to find it in the DB2
LUW doc. When I run it on LUW 9.7 it has a zero return code (successful)
even though it doesn't seem to be documented. It does change the schema name
of a table created after that, but does not affect the Definer or Owner of
the table. My mainframe DB2 is a little rusty, but I thought SET CURRENT
SQLID would define the Owner of a table created on DB2 z/OS after that
command is issued.
Anyone know what the story behind this is, and why it is not documented in
the LUW doc?
Actually it is, and it was already there since at least version 8.
To brush up your z/OS knowledge, here's a link to the z/OS info:
http://publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=/com.ibm.db29.doc.sqlref/db2z_sql_setcurrentsqlid.htm
Here you can find the relevant doc for LUW v9 resp v8:
http://publib.boulder.ibm.com/infocenter/db2luw/v9/index.jsp?topic=/com.ibm.db2.udb.admin.doc/doc/r0001016.htm
http://publib.boulder.ibm.com/infocenter/db2luw/v8/index.jsp?topic=/com.ibm.db2.udb.doc/admin/r0001016.htm
From the v9 one (See 'Notes' just before the examples):
<q>
CURRENT SQLID is accepted as a synonym for CURRENT SCHEMA and the
effect of a SET CURRENT SQLID statement will be identical to that of a
SET CURRENT SCHEMA statement. No other effects, such as statement
authorization changes, will occur.
</q>
HTH
--
Jeroen
That's what I observed, that it acts like CURRENT SCHEMA, but does not set
the authorization id like it does in z/OS. I am not sure this is such a
great idea. but too late to change it now.