Utility Program Operation (contd.) [ TurboIMAGE/XL Database Management System Reference Manual ] MPE/iX 5.0 Documentation
TurboIMAGE/XL Database Management System Reference Manual
Utility Program Operation (contd.)
Error Messages (contd.)
DBUNLOAD
Operation Discussion
1 An optional file equation that specifies the device class name for
the device on which the data entries are to be copied. The default
is device class TAPE.
2 Initiates execution of the DBUNLOAD program in the PUB group of the
SYS account.
3 In session mode, DBUNLOAD prompts for the database name and
maintenance word. In job mode, the database name and maintenance
word, if any, must be in the record immediately following the RUN
command.
4 After copying a data set without detecting a broken chain, DBUNLOAD
prints a message that includes the data set number and the number of
entries copied.
If DBUNLOAD detects a broken chain, the following messages are also
returned:
DATA SET m: Broken Chain at Entry #p[,following Entry #q]
Chain Head is Entry #r of Data Set #s
Key = k
l entries [expected,j entries salvaged]
where:
p is the entry number where the break was detected.
q is the number of the entry last unloaded from the front of the
chain, if any.
r is the entry number of the chain head.
s is the data set number of the chain head.
k is the value of the key of the broken chain.
l is the length of the chain according to the user label.
j is the number of entries salvaged from the chain.
These four message lines are repeated for every broken chain in the
data set, followed by the end-of-data-set summary that reports the
number of lost entries, if any:
DATA SET m: x ENTRIES[EXPECTED, t LOST!!]
For example:
DATA SET 1: 3 ENTRIES
DATA SET 2: Broken Chain at Entry #2, following Entry #1
Chain Head is Entry #5 of Data Set #1
KEY = AA
4 entries expected, 3 entries salvaged
DATA SET 2: 11 ENTRIES EXPECTED; 1 LOST!!
5 When the end of a volume is encountered, DBUNLOAD prints this
message:
END OF VOLUME n, y WRITE ERRORS RECOVERED
where n is the number of the volume and y is the number of write
errors from which DBUNLOAD successfully recovered. DBUNLOAD also
instructs the operator to save the current volume and mount a new one
by printing the following two messages on the system console (where z
is the logical device number of the tape drive and n is the volume
number):
SAVE VOLUME ON LOGICAL DEVICE z AS n
MOUNT NEXT VOLUME ON LOGICAL DEVICE z.
6 After the data sets have been successfully copied, DBUNLOAD issues a
completion message.
DATABASE UNLOADED
END OF PROGRAM
Console Messages
After you supply the database name and DBUNLOAD opens the output file, a
message is displayed on the system console. A tape must be mounted on
the appropriate unit and identified through an operator reply. Refer to
the Volume Management Reference Manual for instructions about console
interaction.
Using ControlY
When executing DBUNLOAD in session mode, you can press ControlY to
request the approximate number of entries in the current data set that
have already been written. DBUNLOAD then prints the following message on
$STDLIST:
<CONTROL Y>DATA SET m: x ENTRIES HAVE BEEN PROCESSED
Writing Errors
If an unrecoverable write error occurs, DBUNLOAD prints the message:
UNRECOVERABLE WRITE ERROR, RESTARTING AT BEGINNING OF VOLUME
and attempts to recover by starting the current volume again. It also
sends this message to the system operator (where z is the logical device
number of the unit):
WRITE PROBLEMS TRY ANOTHER VOLUME ON LOGICAL DEVICE z
If an excessive number of non-fatal write errors occur, DBUNLOAD again
attempts to recover from the beginning of the volume after printing the
following message on the $STDLIST and sends the same message to the
system operator as described for unrecoverable errors above:
EXCESSIVE WRITE ERROR RECOVERIES, RESTARTING AT BEGINNING OF VOLUME
Example (Session Mode)
:RUN DBUNLOAD.PUB.SYS
:
WHICH DATABASE? ORDERS
DATA SET 1: 3 ENTRIES EXPECTED, 3 ENTRIES PROCESSED.
DATA SET 2: 11 ENTRIES EXPECTED, 11 ENTRIES PROCESSED.
END OF VOLUME 1, 0 WRITE ERRORS RECOVERED
DATABASE UNLOADED
END OF PROGRAM
Example (Job Mode)
:JOB MGR.ACCOUNTA Initiate job.
:RUN DBUNLOAD.PUB.SYS Initiate execution of DBUNLOAD.
ORDERS Specify database name.
:EOJ Initiate end of job.
Because the user in this example is the database creator, a maintenance
word is not provided. The DBUNLOAD program is executed in chained mode
by default because no entry is specified.
As the job executes, the following information is printed on the
$STDLIST:
DATA SET 1: 50 ENTRIES EXPECTED, 50 ENTRIES PROCESSED.
DATA SET 2: 9 ENTRIES EXPECTED, 9 ENTRIES PROCESSED.
DATA SET 3: 24 ENTRIES EXPECTED, 24 ENTRIES PROCESSED.
DATA SET 4: 12 ENTRIES EXPECTED, 12 ENTRIES PROCESSED.
DATA SET 5: 5 ENTRIES EXPECTED, 5 ENTRIES PROCESSED.
DATA SET 6: 0 ENTRIES EXPECTED, 0 ENTRIES PROCESSED.
END OF VOLUME 1,0 WRITE ERRORS RECOVERED
DATABASE UNLOADED
END OF PROGRAM
Figure 8-1. DBUNLOAD File: Sequence of Entries
DBUTIL
The DBUTIL program performs several different functions according to the
command you enter. Each DBUTIL command is described separately on the
following pages.
Operation
1 :RUN DBUTIL.PUB.SYS
2 >>command
Operation Discussion
1 Initiates execution of the DBUTIL program in the PUB group of the SYS
account.
2 Prompts for a DBUTIL >>command. Enter one of the following:
HELP VERIFY
CREATE SET
ERASE ENABLE
MOVE DISABLE
PURGE RELEASE
DEACTIVATE SECURE
ACTIVATE SHOW
EXIT
DBUTIL commands can be abbreviated to the first three characters or less.
For example, >>CREATE can be abbreviated to >>C or >>CRE. Enter the HELP
command for the minimum abbreviation for each command.
When using the >>CREATE, >>PURGE, or >>ERASE command, you can bypass the
command prompt by specifying the full command as an entry point with the
RUN command; for example,
:RUN DBUTIL.PUB.SYS,CREATE
If you use an entry point, TurboIMAGE/XL prompts you for the database
name and, optionally, for the maintenance word, as follows:
Database name: database name [/maint word]
where:
database name is the name of a TurboIMAGE/XL database root file
catalogued in the current session or job's account
and logon group.
maint word is an optional ASCII string, one to eight
characters long with no commas or semicolons, that
defines a password to be used by anyone other than
the database creator to enable them to execute
certain DBUTIL commands, and operate other
utilities. (The database creator can also define
or change the maintenance word by using the >>SET
command).
In job mode, the database name and maintenance word, if any, must be in
the record immediately following the RUN command. To perform any DBUTIL
command except >>SHOW, >>HELP, or >>EXIT, you must have exclusive access
to the database or database-access file.
>>ACTIVATE
Activates the database-access file for use with DBOPEN. Before using this
command, read the description of remote database access in chapter 9.
This command should be used to prepare a database-access file before
accessing a remote database residing on another HP 3000.
Syntax
>>A[CTIVATE] database-access file name
For example:
ACTIVATE ORDDBA
where ORDDBA is the database-access file name
Parameter
database- is the name of the database-access file that you created
access file with an editor.
name
The database-access file (created on the local system) can
have any legal MPE/iX file name and is not dependent on
the database name.
Unexpected Results
TurboIMAGE/XL checks that the following conditions are not violated:
* File code is 0.
* Record length does not exceed 128 characters.
* File is unnumbered.
* File has at least three records.
An appropriate error message is returned if any of these conditions is
violated. If all of the conditions are satisfied, DBUTIL prints the
message:
Verification follows:
and the syntax of the file is checked record by record. The monitoring
messages associated with the file records are of the form:
FILE command: <result>
DSLINE command: <result>
HELLO command: <result>
where <result> is "Looks good" if there are no errors associated with the
record. Appendix A lists the record errors (results) that would cause
the file to be rejected.
Example
:RUN DBUTIL.PUB.SYS Initiate DBUTIL execution.
:
>>ACT ORDDBA Enter abbreviated form of ACTIVATE command and database-access file name.
Verification follows
FILE command: Looks good
DSLINE command: Looks good
HELLO command: Looks good
HELLO command: Looks good
ACTIVATED
>>
DBUTIL checks the structure of the file named ORDDBA for correct format
and activates the file. You will not be able to edit the file unless you
deactivate it using the DBUTIL >>DEACTIVATE command.
>>CREATE
Creates and initializes a file for each data set in the database.
Once the Schema Processor has created the root file, the database creator
must build a file for each data set in the database using the >>CREATE
command. DBUTIL initializes each data set to zeros and saves it as a
catalogued MPE/iX file in the same logon group as the root file, on the
device classes specified in the schema. The data set names are created
by appending two digits to the root file name. If the root file is named
XXXX, then the first data set defined in the schema is named XXXX01, the
second data set is named XXXX02, and so on. In order to save files for
the maximum of 199 data sets per database, files are incremented from
XXXX01-99, XXXXA1-A9, XXXXB1-B9, up to XXXXJ9.
To execute the DBUTIL program to create and initialize the database, you
must be the database creator; that is, you must log on with the same user
name, account and group that was used to run the Schema Processor and
create the root file. After DBUTIL has created and initialized the
database files, it prints a confirmation message on the list file device
and prompts for another command.
Syntax
>>C[REATE] database name [/maint word]
For example:
CREATE ORDERS
where ORDERS is the database name.
Parameters
database name is the name of a TurboIMAGE/XL database being
created.
maint word is the maintenance word that can be defined by the
database creator when the database is created. To
access the database, anyone other than the database
creator must supply this word.
Example (Session Mode)
:RUN DBUTIL.PUB.SYS Initiate DBUTIL executions.
:
>>CREATE ORDERS Respond to DBUTIL prompt with >> CREATE command and database name.
Database ORDERS has been CREATED
>>
DBUTIL creates, initializes, and saves files named ORDERS01, ORDERS02,
and so forth, one file for each data set. These constitute the empty
database.
Example (Job Mode)
:JOB MGR.ACCOUNTA Initiate job.
:RUN DBUTIL.PUB.SYS Initiate DBUTIL execution.
CREATE ORDERS Enter >>CREATE command and database name.
EXIT Terminate DBUTIL.
:EOJ Terminate job.
After the data files are created and initialized, DBUTIL prints the
following message on the list file device:
DATABASE ORDERS HAS BEEN CREATED
NOTE >>CREATE will fail if the native language defined for the database
is not supported at the system level. (Refer to appendix A or the
Native Language Support Programmer's Guide for more information.)
>>DEACTIVATE
Deactivates the database-access file to allow modifications to the file
or to disallow remote database access.
This command is used before you change the contents of the
database-access file. (Refer to chapter 9 for more information about
accessing remote databases.)
If DBUTIL successfully deactivates the file, it prints a confirmation
message on the list file device.
Syntax
>>DE[ACTIVATE] database-access file name
For example:
DEACTIVATE ORDDBA
where ORDDBA is the database-access file name.
Parameter
database-access file name is the name of the database-access file to be
deactivated.
Example
:RUN DBUTIL.PUB.SYS Initiate DBUTIL execution.
:
>>DEACTIVATE ORDDBA Enter a >>DEACTIVATE command and the database-access file name.
DEACTIVATED
>>
>>DISABLE
Disables the access, automatic deferred output, data prefetching,
dumping, ILR, indexing, MUSTRECOVER, logging, and recovery options.
Syntax
>>DI[SABLE] database name[/maint word] FOR option[,option...]
For example:
DISABLE ORDERS FOR LOGGING,RECOVERY
where ORDERS is the database name, and LOGGING and RECOVERY are the
options.
Parameters
database name is the name of a TurboIMAGE/XL database root file
created in the current session or job's account and
logon group.
maint word is the maintenance word defined by the database
creator when the database is created with DBUTIL.
This word must be supplied by anyone other than the
database creator.
option is an option from the list provided and described
below. More than one option can be specified.
Options
ACCESS disables user access to the database.
AUTODEFER disables automatic deferred output for the
database. AUTODEFER must be disabled if ILR or
roll-back recovery is to be enabled for a database.
DUMPING disables the automatic dumping of the user's stack
and the database control block in the event of a
TurboIMAGE/XL abort. Unless requested by
Hewlett-Packard support representatives, under most
circumstances dumping should be disabled. When
enabled, DUMPING creates files (before
TurboIMAGE/XL aborts) that can prove helpful in
determining the cause of such problems as a
corrupted control block.[REV BEG]
HWMPUT disables DBPUT action of placing entries at the
high-water mark first, instead of at the delete
chain head.[REV END]
ILR disables Intrinsic Level Recovery facility.
INDEXING disables third-party indexing (TPI) for the
database. Third-party indexing provides the
capability to do generic key searches, multiple
keyword retrievals, and sorted sequential searches
on any database. Refer to your vendor
documentation for information on TPI.
LOGGING disables the database roll-forward logging
facility. Roll-back and MUSTRECOVER must be
disabled first.
MUSTRECOVER disables the MUSTRECOVER option for the database.
Logging is not affected by disabling MUSTRECOVER.
If the database needs recovery when you disable
MUSTRECOVER, you are prompted to confirm the
DISABLE command. If you respond to continue, the
consistency of the database cannot be guaranteed.
To ensure database consistency, respond with N,
recover the database, and then disable MUSTRECOVER
after recovering the database.
PREFETCH disables the prefetching of data blocks required by
the DBPUT and DBDELETE intrinsics under certain
conditions. Refer to "Coordinating Additions to a
Database" or "Coordinating Deletions from a
Database" in chapter 4 for additional information.
RECOVERY disables the database roll-forward recovery
facility.
ROLLBACK disables the database roll-back logging facility.
However, logging will not be automatically
disabled. To disable logging, use the >>DISABLE
database name FOR LOGGING command. Otherwise,
logging (roll-forward) will remain enabled.
Default Conditions
Access is Enabled
Autodefer is Disabled
Dumping is Disabled[REV BEG]
HWMPUT is Disabled[REV END]
ILR is Disabled
Indexing is Disabled
Logging is Disabled
Mustrecover is Disabled
Prefetch is Disabled
Recovery is Disabled
Roll-Back is Disabled
Example
:RUN DBUTIL.PUB.SYS
:
>>DISABLE ORDERS FOR ACCESS
Access is Disabled
>>
>>ENABLE
Enables the access, automatic deferred output, data prefetching, dumping,
ILR, indexing, MUSTRECOVER, logging, and recovery options.
Syntax
>>EN[ABLE] database name[/maint word] FOR option[,option...]
For example:
ENABLE RETAIL FOR LOGGING
where RETAIL is the database name and LOGGING is an option.
Parameters
database name is the name of a TurboIMAGE/XL database being
enabled.
maint word is the maintenance word defined by the database
creator when the database is created with DBUTIL.
This word must be supplied by anyone other than the
database creator.
option is an option from the list provided and described
below. More than one option can be specified.
Options
ACCESS enables user access to the database.
AUTODEFER enables automatic deferred output for the database.
With deferred output the MPE/iX transaction manager
is not used to log database modifications to the
transaction manager log file. Instead, AUTODEFER
uses the MPE/iX file system default mode. This
mode keeps data pages in memory for as long as
possible until either lack of memory or the closing
of a file causes the pages to be written to disk.
In this mode a system failure can cause the loss of
database integrity. ILR is not compatible with
AUTODEFER; therefore, deferred output should be
used only in a batch situation where the database
has been backed up prior to batch processing. ILR
must be disabled prior to enabling AUTODEFER.
AUTODEFER can be used to increase I/O performance
by disabling Transaction Management (XM). However,
ILR and roll-back recovery must be disabled. You
must consider performance and data recoverability
when determining whether to use AUTODEFER.
Roll-forward logging can be used to preserve
consistency.
DUMPING is an option for Hewlett-Packard support use,
development, and debugging only. When enabled, the
TurboIMAGE/XL abort procedure copies the user's
stack and the database control blocks to files if a
TurboIMAGE/XL procedure aborts.[REV BEG]
HWMPUT enables DBPUT action of placing entries at the
high-water water first, instead of at the delete
chain head.[REV END]
ILR enables the Intrinsic Level Recovery facility.
TurboIMAGE/XL maintains structural integrity
without ILR enabled.
INDEXING enables third-party indexing (TPI) for the database
if not already done by the third-party software
when configuring the database for TPI. Third-party
indexing provides the capability to do generic key
searches, multiple keyword retrievals, and sorted
sequential searches on any database. Refer to your
vendor documentation for information on TPI.
LOGGING enables the database roll-forward logging facility.
MUSTRECOVER enables the MUSTRECOVER option for the database.
If logging is not already enabled, it is
automatically enabled when MUSTRECOVER is enabled.
While MUSTRECOVER is enabled, the database cannot
be accessed after a system failure until the
database is recovered with roll-forward or
roll-back recovery.
PREFETCH enables the prefetching of data blocks required by
the DBPUT and DBDELETE intrinsics under certain
conditions. Refer to "Coordinating Additions to a
Database" or "Coordinating Deletions from a
Database" in chapter 4 for additional information.
RECOVERY enables the database for recovery.
ROLLBACK enables the database roll-back logging facility. A
warning displays if the log file does not exist,
and the database remains disabled for roll-back
recovery. If logging is not in effect already, it
will be enabled automatically.
Default Conditions
Access is Enabled
Autodefer is Disabled
Dumping is Disabled[REV BEG]
HWMPUT is Disabled[REV END]
ILR is Disabled
Indexing is Disabled
Logging is Disabled
Mustrecover is Disabled
Prefetch is Disabled
Recovery is Disabled
Roll-Back is Disabled
Example
:RUN DBUTIL.PUB.SYS
:
>>ENABLE ORDERS FOR RECOVERY
Recovery is Enabled
>>
MPE/iX 5.0 Documentation