If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > How can I change the implicit schema?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-06-04, 01:29
AStefan AStefan is offline
Registered User
 
Join Date: Jun 2004
Posts: 57
How can I change the implicit schema?

When I install db2 the server name became the host name, as I noticed.
My computer is STEFAN and when I install DB2 I was forced to give the same name to DB2 server and to accept the user and the password same as in the network (in am in a Windows 2000 network).
More than that, installing creates a schema too named STEFAN.
My problem is the following.
I made some sql files where I create the database and, after that, the database objects: tables, procedures etc. After I create the database and the tablespaces I create a schema which I would like to became the implicit schema for all the objects without being necessary to name it. AT the begginng of a sql file I write the instructions set current schema = 'x'.
But when I create new stored procedures in development center if I forgot to name the schema DB2 always associate unnamed objects with STEFAN schema although I would like to use my x schema.
Tekll me please, how can I change the implicit schema so all new objects to be associated with this schema I want (x schema)?
Thanks in advanced.
Reply With Quote
  #2 (permalink)  
Old 07-06-04, 12:01
J Petruk J Petruk is offline
Registered User
 
Join Date: Mar 2004
Location: Toronto, ON, Canada
Posts: 513
Quote:
Originally Posted by AStefan
When I install db2 the server name became the host name, as I noticed.
My computer is STEFAN and when I install DB2 I was forced to give the same name to DB2 server and to accept the user and the password same as in the network (in am in a Windows 2000 network).
More than that, installing creates a schema too named STEFAN.
My problem is the following.
I made some sql files where I create the database and, after that, the database objects: tables, procedures etc. After I create the database and the tablespaces I create a schema which I would like to became the implicit schema for all the objects without being necessary to name it. AT the begginng of a sql file I write the instructions set current schema = 'x'.
But when I create new stored procedures in development center if I forgot to name the schema DB2 always associate unnamed objects with STEFAN schema although I would like to use my x schema.
Tekll me please, how can I change the implicit schema so all new objects to be associated with this schema I want (x schema)?
Thanks in advanced.
db2 set current schema <myschema>
__________________
--
Jonathan Petruk
DB2 Database Consultant
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

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