Find DB2 Nicknames

Want to see the nickname setup for a DB2 database?  Here’s a handy query…

SELECT 
        NICK.TABSCHEMA,
        NICK.TABNAME,
        NICK.SERVERNAME,
        NICK.OWNER,
        NICK.REMOTE_SCHEMA,
        NICK.REMOTE_TABLE,
        SRV.SERVERTYPE
FROM    SYSCAT.NICKNAMES NICK
        INNER JOIN SYSCAT.SERVERS SRV
            ON (NICK.SERVERNAME = SRV.SERVERNAME);

Please remember to subscribe to the newsletter or feed to stay up to date.

Disclaimer: Thoughts and opinions are my own, and do not reflect the views of any employer, family member, friend, or anyone else. Some links may be affiliate links, but I do not link to anything I do not use myself.