If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > How to list all Synonyms and snapshots in DB2

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-04-06, 08:55
singhipst singhipst is offline
Registered User
 
Join Date: Jul 2006
Location: Bangalore
Posts: 57
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 !!**
Reply With Quote
  #2 (permalink)  
Old 08-04-06, 14:00
jthakrar jthakrar is offline
Registered User
 
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')
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On