Data that you change in a committed, durable transaction survives after you restart the server following a system failure or shutdown with nowait. The durability of a transaction in a traditional disk-resident database results from flushing the transaction log and the database pages to disk. In-memory databases provide no transactional durability after a server fails or impolite shutdown.
A relaxed-durability database offers two levels of durability from which you can select. The first level of durability is similar to an in-memory database: if the server fails, data is lost. The second level of durability is between that of a disk-resident database and that of an in-memory database: all transactions are completed and are persisted to disk only with a polite shutdown. This enables relaxed-durability databases to take advantage of many performance optimizations of in-memory databases.
Databases with a durability set to no_recovery or at_shutdown—whether they are in-memory or disk-resident—are referred to as low-durability databases. Data in low durability databases survives after a commit (provided you do not restart the server).
Use create database with durability=durability_level to set a database’s durability level. Adaptive Server supports full, no_recovery, and at_shutdown durability levels. See the Reference Manual: Commands.
Table 1-1 describes the operations you can perform at each durability level:
Operation |
no_recovery at_shutdown full |
||
---|---|---|---|
Create disk-resident databases |
Yes |
Yes |
Yes |
Create in-memory databases |
Yes |
No |
No |
Runtime rollback |
Yes |
Yes |
Yes |
Failure recovery |
No |
No |
Yes |
Database restored after a polite shutdown and restart. |
No |
Yes |
Yes |
Dump database to and load from archive. |
Yes |
Yes |
Yes |
Dump transaction log from device to archive. Load transaction log from archive to device. |
No |
No |
Yes |
Reduced durability and improved performance applies only to relaxed-durability databases using at_shutdown and no_recovery. You can bind relaxed-durability databases to named caches, for which the cache size can be smaller than the database size.