Connecting Tech Pros Worldwide Help | Site Map
 
 
LinkBack Thread Tools Search this Thread
  #1  
Old November 12th, 2005, 06:26 AM
Hemant Shah
Guest
 
Posts: n/a
Default 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: NoJunkMailshah@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.
  #2  
Old November 12th, 2005, 06:27 AM
Anton Versteeg
Guest
 
Posts: n/a
Default Re: How to set default schema name?

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:
[color=blue]
>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.
>
>
>
>[/color]

--
Anton Versteeg
IBM Certified DB2 Specialist
IBM Netherlands


  #3  
Old November 12th, 2005, 06:27 AM
Ken
Guest
 
Posts: n/a
Default Re: How to set default schema name?

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 <anton_versteeg@nnll.iibbmm.com> wrote in message news:<4020BA1F.5090106@nnll.iibbmm.com>...[color=blue]
> 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:
>[color=green]
> >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.
> >
> >
> >
> >[/color][/color]
  #4  
Old November 12th, 2005, 06:27 AM
Hemant Shah
Guest
 
Posts: n/a
Default Re: How to set default schema name?

While stranded on information super highway Ken wrote:[color=blue]
> 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[/color]

Thanks. I will take a look at it. This might solve most of my problems.
[color=blue]
>
>
> Anton Versteeg <anton_versteeg@nnll.iibbmm.com> wrote in message news:<4020BA1F.5090106@nnll.iibbmm.com>...[color=green]
>> 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:
>>[color=darkred]
>> >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.
>> >
>> >
>> >
>> >[/color][/color][/color]

--
Hemant Shah /"\ ASCII ribbon campaign
E-mail: NoJunkMailshah@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.
  #5  
Old November 12th, 2005, 06:28 AM
Knut Stolze
Guest
 
Posts: n/a
Default Re: How to set default schema name?

Ken <lftdee@volcanomail.com> wrote:
[color=blue]
> 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.[/color]

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
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 205,248 network members.