SAND CDBMS Tools Reference Guide
Database Configuration Tool (nconfig)

 

Previous Topic:
Database File Configuration Overview
Chapter Index
Next Topic:
Creating and Configuring a Database

 

Invoking and Using nconfig


Preparation

There are a few basic tasks which must be completed before nconfig can be used. They are as follows:

    1. SAND CDBMS software must be installed.
    2. The NUCLEUS environment variable must be set, specifying the SUPPORT directory that contains the nucleus.ini file and seed database (ndb.n00).
    3. The nconfig tool (an executable file called nconfig in UNIX, or nconfig.exe in Windows) should be located in the directory specified in the PATH environment variable. If it is not, a full path specification will be required to invoke nconfig.


nconfig Invocation

The nconfig invocation is entered at the operating system command prompt and has the following form:

nconfig [database-name]


nconfig Invocation Arguments:

database-name

The database-name argument is optional. Specify the name of an existing database (without the file name extension) if you want to modify its configuration. If you specify a legal file name that does not exist, nconfig will create a database in the current directory with that file name and an extension of .n00. The file name may be no more than 128 characters in length, excluding the extension. If a database-name argument is not included, nconfig assumes a database name of db.n00.


Using nconfig

Successful invocation of nconfig displays the SAND Database Configuration Program banner and the nconfig command prompt. If a new database name was entered in the nconfig invocation, nconfig displays the new database name before the command prompt as follows (in this example, vip was entered for the database argument):

NEW DATABASE: vip.n00
command:

The nconfig tool is command-driven. nconfig commands are initiated by typing the first letter of the desired command at the command prompt and pressing the <Enter> key. nconfig commands are not case-sensitive.


The nconfig Help Command

Once nconfig has been invoked, the letter 'H' (for Help) may be entered at the command prompt in order to display all the nconfig commands and their respective invocation keys. The nconfig help screen has the following appearance:

command: H

Valid commands are:
(D)efault configuration
(F)ile configuration
(H)elp-display this help screen
(T)empfile directory
(Q)uit
(R)ead file
(V)iew configuration
(W)rite file

command:

The remainder of this section describes the use of the basic nconfig commands Read File, Write File, View Configuration, and Quit. Other commands which perform the actual configuration of a database (that is, Default Configuration, File Configuration, and Tempfile Directory) are described in subsequent sections.


The Read File Command

Use the Read File command to access an existing database configuration. The Read File command is useful in the following situations:

    1. Accessing a database configuration for viewing purposes
    2. Accessing a database configuration for modification
    3. Creating a new database which is identical to an existing database.

To execute the Read File command, type the letter 'R' at the command prompt and press <Enter>. nconfig displays the following prompt:

File to read (database.n00):

where database is the name of the SAND database supplied in the nconfig invocation — or, if no name was specified in the invocation, db (the default database name assigned by nconfig).

To accept the name suggested by nconfig, press <Enter>.

To access the configuration of an existing SAND database, type the name of the database at the File to read prompt (without the .n00 extension) and press <Enter>.

 

The Write File Command

The Write File command creates a new database using the SAND seed database with the currently specified configuration (if no existing database was specified in the nconfig invocation or accessed using the Read File command). The seed database is a file called ndb.n00, stored in the SAND CDBMS SUPPORT directory.

To execute the Write File command, type the letter 'W' at the command prompt and press <Enter>. nconfig displays the following prompt:

file to write (database.n00):

where database is the name of the SAND database whose configuration is currently being accessed through nconfig — or, if no name was specified in the invocation or using the Read command, dB(the default database name assigned by nconfig).

To accept the name suggested by nconfig, press <Enter>.

To create a new database file in the current directory with the current configuration, type the name of the database at the File to write prompt (without the .n00 extension) and press <Enter>. If an existing database is being accessed through nconfig when the Write File command is issued, then any modifications to the database configuration will be written to the existing database file. nconfig requests confirmation before overwriting the configuration record of an existing database.

Note:
If the database was originally accessed using the nconfig database-name command, and a new name is specified at the File to write prompt, the new database will be created but will not be usable. To create a new database based on an existing database configuration, use the Read File command to access the existing database, then issue the Write File command specifying the new database name.

 

The View Configuration Command

Use the View Configuration command to display the configuration settings for a SAND database. To execute the View Configuration command, type the letter 'V' at the command prompt and press <Enter>. nconfig displays a screen like the following (this example reflects the UNIX version of nconfig):

command: V

CURRENT CONFIGURATION (unchanged)

============================================
database root                                                  vip.n00
database state:                                             DISMOUNTED
creating revision:                                       6.1
creation time:                                              Mon Oct 26 14:47:37 2009
expiration time:                no expiration time
compatibility ID:                                        30
record limit:                   2147483648
page size:                      1048576
SQL collation:                  BINARY
tempfile directory:             .
data drives:                                                  2
drive        file size     path
         0          2048                     /usr/sand/db01
         1          2048                     /usr/sand/db02
 tmp   
4194304     .

files:  2
drive file
  used/maximum  path
0     1     2048/2048    
/usr/sand/db01
1     2     0311/2048    
/usr/sand/db02
--------------------------------------------
                             2359/4096                                     TOTALS



database root

The name of the SAND database root file. In addition to containing data in tables, the database root file contains the database configuration record.
 

database state
The operational state of the current database. There are three possible database states:

MOUNTED
The database state should never be MOUNTED when accessing a database using nconfig, since nconfig can only access databases that do not have running instances. If the database state is MOUNTED, try to start it with the nserv program and then shut it down again before continuing.

DISMOUNTED
A database state of DISMOUNTED is normal when accessing an existing database using nconfig.

NEW
A database state of NEW indicates a newly created database.

 
creating revision
The release number of SAND CDBMS software that was used to create the database.
 

creation time
The date and time when the current database was created.
 

expiration time
record limit
These parameters reflect any time or size limits that have been set for the database by the vendor. A record limit of 2,147,483,648 (1-MB page size) or 34,359,738,368 (64-KB page size) corresponds to the maximum database size supported by SAND CDBMS.


page size
The size of the blocks used to store data in SAND database files. In the UNIX environment, the page size is 1,048,576 bytes (1 MB) or 65,536 bytes (64 KB); in the Windows environment, the page size is always 65,536 bytes (64 KB).


compatibility ID
The compatibility ID for the current database. Databases created with a particular SAND CDBMS release may be used with a different SAND CDBMS release if the compatibility ID is the same.


SQL Collation
The collation table (character sorting order) that will be used for system-created character-type domains in the database. The value displayed here depends on the type of seed database (ndb.n00 file) used in creating the database, and can be one of the following:

BINARY
Enables the standard ASCII sequence (with the set of uppercase characters sorted before those in lowercase).

BINARY_UPCASE
Converts the lowercase characters of the standard character repertoire (a-z) to uppercase (A-Z), allowing for sorting of character data in “dictionary order”.

LATIN01
Provides the expected sort order for the accented characters of non-English Western European languages, with the set of uppercase characters sorted before those in lowercase. This collation table conforms to the Latin-1 (ISO/IEC 8859-1) standard.

LATIN01_UPCASE
Converts the lowercase characters of the LATIN01 repertoire to their uppercase equivalents, just as the BINARY_UPCASE collation table does for the ASCII characters.

LATIN02
Provides the expected sort order for the accented characters of non-English Eastern European languages, with the set of uppercase characters sorted before those in lowercase. This collation table conforms to the Latin-2 (ISO/IEC 8859-2) standard.

LATIN02_UPCASE
Converts the lowercase characters of the LATIN02 repertoire to their uppercase equivalents, just as the BINARY_UPCASE collation table does for the ASCII characters.

The database SQL Collation value does not affect domains that are explicitly created by means of CREATE DOMAIN statements.


tempfile directory
The directory location of the database temporary file, which is used to hold temporary records produced during database operation (this is not to be confused with the temporary Delta File used in Virtual mode operations). A period ( . ) indicates that the file is located in the current directory (this is the default setting). The location and maximum size of the temporary file can be changed using the nconfig T command; the default maximum size setting of no limit corresponds to a maximum of 4,194,304 MB (or 67,108,864 blocks of 64 KB).


data drives

Opposite the data drives label, nconfig indicates the number of drive/path locations designated for storage of SAND database files, including the database temporary file (tmp). On the following line are the headings drive, file size, and path. Beneath these headings, nconfig displays the drive number (assigned by nconfig), the maximum database file size for that drive (in one-megabyte blocks), and the file system/directory path location for file storage, respectively.

Drive 0 corresponds to the drive and directory path where the primary database file resides. Only one primary database file can reside in a given directory location. For the UNIX version of SAND CDBMS, the default maximum file size for database files on drive 0 (and by association, for the primary database file) is 2,147,483,648 blocks of 1 MB or 34,359,738,368 blocks of 64 KB, which corresponds to a maximum database size of 2 PB (2048 TB). For Windows, due to operating system restrictions, this maximum is 524,288 blocks of 64 KB, corresponding to a maximum file size of 32 GB. The maximum number of drives that can be designated for storing database files is 32 for both UNIX and Windows.

The default configuration consists of a single drive location, in the current directory (signified by a period, . ). Exercise care when using this specification, since any secondary database files will be created in the directory in which the nserv program is started, and not necessarily in the directory in which nconfig was originally executed. This means that if nserv is subsequently started in a different directory, the database will not be usable because the location of the secondary files will not be known. For this reason, the use of absolute path specifications for database drives is recommended.

In the example above, two locations have been established for storage of database files. Drive 0 corresponds to the file system location /usr/sand/db01, and drive 1 corresponds to the file system location /usr/sand/db02. Each has been defined to have a maximum file size of 2048 megabytes.


files

Opposite the files label, nconfig displays the actual number of database files that make up the database. Beneath the label, nconfig displays the drive number, name, current size, and maximum size of each of the files that make up the database.

Consider the examples in the previous display (for UNIX):

0 1:2048/2048 vip.n00
1 2:0311/2048 vip.n01

The first line indicates that the primary database file (that is, vip.n00) resides in drive 0, has a current size of 2048 one-megabyte blocks, and a maximum size of 2048 one-megabyte blocks. The second line indicates that the second database file (vip.n01) resides in drive 1, has a current size of 311 one-megabyte blocks, and a maximum size of 2048 one-megabyte blocks.

Each of the data files is named by nconfig according to the convention database-name.nxx, where xx is a hexadecimal number indicating the position of the data file in the sequence of data files. That is, database-name.n00 is the primary database file, database-name.n01 is the first data file following the primary database file, database-name.n02 is the next, and so on, and so on, up to database-name.nfff.

The database files are placed on the available file system/directory path locations according to the order in which they are created. The primary database file resides on drive 0, the first file following it resides on drive 1, the next on drive 2, and so on until the list of available drives is exhausted, at which point the next file created is placed on drive 0, the next on drive 1, and so on. When a drive in the list runs out of space, it is simply not used to store any more new files.


<number>/<number> TOTALS

nconfig displays the total of the current file sizes and the total of the maximum file sizes (in one-megabyte or 64-kilobyte blocks) beneath the list of data files. These two figures indicate, respectively, the sum of the analogous figures for the individual data files.


The Quit Command

The Quit command ends the nconfig program and returns to the operating system prompt. To execute this command, type the letter 'Q' at the command prompt and press <Enter>.

If you were accessing a new database or changing an existing database configuration, nconfig will prompt for confirmation that it should quit without first executing a Write File command. Enter the letter 'N' to return to the system prompt, or the letter 'Y' to continue using nconfig. Note that entering 'Y' does not result in a Write: the Write File command actually must be executed after entering 'Y.'

 

Previous Topic:
Database File Configuration Overview
Chapter Index
Next Topic:
Creating and Configuring a Database