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

SET SCHEMA equivalent for MVS

88 views
Skip to first unread message

Spencer

unread,
Mar 24, 2003, 10:36:20 AM3/24/03
to
What is the equivalent for a SET SCHEMA statment in DB2 UDB 7.2 in
Unix for DB2 MVS on OS/390? Essentially looking to set the schema
once and run a bunch of sql commands in a connection. I would like to
avoid prefix the tables with the schema as we will be running the sql
across a couple of different environments.

Regards,
Spencer Tabbert

Anton Versteeg

unread,
Mar 24, 2003, 11:25:57 AM3/24/03
to
SET CURRENT SQLID = 'schema'
should do it.

Spencer wrote:

--
Anton Versteeg
IBM Netherlands


Sean C.

unread,
Mar 24, 2003, 2:41:09 PM3/24/03
to
Try :
SET CURRENT SQLID = abcd

spe...@tabbert.net (Spencer) wrote in message news:<57dd3c13.03032...@posting.google.com>...

Serge Rielau

unread,
Mar 24, 2003, 2:44:26 PM3/24/03
to
FYI, DB2 for Multiplatforms also tolerates SQLID:

Database server = DB2/NT 8.1.0
SQL authorization ID = SRIELAU
Local database alias = TEST

db2 => set current sqlid = hello;
DB20000I The SQL command completed successfully.
db2 => values current schema, current sqlid;

1

--------------------------------------------------------------------------------
------------------------------------------------
HELLO

HELLO

--
Serge Rielau
DB2 UDB SQL Compiler Development
IBM Software Lab, Toronto

Visit DB2 Developer Domain at
http://www7b.software.ibm.com/dmdd/


Joachim Klassen

unread,
Mar 25, 2003, 3:00:46 AM3/25/03
to
IIRC there is a difference between the platforms. On DB2/390 the
schema name you use in a SET CURRENT SQLID Statement must be one of
your secondary authids (= RACF Groups) you are attached to. On DB2/LUW
you can use any schema name.

Can anybody confirm that ?

Joachim

Anton Versteeg <anton_v...@nnll.iibbmm.com> wrote in message news:<3E7F3195...@nnll.iibbmm.com>...

Allen

unread,
Mar 25, 2003, 11:48:46 AM3/25/03
to
I just tried 'set current sqlid' on my UDB 7.2 Linux server
and it worked. Interesting.

Thats a good DB2 trivia/test question - What is an alternate
way to set schema?

aj

Spencer

unread,
Mar 25, 2003, 2:14:24 PM3/25/03
to
Apparently it looks like this is true. I tried to issue the SET
CURRENT SQLID on MVS and get this error.

SET CURRENT SQLID = 'XXXDBA';

Error: SQL0567N "XXXDBA" is not a valid authorization ID.
SQLSTATE=42503
(State:42503, Native Code: FFFFFDC9)

Spencer Tabbert

JoKl...@email.com (Joachim Klassen) wrote in message news:<b5788ff3.03032...@posting.google.com>...

PM (pm3iinc-nospam)

unread,
Mar 25, 2003, 3:14:36 PM3/25/03
to
> Thats a good DB2 trivia/test question - What is an alternate
> way to set schema?

depends on how you access the db.
static, dynamic, ... the platform, ...

api, prep/bind options, db2cli.ini file/CLI/ODBC, probably url
attribute(jdbc), set current packageset, ...

PM


EDWARD LIPSON

unread,
Mar 25, 2003, 4:59:19 PM3/25/03
to
This will only work if you are connected in RACF to the schema,
meaning you are the schema. It really isn't too helpful to shops where
object ownership is not given to the programmers, so they can't set
the sqlid to the schema.


It seems V8.1 is too far along for schema to be added to the set
commands on zOS. But the request is in for VNext (8.1+)


AV> SET CURRENT SQLID = 'schema'
AV> should do it.

AV> Spencer wrote:

AV> > What is the equivalent for a SET SCHEMA statment in DB2 UDB 7.2 in
AV> > Unix for DB2 MVS on OS/390? Essentially looking to set the schema
AV> > once and run a bunch of sql commands in a connection. I would like to
AV> > avoid prefix the tables with the schema as we will be running the sql
AV> > across a couple of different environments.
AV> >
AV> > Regards,
AV> > Spencer Tabbert

AV> --
AV> Anton Versteeg
AV> IBM Netherlands

Edward Lipson via Relaynet.org Moondog
edward...@moondog.com eli...@bankofny.com
---
þ MM 1.1 #0361 þ BETA: Better Expect Trouble Ahead


-----------== Posted via Newsfeed.Com - Uncensored Usenet News ==----------
http://www.newsfeed.com The #1 Newsgroup Service in the World!
-----= Over 100,000 Newsgroups - Unlimited Fast Downloads - 19 Servers =-----

Walter SCHNEIDER

unread,
Mar 26, 2003, 10:23:14 AM3/26/03
to
Hi,

This is true unless your (RACF)-ID holds the SYSADM privilege or is
connected to at least one RACF group holding this privilege. A system
administrator can set it's SQLID to any value - even if there exists no
corresponding RACF group.

Furthermore, IDs holding the SYSADM or SYSCTRL privilege can do BINDs for
any other SQLID ("Schema")

Regards - Walter SCHNEIDER.

"Joachim Klassen" <JoKl...@email.com> schrieb im Newsbeitrag
news:b5788ff3.03032...@posting.google.com...

0 new messages