469,267 Members | 979 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,267 developers. It's quick & easy.

How to set default schema name?


Folks,

Is there a way to set a default schema name by setting environment
variable, so that it is set for CLP and any program I run from command line.

Thanks.
--
Hemant Shah /"\ ASCII ribbon campaign
E-mail: No************@xnet.com \ / ---------------------
X against HTML mail
TO REPLY, REMOVE NoJunkMail / \ and postings
FROM MY E-MAIL ADDRESS.
-----------------[DO NOT SEND UNSOLICITED BULK E-MAIL]------------------
I haven't lost my mind, Above opinions are mine only.
it's backed up on tape somewhere. Others can have their own.
Nov 12 '05 #1
4 18986
Is it possible to create a user id that equals the schema name?
Then you just connect to the database with that user id.
Otherwise you have to issue the SET SCHEMA='name' command

Hemant Shah wrote:
Folks,

Is there a way to set a default schema name by setting environment
variable, so that it is set for CLP and any program I run from command line.

Thanks.


--
Anton Versteeg
IBM Certified DB2 Specialist
IBM Netherlands
Nov 12 '05 #2
Ken
You can set a default schema on programs that are prep'ed and bound to
the database. It is either the "collection" and/or the "qualifer"
parameter. It is one of those things that we set-up in a prep and a
bind script some time ago.

I do not know how to do it globally.

Ken
Anton Versteeg <an************@nnll.iibbmm.com> wrote in message news:<40**************@nnll.iibbmm.com>...
Is it possible to create a user id that equals the schema name?
Then you just connect to the database with that user id.
Otherwise you have to issue the SET SCHEMA='name' command

Hemant Shah wrote:
Folks,

Is there a way to set a default schema name by setting environment
variable, so that it is set for CLP and any program I run from command line.

Thanks.

Nov 12 '05 #3
While stranded on information super highway Ken wrote:
You can set a default schema on programs that are prep'ed and bound to
the database. It is either the "collection" and/or the "qualifer"
parameter. It is one of those things that we set-up in a prep and a
bind script some time ago.

I do not know how to do it globally.

Ken
Thanks. I will take a look at it. This might solve most of my problems.


Anton Versteeg <an************@nnll.iibbmm.com> wrote in message news:<40**************@nnll.iibbmm.com>...
Is it possible to create a user id that equals the schema name?
Then you just connect to the database with that user id.
Otherwise you have to issue the SET SCHEMA='name' command

Hemant Shah wrote:
>Folks,
>
> Is there a way to set a default schema name by setting environment
> variable, so that it is set for CLP and any program I run from command line.
>
> Thanks.
>
>
>
>


--
Hemant Shah /"\ ASCII ribbon campaign
E-mail: No************@xnet.com \ / ---------------------
X against HTML mail
TO REPLY, REMOVE NoJunkMail / \ and postings
FROM MY E-MAIL ADDRESS.
-----------------[DO NOT SEND UNSOLICITED BULK E-MAIL]------------------
I haven't lost my mind, Above opinions are mine only.
it's backed up on tape somewhere. Others can have their own.
Nov 12 '05 #4
Ken <lf****@volcanomail.com> wrote:
You can set a default schema on programs that are prep'ed and bound to
the database. It is either the "collection" and/or the "qualifer"
parameter. It is one of those things that we set-up in a prep and a
bind script some time ago.


That works for static SQL. For dynamic, you will have to use SET SCHEMA ...
in your code.

--
Knut Stolze
Information Integration
IBM Germany / University of Jena
Nov 12 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by John L. Clark | last post: by
4 posts views Thread by Lénaïc Huard | last post: by
7 posts views Thread by greatcanyon | last post: by
reply views Thread by =?Utf-8?B?VmVudQ==?= | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.