dbTalk Databases Forums  

SET CURRENT SQLID on DB2 LUW

comp.databases.ibm-db2 comp.databases.ibm-db2


Discuss SET CURRENT SQLID on DB2 LUW in the comp.databases.ibm-db2 forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Mark A
 
Posts: n/a

Default SET CURRENT SQLID on DB2 LUW - 10-05-2010 , 05:18 PM






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?

Reply With Quote
  #2  
Old   
The Boss
 
Posts: n/a

Default Re: SET CURRENT SQLID on DB2 LUW - 10-05-2010 , 05:48 PM






On Oct 6, 12:18*am, "Mark A" <no... (AT) nowhere (DOT) com> wrote:
Quote:
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?
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/infoce...rrentsqlid.htm

Here you can find the relevant doc for LUW v9 resp v8:
http://publib.boulder.ibm.com/infoce...c/r0001016.htm
http://publib.boulder.ibm.com/infoce...n/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

Reply With Quote
  #3  
Old   
Mark A
 
Posts: n/a

Default Re: SET CURRENT SQLID on DB2 LUW - 10-05-2010 , 10:33 PM



Quote:
"The Boss" <nltaal (AT) baasbovenbaas (DOT) demon.nl> wrote in message
news:05cfedf9-3824-40af-9195-ac5f5aac44e7 (AT) e14g2000yqe (DOT) 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.

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.