## diag_histlist

### Use

You display the available log files.

If you execute the DBM command without specifying a time stamp, the system displays a list of all available log files, the directory in which they are stored, and the time stamp for each.

If you specify a time stamp in addition to the DBM command, the system displays the file IDs of the log files. You can display the contents of a file by using the file ID (see: file_getfirst).

You can, however, also use the information about the directory to access log files using the operating system. The path for the directory that contains the log files is defined by the value of the special database parameter DIAG_HISTORY_PATH.

See also:

Concepts of the Database System, Log Files

### Prerequisites

You have the server authorization DBFileRead.

### Syntax

diag_histlist [<YYYYMMDDHHMMSS>]

<YYYYMMDDHHMMSS> | Change date of the backup history Time format: Year Month Day Hours Minutes Seconds

### Reply After Specifying a Command Without a Time Stamp

The system displays a list of all available log files.

OK

<timestamp> <directory>

<timestamp> <directory>

...

### Reply After Specifying a Command With a Time Stamp

The system displays the file IDs of available log files.

OK

<file_ID>

<file_ID>

...

Values for the Reply Fields

Value | Description
<timestamp> | Time stamp
<directory> | Directory
<file_ID> | File ID See also: Concepts of the Database System, Log Files

In the event of errors, see Reply Format.

### Examples

Call the Database Manager CLI, log on as operator OLEG with password MONDAY, connect to the database instance DEMODB, display the list of log files available in this session:

>dbmcli -u OLEG,MONDAY –d DEMODB diag_histlist

OK

20050324150815 C:\Documents and Settings\All Users\Application Data\sdb\data\wrk\DEMODB\DIAGHISTORY\DEMODB_20050324_15-08-15

20050324150845 C:\Documents and Settings\All Users\Application Data\sdb\data\wrk\DEMODB\\DIAGHISTORY\DEMODB_20050324_15-08-45

Call the Database Manager CLI, log on as operator OLEG with password MONDAY, connect to the database instance DEMODB, display the file ID’s of the database instance:

>dbmcli -u OLEG,MONDAY –d DEMODB diag_histlist 20050324150815

OK

DIAGHIST#20050324_15-08-15\knldiag

DIAGHIST#20050324_15-08-15\knldiag.run

DIAGHIST#20050324_15-08-15\knldiag.start

DIAGHIST#20050324_15-08-15\knltrace