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.

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.

To display command history:
Use a SELECT statement to return the data from the command_history table.
The following example displays all command history for the past 30 days:
SELECT * FROM command_history;

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 Informix® 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.

Copyright© 2018 HCL Technologies Limited