Results 1 to 7 of 7
  1. #1
    Join Date
    Sep 2003
    Posts
    17

    Unanswered: Accessing db2 catalog tables

    Hi

    Simple question ...
    I need to access SYSCAT>VIEWS ... and this doesn't work :
    SELECT * FROM SYSCAT.VIEWS


    How should I access the contents of that table?

    Thanks

  2. #2
    Join Date
    Sep 2003
    Posts
    17

    Note :

    I get 'Invalid object 'VIEWS'

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

    Re: Accessing db2 catalog tables

    Assume you are NOT using Unix or Windows version of db2
    Visit the new-look IDUG Website , register to gain access to the excellent content.

  4. #4
    Join Date
    Sep 2003
    Posts
    17
    No, neither. Using OS2 I think, standard AS/400 operating system.

  5. #5
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    OS/2 and AS/400 are completely different operating systems.

    Find the SQL Reference manual for your platform and look in the Appendix for Catalog Tables or Catalog Views. On some platforms (like mainframe) it would be called sysibm.systables with a "V" in the TYPE column.

    On Linux, UNIX, and Windows (and older DB2 versions that supported OS/2) you can query syscat.tables with with a "V" in the TYPE column. or you can query sycat.views.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  6. #6
    Join Date
    May 2003
    Location
    San Juan, PR
    Posts
    18
    The name of the system table for views is SYSVIEWS.
    For mainframe, use SYSIBM.SYSVIEWS. In other environments, use SYSCAT.SYSVIEWS

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

    Does the 'other' include AS400

    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
  •