Results 1 to 5 of 5
  1. #1
    Join Date
    Apr 2005
    Posts
    127

    Question Unanswered: how to list all the database names in a connection

    Hi all,

    I wish to see the list of database names that exists in a connection..
    is there any inbuilt function or system tables defining this..

    cheers
    Sn

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    You can list all the database names in an instance:

    db2 list db directory

    This will include all local databases, plus any remote databases that are catalogued.
    M. A. Feldman
    IBM Certified DBA on DB2 for Linux, UNIX, and Windows
    IBM Certified DBA on DB2 for z/OS and OS/390

  3. #3
    Join Date
    Oct 2005
    Posts
    109
    Shefu,

    which platform are you on or connecting to ??

    in z/OS you are actually connecting to a subsystem, so the information you are looking for could be selected using

    select name from sysibm.sysdatabase
    Juliane

  4. #4
    Join Date
    Apr 2005
    Posts
    127
    Thanks for the info juliane and marcus,

    but mine is loaded in to a Windows 2000.

    regards
    Sn

  5. #5
    Join Date
    Oct 2004
    Location
    DELHI INDIA
    Posts
    338
    Quote Originally Posted by Shefu
    Hi all,

    I wish to see the list of database names that exists in a connection..
    is there any inbuilt function or system tables defining this..

    cheers
    Sn
    db2 "list active databases"

    thx,
    Jayanta Datta
    Delhi NCR

Posting Permissions

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