An in-memory database resides completely in main memory, not in the file system. It is useful for testing and developing applications, when you may want to create and discard databases that will never be used again. It is also useful when you need to process only temporary or reproducible data.
If you have the required memory available, you may also benefit from faster processing (no disk I/O) and from the simplicity of not having to explicitly delete databases you have finished with.
To create an in-memory database, specify
For the network client driver, use the following connection URL. Because
the client driver does not understand the
Be careful to specify a colon (
When you create or refer to an in-memory database, any path that is not
absolute is interpreted as relative to the system directory, just as with file
system databases. For example, if the system directory is
Similarly,
When you use an in-memory database, you need to make sure to configure the
heap and the
For examples of how to use an in-memory database, see some of the
To remove an in-memory database, use the connection URL attribute drop as follows:
You can shut down an in-memory database using the shutdown=true attribute before you drop the database, but this is optional. Dropping the database also performs the shutdown.
When you drop the database,
If user
An in-memory database is automatically removed if any of the following happens:
If you create an in-memory database and then decided that you want to keep it
after all, you can use one of the backup system procedures
(SYSCS_UTIL.SYSCS_BACKUP_DATABASE, for example) to persist it. You can then boot
it as an in-memory database at a later time, or use it as a normal file system
database. See "Backing up and restoring databases" in