Use create inmemory database to create an in-memory database, using model or another user database as its template.
You can also create temporary databases as in-memory databases that reside entirely in in-memory storage. However, you cannot specify a template database for an in-memory temporary database.
When you use a user-database template to create an in-memory database, all users, permissions, objects, and procedures are copied from the template database to the in-memory database.
When you create an in-memory temporary database:
The guest user is added to the temporary database.
create table privileges are granted to public.
You cannot create system databases (for example, sybsecurity) as in-memory databases, because these databases must be updated in the event of an Adaptive Server failure.
When you create in-memory databases, you can specify that insert, update, delete and some bulk-copy-in operations are minimally or fully logged on a per-database, per-object, or a session-specific basis. See Chapter 3, “Minimally Logged DML.”
This example creates an in-memory database on a 2GB in-memory device. with override allows you to create the data and log segments on the same in-memory device (the only durability level supported for in-memory databases is no_recovery: attempts to use another durability level result in an error):
create inmemory database imdb1 on imdb_data_dev1 = '1.0g' log on imdb_data_dev1 = '0.5g' with override, durability = no_recovery