Mimer SQL System Management Handbook TOC PREV NEXT INDEX

Mimer Developer Site


Creating the Example Database

BSQL input files are included in the Mimer SQL distribution which will create and then manipulate data in an example database.

The "crehotdb.sql" file creates the data structure for the example database and the "examples.sql" file contains various operations to manipulate data in the example database.

Before the data structure in the example database can be constructed, the initial database environment must be created according to the instructions given earlier in this chapter.

In the examples below the database named "HOTEL" will be the database wherein the example environment will be created:

 Username: SYSADM
 bsql hotel
 Username: SYSADM
 SQL> read 'crehotdb.sql';
 SQL> exit;
Note: On UNIX, the command mimexampledb is available for creating the example environment (see the mimexampledb man-page).
On Windows
 bsql hotel
 Username: SYSADM
 SQL> read 'crehotdb.sql';
 SQL> exit;

The "examples.sql" file contains various SQL and PSM statements which may be examined and executed interactively, statement by statement, in order to follow the operations being performed.

Many of the operations are presented as examples in the accompanying Mimer SQL User's Manual so they may be studied interactively in conjunction with reading the manual. See also the "cjdate.sql" file.

Removing a Database

To remove a database, perform the following steps:

  1. Check that no one is using the database, and that no database server is started against the database you are going to remove.
  2. Create a list of all databank files by doing the following:
     $ bsql -s database
     Username: SYSADM
     Password: xxxxxx
     SQL> EXIT;

UNIX: For a UNIX installation, databanks can be located in any directory specified in the path list given for the local database definition in:
For a complete list of the databank files included in a database the command mimdbfiles can be used (see the mimdbfiles man-page).

  1. Using the list generated in the previous step, locate and delete all the physical databank files. If no directory is specified, the directory will be the home directory of the database, see The Local Database. Delete any directories that have been specifically created to hold databank files for the database.
  2. Remove the database from the list of accessible databases, see Making the Database Accessible. This will involve deleting it from the list of local databases on the node where it resides and deleting the remote database definition created for it on each other network node from which it was made accessible.

VMS: On VMS, the SQLHOSTS file have to be edited.

Win: On a Windows system, the Mimer Administrator is used for this operation.

UNIX: On UNIX, the SQLHOSTS file have to be edited. This can be done by using the mimhosts program (see the mimhosts man-page).

  1. If any database-specific commands have been added to a system startup or shutdown file, these should be removed.

VMS: Database-specific commands are often added to the VMS system startup file:
and the VMS shutdown file:
so these may have to be edited.

Win: Under Windows NT, when the local definition of a database is removed, the associated service is also automatically removed.

UNIX: For a UNIX installation, this is usually the rc or init.d facilities.

Upright Database Technology AB
Voice: +46 18 780 92 00
Fax: +46 18 780 92 40
Mimer SQL System Management Handbook TOC PREV NEXT INDEX