SAND CDBMS Tools Reference Guide
Database Server (nserv)

 

x
Chapter Index
Next Topic:
Providing Multi-User Database Access with nserv

 

Overview of Multi-User Database Access


Server Architecture

The nserv program running as a process constitutes a SAND database server. A SAND database server provides multi-user database access to client programs running as separate processes, on the same computer or on a network.


Database Access

Before clients can establish sessions with a database, the database must be started using nserv. A database that is running on nserv and ready to be accessed by clients is referred to as a database instance. A given nserv process may start only one database instance at a time.

The nserv command makes a particular database instance available for access on an operating system port (the default is 5001), and acquires necessary system memory. nserv makes a database available by locating and opening all the files constituting that database (which must be stored locally or on a NFS), and loading information from these files into main memory.

Once nserv is started, users can connect to the database instance using a SAND CDBMS client program (for example, nisqlm or ndlm), on the same host computer or over a network, via TCP/IP. In order to successfully establish a connection, the client software must be compatible with the version of nserv running the database instance, and users must be able to supply the connection name, instance name and a valid database user authorization and password. For information about connecting with nisqlm, consult the SAND CDBMS Interactive SQL (nisqlm) chapter.

The SAND Analytic Explorer tool and other ODBC-enabled client programs can also be used to connect to a database server via the Nucleus ODBC Driver. For more information, consult the the Nucleus ODBC Configuration Guide or the SAND Analytic Explorer help.


Database Operating Modes

A database instance may run in one of three operating modes, depending on the RunMode setting for the instance in the nucleus.ini file or environment variable:

REAL Mode
Standard
operation: upon execution of the COMMIT [WORK] command, changes made during the previous SQL transaction are written to the real database. Only one instance of a given database can be started in Real Mode.


VIRTUAL Mode

Upon execution of the COMMIT [WORK] command, changes made during the previous SQL transaction are written to a temporary Delta File, which is deleted when the database server instance is shutdown. Any number of virtual instances of a database may run concurrently; each must have a unique instance name.

When the virtual instance name is equal to the real database name (that is, when the instance is the primary virtual instance), the changes recorded in the Delta File may be applied to the real database by issuing the SHUTDOWN...KEEP CHANGE command from an SQL session: this transforms the Delta File into a permanent Update File, then restarts nserv with the -APPLY option to write the changes in the Update File to the real database.

Consult the Virtual Mode Operations section of the SAND CDBMS Administration Guide for more information.


PERSISTENT Mode

Time Travel operation: upon execution of the COMMIT [WORK] command, changes made during the previous SQL transaction are written to a temporary Delta File, which can be made permanent by executing the SHUTDOWN...KEEP CHANGE command from an SQL session (the real database remaining unchanged). The permanent Update File can serve as an entry point to the new version of the database.

Consult the Persistent Mode Operations section of the SAND CDBMS Administration Guide for more information.


nserv displays the current operating mode after the database instance has been successfully started in Virtual or Persistent mode.


Multiple Users

By default, a single database server instance can support up to 10 simultaneous database sessions (this limit may be changed by making a MaxUsers entry in the appropriate CONNECTION section in the server-side nucleus.ini file). Up to 10 sessions may be established from a single client. nserv treats each session as an independent client.

 

x
Chapter Index
Next Topic:
Providing Multi-User Database Access with nserv