IBM Books

Command Reference

LIST DATABASE DIRECTORY

Lists the contents of the system database directory. If a path is specified, the contents of the local database directory are listed.

Scope

If this command is issued without the ON path parameter, the system database directory is returned. This information is the same at all nodes.

If the ON path parameter is specified, the local database directory on that path is returned. This information is not the same at all nodes.

Authorization

None

Required Connection

None. Directory operations affect the local directory only.

Command Syntax

>>-LIST----+-DATABASE-+--DIRECTORY----+----------------+-------><
           '-DB-------'               '-ON--+-path--+--'
                                            '-drive-'
 

Command Parameters

ON path/drive
Specifies the local database directory from which to list information. If not specified, the contents of the system database directory are listed.

Examples

The following shows sample output for a system database directory:



 System Database Directory
 
 Number of entries in the directory = 2
 
Database 1 entry:
 
 Database alias                  = SAMPLE
 Database name                   = SAMPLE
 Database drive                  = /home/smith
 Database release level          = 8.00
 Comment                         =
 Directory entry type            = Indirect
 Catalog node number             = 0
 
Database 2 entry:
 
 Database alias                  = GDB1
 Database global name            = /.../cell_name/dir_name/gdb1
 Database release level          = 8.00
 Comment                         = DCE database
 Directory entry type            = DCE
 Catalog node number             = -1

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 node number             = 0
 Node number                     = 0

These fields are identified as follows:

Database alias
The value of the alias parameter when the database was created or cataloged. If an alias was not entered when the database was cataloged, the database manager uses the value of the database-name parameter when the database was cataloged.

Database global name
The fully qualified name that uniquely identifies the database in the DCE name space.

Database name
The value of the database-name parameter when the database was cataloged. This name is usually the name under which the database was created.

Local database directory
The path on which the database resides. This field is filled in only if the system database directory has been scanned.

Database directory/Database drive
The name of the directory or drive where the database resides. This field is filled in only if the local database directory has been scanned.

Node name
The name of the remote node. This name corresponds to the value entered for the nodename parameter when the database and the node were cataloged.

Database release level
The release level of the database manager that can operate on the database.

Comment
Any comments associated with the database that were entered when it was cataloged.

Directory entry type
The location of the database:

All entries in the system database directory are either remote or indirect. All entries in local database directories are identified in the system database directory as indirect entries.

Authentication
The authentication type cataloged at the client is used to determine whether the connection is being done with system or with DCE security.

Catalog node number
Specifies which node is the catalog node (MPP systems only). This is the node on which the CREATE DATABASE command was issued.

Node number
Specifies the number that is assigned in db2nodes.cfg to the node where the command was issued (MPP systems only). In non-MPP systems where there is no db2nodes.cfg file, the node number will always be zero.

Usage Notes

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.

See Also

CHANGE DATABASE COMMENT

CREATE DATABASE.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]