changeDbAccessMode
changeDbAccessMode(mode: Integer; usage: Integer) updating;
The changeDbAccessMode method of the JadeDatabaseAdmin class changes the access mode of the database.
Use the mode parameter to specify the database access mode that you require. The values for the mode parameter are defined by the JadeDatabaseAdmin class constants listed in the following table.
Constant | Integer Value | Description |
---|---|---|
Mode_Archive | 4 | Quiesces the database for archive backup. |
Mode_Default | 9 | Restores the database to the initial mode and usage values. |
Mode_Exclusive | 1 | Requests exclusive access to the database. If other users already have the database open, a database mode conflict is reported. Similarly, if one user already has the database open in exclusive mode, other users are prevented from opening the database. |
Mode_Shared | 0 | Enables multiple current users to open the database. |
Mode_Snapshot | 6 |
Conditions the database for external third‑party snapshot backup. |
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.
For details about external third‑party snapshot backups, see "
Use the usage parameter to specify the database usage that you require. The values for the usage parameter are defined by the JadeDatabaseAdmin class constants listed in the following table.
Constant | Integer Value | Description |
---|---|---|
Usage_NoAudit | 2 | Specifies that the recovery log is not maintained. This usage can result in better performance, but if an abnormal termination occurs and the database is not audited, recovery is not possible and the database must be restored from backup. Use the shared access mode to specify multiple users with no‑audit usage. However, if any one application or shared‑access user opens the database in no‑audit mode, all users must request no‑audit usage or a conflicts exception is raised. |
Usage_ReadOnly | 1 | Specifies that applications have read‑only access to the database. Multiple instances of the Jade Object Manager can access the database in read-only mode. |
Usage_Update | 0 | Enables applications to update the database. |