HP 3000 Manuals

MODES OF ACCESS [ QUERY/V Reference Manual ] MPE/iX 5.0 Documentation


QUERY/V Reference Manual

MODES OF ACCESS 

Each person using QUERY to access a data base must specify one of the 8
modes of access.  The following table lists the capabilities you will
have with each mode.

--------------------------------------------------------------------------------------------
|                              |                                                           |
|             MODE             |                       CAPABILITIES                        |
|                              |                                                           |
--------------------------------------------------------------------------------------------
|                              |                                                           |
|              1               | Find (read), replace, add, delete entries (QUERY requests |
|                              | IMAGE dynamically lock and unlock the data base when      |
|                              | accessing it)                                             |
|                              |                                                           |
|              2               | Find and replace entries                                  |
|                              |                                                           |
|           3* or 4            | Find, replace, add, and delete entries                    |
|                              |                                                           |
|              5               | Find entries (QUERY locks and unlocks)                    |
|                              |                                                           |
|         6, 7*, or 8          | Find entries                                              |
|                              |                                                           |
--------------------------------------------------------------------------------------------

* Modes 3 and 7 give you exclusive access to the data base.  All other
modes allow others to share the data base.

A data base can only be shared in certain situations or environments.
The mode you specify must be acceptable for the environment already
established by other IMAGE and QUERY users (if any) when you open the
data base.  Here is a summary of the acceptable environments:

 *  multiple mode 1 and mode 5 users

 *  multiple mode 6 and mode 2 users

 *  multiple mode 6 users and one mode 4 user

 *  multiple mode 6 and mode 8 users

 *  one mode 3 user

 *  one mode 7 user

Subsets of these environments are also allowed.  For example, there may
be all mode 6 users or all mode 8 users.  There may also be one mode 1
user or all mode 5 users and so forth.

If a mode 3 or mode 7 user is currently accessing the data base that you
want to access, you must wait until that user either terminates their
IMAGE or QUERY session or accesses a different data base.  This is true
any time you try to access a data base with a mode which is incompatible
with other users accessing the same data base.  Changing your mode of
access may enable you access to the data base.

When deciding which mode to use, you should consider the following:

 *  If you merely want to find information and examine or report on it,
    you should open the data base with a find (read-only) mode, thus
    allowing other users as much capability as possible.  The following
    table gives the result of using each read-only mode.

--------------------------------------------------------------------------------------------
|                              |                                                           |
|             MODE             |                          RESULT                           |
|                              |                                                           |
--------------------------------------------------------------------------------------------
|                              |                                                           |
|              5               | The data base is locked for some operations and may slow  |
|                              | the rate of activity somewhat.  If mode 1 or mode 5 users |
|                              | are already accessing the data base, you must use mode 5. |
|                              |                                                           |
|              6               | Mode 2 users can replace entries, and one mode 4 user can |
|                              | replace, add, or delete; or mode 8 users can read         |
|                              | entries.                                                  |
|                              |                                                           |
|              7               | You have exclusive access to the data base.               |
|                              |                                                           |
|              8               | No other users can replace, add, or delete entries.       |
|                              |                                                           |
--------------------------------------------------------------------------------------------

An important advantage of using modes 5 through 8 is that the data base
is opened for reading only.  As a result, you are more likely to gain
access to the data base by avoiding restrictions due to the MPE account
structure.  Also, the files are not marked for inclusion in the MPE
system backup tapes (SYSDUMP) since they are not altered in any way.
This saves time when the daily system backup procedure is executed.

 *  If you want to find information and replace data in existing entries
    but do not need to add or delete any entries (and do not want anyone
    else to add or delete entries), you should open the data base with
    mode 2.

 *  If you want to perform all the operations including adding and
    deleting entries, you should open with mode 1, 3, or 4.  The
    following table gives the result of using each of these modes.

--------------------------------------------------------------------------------------------
|                              |                                                           |
|             MODE             |                          RESULT                           |
|                              |                                                           |
--------------------------------------------------------------------------------------------
|                              |                                                           |
|              1               | QUERY locks and unlocks the data base while performing    |
|                              | operations.  Other users are able to add and delete       |
|                              | entries.  (The previous comments for mode 5 apply here    |
|                              | also.)                                                    |
|                              |                                                           |
|              3               | You have exclusive access to the data base.               |
|                              |                                                           |
|              4               | You have exclusive ability to change the data base but    |
|                              | mode 6 users are able to read while you make changes.     |
|                              |                                                           |
--------------------------------------------------------------------------------------------

Figure 1-3 illustrates acceptable IMAGE/QUERY environments.  Users at
terminals can operate IMAGE or QUERY simultaneously.  A single user
indicates that only one user may specify that mode.  Two users indicates
that multiple users may specify that mode.  Terminals indicate the modes
which are incompatible with the current environment.  The capability of
each user is abbreviated as follows:  F = find, R = replace, A = add, D =
delete.

[]
Figure 1-3. IMAGE/QUERY Environments Logging and Mode Selection Opening the data base in modes 1 through 4 allows data base modifications to be logged to a log file and subsequently recovered if there is a system failure. If the data base administrator has enabled the data base for logging, certain requirements of the logging system must be met before the data base can be accessed in modes 1 through 4. These requirements are the responsibility of the data base administrator and console operator, and are discussed in the IMAGE Reference Manual. If any of these requirements are not satisfied, an IMAGE error message is returned.


MPE/iX 5.0 Documentation