The ondblog utility

Use the ondblog utility to change the logging mode for one or more databases.

>>-ondblog--+-buf-------+--+-------------+---------------------><
            +-unbuf-----+  | .-,-------. |   
            +-nolog-----+  | V         | |   
            +-ansi------+  +---db_list-+-+   
            +-cancel----+  '- -f--dbfile-'   
            +- -V-------+                    
            '- -version-'                    
Element Purpose Key Considerations
buf Sets the logging mode so that transaction information is written to a buffer before it is written to a logical log None.
unbuf Sets the logging mode so that data is not written to a buffer before it is written to a logical log None.
nolog Sets the logging mode so that no database transactions are logged None.
ansi Changes database logging to be ANSI compliant Once you create or convert a database to ANSI mode, you cannot change it back to any of the other logging modes.
cancel Cancels the logging-mode change request before the next level-0 backup occurs None.
-f dbfile Changes the logging status of the databases that are listed (one per line) in the text file whose pathname is given by dbfile This command is useful if the list of databases is long or used often.
db_list Names a space-delimited list of databases whose logging status is to be changed If you do not specify anything, all databases that the database server manages are modified.

Usage

If you turn on transaction logging for a database, you must create a level-0 backup of all of the storage spaces that contain data in the database before the change takes effect.

For more information and examples of logging modes, see Modify the database-logging mode with ondblog.

Alternatively, you can change the logging mode by using an SQL administration API command with the alter logmode argument.

You cannot use the ondblog utility on High-Availability Data Replication (HDR) secondary servers, remote standalone (RS) secondary servers, or shared disk (SD) secondary servers.

Return codes

The ondblog utility logs messages in the BAR_ACT_LOG file.

For many of the return codes, you can check the ON-Bar logs to find the source of the problem:

  1. Check the BAR_ACT_LOG file for accompanying messages.
  2. Set the BAR_DEBUG configuration parameter to a positive integer and retry the operation.
  3. Check the ON-Bar debug log file.
Table 1. Return codes for the ondblog utility
Return code Description User action
1 An error reading the onconfig file. Check that the onconfig file is in the $INFORMIXDIR/etc/$ONCONFIG directory. If the BAR_ACT_LOG and BAR_DEBUG_LOG configuration parameters are set, make sure that the files are valid.
2 A linked list error. See the accompanying message.
3 The user is not authorized to run the command. Run the ondblog commands as the root user, user informix, as a Windows administrator, or as the owner of the database server.
4 Failed to set the INFORMIXSHMBASE environment variable to -1. Contact HCL Software Support.
5 The database server is not online. Start the database server.
6 The command option is invalid. Correct the spelling of the option.
7 Failed to communicate with the backup utility. Check that the database server is online and that ON-Bar is configured.
9 Failed to allocate memory. Check the ON-Bar logs for more information. You might need to ask your System Administrator to either increase your swap space or to install more memory in your system.
16 Failed to open the file. Check the ON-Bar logs for more information.
17 Cannot change to the specified logging mode. Check the ON-Bar logs for more information.
18 Failed to change the logging mode. Check the ON-Bar logs for more information.
19 An SQL error occurred. Check the ON-Bar logs for more information.
20 An empty list problem occurred. Check the ON-Bar logs for more information.