Viewing SQL administration API history

You can view the history of all the SQL administration API functions that the were run in the previous 30 days in the command_history table in the sysadmin database.

Before you begin

You must be connected to the sysadmin database as user informix or another authorized user.

The command_history table shows if an administrative task was executed through an admin() or task() function and displays information about the user who ran the command, the time the command was run, the command, and the message returned when the database server completed running the command.

About this task

To display command history:

Procedure

Use a SELECT statement to return the data from the command_history table.

Example

The following example displays all command history for the past 30 days:
SELECT * FROM command_history;

What to do next

The following table shows sample commands and the associated results in a sample command_history table. For a description of all information in the command_history table, see the HCL OneDB™ Administrator's Reference.

Table 1. Example of some information in a command_history table
Command Sample returned messages
set sql tracing on SQL tracing on with 1000 buffers of 2024 bytes.
create dbspace Space 'space12' added.
checkpoint Checkpoint completed.
add log Added 3 logical logs to dbspace logdbs.