Results 1 to 4 of 4
  1. #1
    Join Date
    Dec 2003
    Posts
    2

    Unanswered: 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.

  2. #2
    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

  3. #3
    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???

  4. #4
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    Did you try opening another window and trying out the same ...

    Does the same problem occur ?

    Cheers
    Sathyaram

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •