The jomChangeAccessMode call, shown in the following example, indicates the database access mode for a process, as opposed to the access mode specified in the jomSignOn call for the process. (For details about the jomSignOn call, see "Opening a Process", earlier in this chapter.)
int jomChangeAccessMode(const DskHandle *pHandle, const DskParam *pMode, const DskParam *pUsage, UInt32 lineNo)
If the requested mode or usage conflicts with the current mode or usage of the database by existing users, the request fails and an exception is raised.
When a primary changes to archive mode, the SDS service, if active, is stopped. The service is restarted as necessary when exiting from archive mode.
The parameters for this call are described in the following subsections.