Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

SET CURRENT SQLID on DB2 LUW

626 views
Skip to first unread message

Mark A

unread,
Oct 5, 2010, 6:18:05 PM10/5/10
to
I am running some DDL from a IBM product called Master Data Management and
it contains the following on the first line of each script

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?


The Boss

unread,
Oct 5, 2010, 6:48:05 PM10/5/10
to

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

Mark A

unread,
Oct 5, 2010, 11:33:28 PM10/5/10
to
> "The Boss" <nlt...@baasbovenbaas.demon.nl> wrote in message
> news:05cfedf9-3824-40af...@e14g2000yqe.googlegroups.com...

>
> <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.


0 new messages