Results 1 to 6 of 6
  1. #1
    Join Date
    Mar 2004
    Location
    Mumbai
    Posts
    2

    Unanswered: db2 udb data access

    I am new for db2 udb .I have problem such as "I want to access database tables?" I have createtab,
    bindadd,connect,implicite schema previleges & userID/password.
    I run the query "select tabname,tabschema from syscat.tables where tabschema not like 'SYS%' order by tabname". But from output i got list of tables & schema I could not able to select data or tables other than mine schema.
    "select tabname,colcount,status from syscat.tables where tabschema not like 'SYS%' order by tabname".
    also tried from syscat.tables,syscat.tabauth,,syscat.colauth.....e tc
    so can anybody help me to access database tables which are other than sysstem tables. or suggest me which previleges i should have to access database tables other than above mentioned? and send me sql query to retrive those tables

    thanks & regards.

    rudra.

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: db2 udb data access

    select * from <schemaname>.<tablename>

    Does this help ?

    Sathyaram
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  3. #3
    Join Date
    Jan 2004
    Location
    Tallahassee, FL, USA
    Posts
    96
    check who is creator for the tables

    by

    select distinct creator from sysibm.systables where name in ( tables list ) ;

    then

    set current schema output of above query;

    select * from tablename;


    that will do


    --Lekharaju ENnam

  4. #4
    Join Date
    Mar 2004
    Posts
    2

    Re: db2 udb data access

    It gives only my tables views ...etc to select data. I want global
    data/tables which database contains. I expect o/p like this which don't contain system tables means remaining tables should be public accessible sothat public user can "only" select tables .I expect o/p from query is "select tabname,colcount ,status from syscat.tables where
    tabschema NOT LIKE 'SYS%' ORDER BY tabname" I f you find please send it.

    thanks for reply


    thanks & Regards

    rudra




    Originally posted by sathyaram_s
    select * from <schemaname>.<tablename>

    Does this help ?

    Sathyaram

  5. #5
    Join Date
    Mar 2004
    Posts
    2

    Re: db2 udb data access

    It gives only my tables views ...etc to select data. I want global
    data/tables which database contains. I expect o/p like this which don't contain system tables means remaining tables should be public accessible sothat public user can "only" select tables .I expect o/p from query is "select tabname,colcount ,status from syscat.tables where
    tabschema NOT LIKE 'SYS%' ORDER BY tabname" I f you find please send it.

    OR IN OTHER WORDS:

    how to find tables which I have acess?

    thanks for reply


    thanks & Regards

    rudra [/SIZE][/QUOTE]

  6. #6
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    Re: db2 udb data access

    SYSCAT.TABAUTH

    Cheers
    Sathyaram
    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
  •