alter logmode argument: Change the database logging mode (SQL administration API)
Use the alter logmode argument with the admin() or task() function to change the database logging mode to ANSI, buffered, non-logging, or unbuffered.
Syntax
Element | Description | Key Considerations |
---|---|---|
database_name | The name of the database with the logging mode that you want to alter. |
Usage
Unlike when you change the database logging mode with the ondblog or ontape utilities, when you use this function, the database remains accessible, and a level-0 backup is not always required. Ensure that no other session is active before running this function or it will fail.
Use the "a" argument to change the database logging to be ANSI compliant. After you create or convert a database to ANSI mode, you cannot change it back to any of the other logging modes.
Use the "b" argument to change the database logging to be buffered, so that transaction information is written to a buffer before it is written to a logical log.
Use the "n" argument to change the database logging to be non-logging, so that no database transactions are logged. You must perform a level-0 backup prior to using this argument.
Use the "u" argument to change the database logging to be unbuffered, so that data is not written to a buffer before it is written to a logical log.
Example
The following example changes the logging mode of a database named employee to unbuffered logging:EXECUTE FUNCTION task("alter logmode","employee","u");