Octopus Administrator's Guide
Octopus Operations

 

Previous Topic:
Permanently Saving Database Changes Made via Octopus
Chapter Index
Next Topic:
Octopus On-Demand Database (ODDB)

 

Non-Persistent Updates


When Octopus is operating in Private Update mode, the non-persistent update functionality allows a user to commit (save) changes made to the database; in Public Update mode, it allows the user to commit changes to the database made while using an OctoEng other than the Update Engine.

When a user name is added to the list of "non-persistent change"-enabled users, they will receive the ability to make "non-persistent updates" the next time Octopus is started. As of release 5.2, it is also possible for users to create named session "contexts", associated with particular connections to Octopus, within which they will be able to perform non-persistent updates.

After executing a COMMIT command to make a non-persistent update, users or named contexts are "bound" to the OctoEng on which the commit was executed until a command is issued to unbind them.

Only specified users or named contexts are able to commit changes in this way. To have this capability, a user ID must:

NonPersistentChangeUsers=user1, user2, user3

-or-

NonPersistentChangeUsersConfigFile=c:\octo\users.ini

When a named context is created as described below, it is automatically added to the list of non-persistent change users.

Changes made with a non-persistent update are discarded in the following circumstances:

 

Creating a Named Non-Persistent Change Session Context

A single user authorization ID can define multiple context IDs associated with individual connections to Octopus and specify them as able to perform non-persistent updates. To specify the current connection to Octopus as a non-persistent change context, use the following command (DBA privileges are required):

ALTER SESSION SET CONTEXT { context-id | UNIQID } [ TEMPORARY | PRIVATE ]

Context-id can be any alphanumeric string. The UNIQID keyword may be substituted for context-id to automatically generate a context ID with the format SESS_x, where x is the Octopus session ID for the session.

This statement will assign the name context-id (or the automatically generated ID) to the current connection and add the context ID to the list of non-persistent change users. Any SQL Data Manipulation Language (DML) command executed via that connection and followed by a COMMIT [ WORK ] command will be considered as belonging to the associated context ID, which will be bound to the OctoEng where the change was committed. If the optional TEMPORARY keyword is included, the context will be dropped (as described below) when the session disconnects. If the optional PRIVATE keyword is included, the context will be dropped when the session disconnects and the OctoEng will be restarted.

To unbind a context ID from an OctoEng, remove the context ID from the non-persistent change users list and dissociate any connections assigned to that context ID, use the following command (DBA privileges are required):

ALTER SESSION DROP CONTEXT [ context-id ]

If the context-id argument is omitted, the currently bound context ID will be dropped.


Dynamic Changes to The Non-Persistent Change Users List

To add the name of the current user to the non-persistent change users list, issue the following command:

SET UPDATE NON-PERSISTENT


To add the name of another user to the "non-persistent change users", use the following command (DBA privileges are required):

SET UPDATE NON-PERSISTENT TO user-name


To remove the current user/context ID from the non-persistent update user list and unbind them from the OctoEng to which they are bound, issue the following command:

SET UPDATE NORMAL


To remove another user from the non-persistent update user list and unbind them from the OctoEng to which they are bound, issue the following command (DBA privileges are required):

SET UPDATE NORMAL TO user-name


To unbind the current user from the OctoEng to which they are bound while leaving them in the non-persistent update user list, issue the following command:

SET UPDATE UNBIND


To unbind another user from the OctoEng to which they are bound while leaving them in the non-persistent update user list, issue the following command (DBA privileges are required):

SET UPDATE UNBIND TO user-name


To unbind the current context ID from the OctoEng to which it is bound while leaving it in the non-persistent update user list, issue the following command:

SET UPDATE UNBIND CONTEXT


To unbind another context ID from the OctoEng to which they it is bound while leaving it in the non-persistent update user list, issue the following command (DBA privileges are required):

SET UPDATE UNBIND CONTEXT TO context-id


When Octopus is running, the following command can be issued to refresh the "non-persistent change users" list:

SET UPDATE REFRESH USER LIST

When this command is executed, new users on the list will be given non-persistent update capability, and any names no longer on the list will be unbound from the OctoEng to which they have been bound.

 

Getting Information About the Octopus Run Mode and Users' Update Status

To display information about the current Octopus run mode, about users with exclusive Public Update abilities or non-persistent update abilities, and about bindings of users or context IDs to OctoEng's, issue the following command:

SET UPDATE STATUS

Information about non-persistent update users/context IDs and bindings of users or context IDs to OctoEng's will be displayed only if one or more users or context IDs are present in the list of "non-persistent change users".


Nucleus.ini Parameters

The parameters described below are related to non-persistent updates. They are defined in the appropriate [OCTOPUS instance-name] sections of the nucleus.ini file.

BoundUserTimeOut=

Time in seconds before an OctoRefresh or COMMIT (in Public Update mode) will be executed on a server with bound statements. This time is linked to the last Octopus activity of a particular user.

Default: 900 seconds

BoundUserExclusiveTimeOut=

Time in seconds before a server will become available for a request. This time is linked to the last Octopus activity of a particular user.

Default: 900 seconds

NonPersistentChangeUsers= A comma-separated list of user names with non-persistent update capabilities.
NonPersistentChangeUsersConfigFile= The name of a file containing a list of user names (one per line) with non-persistent update capabilities. This parameter overrides the NonPersistentChangeUsers parameter, if both are set.
NPUOnHeaviestClassOnly= Possible values: TRUE (default) and FALSE

Setting this parameter to FALSE enables non-persistent updates via OctoEng's in any class other than the Login class. The default setting (TRUE) permits non-persistent updates only on OctoEng's in the the heaviest class.
 
Previous Topic:
Permanently Saving Database Changes Made via Octopus
Chapter Index
Next Topic:
Octopus On-Demand Database (ODDB)