SAND CDBMS Administration Guide
Virtual Mode Operations

 

Previous Topic:
Introduction to Virtual Mode
Chapter Index
Next Topic:
Saving Changes in Virtual Mode

 

Starting a Virtual Database Instance


Each virtual instance of a given database has a unique instance name, which must correspond to a [DATABASE instance-name] section in the server-side nucleus.ini file. The instance name is specified in the nserv invocation when starting the virtual instance, and in connection requests from client programs (for example, nisqlm).
The master virtual instance, which can be used to update the real database, must have the same name as the real database; all other instances ("read-only" secondary instances) must have unique names that are different from the real database name.

To set a database instance to run in Virtual Mode, include the following parameters in the appropriate [DATABASE instance-name] section of the nucleus.ini file:

RunMode=virtual
PrimaryDB=<real database name>
DatabasePath=<path to primary database file>

The PrimaryDB parameter specifies the name of the real database upon which the virtual instance will be based. In the case of the master virtual instance, this parameter must be left blank, or must be the same as the instance-name in the DATABASE section header (that is, instance-name must be the same as the real database name). If this is not the master virtual instance, the DatabasePath value must match the one specified in the [DATABASE real-database-name] section.

Note that once the virtual instance has been successfully started, the nserv program returns a message indicating that it is running in Virtual Mode. In order to prevent port conflicts, each concurrently-running virtual instance must use its own connection.

In the example illustrated below, one read-only or secondary virtual instance (v_test) and a master virtual instance (test), have been started, based on the real database called test.

 

Figure 2: Master and Read-Only Virtual Instances

 

Delta File Settings


The following parameters can be included in the [DATABASE instance-name] section of the nucleus.ini file to set the location and maximum size of the Delta File for the instance.


DeltaPath

Specifies the directory location of the Delta File for the instance.

default: <directory of the database-name.n00 file>


MaxDeltaFileSize

Specifies the maximum size of the Delta File for the instance, expressed in megabytes. A value of  0 denotes no limit.

default: 0 (unlimited file size)


MaxDeltaFileRatio

Specifies the maximum size of the Delta File for the instance, expressed as a percentage of the primary database size.

If this parameter is included, it takes precedence over the MaxDeltaFileSize parameter, with one exception: if MaxDeltaFileRatio is set to 0 (zero), the MaxDeltaFileSize parameter is used.

Note:
MaxDeltaFileRatio should not be used with small databases; if the database size is around 10 GB or less, use the MaxDeltaFileSize parameter instead.

default: 0 (that is, the MaxDeltaFileSize parameter is used)

 

Sample nucleus.ini Entry for a Virtual Database Instance (UNIX):

[DATABASE customer_vdb]
DatabasePath=/usr/sand/db
Cache=2048
RunMode=virtual
PrimaryDB=customer
MaxDeltaFileSize=0
MaxDeltaFileRatio=10
DeltaPath=/usr/sand/delta

 


Previous Topic:
Introduction to Virtual Mode
Chapter Index
Next Topic:
Saving Changes in Virtual Mode