createRpsDatabase

createRpsDatabase(backupDir:     String;
                 schema:         Schema;
                 rpsMapping:     RelationalView;
                 rpsStorageMode: Integer;
                 verifyFiles:    Boolean;
                 overwriteFiles: Boolean;
                 quiesce:        Boolean);

The createRpsDatabase method of the JadeDatabaseAdmin class creates an RPS database for a specified schema and RPS mapping programmatically in the directory specified in the backupDir parameter. The backup directory must be a writable valid directory that is relative to the server.

This method can be executed on the primary system only.

Specify the schema and RPS mapping (that is, the RPS name) for which the RPS database is to be created in the schema and rpsMapping parameters, respectively.

Specify the storage mode of the created RPS database in the rpsStorageMode parameter, using one of the JadeDatabaseAdmin class constants listed in the following table.

Class Constant Integer Value Description
RpsStorageMode_Full 0 Full database replica RPS data store mode
RpsStorageMode_MappedExtent 1 Mapped extent RPS data store mode
RpsStorageMode_WorkingSet 2 Working set RPS data store mode

For details about the RPS database storage modes, see "RPS Data Store", see Chapter 2, "Relational Population Service (RPS) Support", in the JADE Synchronized Database Service (SDS) Administration Guide.

Set the verifyFiles parameter to true if you want the RPS mapping entities checked, or verified. In a checked RPS database creation, entities are read using the database access routines and object caching mechanisms, and at the same time, a verification of the data and indexes is performed. The verification performs various consistency checks similar to a database certify, to ensure the integrity of the RPS database creation. Furthermore, additional checksum information is added to the RPS database creation, to allow restore operations to verify the integrity of the RPS system.

Set the overwriteFiles parameter to true if you want to allow RPS database entities to overwrite existing entities in the destination RPS database. When this parameter is false, an exception is raised if an existing entity is detected.

Use the quiesce parameter to allow a quiesced read-only database transaction to be specified. When you set this parameter to true, the database is placed in a quiescent state by first allowing current active transactions to be completed and flushing modified buffers for cache to the stable database. In this mode, physical database files contain all committed updates to the database, and the files are opened in read-only mode with shared read access allowing the RPS create process to safely copy database files. In the quiescent mode, updating transactions are not permitted and attempts to execute database transactions raise a database exception. When an RPS database creation is performed in the quiescent mode, the physical database files are guaranteed to contain all database updates and a quiesced RPS database does not require backup recovery.

Set the quiesce parameter to false to allow updates during the RPS database creation process. When restoring an RPS database created with this option (that is, false), the restoration process requires the recovery of database transaction journals, which will be automatically transferred from the primary and the transactions applied.