Memory Data Store

Overview

Memory Data Store, or MDS, is a transactional in-memory data store that can be used with SAS Federation Server. The MDS driver supports most of the FedSQL functionality. MDS runs strictly in memory with no backup data store. Therefore, changes are lost when the database is dropped or the server is restarted.
The database is created in memory when the first user connects to the database. The database remains in memory until one of the following conditions is met:
  • The server is shut down.
  • The data service or the catalog associated with the data service is dropped.
Note: You cannot drop a MDS data service or catalog if users are connected to the data service.
You can rename the database and change the memory value while users are connected, but you cannot drop the database while users are connected. To drop or rename a schema, the table within the schema cannot not be in use. Users can be connected to the database, but they cannot have a table open in the schema.

The MDS Data Service

You can configure an MDS data service and table using one of these methods:
You can create multiple data services if needed.

Catalog and Schema Support

Overview

Each MDS data service catalog contains a pre-defined, read-only schema, named SYSTEMINFO. The SYSTEMINFO schema contains an auto-generated MEMORY table that is described in the following section.

Limiting the Database Memory Size

To limit the memory size for a database, use the connection string option MAXDBMEM= that specifies the maximum size of memory to be used to store all rows of data in the database. This includes committed rows and pending row versions (INSERT, UPDATE, and DELETE operations that have not yet been committed or rolled back). If an INSERT, UPDATE, or DELETE operation exceeds this limit, an out of memory error is returned. For additional information, see Connection Options in the MDS Driver Reference.

The MEMORY Table

The MEMORY table contains information about memory usage and is always available. The first row contains statistics about the database. Additional rows provide information about each of the tables in the database.
The MEMORY table includes the following columns:
Columns in SYSTEMINFO.MEMORY Table
Column Name
Description
"DB_NAME"
The name of the current database. This will be the same as the catalog name.
"SCHEMA_NAME"
The name of the schema for the table (NULL for the database info row).
"TABLE_NAME"
The name of the table (NULL for the database info row).
"ROW_COUNT"
The number of rows in the table (NULL for the database info row).
"ROW_SIZE"
The size of a single row in the table (NULL for the database info row).
"MEM_SIZE"
The current memory used by the table and database for data.
"MEM_PEAK"
The peak memory used by the table and database since creation.
"MEM_LIMIT"
The maximum memory this database can use (NULL for table info rows). This value corresponds to the MAXDBMEM= option specified when the database was created.
To view the MEMORY table using SAS Federation Server Manager:
  1. In the navigation tree, open the MDS data service.
  2. Select the catalog associated with the MDS data service.
  3. Select the SYSTEMINFO schema to open it. The MEMORY table appears under the SYSTEMINFO schema.