Results 1 to 2 of 2
  1. #1
    Join Date
    Jul 2006
    Location
    Bangalore
    Posts
    57

    Unanswered: How to list all Synonyms and snapshots in DB2

    Hi Friends,

    How can i list all synonyms and snapshotes which is in DB2 database.

    Please tell me querry for that.

    Thanks in Advance
    Ritesh Kumar Singh
    IBM Certified DB2 DBA for LUW
    **Knowledge Is Theft If Not Shared !!**

  2. #2
    Join Date
    Mar 2004
    Posts
    46
    I suppose you are asking for the DB2 equivalent of Oracle's SYNONYMS and SNAPSHOTS, right ?

    In DB2, SYNONYMS are known as ALIAS an and SNAPSHOTS are kind of a TABLE.
    Both of these can be found in the SYSCAT.TABLES catalog view.

    Here's a sample query

    SELECT TABSCHEMA,
    TABNAME,
    CASE TYPE
    WHEN 'A' THEN 'ALIAS'
    WHEN 'S' THEN 'MQT'
    END CASE
    FROM SYSCAT.TABLES
    WHERE TYPE IN ('A', 'S')

Posting Permissions

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