Database Setup

Reality provides various ways for you to automatically set up a database:

Create/Update Proc

Whenever you create a new database or update an existing one, a Proc is run to configure the database. This runs a second Proc called CUSTOM-SETUP from the file SITE-PL in the SYSPROG account, into which you can place your own configuration commands.

Database Start-up Proc

The database configuration parameter DbStart allows you to specify that a system Proc should be run whenever you start up a database. This Proc resets any despooler records that have been left in an inconsistent state, clears the USER.LOG file and marks any ‘active’ PH-HISTORY items as ‘killed’. The system Proc also runs second Proc called DBSTART from the file SITE-PL in the SYSPROG account, into which you can place your own configuration commands. A template containing typical commands can be found in the item DBSTART.TEMPLATE of the file SYSPROG-PL (SYSPROG account).

When your DBSTART Proc is called, the primary input buffer will contain the following information for you to make use of:

Input buffer parameter Description
%1 – %9 Scratch/work parameters.
%10 R – restart of database daemon.
S – system start.
%11 C – clean database start.
D – dirty database start.
%12 P – parallel execution with other processes.
X – exclusive execution, no other logged on ports.
%13

Failsafe status:

0 – Stand-alone - resilience not active.
1 – Stand-alone - transaction handling.
2 – Stand alone - transaction handling and logging.
3 – Shadow.
4 – Failsafe - Primary.
5 – Failsafe - Secondary.
12 – (4+8) Failsafe - Primary - failed.
13 – (5+8) Failsafe - Secondary - failed.

%14 0/1 – User is/isn’t the database owner.
%15 0/1 – database type is file-store/partition.
%16

Machine type is:

0 – Series 19.
1 – Unix.
2 – Windows 32 bit.

%17 Today’s date in the default format.
%18 Today’s date yymmdd – useful with time for unique file/item-ids.
%19 Time hh:mm.
%20 Time hhmm.
%21 Total number of real and pseudo ports.

 

Go to top button