currentSchema parm db2dsdriver.cfg (Db2 z/os v11 nfm)

Art McEwen

currentSchema parm db2dsdriver.cfg (Db2 z/os v11 nfm)
Hi,

Has anybody managed to set the current schema via the parm in the db2dsdriver.cfg file?

<parameter name="CurrentSchema" value="schema name"/>
https://www.ibm.com/support/knowledgecenter/en/SSEPGG_11.1.0/com.ibm.swg.im.dbclient.config.doc/doc/r0054619.html

My config file passes the validate test but when I query an unqualified table in DataStudio (or other products) it defaults to my userid. If I issue and explicit SET CURRENT SCHEMA="xxx" in DS it takes it just fine.

DB2 z/os V11 nfm


Art McEwen

Sr DBA, Database & Mainframe Support
Health Solutions Delivery Br.
Health Services Cluster
4th flr, 49 Place d'Armes
Kingston ON K7L 5J3

[login to unmask email]<mailto:[login to unmask email]>

Office 613-548-6622
Cell 613-539-3903

Daniel Luksetich

currentSchema parm db2dsdriver.cfg (Db2 z/os v11 nfm)
(in response to Art McEwen)
Try this

<parameter name="currentSchema" value="schema name"/>





Daniel L Luksetich

DanL Database Consulting



IBM GOLD Consultant

IBM Champion for Analytics

IDUG Content Committee Past-Chairman

IDUG DB2-L Administrator

IBM Certified Database Adminstrator - DB2 11 DBA for z/OS

IBM Certified System Administrator - DB2 11 for z/OS

IBM Certified Application Developer - DB2 11 for z/OS

IBM Certified Advanced Database Administrator - DB2 10.1 for Linux UNIX and
Windows



From: McEwen, Art (MOHLTC) <[login to unmask email]>
Sent: Friday, November 2, 2018 8:37 AM
To: '[login to unmask email]' <[login to unmask email]>
Subject: [DB2-L] - currentSchema parm db2dsdriver.cfg (Db2 z/os v11 nfm)



Hi,



Has anybody managed to set the current schema via the parm in the
db2dsdriver.cfg file?



https://www.ibm.com/support/knowledgecenter/en/SSEPGG_11.1.0/com.ibm.swg.im.
dbclient.config.doc/doc/r0054619.html



My config file passes the validate test but when I query an unqualified
table in DataStudio (or other products) it defaults to my userid. If I
issue and explicit SET CURRENT SCHEMA="xxx" in DS it takes it just fine.



DB2 z/os V11 nfm





Art McEwen



Sr DBA, Database & Mainframe Support

Health Solutions Delivery Br.

Health Services Cluster

4th flr, 49 Place d'Armes

Kingston ON K7L 5J3



[login to unmask email] <mailto:[login to unmask email]>



Office 613-548-6622

Cell 613-539-3903





-----End Original Message-----

Art McEwen

RE: currentSchema parm db2dsdriver.cfg (Db2 z/os v11 nfm)
(in response to Daniel Luksetich)

No difference (it's capitalized in all the documentation).   Other parameters like CurrentDegree and SecurityTransportMode seem to work.  Just downloaded the Aug fix pack, no improvement

Client Version (level/bit): DB2 v11.1.0.1527 (s1606081100/64-bit)


In Reply to Daniel Luksetich:

Try this







Daniel Luksetich

currentSchema parm db2dsdriver.cfg (Db2 z/os v11 nfm)
(in response to Art McEwen)
Try adding it to the connection string in Data studio and see if that works. If you don’t know how to do that it’s in the connection properties for the target DB, driver properties, optional



Daniel L Luksetich

DanL Database Consulting



IBM GOLD Consultant

IBM Champion for Analytics

IDUG Content Committee Past-Chairman

IDUG DB2-L Administrator

IBM Certified Database Adminstrator – DB2 11 DBA for z/OS

IBM Certified System Administrator – DB2 11 for z/OS

IBM Certified Application Developer – DB2 11 for z/OS

IBM Certified Advanced Database Administrator – DB2 10.1 for Linux UNIX and Windows



From: Art McEwen <[login to unmask email]>
Sent: Friday, November 2, 2018 9:44 AM
To: [login to unmask email]
Subject: [DB2-L] - RE: currentSchema parm db2dsdriver.cfg (Db2 z/os v11 nfm)



No difference (it's capitalized in all the documentation). Other parameters like CurrentDegree and SecurityTransportMode seem to work. Just downloaded the Aug fix pack, no improvement

Client Version (level/bit): DB2 v11.1.0.1527 (s1606081100/64-bit)


In Reply to Daniel Luksetich:

Try this










-----End Original Message-----

Robert Plata

currentSchema parm db2dsdriver.cfg (Db2 z/os v11 nfm)
(in response to Daniel Luksetich)
Agree. Dan’s suggestion works for me with the clientProgramName parameter.

[cid:[login to unmask email]


Robert Plata
Database Administrator
ODOT DMV Information Systems

From: Daniel L Luksetich <[login to unmask email]>
Sent: Friday, November 2, 2018 7:54 AM
To: [login to unmask email]
Subject: [DB2-L] - RE: currentSchema parm db2dsdriver.cfg (Db2 z/os v11 nfm)

Try adding it to the connection string in Data studio and see if that works. If you don’t know how to do that it’s in the connection properties for the target DB, driver properties, optional

Daniel L Luksetich
DanL Database Consulting

IBM GOLD Consultant
IBM Champion for Analytics
IDUG Content Committee Past-Chairman
IDUG DB2-L Administrator
IBM Certified Database Adminstrator – DB2 11 DBA for z/OS
IBM Certified System Administrator – DB2 11 for z/OS
IBM Certified Application Developer – DB2 11 for z/OS
IBM Certified Advanced Database Administrator – DB2 10.1 for Linux UNIX and Windows

From: Art McEwen <[login to unmask email]<mailto:[login to unmask email]>>
Sent: Friday, November 2, 2018 9:44 AM
To: [login to unmask email]<mailto:[login to unmask email]>
Subject: [DB2-L] - RE: currentSchema parm db2dsdriver.cfg (Db2 z/os v11 nfm)


No difference (it's capitalized in all the documentation). Other parameters like CurrentDegree and SecurityTransportMode seem to work. Just downloaded the Aug fix pack, no improvement

Client Version (level/bit): DB2 v11.1.0.1527 (s1606081100/64-bit)

In Reply to Daniel Luksetich:
Try this






-----End Original Message-----

-----End Original Message-----
Attachments

  • image001.jpg (28.2k)

Art McEwen

RE: currentSchema parm db2dsdriver.cfg (Db2 z/os v11 nfm)
(in response to Robert Plata)

Yes I can get around it in DataStudio but DS isn't the goal (actually PowerBuilder is), it's just the tool I'm using to debug why the config parm isn't working.   Same issue happens in the db2cli command line method, I can easily add the set current to my SQL script but the cfg parm should work as documented.

We're trying to use the currentschema to isolate environmental changes from the app when it goes from dev/test/prod.

Robert Plata

RE: currentSchema parm db2dsdriver.cfg (Db2 z/os v11 nfm)
(in response to Art McEwen)

Might you have a customized db2dsdriver.cfg in a different location and pointed to by DB2DSDRIVER_CFG_PATH registry variable?

https://www.ibm.com/support/knowledgecenter/en/SSEPGG_11.1.0/com.ibm.swg.im.dbclient.config.doc/doc/r0061058.html

"When the DB2DSDRIVER_CFG_PATH registry variable is set, only the paths and file names that are specified in the DB2DSDRIVER_CFG_PATH registry variable are searched in listed sequence."

Robert Plata

Art McEwen

RE: currentSchema parm db2dsdriver.cfg (Db2 z/os v11 nfm)
(in response to Robert Plata)

Nope, looked for that and db2cli.ini files.  The db2cli validate command confirms it's location is as expected, even deleted my handwritten version (which worked in all other respects) and recreated via db2cli writecfg.   Unqualified statements still default to my personal schema not the one set.

In Reply to Robert Plata:

Might you have a customized db2dsdriver.cfg in a different location and pointed to by DB2DSDRIVER_CFG_PATH registry variable?

https://www.ibm.com/support/knowledgecenter/en/SSEPGG_11.1.0/com.ibm.swg.im.dbclient.config.doc/doc/r0061058.html

"When the DB2DSDRIVER_CFG_PATH registry variable is set, only the paths and file names that are specified in the DB2DSDRIVER_CFG_PATH registry variable are searched in listed sequence."

Robert Plata

J&#248;rn Thyssen

RE: currentSchema parm db2dsdriver.cfg (Db2 z/os v11 nfm)
(in response to Art McEwen)

Hi Art,

I observe the same behavior as you. This looks like an error to me, so I will suggest you open a ticket with IBM.

Jørn

In Reply to Art McEwen:

Hi,

Has anybody managed to set the current schema via the parm in the db2dsdriver.cfg file?


https://www.ibm.com/support/knowledgecenter/en/SSEPGG_11.1.0/com.ibm.swg.im.dbclient.config.doc/doc/r0054619.html

My config file passes the validate test but when I query an unqualified table in DataStudio (or other products) it defaults to my userid. If I issue and explicit SET CURRENT SCHEMA="xxx" in DS it takes it just fine.

DB2 z/os V11 nfm


Art McEwen

Sr DBA, Database & Mainframe Support
Health Solutions Delivery Br.
Health Services Cluster
4th flr, 49 Place d'Armes
Kingston ON K7L 5J3

[login to unmask email]<mailto:[login to unmask email]>

Office 613-548-6622
Cell 613-539-3903



 

Best regards,

Jørn Thyssen

Rocket Software
77 Fourth Avenue • Waltham, MA • 02451 • USA
E: [login to unmask email] • W: www.rocketsoftware.com 

2018 IBM Champion.

Views are personal. 

Art McEwen

RE: currentSchema parm db2dsdriver.cfg (Db2 z/os v11 nfm)
(in response to Jørn Thyssen)

Yeah did that last week.   So far they're trying to tell me it only works for CLI connections, even though there's nothing in the documentation that indicates that.    The DB2CLI test application takes the parm but nothing else.