Configurable EDB Volume Options

Other versions of this page are also available for the following:

Windows Mobile Not SupportedWindows Embedded CE Supported

8/28/2008

EDB enables you to set options on each EDB volume. These options are set using the CEVOLUMEOPTIONS (EDB) structure and the CeMountDBVolEx (EDB) function.

Once a volume has been mounted, you cannot change the volume options. Therefore, the volume options are considered only once, when the volume is first mounted.

The following table shows the settings you can adjust on an EDB volume.

CEVOLUMEOPTIONS member Description Range Default value

cbBufferPool

Specifies the size, in bytes, of the buffer pool.

NA

640 KB

dwAutoShrinkPercent

Specifies the amount of free space to allow before automatically shrinking the database.

0-100

60

dwFlushInterval

Specifies the interva, in seconds, at which the dirty pages in a volume are flushed to disk.

1-1000 seconds

10 seconds

cMaxNotifyChanges

Specifies the maximum number of changes to queue during a transaction.

NA

1000

dwDefaultTimeout

Specifies the number of milliseconds a transaction waits before abandoning the wait on a lock.

NA

2000

wszPassword

Password-protects and encrypts the volume.

NA

No password

The following list gives further details for these options:

  • cbBufferPool
    The buffer pool is used to cache pages and to manage transactions. The larger the buffer pool size, the better the performance, but the buffer pool consumes memory.

  • dwAutoShrinkPercent
    This option represents the percentage of the database that is free space. For example, a setting of 70 causes the database to shrink automatically when the free space exceeds 70 percent of the database size. A value of zero disables automatic shrinking.

    Note

    Automatic shrinking does not affect the OID of the database.

  • dwFlushInterval
    You can change this setting to determine how often EDB writes changes to disk. The shorter the flush interval, the more often EDB writes to disk. However, if the application crashes before changes have been flushed, changes are lost, but no corruption occurs.

    Note

    A flush occurs only if the data in the volume has changed.

  • cMaxNotifyChanges
    Use this setting to improve performance during long-running transactions. When the cMaxNotifyChanges threshold is exceeded, notification clients do not receive insert, update, and delete notifications. Instead, they receive only DB_NOTIFY_VOLUME_CHANGED notifications.
    For more information, see Using Notifications with EDB.

  • dwDefaultTimeout
    This setting specifies the time, in milliseconds, that a transaction wait for another transaction to release a lock. If the timeout time elapses, the transaction fails. When choosing a setting for dwDefaultTimeout, consider your concurrency scenario on the volume. If your application requires data to be flushed immediately, set dwDefaultTimeout to a low value. However, flushing is a resource-intensive operation that affects performance.

    Note

    EDB flushes data only if modifications have occurred.

  • wszPassword
    In addition to providing password protection, this setting also encrypts the data in the volume. The maximum password length is 40 characters.

    Note

    EDB does not support a shared volume.

See Also

Reference

CEVOLUMEOPTIONS (EDB)
CeMountDBVolEx (EDB)

Concepts

Using Notifications with EDB

Other Resources

EDB Database Support