1.1

Table Of Contents
Related Topics
CREATE TABLE on page 476
Persist Table Data to a Disk Store on page 84
Evicting table data from memoryUse eviction to remove table data from memory, or to persist the overow data in a disk store.
Creating a Disk Store or Using the Default
You can create a disk store for persistence and/or overow or use the default disk store. Data from multiple
tables can be stored in the same disk store.
Using the Default Disk Store
Tables that do not name a disk store but specify persistence or overow in their CREATE TABLE statement are
automatically assigned to the default disk store, SQLF-DEFAULT-DISKSTORE. Also, gateway,
AsyncEventListener, and DBSynchronizer queues always use the default disk store. The default diskstore is
saved to the SQLFire data store's working directory, unless you change the value of the sys-disk-dir boot
property to specify another location.
Create a Disk Store
You create a named disk store in the data dictionary using the CREATE DISKSTORE DDL statement. You
then assign the disk store to an individual table by specifying the disk store in the table's CREATE TABLE DDL
statement. You can store data from multiple tables and queues in the same named disk store.
Persist Table Data to a Disk Store
You congure the persistence settings for a partitioned or replicated table when you create the table with the
CREATE TABLE DDL statement. SQLFire automatically recovers data from disk for persistent tables when
you restart SQLFire members.
Procedure
1. Ensure that the data dictionary is persisted in your SQLFire cluster. SQLFire persists the data dictionary by
default for all data stores, but you can explicitly enable or disable data dictionary persistence using the
persist-dd boot property.
Note: All SQLFire data stores in the same cluster must use a consistent persist-dd value. Accessors
cannot persist data, and you cannot set persist-dd to true for an accessor.
2. Create the disk store that you want to use for persisting the table's data, or use the default disk store. See
Creating a Disk Store or Using the Default on page 84.
3. Specify table persistence and the named disk store in the CREATE TABLE statement. For example:
CREATE TABLE Orders(OrderId INT NOT NULL,ItemId INT )
persistent 'OrdersDiskStore' asynchronous
This example uses asynchronous writes to persist table data to the "OrdersDiskStore."
Note: Persistent tables must be associated with a disk store. If you do not specify a named disk store
in the CREATE TABLE statement, SQLFire persists the table to the default disk store. For example,
the following statement persists the new table to the default disk store:
CREATE TABLE Orders(OrderId INT NOT NULL,ItemId INT )
persistent asynchronous
vFabric SQLFire User's Guide84
Managing Your Data in vFabric SQLFire