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 > About the table schema and the table space.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 12-23-03, 22:24
scottding scottding is offline
Registered User
 
Join Date: Dec 2003
Posts: 2
About the table schema and the table space.

He, all:
I login windows with the user "SCOTT", and I create the table in DB2 with the user db2admin, and the table's schema is db2admin, the table space is userspace1. then I use the command "connect to RWC user db2admin" to connect the database, but when I use the command "select * from rmf" , the error is appear "TABLE SCOTT.RFM is not found".
Why? my current user is db2admin.
Reply With Quote
  #2 (permalink)  
Old 12-24-03, 01:05
nitingm nitingm is offline
Registered User
 
Join Date: Jul 2003
Location: Austin, TX, USA
Posts: 278
Schema

Hi Scott,

A schema is a logical name for a group of tables belonging to a user.

The reason that the table was not created under scott is because the user that logged into db2 was db2admin. That's why the table got created under db2admin's schema.

For you to create the table under scott's schema you need to be logged into db2 using the userid scott.

The same can be achieved by the following
1. Logging into the windows by user scott and then at the db2cmd mode giving the command db2 connect to <database name>

OR

2. Logging into the windows by any other user and then at the db2cmd mode giving the command db2 connect to <database name> user scott using <scott's password>

Then you will have the table created under scott's schema.

Hope this is clear.

Cheers

Nitin
__________________
HTH

Nitin

Ask the experienced rather than the learned
Reply With Quote
  #3 (permalink)  
Old 12-25-03, 21:26
scottding scottding is offline
Registered User
 
Join Date: Dec 2003
Posts: 2
I see.
Thanx.

but when I login with the command:
connect to <database name> user db2admin using db2admin
and to select the table RFM, the table RFM's schema is db2admin,
but, when execute the command :select * from RFM;
the ERROR :
SCOTT.RFM Table not define

why?
my current user is db2admin, and the table's schema is db2admin
why???
Reply With Quote
  #4 (permalink)  
Old 12-26-03, 06:10
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
Did you try opening another window and trying out the same ...

Does the same problem occur ?

Cheers
Sathyaram

Quote:
Originally posted by scottding
I see.
Thanx.

but when I login with the command:
connect to <database name> user db2admin using db2admin
and to select the table RFM, the table RFM's schema is db2admin,
but, when execute the command :select * from RFM;
the ERROR :
SCOTT.RFM Table not define

why?
my current user is db2admin, and the table's schema is db2admin
why???
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
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