SQL/MP Installation and Management Guide
Managing Database Applications
HP NonStop SQL/MP Installation and Management Guide—523353-004
10-37
Using DEFINEs With PATHMON
Using DEFINEs With PATHMON
If your application executes in a Pathway transaction processing environment, you
specify DEFINE names for a server class by using the SET SERVER DEFINE
command. SQL tables and views are referred to by using DEFINE names. When you
specify DEFINEs within the server configuration, you are associating DEFINE names
used by that server class with actual physical files.
You should indicate the maximum number of DEFINEs that will exist across all server
class definitions by entering a SET PATHWAY MAXDEFINES command. The Pathway
transaction processing environment must be cold started to set this attribute. Be sure
to allow an ample number of DEFINEs for your environment. If you do not specify a
value for MAXDEFINES, the default value is 0.
Suppose that you expect a total of 53 DEFINEs for your application. You indicate the
maximum number of DEFINEs by specifying this command in the PATHMON
configuration file:
= SET PATHWAY MAXDEFINES 53
Suppose that a server class, SRV-SDB102, contains SQL statements that refer to
these DEFINE names: =EMP, =DEPT, and =JOB. To associate these DEFINE names
with a physical object in your database, include these commands in your server class
configuration:
= SET SERVER DEFINE =EMP , CLASS MAP, &
= FILE \SYS1.$VOL1.TEST1.EMPLOYEE
= SET SERVER DEFINE =DEPT , CLASS MAP, &
= FILE \SYS1.$VOL1.TEST1.DEPT
= SET SERVER DEFINE =JOB , CLASS MAP, &
= FILE \SYS1.$VOL1.TEST1.JOB
.
.
= ADD SERVER SRV-SDB102
When a server process in the server class SRV-SDB102 starts, the specified DEFINE
definitions are included as part of the process environment. The system uses the
information in the DEFINE definitions when the server refers to a DEFINE by name.
For MAP DEFINEs or CATALOG DEFINEs, this approach results in the substitution of
the associated object or catalog name for the DEFINE name in the SQL statement at
run time.
Altering PATHMON DEFINEs
You can change DEFINEs without stopping the PATHMON environment. You must stop
the server class, however, to alter the DEFINEs it uses. To stop the server class, you
must freeze it.
Suppose that during development you must move the referenced objects to a new
volume. You can use the ALTER SERVER commands to replace the existing DEFINEs
with new DEFINEs, as shown: