Lists the contents of the system database directory. If a path is specified, the contents of the local database directory are listed.
If this command is issued without the ON path parameter, the system database directory is returned. This information is the same at all database partitions.
If the ON path parameter is specified, the local database directory on that path is returned. This information is not the same at all database partitions.
None
None. Directory operations affect the local directory only.
>>-LIST--+-DATABASE-+--DIRECTORY--+---------------+------------>< '-DB-------' '-ON--+-path--+-' '-drive-'
System Database Directory
Number of entries in the directory = 2
Database 1 entry:
Database alias = SAMPLE
Database name = SAMPLE
Local database directory = /home/smith
Database release level = 8.00
Comment =
Directory entry type = Indirect
Catalog database partition number = 0
Alternate server hostname = montero
Alternate server port number = 29384
Database 2 entry:
Database alias = TC004000
Database name = TC004000
Node name = PRINODE
Database release level = a.00
Comment =
Directory entry type = LDAP
Catalog database partition number = -1
Gateway node name = PRIGW
Alternate server node name =
Alternate server gateway node name = ALTGW
The following shows sample output for a local database directory:
Local Database Directory on /u/smith
Number of entries in the directory = 1
Database 1 entry:
Database alias = SAMPLE
Database name = SAMPLE
Database directory = SQL00001
Database release level = 8.00
Comment =
Directory entry type = Home
Catalog database partition number = 0
Database partition number = 0
All entries in the system database directory are either remote or indirect. All entries in local database directories are identified in thesystem database directory as indirect entries.
Regardless of the DB2LDAPCACHE miscellaneous variable setting, if using the LIST DATABASE DIRECTORY or the LIST NODE DIRECTORY commands, the list of local database and node entries are read from the LDAP server.
There can be a maximum of eight opened database directory scans per process. To overcome this restriction for a batch file that issues more than eight LIST DATABASE DIRECTORY commands within a single DB2® session, convert the batch file into a shell script. The "db2" prefix generates a new DB2 session for each command.