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

    Unanswered: Simple table question

    1. How to describe the definition of table from DB2 database?
    ie. equal to "desc <table_name>" in Oracle env.

    2. How can i found the owner information of a table?

    3. Any good reference for studying "sysibm" and "syscat" schemas?
    The two schemas contain many database internal information, such as the name of tablspaces, auit setting, schema setting, etc. How can we check it and What actually information can be found by using sysibm and syscat schemas?


    Thanks

  2. #2
    Join Date
    Jan 2003
    Posts
    1,605
    Hi,

    1. describe table schema.table_name

    2. db2 list tables for all - list all tables

    3. At DB2 support site there is book Administration Guide.

    Hope this helps,
    Grofaty

  3. #3
    Join Date
    Dec 2003
    Posts
    4
    Thanks, just a little bit followup of the second question.

    do you mean, schema name = owner of the tables?
    If yes, I would like to clarify that who will be the owner of tables if the table is under a schema which is not the same as the username.
    (eg. a "schema.tablename" table was create by db2_inst1 user while there is no user which is called "schema".)

    Then how can we check the owner of the table if we dont know such table was created by db2_inst1 user.

    Thanks a lot

  4. #4
    Join Date
    Jul 2003
    Location
    Austin, TX, USA
    Posts
    278

    Schema

    Hi ,

    A schema is nothing but a logical name for a group of tables owned by a user.

    Let's say if db2inst1 is the user then all the tables that are created by db2inst1 are said to be db2inst1's schema.

    So now I can say db2 describe table db2inst1.test

    Here db2inst1 = schema so for any user authorised to create a table schema would = username


    Hope that explains.


    nitin.

  5. #5
    Join Date
    Oct 2003
    Posts
    29
    Db2 list tables for schema <schema name>

    Will list all the tables under this schema.

    To find out the owner for a table

    db2 select tabname, tabschema, tabowner / owner from syscat.tables where tabname='<tabname>'

    This will help to identify the owner

    CHeerS
    Racha

  6. #6
    Join Date
    Dec 2003
    Posts
    4
    Thanks for all.

Posting Permissions

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