Commands and Qualifiers

The MUPIP commands described in this section are used for common database operations and serves as the foundation for more advanced functionality like Journaling and Replication.

BACKUP

Saves the contents of the database. It provides a consistent application snapshot across all database regions involved in the backup operation.

The format of the MUPIP BACKUP command is:
B[ACKUP]
[
 -BK[UPDBJNL]={DISABLE|OFF}]
 -B[YTESTREAM] [-NET[TIMEOUT]]
 -DA[TABASE]
 -DBG
 -[NO]NEWJNLFILES[=[NO]PREVLINK],[NO]S[YNC_IO]]
 -O[NLINE]
 -REC[ORD]
 -REPL[ACE]
 -REPLINSTANCE=target_location
 -S[INCE]={DATABASE|BYTESTREAM|RECORD}
 -T[RANSACTION]=hexadecimal_transaction_number
] region-list[,...] destination-list
[Important] Important

MUPIP BACKUP does a more comprehensive job of managing backup activities than other backup techniques such as a SAN backup, breaking a disk mirror, or a file system snapshot because it integrates journal management, instance file management, and records timestamps in the database file headers. To use other techniques, you must first freeze all regions concurrently with a command such as MUPIP FREEZE -ON "*" in order to ensure a consistent copy of files with internal structural integrity. FIS neither endorses nor tests any third party products for backing up a GT.M database.

  • MUPIP BACKUP supports two methods of database backup: -BYTESTREAM and -DATABASE. MUPIP BACKUP -BYTESTREAM directs the output to a broad range of devices, including disks, TCP sockets, and pipes. MUPIP BACKUP -DATABASE directs the output to random access devices (that is, disks).

  • [NO]ONLINE qualifier determines whether MUPIP BACKUP should suspend updates to regions. For example, MUPIP BACKUP -NOONLINE suspends updates to all regions from the time it starts the first region until it finishes the last region. However, it does not suspend processes that only read from the database.

  • By default, MUPIP BACKUP is -DATABASE -ONLINE.

  • If any region name does not map to an existing accessible file, or if any element of the destination list is invalid, BACKUP rejects the command with an error.

  • region-list may specify more than one region of the current global directory in a list. Regions are separated by a comma, and wildcards can be used to specify them. Any region-name may include the wildcard characters * and % (remember to escape them to protect them from inappropriate expansion by the shell). Any region name expansion occurs in M (ASCII) collation order.

  • Depending on the type of backup, destination-list may be a single directory, or a comma separated list of destinations including files, piped commands, or a TCP socket address (a combination of IPv4 or IPV6 hostname and a port number).

  • Region-list and destination-list items are matched in order - the first region is mapped to the first destination, the second to the second destination, and so on. If GT.M encounters a region mapped to a directory, GT.M treats that directory as the destination for all subsequent regions in the region-list.

  • GT.M implicitly timestamps both BYTESTREAM and DATABASE backups using relative timestamps (transaction numbers). You can also explicitly specific a RECORD timestamp for custom-control (SANS or mirrored disk) backup protocol. You might want to use these timestamps as reference points for subsequent backups.

  • It takes approximately one (1) minute (per region) for BACKUP -ONLINE to give up and bypass a KILLs in progress; backup does not wait for Abandoned Kills to clear.

  • The environment variable gtm_baktmpdir specifies the directory where mupip backup creates temporary files. If gtm_baktmpdir is not defined, GT.M uses the deprecated GTM_BAKTMPDIR environment variable if defined, and otherwise uses the current working directory.

  • When you restrict access to a database file, GT.M propagates those restrictions to shared resources associated with the database file, such as semaphores, shared memory, journals and temporary files used in the course of MUPIP BACKUP.

  • GT.M supports only one concurrent -ONLINE backup on a database. MUPIP BACKUP displays the BKUPRUNNING message if started when there is an already running BACKUP.

  • MUPIP BACKUP protects against overwriting of existing destination files. However, it cannot protect other destinations, for example, if the destination is a pipe into a shell command that overwrites a file.

[Tip] Before starting a MUPIP BACKUP

Perform the following tasks before you begin a database backup.

  • Ensure adequate disk space for target location and temporary files. Set the environment variable gtm_baktmpdir to specify the directory where MUPIP BACKUP creates temporary files. If gtm_baktmpdir is not defined, GT.M uses the deprecated GTM_BAKTMPDIR environment variable if defined, and otherwise uses the current working directory. Do not place temporary files in the current directory for large databases in production environments.

  • When using replication, ensure that the Source/Receiver process is alive (MUPIP REPLIC -SOURCE/-RECEIVER -CHECKHEALTH). Always backup the replicating instance file with the database (BACKUP -REPLINST).

  • If you intend to use a -DATABASE backup at the same time in the same computer system as the source database, be sure to disable journaling in the backed up database with -BKUPDBJNL=DISABLE.

  • When doing a complete backup, switch journal files as part of the backup command using -NEWJNLFILES=NOPREVLINK. This aligns the journal files with the backup and simplifies journal file retention.

  • If you follow separate procedures for backup and archive (moving to secondary storage), you can save time by starting archive as soon as MUPIP BACKUP completes the process of creating a backup database file for a region. You do not need to wait for MUPIP BACKUP to complete processing for all regions before starting archive. For example, a message like:

    DB file /home/jdoe/.fis-gtm/V6.0-001_x86_64/g/gtm.dat backed up in file /backup/gtm.dat
    Transactions up to 0x0000000000E92E04 are backed up.

    confirms that gtm.dat is backed up correctly and is ready for archive.

  • Determine an appropriate frequency, timing, and backup method (-BYTESTREAM or -COMPREHENSIVE) based on the situation.

  • Ensure the user issuing backup commands has appropriate permissions before starting the backup. Backup files have the ownership of the user running MUPIP BACKUP.

  • There is one circumstance under which a MUPIP BACKUP is not advised. When your operational procedures call for taking backups of unmodified databases and journal files on rebooting a system after a crash, then use an underlying operating system command (cp, cpio, gzip, tar, and so on) which will open the files read-only. Note that for ordinary system crashes where the system simply stops writing to open files at power down, you can use MUPIP JOURNAL to recover journaled database files, and taking backups on reboot should not be required. However, for system crashes with the possibility of damage to files already written to disk (for example, if the crash involved an IO controller with the potential for having written random data to disk immediately prior to power down), such backups on reboot are appropriate.

Example:

$ mupip backup "*" /gtm/bkup

This example creates ready-to-run database backup of all regions.

-BKupdbjnl

A backup database shares the same journaling characteristics of the source database. However, with BKUPDBJNL you can disable or turns off journaling in the backup database. Use this qualifier if you intend to open your backup database at the same time in the same environment as the source database.

The format of the BKUPDBJNL qualifier is:

-BK[UPDBJNL]={DISABLE|OFF}
  • Specify DISABLE to disable journaling in the backup database.

  • Specify OFF to turn off journaling is in the backup database.

  • Only one of the qualifiers DISABLE or OFF can be specified at any given point.

-Bytestream

Ttransfers MUPIP BACKUP output to a TCP connection, file (or a backup directory), or a pipe. If there are multiple .dat files, BYTESTREAM transfers output to a comma separated list of TCP connections, incremental backup files and/or directories, or pipes. When used with -SINCE or -TRANSACTION, MUPIP BACKUP allow incremental backup, that is, include database blocks that have changed since a prior point specified by the -SINCE or -TRANSACTION.

[Note] Note

MUPIP BACKUP output to a TCP connection saves disk I/O bandwidth on the current system.

All bytream backups needs to be restored to a random access file (with MUPIP RESTORE) before being used as a database file. -BYTESTREAM can also send the output directly to a listening MUPIP RESTORE process via a TCP/IP connection or a pipe.

The format of the BYTESTREAM qualifier is:

-B[YTESTREAM]
  • -BYTESTREAM is compatible with -SINCE and -TRANSACTION.

  • -INCREMENTAL is deprecated in favor of -BYTESTREAM. For upward compatibility, MUPIP temporarily continues to support the deprecated -INCREMENTAL.

-Database

Creates a disk-to-disk backup copy of the files of all selected regions. DATABASE backup copy is a ready-to-use a GT.M database unlike BYTESREAM backup which is required to be restored to a random access file.

[Note] Note

The DATABASE qualifier does not support backup to magnetic tape.

The format of the DATABASE qualifier is:

-D[ATABASE]
  • By default, MUPIP BACKUP uses -DATABASE.

  • The DATABASE qualifier is only compatible with the -[NO]NEW[JNLFILES], -ONLINE, and -RECORD qualifiers.

  • -COMPREHENSIVE is depreciated in favor of -DATABASE. For upward compatibility, MUPIP temporarily continues to support the deprecated -COMPREHENSIVE.

-NETtimeout

Specifies the timeout period when a bytestream BACKUP data is sent over a TCP/IP connection. The format of the NETTIMEOUT qualifier is:

NET[TIMEOUT]=seconds
  • The default value is 30 seconds.

  • Use only with: -BYTESTREAM.

-NEWJNLFILES

Determines the journaling charactertistics of the database files being backed-up. All the established journaling characteristics apply to new journal files. This qualifier is effective only for an ONLINE backup (the default), when the database has journaling enabled.

The format of the NEWJNLFILES qualifier is:

-[NO]NEWJNLFILES[=[NO]PREVLINK], [NO]S[YNC_IO]]
  • -NEWJNLFILES can take the following three values:

    1. PREVLINK: Back links new journal files with the prior generation journal files. This is the default value.

    2. NOPREVLINK: Indicates that there should be no back link between the newly created journals and prior generation journal files.

    3. SYNC_IO: Specifies that every WRITE to a journal file to be committed directly to disk. On high-end disk subsystems (for example, those that include non-volatile cache and that consider the data to be committed when it reaches this cache), this might result in better performance than the NOSYNC_IO option. NOSYNC_IO turn off this option.

  • -NONEWJNLFILES causes journaling to continue with the current journal files. It does not accept any arguments.

  • The default is -NEWJNLFILES=PREVLINK.

-Online

Specifies that while a MUPIP BACKUP operation is active, other processes can update the database without affecting the result of the backup. The format of the ONLINE qualifier is:

-[NO]O[NLINE]
  • MUPIP BACKUP -ONLINE creates a backup of the database as of the moment the backup starts. If the running processes subsequently update the database, the backup does not reflect those updates.

  • MUPIP BACKUP -ONLINE on regions(s) waits for up to one minute so any concurrent KILL or MUPIP REORG operations can complete. If the KILL or MUPIP REORG operations do not complete within one minute, MUPIP BACKUP -ONLINE starts the backup with a warning that the backup may contain incorrectly marked busy blocks. Such blocks waste space and can desensitize operators to much more dangerous errors, but otherwise don't affect database integrity. If you get such an error, it may be better to stop the backup and restart it when KILL or MUPIP REORG operations are less likely to interfere. Performing MUPIP STOP on a process performing a KILL or MUPIP REORG operation may leave the database with incorrectly marked busy blocks. In this situation, GT.M converts the ongoing KILLs flag to abandoned KILLs flag. If MUPIP BACKUP -ONLINE encounters ADANDONED_KILLS, it gives a message and then starts the backup. An ABANDONED_KILLS error means both the original database and the backup database possibly have incorrectly busy blocks which should be corrected promptly.

  • By default, MUPIP BACKUP is -ONLINE.

-Record

Timestamps (in the form of a transaction number) a database file to mark a reference point for subsequent bytestream, database, or custom backup (SANS or disk mirror) protocols. Even though -DATABASE and -BYTESTREAM both mark their own relative timestamps, -RECORD provides an additional timestamp option. MUPIP FREEZE also provides the -RECORD qualifier because a FREEZE may be used to set the database up for a SAN or disk-mirror based backup mechanism.

The format of the RECORD qualifier is:

-R[ECORD]
  • Use -RECORD (with the hypen) to timpestamp a refererence point and use RECORD as a keyword (as in -SINCE=RECORD) to specific the starting point for a MUPIP BACKUP operation.

  • -RECORD replaces the previously RECORDed transaction identifier for the database file.

-REPLace

Overwrites the existing destination files.

The format of the REPLACE qualifier is:

-[REPL]ACE
  • By default, MUPIP BACKUP protect against overwriting the destination files. -REPLACE disables this default behavior.

  • -REPLACE is compatible only with -DATABASE.

-REPLInstance

Specifies the target location to place the backup of the replication instance file.

[Note] Note

The replication instance file should always be backed up with the database file.

The format of the REPLINSTANCE qualifier is:

-REPLI[NSTANCE]=<target_location>

-Since

Includes blocks changed since the last specified backup. The format of the SINCE qualifier is:

-S[INCE]={DATABASE|BYTESTREAM|RECORD}
  • D[ATABASE] - Backup all changes since the last MUPIP BACKUP -DATABASE.

  • B[YTESTREAM] - Backup all changes since the last MUPIP BACKUP -BYTESTREAM.

  • R[ECORD] - Backup all changes since the last MUPIP BACKUP -RECORD.

By default, MUPIP BACKUP -BYTESTREAM operates as -SINCE=DATABASE.

Incompatible with: -TRANSACTION.

-Transaction

Specifies the transaction number of a starting transaction that causes BACKUP -BYTESTREAM to copy all blocks that have been changed by that transaction and all subsequent transactions. The format of the TRANSACTION qualifier is:

-T[RANSACTION]=transaction-number
  • A Transaction number is always 16 digit hexadecimal number. It appears in a DSE DUMP -FILEHEADER with the label "Current transaction".

  • If the transaction number is invalid, MUPIP BACKUP reports an error and rejects the command.

  • It may be faster than a DATABASE backup, if the database is mostly empty.

  • Incompatible with: -DATABASE, -SINCE

[Note] Note

A point in time that is consistent from an application perspective is unlikely to have the same transaction number in all database regions. Therefore, except for -TRANSACTION=1, this qualifier is not likely to be useful for any backup involving multiple regions.

Examples for MUPIP BACKUP

Example:

$ mupip backup -bytestream REPTILES,BIRDS bkup

Suppose that the environment variable gtmgbldir has regions REPTILES and BIRDS that map to files called REPTILES.DAT and BIRDS.DAT (no matter which directory or directories the files reside in). Then the above example creates bytestream backup files REPTILES.DAT and BIRDS.DAT in the bkup directory since the last DATABASE backup.

Example:

$ mupip backup -bkupdbjnl="OFF" "*"

This command turns off journaling in the backup database.

Example:

$ mupip backup -bytestream "*" tcp://philadelphia:7883,tcp://tokyo:8892

Assuming a Global Directory with two regions pointing to ACN.DAT and HIST.DAT, this example creates a backup of ACN.DAT to a possible MUPIP RESTORE process listening at port 7883 on server philadelphia and HIST.DAT to a possible MUPIP RESTORE process listening at port 8893 on server tokyo.

Always specify the <machine name> and <port> even if both backup and restore are on the same system, and ensure that the MUPIP RESTORE process is started before the MUPIP BACKUP process.

Example:

$ mupip backup -database -noonline "*" bkup
DB file /home/gtmnode1/gtmuser1/mumps.dat backed up in file bkup/mumps.dat
Transactions up to 0x00000000000F42C3 are backed up.

BACKUP COMPLETED.

This command creates a disk-to-disk backup copy of all regions of the current database in directory bkup. GT.M freezes all the regions during the backup operation.

Example:

$ mupip backup -bytestream -nettimeout=420 DEFAULT tcp://${org_host}:6200

This command creates a backup copy of the DEFAULT region with timeout of 420 seconds.

Example:

$ mupip backup -bytestream DEFAULT '"| gzip -c > online5pipe.inc.gz"'

This command sends (via a pipe) the backup of the DEFAULT region to a gzip command.

Example:

$ mupip backup -online DEFAULT bkup
DB file /gtmnode1/gtmuser1/mumps.dat backed up in file bkup/mumps.dat
Transactions up to 0x00000000483F807C are backed up.


BACKUP COMPLETED.

This command creates a backup copy of the DEFAULT region of the current database in directory bkup. During the backup operation, other processes can read and update the database.

Example:

$ mupip backup -record DEFAULT bkup

This command sets a reference point and creates a backup copy of the DEFAULT region of the current database in directory bkup.

Example:

$ mupip backup -online -record DEFAULT bkup1921
DB file /home/reptiles/mumps.dat backed up in file bkup1921/mumps.dat
Transactions up to 0x00000000000F4351 are backed up.

Example:

$ mupip backup -bytestream -since=record DEFAULT bkup1921onwards
MUPIP backup of database file /home/reptiles/mumps.dat to bkup1921onwards/mumps.dat
DB file /home/reptiles/mumps.dat incrementally backed up in file bkup1921onwards/mumps.dat
6 blocks saved.
Transactions from 0x00000000000F4351 to 0x00000000000F4352 are backed up.


BACKUP COMPLETED.

The first command sets a reference point and creates a backup copy of the DEFAULT region of the current database in directory bkup1921. The second command completes a bytestream backup starting from the reference point set by the first command.

Example:

$ mupip backup -bytestream -transaction=1 DEFAULT bkup_dir
MUPIP backup of database file /gtmnode1/gtmuser1/mumps.dat to bkup_dir/mumps.dat
DB file /gtmnode1/gtmuser1/mumps.dat incrementally backed up in file bkup/mumps.dat
5 blocks saved.
Transactions from 0x0000000000000001 to 0x0000000000000003 are backed up.


BACKUP COMPLETED.

This command copies all in-use blocks of the DEFAULT region of the current database to directory bkup_dir.

Example:

$ mupip backup -newjnlfiles=noprevlink,sync_io "*" backupdir

This example creates new journal files for the current regions, cuts the previous journal file link for all regions in the global directory, enables the SYNC_IO option and takes a backup of all databases in the directory backupdir.

CREATE

Creates and initializes database files using the information in a Global Directory file. If a file already exists for any segment, MUPIP CREATE takes no action for that segment.

The format of the CREATE command is:

CR[EATE] [-R[EGION]=region-name]

The single optional -REGION qualifier specifies a region for which to create a database file.

Note that one GT.M database file grows to a maximum size of 224M (234,881,024) blocks. This means, for example, that with an 8KB block size, the maximum single database file size is 1,792GB (8KB*224M). Note that this is the size of one database file -- a logical database (an M global variable namespace) can consist of an arbitrary number of database files.

-Region

Specifies a single region for creation of a database file. By default, MUPIP CREATE creates database files for all regions in the current Global Directory that do not already have a database file.

The format of the REGION qualifier is:

-R[EGION]=region-name

Examples for MUPIP CREATE

Example:

$ mupip create -region=REPTILES

This command creates the database file specified by the Global Directory (named by the GT.M Global Directory environment variable) for region REPTILES.

DOWNGRADE

The MUPIP DOWNGRADE command changes the file header format to V4 or V5. The format of the MUPIP DOWNGRADE command is:

D[OWNGRADE] -V[ERSION]={V4|V5} file-name

For V4:

  • It reduces the size from 8 bytes to 4 bytes for fields like current transaction (CTN), maximum tn (MTN) and others that contain transaction numbers.

  • It removes the results of any prior DBCERTIFY run on the database.

  • You cannot downgrade a V5 database which has standard null collation. In such a case, perform a MUPIP EXTRACT -FORMAT=ZWR operation on the V5 database and then perform a MUPIP LOAD operation on a V4 database.

-VERSION={V4|V5}

Specifies file header format. For more information on the downgrade criteria for your database, refer to the release notes document of your current GT.M version.

Examples for MUPIP DOWNGRADE

Example:

$ mupip downgrade mumps.dat

This command changes the file-header of mumps.dat to V4 format.

ENDIANCVT

Converts a database file from one endian format to the other (BIG to LITTLE or LITTLE to BIG). The format of the MUPIP ENDIANCVT command is:

ENDIANCVT [-OUTDB=<outdb-file>] -OV[ERRIDE] <db-file>
  • <db-file> is the source database for endian conversion. By default ENDIANCVT converts <db-file> in place.

  • outdb writes the converted output to <outdb-file>. In this case, ENDIANCVT does not modify the source database <db-file>.

  • ENDIANCVT produces a <outdb-file>of exactly the same size as <db-file>.

    [Important] Important

    Ensure adequate storage for <outdb-file> to complete the endian conversion successfully.

  • ENDIANCVT requires standalone access to the database.

  • GT.M displays a confirmation request with the “from” and “to” endian formats to perform the conversion. Conversion begins only upon receiving positive confirmation, which is a case insensitive "yes".

  • In a multi-site replication configuration, the receiver server automatically detects the endian format of an incoming replication stream and converts it into the native endian format. See Database Replication chapter for more information.

  • Encrypted database files converted with ENDIANCVT require the same key and the same cipher that were used to encrypt them.

[Note] Note

GT.M on a big endian platform can convert a little endian database into big endian and vice versa; as can GT.M on a little endian platform. GT.M (run-time and utilities other than MUPIP ENDIANCVT) on a given endian platform opens and processes only those databases that are in the same endian format. An attempt to open a database of a format other than the native endian format produces an error.

-OVerride

Enables MUPIP ENDIANCVT to continue operations even if GT.M encounters the following errors:

  • "minor database format is not the current version"

  • "kills in progress"

  • "a GT.CM server is accessing the database"

Note that the OVERRIDE qualifier does not override critical errors (database integrity errors, and so on) that prevent a successful endian format conversion.

Examples for MUPIP ENDIANCVT

$ mupip endiancvt mumps.dat -outdb=mumps_cvt.dat
Converting database file mumps.dat from LITTLE endian to BIG endian on a LITTLE endian system

Converting to new file mumps_cvt.dat

Proceed [yes/no] ?

This command detects the endian format of mumps.dat and converts it to the other endian format if you type yes to confirm.

EXIT

Stops a MUPIP process and return control to the process from which MUPIP was invoked.

The format of the MUPIP EXIT command is:

EXI[T]

The EXIT command does not accept any qualifiers.

EXTEND

Increases the size of a database file. By default, GT.M automatically extends a database file when there is available space.

The format of the MUPIP EXTEND command is:

EXTE[ND] [-BLOCKS=<data-blocks-to-add>] region-name
  • The only qualifier for MUPIP EXTEND is BLOCKS.

  • The required region-name parameter specifies the name of the region to expand.

  • EXTEND uses the Global Directory to map the region to the dynamic segment and the segment to the file.

-Blocks

Specifies the number of GDS database blocks by which MUPIP should extend the file. GDS files use additional blocks for bitmaps. MUPIP EXTEND adds the specified number of blocks plus the bitmap blocks required as overhead. For more information about bitmaps, refer to Chapter 9: “GT.M Database Structure(GDS). The format of the BLOCK qualifier is:

-BLOCKS=data-blocks-to-add

By default, EXTEND uses the extension value in the file header as the number of GDS blocks by which to extend the database file. You can specify as many blocks as needed as long as you are within the maximum total blocks limit (which could be as high as 224 million GDS blocks).

Examples for MUPIP EXTEND

$ mupip extend DEFAULT -blocks=400

This command adds 400 GDE database block to region DEFAULT.

Example:

$ mupip extend REPTILES -blocks=100

This command adds 100 GDE database blocks to the region REPTILES.

EXTRACT

Backups certain globals or to extract data from the database for use by another system. The MUPIP EXTRACT command copies globals from the current database to a sequential output file in one of three formats-GO, BINARY, or ZWR. The format of the EXTRACT command is:

EXTR[ACT] 
[
 -FO[RMAT]={GO|B[INARY]|Z[WR]}
 -FR[EEZE]
 -LA[BEL]=text
 -[NO]L[OG]
 -S[ELECT]=global-name-list]
]
{-ST[DOUT]|file-name}
  • By default, MUPIP EXTRACT uses -FORMAT=ZWR.

  • MUPIP EXTRACT uses the Global Directory to determine which database files to use.

  • MUPIP EXTRACT supports user collation routines. When used without the -FREEZE qualifier, EXTRACT may operate concurrently with normal GT.M database access.

  • To ensure that MUPIP EXTRACT reflects a consistent application state, suspend the database updates to all regions involved in the extract, typically with the FREEZE qualifier, or backup the database with the ONLINE qualifier and extract files from the backup.

  • EXTRACT places its output in the file defined by the file- name. EXTRACT may output to a UNIX file on any device that supports such files, including magnetic tapes.

  • In UTF-8 mode, MUPIP EXTRACT write sequential output file in the UTF-8 character encoding. Ensure that MUPIP EXTRACT commands and corresponding MUPIP LOAD commands execute with the same setting for the environment variable gtm_chset.

[Note] Note

Magnetic tapes may have a smaller maximum file size than disks.

For information on extracting globals with the %GO utility, refer to "M Utility Routines" chapter of the GT.M Programmer's Guide. MUPIP EXTRACT is typically faster, but %GO can be customized.

The following sections describe the qualifiers of MUPIP EXTRACT command.

-FOrmat

Specifies the format of the output file. The format of the FORMAT qualifier is:

-FO[RMAT]=format_code

The format code is any one of the following:

  1. B[INARY] - Binary format, used for database reorganization or short term backups. MUPIP EXTRACT -FORMAT=BINARY works much faster than MUPIP EXTRACT -FORMAT=GO and MUPIP EXTRACT -FORMAT=ZWR. Note: There is no defined standard to transport binary data from one GT.M implementation to another. Further, FIS reserves the right to modify the binary format in new versions. The first record of a BINARY format data file contains the header label. The header label is 87 characters long. The following table illustrates the components of the header label.

    BINARY Format Data File Header Label

    CHARACTERS

    EXPLANATION

    1-26

    Fixed-length ASCII text: "GDS BINARY EXTRACT LEVEL 4".

    27-40

    Date and time of extract in the $ZDATE() format: "YEARMMDD2460SS".

    41-45

    Decimal maximum block size of the union of each region from which data was extracted.

    46-50

    Decimal maximum record size of the union of each region from which data was extracted.

    51-55

    Decimal maximum key size of the union of each region from which data was extracted.

    56-87

    Space-padded label specified by the -LABEL qualifier. For extracts in UTF-8 mode, GT.M prefixes UTF-8 and a space to -LABEL. The default LABEL is "GT.M MUPIP EXTRACT"

  2. GO - Global Output format, used for files to transport or archive. -FORMAT=GO stores the data in record pairs. Each global node produces one record for the key and one for the data. MUPIP EXTRACT -FORMAT=GO has two header records - the first is a test label (refer to the LABEL qualifier) and the second contains a data, and time.

  3. ZWR - ZWRITE format, used for files to transport or archive that may contain non-graphical information. Each global node produces one record with both key and data. MUPIP EXTRACT -FORMAT=ZWR has two header records, which are the same as for FORMAT=GO, except that the second record ends with the text " ZWR"

-FReeze

Prevents database updates to all database files from which the MUPIP EXTRACT command is copying records. FREEZE ensures that a MUPIP EXTRACT operation captures a "sharp" image of the globals, rather than one "blurred" by updates occurring while the copy is in progress.

The format of the FREEZE qualifier is:

-FR[EEZE]

By default, MUPIP EXTRACT does not "freeze" regions during operation.

-LAbel

Specifies the text string that becomes the first record in the output file. MUPIP EXTRACT -FORMAT=BINARY truncates the label text to 32 characters. The format of the LABEL qualifier is:

-LA[BEL]=text
  • By default, EXTRACT uses the label "GT.M MUPIP EXTRACT."

  • For more detailed information about the -FORMAT=BINARY header label, refer to the description of EXTRACT -FORMAT=BINARY.

-LOg

Displays a message on stdout for each global extracted with the MUPIP EXTRACT command. The message displays the number of global nodes, the maximum subscript length and maximum data length for each global. The format of the LOG qualifier is:

-[NO]LO[G]

By default, EXTRACT operates -LOG.

-Select

Specifies globals for a MUPIP EXTRACT operation. The format of the SELECT qualifier is:

-S[ELECT]= global-specification
  • By default, EXTRACT selects all globals, as if it had the qualifier -SELECT=*

  • The caret symbol (^) in the specification of the global name is optional.

The global-specification can be:

  • A parenthetical list, such as (a,B,C). In this case, MUPIP EXTRACT selects all globals except ^a, ^B, and ^C.

  • A global name, such as MEF. In this case, MUPIP EXTRACT selects only global ^MEF.

  • A range of global names, such as A7:B6. In this case, MUPIP EXTRACT selects all global names between ^A7 and ^B6, inclusive.

  • A list, such as A,B,C. In this case, MUPIP EXTRACT selects globals ^A, ^B, and ^C.

  • Global names with the same prefix, such as PIGEON*. In this case, EXTRACT selects all global names from ^PIGEON through ^PIGEONzzzzz.

[Note] Note

If the rules for selection are complex, it may be easier to construct an ad hoc Global Directory that maps the global variables to be extracted to the database file. This may not be permissible if the database file is part of a replicated instance. If this is the case, work with a backup of the database.

-STdout

Redirects database extract to the standard output stream. The format of the STDOUT qualifier is:

-ST[DOUT]

Examples for MUPIP EXTRACT

Example:

$ mupip extract -format=go -freeze big.glo

This command prevents database updates during a MUPIP EXTRACT operation.

Example:

$ mupip extract -format=GO mumps_i.go

This command creates an extract file called mumps_i.go in "Global Output" format. Use this format to transport or archive files. The first record of a GO format file contains the header label, "GT.M MUPIP EXTRACT," as text.

Example:

$ mupip extract -format=BINARY v5.bin

This command creates an extract file called v5.bin in Binary format. Use this format for reorganizing a database or for short-term backups.

Example:

$ mupip extract -format=ZWR -LABEL=My_Label My_Extract_File

This example extracts all globals from the current database to file My_Extract_File (in ZWRITE format) with label My_Label.

Example:

$ mupip extract -nolog FL.GLO

This command creates a global output file, FL.GLO, (which consists of all global variables in the database) without displaying statistics on a global-by-global basis. As there is no label specified, the first record in FL.GLO contains the text string "GT.M MUPIP EXTRACT."

Example:

$ mupip extract -select=Tyrannosaurus /dev/tty

This command instructs EXTRACT to dump the global ^Tyrannosaurus to the device (file-name) /dev/tty.

FREEZE

Temporarily suspends (freezes) updates to the database. If you prefer a non-GT.M utility to perform a backup or reorganization, you might use this facility to provide standalone access to your GT.M database. You might use MUPIP FREEZE to suspend (and later resume) database updates for creating mirrored disk configuration or re-integrating a mirror.

GT.M BACKUP, INTEG, and REORG operations may implicitly freeze and unfreeze database regions. However, for most operations, this freeze/unfreeze happens internally and is transparent to the application.

The format of the MUPIP FREEZE command is:

F[REEZE] {-OF[F] [-OV[ERRIDE]]|-ON [-R[ECORD]]} region-list
  • The region-list identifies the target of the FREEZE.

  • MUPIP FREEZE waits for one minute so that concurrent KILL or MUPIP REORG operations can complete. If the KILL or MUPIP REORG commands do not complete within one minute, MUPIP FREEZE terminates operations and unfreezes any regions it had previously marked as frozen.

  • To ensure that a copy or reorganized version of a database file contains a consistent set of records, concurrent MUPIP utilities, such as BACKUP (without the ONLINE qualifier) and EXTRACT, include mechanisms to ensure that the database does not change while the MUPIP utility is performing an action. FIS recommends the use of the -ONLINE qualifier with BACKUP.

  • A MUPIP FREEZE can be removed only by the user who sets the FREEZE or by using -OVERRIDE.

  • After MUPIP FREEZE -ON, processes that are attempting updates "hang" until the FREEZE is removed by the MUPIP FREEZE -OFF command or DSE. Make sure that procedures for using MUPIP FREEZE, whether manual or automated, include provisions for removing the FREEZE in all appropriate cases, including when errors disrupt the normal flow.

  • A -RECOVER/-ROLLBACK for a database reverts to a prior database update state. Therefore, a -RECOVER/-ROLLBACK immediately after a MUPIP FREEZE -ON removes the freeze. However, -RECOVER/-ROLLBACK does not succeed if there are processes attached (for example when a process attempt a database update immediately after a MUPP FREEZE -ON) to the database.

FREEZE must include one of the qualifiers:

-OF[F]
-ON

The optional qualifiers are:

-OV[ERRIDE]
-R[ECORD] 

-OFf

Clears a freeze set by another process with the same userid.

The format of the OFF qualifier is:

OF[F]
  • When used with -OVERRIDE, -OFF stops a freeze operation set by a process with a different userid.

  • Incompatible with: -ON, -RECORD

-ON

Specifies the start of a MUPIP FREEZE operation. The format of the ON qualifier is:

-ON

Incompatible with: -OFF, -OVERRIDE

-OVerride

Release a freeze set by a process with a different userid. GT.M provides OVERRIDE to allow error recovery in case a procedure with a freeze fails to release. The format of the OVERRIDE qualifier is:

-OV[ERRIDE]
  • OVERRIDE should not be necessary (and may even be dangerous) in most schemes.

  • Incompatible with: -ON, -RECORD

-Record

Specifies that a MUPIP FREEZE operation should record an event as a reference point. You might use MUPIP FREEZE to set up your database for a custom-backup mechanism (SAN or mirror-based).

The format of the RECORD qualifier is:

-R[ECORD]
  • You might use -RECORD to integrate MUPIP BACKUP -BYTESTREAM with an external backup mechanism.

  • -RECORD replaces the previously RECORDed transaction identifier for the database file.

  • Incompatiable with: -OFF and -OVERRIDE.

Examples for MUPIP FREEZE

Example:

$ mupip freeze -off DEFAULT

This command stops an ongoing MUPIP FREEZE operation on the region DEFAULT.

Example:

$ mupip freeze -on "*"

This command prevents updates to all regions in the current Global Directory.

Example:

$ set +e
$ mupip freeze -on -record "*"
$ tar cvf /dev/tape /prod/appl/*.dat
$ mupip freeze -off
$ set -e

The set +e command instructs the shell to attempt all commands in the sequence , regardless of errors encountered by any command. This ensures that the freeze -off is processed even if the tar command fails. FREEZE prevents updates to all database files identified by the current Global Directory. The -record qualifier specifies that the current transaction in each database be stored in the RECORD portion of the database file header. The tar command creates a tape archive file on the device /dev/tape, containing all the files from /prod/app that have an extension of .dat. Presumably all database files in the current Global Directory are stored in that directory, with that extension. The second FREEZE command re-enables updates that were suspended by the first FREEZE. The set -e command re-enables normal error handling by the shell.

Example:

$ mupip freeze -override -off DEFAULT

This command unfreezes the DEFAULT region even if the freeze was set by a process with a different userid.

FTOK

Produces the "public" (system generated) IPC Keys (essentially hash values) of a given file.

The format of the MUPIP FTOK command is:

FT[OK] [-DB] [-JNLPOOL] [-RECVPOOL] file-name

-DB

Specifies that the file-name is a database file. By default, MUPIP FTOK uses -DB.

-JNLPOOL

Specifies that the reported key is for the Journal Pool of the instance created by the current Global Directory.

-RECVPOOL

Specifies that the reported key is for the Receive Pool of the instance created by the current Global Directory.

INTEG

Performs an integrity check on a GT.M database file. You can perform structural integrity checks on one or more regions in the current Global Directory without bringing down (suspending database updates) your application. However, a MUPIP INTEG on a single file database requires standalone access but does not need a Global Directory. The order in which the MUPIP INTEG command selects database regions is a function of file system layout and may vary as files are moved or created. Execute a MUPIP INTEG operations one database file at a time to generate an report where the output always lists database files in a predictable sequence. For example, to compare output with a reference file, run INTEG on one file at a time.

Always use MUPIP INTEG in the following conditions:

  • Periodically - to ensure ongoing integrity of the database(s); regular INTEGs help detect any integrity problems before they spread and extensively damage the database file.

  • After a crash - to ensure the database was not corrupted. (Note: When using before-image journaling, when the database is recovered from the journal file after a crash, an integ is not required).

  • When database errors are reported - to troubleshoot the problem.

Improving the logical and physical adjacency of global nodes may result in faster disk I/O. A global node is logically adjacent when it is stored within a span of contiguous serial block numbers. A global node is physically adjacent when it resides on adjacent hard disk sectors in a way that a single seek operation can access it. Database updates (SETs/KILLs) over time affect the logical adjacency of global nodes. A MUPIP INTEG reports the logical adjacency of your global nodes which may indicate whether a MUPIP REORG could improve the database performance. A native file system defragmentation improves physical adjacency.

[Note] Note

Most modern SAN and I/O devices often mask the performance impact of the adjustments in logical and physical adjacency. If achieving a particular performance benchmark is your goal, increasing the logical and physical adjacency should be only one of many steps that you might undertake. While designing the database, try to ensure that the logical adjacency is close to the number of blocks that can physically reside on your hard disk's cylinder. You can also choose two or three cylinders, with the assumption that short seeks are fast.

The format of the INTEG command is:

I[NTEG] 
[
 -A[DJACENCY]=integer
 -BL[OCK]=hexa;block-number
 -BR[IEF]
 -FA[ST]
 -FU[LL]
 -[NO]K[EYRANGES]
 -[NO]MAP[=integer]
 -[NO]MAXK[EYSIZE][=integer]
 -S[UBSCRIPT]=subscript] 
 -TN[_RESET]
 -[NO]TR[ANSACTION][=integer]
 -[NO]O[NLINE]
]
{[-FILE] file-name|-REG[ION] region-name}
  • MUPIP INTEG requires specification of either file(s) or region(s).

  • Press <CTRL-C> to stop MUPIP INTEG before the process completes.

  • The file-name identifies the database file for a MUPIP INTEG operation.The region-list identifies one or more regions that, in turn, identify database files through the current Global Directory.

  • MUPIP INTEG operation keeps track of the number of blocks that do not have the current block version during a non-fast integ (default or full) and matches this value against the blocks to upgrade counter in the file-header. It issues an error if the values are unmatched and corrects the count in the file header if there are no other integrity errors.

[Important] Important

Promptly analyze and fix all errors that MUPIP INTEG reports. Some errors may be benign while others may be a signs of corruption or compromised database integrity. If operations continue without fixes to serious errors, the following problems may occur:

  • Invalid application operation due to missing or incorrect data.

  • Process errors, including inappropriate indefinite looping, when a database access encounters an error.

  • Degrading application level consistency as a result of incomplete update sequences caused by the prior symptoms.

FIS strongly recommends fixing the following errors as soon as they are discovered:

  • Blocks incorrectly marked free - these may cause accelerating damage when processes make updates to any part of the database region.

  • Integrity errors in an index block - these may cause accelerating damage when processes make updates to that area of the database region using the faulty index. For more information, refer to Chapter 11: “Maintaining Database Integrity.

MUPIP INTEG -FAST and the "regular" INTEG both report these errors (These qualifiers are described later in this section). Other database errors do not pose the threat of rapidly spreading problems in GDS files. After the GT.M database repair, assess the type of damage, the risk of continued operations, and the disruption in normal operation caused by the time spent repairing the database. For information on analyzing and correcting database errors, refer to Chapter 11: “Maintaining Database Integrity. Contact your GT.M support channel for help assessing INTEG errors.

The following sections describe the qualifiers of the INTEG command.

-ADjacency

Specifies the logical adjacency of data blocks that MUPIP INTEG should assume while diagnosing the database. By default, MUPIP INTEG operates with -ADJACENCY=10 and reports the logical adjacency in the "Adjacent" column of the MUPIP INTEG report.

  • The complexity of contemporary disk controllers and the native file system may render this report superfluous. But when it is meaningful, this report measures the logical adjacency of data.

  • A MUPIP REORG improves logical adjacency and a native file system defragmentation improves physical adjacency.

The format of the ADJACENCY qualifier is:

-AD[JACENCY]=integer

-BLock

Specifies the block for MUPIP INTEG command to start checking a sub-tree of the database. MUPIP INTEG -BLOCK cannot detect "incorrectly marked busy errors"

The format of the BLOCK qualifier is:

-BL[OCK]=block-number
  • Block numbers are displayed in an INTEG error report or by using DSE.

  • Incompatible with: -SUBSCRIPT and -TN_RESET

-BRief

Displays a single summary report by database file of the total number of directory, index and data blocks. The format of the BRIEF qualifier is:

-BR[IEF]
  • By default, MUPIP INTEG uses the BRIEF qualifier.

  • Incompatible with: -FULL

-FAst

Checks only index blocks. FAST does not check data blocks.

The format of the FAST qualifier is:

-FA[ST]
  • -FAST produces results significantly faster than a full INTEG because the majority of blocks in a typical database are data blocks.

  • While INTEG -FAST is not a replacement for a full INTEG, it very quickly detects those errors that must be repaired immediately to prevent accelerated database damage.

  • By default, INTEG checks all active index and data blocks in the database.

  • Incompatible with: -TN_RESET.

-FIle

Specifies the name of the database file for the MUPIP INTEG operation. FILE requires exclusive (stand-alone) access to a database file and does not require a Global Directory. The format of the FILE qualifier is:

-FI[LE]
  • With stand-alone access to the file, MUPIP INTEG -FILE is able to check whether the reference count is zero. A non-zero reference count indicates prior abnormal termination of the database.

  • The -FILE qualifier is incompatible with the -REGION qualifier.

  • By default, INTEG operates on -FILE.

-FUll

Displays an expanded report for a MUPIP INTEG operation. With -FULL specified, MUPIP INTEG displays the number of index and data blocks in the directory tree and in each global variable tree as well as the total number of directory, index and data blocks. The format of the FULL qualifier is:

-FU[LL]
  • The -FULL qualifier is incompatible with the -BRIEF qualifier.

  • By default, INTEG reports are -BRIEF.

  • Use -FULL to have INTEG report all global names in a region or list of regions.

-Keyranges

Specify whether the MUPIP INTEG report includes key ranges that identify the data suspected of problems it detects. The format of the KEYRANGES qualifier is:

-[NO]K[EYRANGES]

By default, INTEG displays -KEYRANGES.

-MAP

Specifies the maximum number of "incorrectly marked busy errors" that MUPIP INTEG reports. The format of the MAP qualifier is:

-[NO]MAP[=max_imb_errors]
  • <max_imb_errors> specifies the threshold limit for the number of incorrectly marked busy errors.

  • -NOMAP automatically sets a high threshold limit of 1000000 (1 million) incorrectly marked busy errors (-MAP=1000000).

  • By default, INTEG reports a maximum of 10 map errors (-MAP=10).

[Note] Note

MUPIP INTEG reports "incorrectly marked free" errors as they require prompt action. MAP does not restrict them.

An error in an index block prevents INTEG from processing potentially large areas of the database. A single "primary" error may cause large numbers of "secondary" incorrectly marked busy errors, which are actually useful in identifying valid blocks that have no valid index pointer. Because "real" or primary incorrectly marked busy errors only make "empty" blocks unavailable to the system, they are low impact and do not require immediate repair.

[Note] Note

After a database recovery with -RECOVER (for example, using -BEFORE_TIME) or -ROLLBACK (for example, using -FETCHRESYNC), the database may contain incorrectly marked busy errors. Although these errors are benign, they consume available space. Schedule repairs on the next opportunity.

-MAXkeysize

Specifies the maximum number of "key size too large" errors that a MUPIP INTEG operation reports. The format of the MAXKEYSIZE qualifier is:

-[NO]MAX[KEYSIZE][=integer]
  • By default, INTEG reports a maximum of 10 key size errors (-MAXKEYSIZE=10).

  • -NOMAXKEYSIZE removes limits on key size reporting so that INTEG reports all key size too large errors.

  • -NOMAXKEYSIZE does not accept assignment of an argument.

  • "Key size too large" errors normally occur only if a DSE CHANGE -FILEHEADER -KEY_MAX_SIZE command reduces the maximum key size.

-Online

Specifies that while a MUPIP INTEG operation is active, other processes can update the database without affecting the result of the backup. Allows checking database structural integrity to run concurrently with database updates. The format of the ONLINE qualifier is:

-[NO]O[NLINE]
  • -NOONLINE specifies that the database should be frozen during MUPIP INTEG.

  • By default, MUPIP INTEG is online except for databases containing V4 blocks for which the default is -NOONLINE. Note that databases containing V4 blocks should exist only in databases that are in the process of being migrated from V4 to V5; please complete your migration to the V5 format before using MUPIP INTEG -ONLINE.

  • Since MUPIP INTEG -ONLINE does not freeze database updates, it cannot safely correct errors in the "blocks to upgrade" and "free blocks" fields in the file header, while MUPIP INTEG -NOONLINE can correct these fields.

  • As it checks each database file, MUPIP INTEG -ONLINE creates a sparse file of the same size as the database. As each GT.M process updates the database, it places a copy of the old block in the sparse file before updating the database. For any database blocks with a newer transaction number than the start of the INTEG, MUPIP uses the copy in the sparse file. Thus, analogous with MUPIP BACKUP -ONLINE, INTEG reports on the state of the database as of when it starts, not as of when it completes. Note: a command such as ls -l command shows sparse files at their full size, but does not show actual disk usage. Use a command such as du -sh to see actual disk usage.

  • The environment variable GTM_BAKTMPDIR (unlike most GT.M environment variables, this is upper case; it is the same directory used for MUPIP BACKUP -ONLINE) can be used to indicate a directory where MUPIP should place the snapshot files (used by MUPIP INTEG -ONLINE). If GTM_BAKTMPDIR does not exist, MUPIP places the snapshot files in the current directory at the time you issue the INTEG command. MUPIP and GT.M processes automatically cleans up these temporary snapshot files under a wider variety of conditions.

  • Temporary directory security settings must allow write access by the MUPIP process and read access by all processes updating the database. MUPIP creates the temporary file with the same access as the database file so processes updating the database can write to the temporary file. If the database is encrypted, the updating processes write encrypted blocks to the snapshot file and the MUPIP INTEG process must start with access to appropriate key information as it does even -NOONLINE.

  • MUPIP INTEG -NOONLINE [-FAST] {-REGION|-FILE} clears the KILLs in progress and Abandoned Kills flags if the run includes the entire database and there are no incorrectly marked busy blocks.

  • Only one online integ can be active per database region. If an online integ is already active, a subsequent one issues an error and immediately terminates. If an online integ does not successfully complete, GT.M cleans it up in one of the following ways:

    1. A subsequent online integ detects that an earlier one did not successfully complete and releases the resources held by the prior online integ before proceeding.

    2. If a MUPIP STOP was issued to the online integ process, the process cleans up any resources it held. Note: since the process was stopped the results of the integ may not be valid.

    3. subsequent MUPIP RUNDOWN ensures the release of resources held by prior unsuccessful online integs for the specified regions.

    4. For every 64K transactions after the online integ initiation, online integ checks GT.M health for improperly abandoned online integs and releases resources held by any it finds.

  • Incompatible with: -FILE, -TN_RESET (there should be no need to use -TN_RESET on a GT.M V5 database).

-Region

Specifies that the INTEG parameter identifies one or more regions rather than a database file. The format of the REGION qualifier is:

-R[EGION]
  • MUPIP INTEG -REGION does not require stand alone access to databases. Instead, it freezes updates (but not reads) to the database during the check. The region-list argument may specify more than one region of the current Global Directory in a list separated with commas. INTEG -REGION requires the environment variable gtmgbldir to specify a valid Global Directory. For more information on defining gtmgbldir, refer to the "Global Directory Editor" chapter.

  • Because a KILL may briefly defer marking the blocks it releases "free" in the bit maps, INTEG -REGION may report spurious block incorrectly marked busy errors. These errors are benign. If these errors occur in conjunction with a "Kill in progress" error, resolve the errors after the "Kill in progress" error is no longer present.

  • By default, INTEG operates -FILE.

  • Incompatible with: -FILE, -TN_RESET

-Subscript

Specifies a global or a range of keys to INTEG. The global key may be enclosed in quotation marks (" "). Identify a range by separating two subscripts with a colon (:). -SUBSCRIPT cannot detect incorrectly marked busy errors. The format of the SUBSCRIPT qualifier is:

-S[UBSCRIPT]=subscript

Specify SUBSCRIPT only if the path to the keys in the subscript is not damaged. If the path is questionable or known to be damaged, use DSE to find the block(s) and INTEG -BLOCK.

Incompatible with: -BLOCK, -TN_RESET

-TN_reset

Resets block transaction numbers and backup event recorded transaction numbers to (one) 1, and the current transaction number to two (2) which makes the backup event recorded transaction numbers more meaningful and useful. It also issues an advisory message to perform a backup.

The format of the TN_RESET qualifier is:

-TN[_RESET]
  • Transaction numbers can go up to 18,446,744,073,709,551,615. This means that a transaction processing application that runs flat out at a non-stop rate of 1,000,000 updates per second would need a TN reset approximately every 584,554 years.

  • The -TN_RESET qualifier rewrites all blocks holding data. If the transaction overflow resets to zero (0) database operation is disrupted.

  • The -TN_RESET qualifier is a protective mechanism that prevents the transaction overflow from resetting to 0.

  • By default, INTEG does not modify the block transaction numbers.

    [Important] Important

    There should never be a need for a -TN_RESET on a database with only V5 blocks, even when cleaning up after a runaway process.

  • The -TN_RESET qualifier is incompatible with the -FAST, -BLOCK, -REGION, and -SUBSCRIPT qualifiers.

[Note] Note

Any time a GT.M update opens a database file that was not properly closed, GT.M increments the transaction number by 1000. This automatic increment prevents problems induced by abnormal database closes, but users must always consider this factor in their operational procedures. The rate at which GT.M "uses up" transaction numbers is a function of operational procedures and real database updates.

-TRansaction

Specifies the maximum number of block transaction- number-too-large errors that MUPIP INTEG reports. The format of the TRANSACTION qualifier is:

-[NO]TR[ANSACTION][=integer]
  • -NOTRANSACTION removes limits on transaction reporting so MUPIP INTEG reports all transaction number errors.

  • -NOTRANSACTION does not accept assignment of an argument.

  • A system crash may generate many "block transaction number too large" errors. These errors can cause problems for BACKUP -INCREMENTAL and for transaction processing. Normally, the automatic increment of 1000 blocks that GT.M adds when a database is reopened averts these errors. If a problem still exists after the database is reopened, users can use a value in the DSE CHANGE -FILEHEADER -CURRENT_TN= command to quickly fix "block transaction number too large number" errors.

  • By default, INTEG reports a maximum of 10 block transaction errors (-TRANSACTION=10).

Examples for MUPIP INTEG

Example:

$ mupip integ -block=4 mumps.dat

This command performs a MUPIP INTEG operation on the BLOCK 4 of mumps.dat.

Example:

$ mupip integ -adjacency=20

A sample output from the above command follows:

Type           Blocks         Records          % Used      Adjacent

Directory           2               5           4.150            NA
Index              18            1151          77.018             1
Data             1137           94189          97.894          1030
Free               43              NA              NA            NA
Total            1200           95345              NA          1031

This example performs a MUPIP INTEG operation assuming that logically related data occupies 20 data blocks in the current database. The sample output shows that out of 1137 data blocks, 1030 data blocks are adjacent to each other. One can improve the performance of a database if the all blocks are as adjacent as possible.

Example:

$ mupip integ -brief mumps.dat

This command performs a MUPIP INTEG operation on the database mumps.dat. A sample output from the above command follows:

No errors detected by integ.

Type           Blocks         Records          % Used      Adjacent

Directory           2               2           2.490            NA
Index               1               1           2.343             1
Data                1               3           6.738             1
Free               96              NA              NA            NA
Total             100               6              NA             2

Example:

$ mupip integ -fast mumps.dat

This command performs a MUPIP INTEG operation only on the index block of the database file mumps.dat. A sample output from the above command follows:

No errors detected by fast integ.
 
Type           Blocks         Records          % Used      Adjacent

Directory           2               2           2.490            NA
Index               1               1           2.343             1
Data                1              NA              NA            NA
Free               96              NA              NA            NA
Total             100              NA              NA             1

Note the NA entries (highlighted in bold) for Data type. It means that the MUPIP INTEG -FAST operation checked only index blocks.

$ mupip integ -full mumps.dat

The sample output from the above command follows:

Directory tree
Level          Blocks         Records          % Used      Adjacent
    1               1               1           2.343           NA
    0               1               1           2.636           NA

Global variable ^Dinosaur
Level          Blocks         Records          % Used      Adjacent
    1               1               6           8.398             1
    0               6             500          83.902             6

No errors detected by integ.

Type           Blocks         Records          % Used      Adjacent

Directory           2               2           2.490            NA
Index               1               6           8.398             1
Data                6             500          83.902             6
Free               91              NA              NA            NA
Total             100             508              NA             7

Example:

$ mupip integ -map=20 -maxkeysize=20 -transaction=2 mumps.dat

This command performs a MUPIP INTEG operation and restricts the maximum number of "key size too large" errors to 20.

Example:

$ mupip integ -map=20 -transaction=2 mumps.dat

This command performs a MUPIP INTEG operation and restricts the maximum number of "block transaction- number-too-large errors" to 2.

$ mupip integ -file mumps.dat -tn_reset

This command resets the transaction number to one in every database block.

Example:

$ mupip integ -subscript="^Parrots" mumps.dat

This example performs a MUPIP INTEG operation on the global variable ^Parrots in the database file mumps.dat.

Example:

$ mupip integ -subscript="^Amsterdam(100)":"^Bolivia(""Chimes"")" -region DEFAULT

This example performs a MUPIP INTEG operation all global variables greater than or equal to ^Amsterdam (100) and less than or equal to ^Bolivia("Chimes") in the default region(s).

[Note] Note

To specify a literal in the command string, use two double quotation marks for example, ^b(""c"").

INTRPT

Sends an interrupt signal to the specified process. The signal used is [POSIX] SIGUSR1. The format of the MUPIP INTRPT command is:

INTRPT process-id
[Important] Important

Ensure that signal SIGUSR1 is not be used by any C external function calls or any (initially non-GT.M) processes that use call-in support, as it is interpreted by GT.M as a signal to trigger the $ZINTERRUPT mechanism.

  • To INTRPT a process belonging to its own account, a process requires no UNIX privilege.

  • To INTRPT a process belonging to its own GROUP, a process requires UNIX membership in the user group of the target process privilege. To INTRPT a process belonging to an account outside its own GROUP, a process requires UNIX superuser privilege.

JOURNAL

Analyzes, extracts, reports, and recovers data using journal files. For a description of the JOURNAL command, refer to Chapter 6: “GT.M Journaling.

LOAD

Puts the global variable names and their corresponding data values into a GT.M database from a sequential file.

The format of the LOAD command is:

L[OAD] 
[
 -BE[GIN]=integer
 -E[ND]=integer
 -FI[LLFACTOR]=integer
 -FO[RMAT]={GO|B[INARY]|Z[WR]]}
 -S[TDIN]
]
 file-name
[Caution] Caution

From an application perspective, performing a MUPIP LOAD operation while an application is running may result in an inconsistent application state for the database.

  • MUPIP LOAD uses the Global Directory to determine which database files to use.

  • LOAD supports user collation routines.

  • LOAD takes its input from the file defined by the file-name

  • LOAD may take its input from a UNIX file on any device that supports such files.

  • MUPIP LOAD command considers a sequential file as encoded in UTF-8 if the environment variable gtm_chset is set to UTF-8. Ensure that MUPIP EXTRACT commands and corresponding MUPIP LOAD commands execute with the same setting for the environment variable gtm_chset.

  • For information on loading with an M "percent utility," refer to the %GI section of the "M Utility Routines" chapter in GT.M Programmer's Guide. LOAD is typically faster, but the %GI utility can be customized.

  • Press <CTRL-C> to produce a status message from LOAD. Entering <CTRL-C> twice in quick succession stops LOAD. A LOAD that is manually stopped or stops because of an internal error is incomplete and may lack application level integrity, but will not adversely affect the database structure unless terminated with a kill -9.

[Note] Note

The MUPIP EXTRACT or MUPIP LOAD procedure for large databases are time consuming due to the volume of data that has to be converted from binary to ZWR format (on source) and vice versa (on target). One must also consider the fact that the extract file can be very large for a large database. Users must ensure adequate storage support the size of the extract file and the space occupied by the source and target databases. In order to reduce the total time and space it takes to transfer database content from one endian platform to another, it is efficient to convert the endian format in-place for a database and transfer the converted database. See MUPIP ENDIANCVT for more information on converting the endian format of a database file.

The following sections describe the optional qualifiers of the MUPIP LOAD command.

-FOrmat

Specifies the format of the input file. The format must match the actual format of the input file for LOAD to operate.

The format codes are:

GO - Global Output format
B[INARY] - Binary format
Z[WR] - ZWRITE format
  • By default, LOAD uses FORMAT=ZWR.

  • -FORMAT=GO expects the data in record pairs. Each global node requires one record for the key and one for the data.

  • -FORMAT=ZWR expects the data for each global node in a single record.

  • -FORMAT=BINARY only applies to Greystone Database Structure (GDS) files. A BINARY format file loads significantly faster than a GO or ZWR format file. -FORMAT=BINARY works with data in a proprietary format. -FORMAT=BINARY has one header record, therefore LOAD -FORMAT=BINARY starts active work with record number two (2).

-BEgin

Specifies the record number of the input file with which LOAD should begin. Directing LOAD to begin at a point other than the beginning of a valid key causes an error. The format of the BEGIN qualifier is:

-BE[GIN]=integer
[Important] Important

Always consider the number of header records for choosing a -BEGIN point. See FORMAT qualifier for more information.

  • For -FORMAT=GO input, the value is usually an odd number. As -FORMAT=BINARY requires important information from the header, this type of load requires an intact file header regardless of the -BEGIN value.

  • For -FORMAT = ZWR input, each record contains a complete set of reference and data information. The beginning values are not restricted, except to allow two records for the header.

  • By default, LOAD starts at the beginning of the input file.

-End

Specifies the record number of the input file at which LOAD should stop. -END=integer must be greater than the -BEGIN=integer for LOAD to operate. LOAD terminates after processing the record of the number specified by -END or reaching the end of the input file. The format of the END qualifier is:

-E[ND]=integer

The value of -FORMAT=GO input should normally be an even number. By default, LOAD continues to the end of the input file.

-FIll_factor

Specifies the quantity of data stored in a database block. Subsequent run-time updates to the block fill the remaining available space reserved by the FILL_FACTOR. Blocks that avoid block splits operate more efficiently. The format of the FILL_FACTOR qualifier is:

-FI[LL_FACTOR]=integer
  • Reserves room and avoid unnecessary block split to accommodate the forecasted growth in a global variable that may experience significant rate of additions over a period.

  • Users having database performance issues or a high rate of database updates must examine the defined FILL_FACTORs. Unless the application only uses uniform records, which is not typical for most applications, FILL_FACTORs do not work precisely.

  • By default, LOAD uses -FILL_FACTOR=100 for maximum data density.

[Note] Note

FILL_FACTOR is useful when updates add or grow records reasonably uniformly across a broad key range. If updates are at ever ascending or descending keys, or if the record set and record sizes are relatively static in the face of updates, FILL_FACTOR won't provide much benefit.

-Stdin

Specifies that MUPIP LOAD takes input from standard input (stdin). The format of the STDIN qualifier is:

-S[TDIN]

Examples for MUPIP LOAD

Example:

$ mupip load ex_file.go

This command loads the content of the extract file ex_file.go to the current database.

Example:

$ mupip load -format=go big.glo

This command loads an extract file big.glo in the current database.

Example:

$ mupip load -begin=5 -end=10 rs.glo

This command begins MUPIP LOAD operation from record number 5 and ends at record number 10. Note that the value for BEGIN is an odd number. A sample output from the above command follows:

GT.M MUPIP EXTRACT
02-MAR-2011  18:25:47 ZWR
Beginning LOAD at record number: 5

LOAD TOTAL		Key Cnt: 6  Max Subsc Len: 7  Max Data Len: 1
Last LOAD record number: 10

Example:

$ mupip load -fill_factor=5 reobs.glo

This command set the FILL_FACTOR to 5 for loading an extract file in the current database.

Example:

$cat big.glo | mupip load -stdin
$mupip load -stdin < big.glo

These commands loads the extract file big.glo using -stdin.

REORG

Improves database performance by defragmenting and reorganizing database files and attempts to reduce the size of the database file. MUPIP REORG runs concurrently with other database activity, including updates. Competing activity generally increases the time required to perform a REORG, as well as that of the competing operations.

The format of the REORG command is:

REO[RG] 
[
 -D[OWNGRADE]
 -E[XCLUDE]=global-name-list
 -FI[LL_FACTOR]=integer
 -I[NDEX_FILL_FACTOR]=integer
 -R[ESUME]
 -S[ELECT]=global-name-list
 -T[RUNCATE][=percentage]
 -UP[GRADE]
 -REG[ION]=region-list
]
[Note] Note

While REORG optimizes the GDS structure of database files, it does not handle native file system file fragmentation. In most cases, fragmentation at the native file system level is more likely than fragmentation at the GDS structure level. Therefore, FIS recommends users create files with appropriate allocations and extensions, on disks with large amounts of contiguous free space. Use native utilities and MUPIP utilities (depending on operational procedures) to eliminate file fragmentation when database files have been extended more than a dozen times.

  • Using REORG concurrently with normal database access affects the performance of normal operation. To reduce this impact, lower the priority of the process performing the REORG.

  • MUPIP REORG does not change the logical contents of the database, and can run on either the originating instance or replicating instance of an LMS application. In such cases, resuming REORGs in process should be part of the batch restart. See "GT.M Database Replication" chapter for more information about running REORG on a dual site application.

  • If you run MUPIP STOP for an ongoing MUPIP REORG process, it may leave the database blocks in an inconsistent state. In this situation, GT.M converts the ongoing KILLs flag to abandoned KILLs flag. If a subsequent MUPIP REORG encounters these abandoned KILLs flags, it gives a message and then starts its REORG actions.

  • <CTRL-C> terminates REORG. A REORG terminated abnormally by operator action or error is incomplete but does not adversely affect the database structure, unless terminated with a kill -9.

[Caution] Caution

REORG focuses on optimum adjacency and a change to even a single block can cause it to perform a large number of updates with only marginal benefit. Therefore, FIS recommends not running successive REORGs close together in time as that can provide minimal benefit for a significant increase in database and journal activity. For the same reason, FIS recommends careful research and planning before using the -RESUME qualifier or complex uses of -EXCLUDE and -SELECT.

Assume two scenarios of putting values of ^x(1) to ^x(10000). In the first scenarios, fill values in a sequential manner. In the second scenario, enter values for odd subscripts and then enter values for the even subscripts.

Scenario 1:

At the GT.M prompt, execute the following command sequence:

GTM>for i=1:1:10000 set ^x(i)=$justify(i,200)

Then, execute the following MUPIP INTEG command.

$ mupip integ -region "*"

This command produces an output like the following:

Integ of region DEFAULT

No errors detected by integ.

Type           Blocks         Records          % Used      Adjacent

Directory           2               2           2.490            NA
Index              29            2528          95.999             1
Data             2500           10000          82.811          2499
Free               69              NA              NA            NA
Total            2600           12530              NA          2500

Note the high density (percent used) for index and data blocks from the report.

Scenario 2:

At the GT.M prompt, execute the following command sequence:

GTM>for i=1:2:10000 s ^x(i)=$justify(i,200)

GTM>for i=2:2:10000 set ^x(i)=$justify(i,200)

Then, execute the following command:

$ mupip integ -region "*"

This command produces an output like the following:

Integ of region DEFAULT

No errors detected by integ.

Type           Blocks         Records          % Used      Adjacent

Directory           2               2           2.490            NA
Index             153            3902          29.211            57
Data             3750           10000          55.856          1250
Free               95              NA              NA            NA
Total            4000           13904              NA          1307

Note that there are more and less dense index and data blocks used than in scenario 1. MUPIP REORG addresses such issues and makes the database (depending on the FILL_FACTOR) more compact.

The optional qualifiers for MUPIP REORG are:

-Exclude

Specifies that REORG not handle blocks that contain information about the globals in the associated list–this means they are neither reorganized nor swapped in the course of reorganizing other globals; -EXCLUDE can reduce the efficiency of REORG because it complicates and interferes with the block swapping actions that try to improve adjacency.

The format of the EXCLUDE qualifier is:

-E[XCLUDE]=global-name-list
  • Assume that a single MUPIP command organizes a subset of the globals in a database or region. If a second MUPIP REORG command selects the remaining globals, it may tend to disrupt the results of the first REORG by de-optimizing the previously organized blocks. This is because there is no information passed from the previous MUPIP REORG command to the next command. The EXCLUDE qualifier allows users to list the name of the previously REORGed globals, so that the MUPIP REORG bypasses the GDS blocks containing these globals.

  • If global-name-list contains globals that do not exist, REORG issues a message to the terminal and continues to process any specified globals that exist. If REORG is unable to process any globals, it terminates with an error.

  • Global-name-list can be an individual global name, a range of global names, or a list of names and prefixes followed by the wildcard symbol. For example:

    1. A global name, such as ACN.

    2. A range of global names, such as A7:B7.

    3. A list, such as A,B,C.

    4. Global names with the same prefix such as TMP*.

In the first case, REORG only excludes global ^ACN. In the second case, REORG excludes all global names in the collating sequence A7 to B7. For the third case, REORG excludes A, B, and C. In the last case, REORG excludes all globals prefixed with TMP.

  • Enclose wildcards in double-quotes ("") to prevent inappropriate expansion by the shell. The caret symbol (^) in the specification of the global is optional.

  • By default, REORG does not EXCLUDE any globals.

  • In case any global appears in the argument lists of both -SELECT and -EXCLUDE, REORG terminates with an error.

-Fill_factor

Specifies how full you want each database block to be. This is a target number. Individual blocks may be more or less full than the fill factor. The format of the FILL_FACTOR qualifier is:

F[ILL_FACTOR]=integer
  • The arguments for the FILL_FACTOR qualifier must be integers from 30 to 100. These integers represent the percentage of the data block that REORG can fill. By default, the FILL_FACTOR value is 100 for maximum data density.

  • Users who come upon database performance issues or a high rate of database updates must examine the defined FILL_FACTORs. Unless the application uses entirely uniform records, which is not typical for most applications, FILL_FACTORs do not work precisely.

  • The FILL_FACTOR for data that is relatively static, or grows by the addition of new nodes that collate before or after pre-existing nodes, should be 100 percent. The FILL_FACTOR for data that is growing by additions to existing nodes may be chosen to leave room in the typical node for the forecast growth for some period. Generally, this is the time between the LOAD and first REORG, or between two REORGs. This is also true for additions of nodes that are internal to the existing collating sequence.

-Index_fill_factor

Directs REORG to leave free space within index blocks for future updates. Arguments to this qualifier must be integers from 30 to 100 that represent the percentage of the index block that REORG can fill. REORG uses this number to decide whether to place more information in an index block, or create space by moving data to another block. The format of the INDEX_FILL_FACTOR qualifier is:

-I[NDEX_FILL_FACTOR]=integer

Under certain conditions, especially with large database block sizes, it may be possible to achieve faster throughput by using a smaller fill factor for index blocks than for data blocks. By default, the INDEX_FILL_FACTOR is the value of FILL_FACTOR regardless of whether that value is explicitly specified or implicitly obtained by default.

-Resume

For an interrupted REORG operation, -RESUME allows the user to resume the REORG operation from the point where the operation stopped. REORG stores the last key value in the database file header. The format of the RESUME qualifier is:

-R[ESUME]
  • With RESUME specified, the program retrieves the last key value, from the database file header, and restarts operations from that key.

-Region

Specifies that REORG operate in the regions in the associated list and restricts REORG to the globals in those regions that are mapped by the current global directory; it does not have the same interactions as -EXCLUDE and -SELECT, but it does not mitigate those interactions when combined with them.

The format of the REGION qualifier is:

-R[EGION]=region-list

-Select

Specifies that REORG reorganizes only the globals in the associated list; globals not on the list may be modified by block swaps with selected globals unless they are named with -EXCLUDE; -SELECT can be difficult to use efficiently because it tends to deoptimize unselected globals unless they are name in an -EXCLUDE list (which introduces inefficiency).

The format of the SELECT qualifier is:

-S[ELECT]=global-name-list
  • By default, REORG operates on all globals in all database files identified by the current Global Directory for the process executing the MUPIP command.

  • One of the functions performed by REORG is to logically order the globals on which it operates within the file. Unless the EXCLUDE and SELECT qualifiers are properly used in tandem, repeating the command with different selections in the same file wastes work and leaves only the last selection well organized.

  • If you enter the REORG -SELECT=global-name-list command and the specified globals do not exist, REORG issues a message to the screen and continues to process any specified globals that exist. If REORG is unable to process any globals, it terminates with an error.

  • Arguments for this qualifier may be an individual global name, a range of global names, or a list of names and prefixes followed by the wildcard symbol. The caret symbol (^) in the specification of the global is optional.

  • The global name can be:

    1. A global name, such as ACN

    2. A range of global names, such as A7:B7

    3. A list, such as A,B,C.

    4. Global names with the same prefix such as TMP*.

  • In the first case, REORG only includes global ^ACN. In the second case, REORG includes all global names in the collating sequence A7 to B7. For the third case, REORG includes A, B, and C. In the last case, REORG includes all globals prefixed with TMP.

  • By default, REORG selects all globals.

-Truncate

Specifies that REORG, after it has rearranged some or all of a region's contents, should attempt to reduce the size of the database file and return free space to the file system. The format of the TRUNCATE qualifier is:

-T[RUNCATE][=percentage]

The optional percentage (0-99) provides a minimum amount for the reclamation; in other words, REORG won't bother performing a file truncate unless it can give back at least this percentage of the file; the default (0) has it give back anything it can. TRUNCATE always returns space aligned with bit map boundaries, which fall at 512 database block intervals. TRUNCATE analyses the bit maps, and if appropriate, produces before image journal records as needed for recycled (formerly used) blocks; The journal extract of a truncated database file may contain INCTN records having the inctn opcode value 9 indicating that the specific block was marked from recycled to free by truncate.

[Note] Note

TRUNCATE does not complete if there is a concurrent online BACKUP or use of the snapshot mechanism, for example by INTEG.

Examples for MUPIP REORG

Example:

$ mupip reorg -exclude="^b2a,^A4gsEQ2e:^A93"

This example performs a MUPIP REORG operation on all globals excluding ^b2a and all globals ranging from ^A4gsEQ2e to ^A93.

Example:

If the forecasted growth of a global is 5% per month from relatively uniformly distributed updates, and REORGs are scheduled every quarter, the FILL_FACTOR for both the original LOAD and subsequent REORGs might be 80 percent 100 - ((3 months + 1 month "safety" margin) * five percent per month). The REORG command based on the above assumptions is as follows:

$ mupip reorg -fill_factor=80 

REPLICATE

Control the logical multi-site operation of GT.M. For more information on the qualifiers of the MUPIP REPLICATE command, refer to Chapter 7: “Database Replication .

RESTORE

Integrates one or more BACKUP -INCREMENTAL files into a corresponding database. The transaction number in the first incremental backup must be one more than the current transaction number of the database. Otherwise, MUPIP RESTORE terminates with an error.

The format of the RESTORE command is:

RE[STORE] [-[NO]E[XTEND]] file-name file-list
  • file-name identifies the name of the database file that RESTORE uses as a starting point.

  • file-list specifies one or more files produced by BACKUP -INCREMENTAL to RESTORE into the database. The file-name are separated by commas (,) and must be in sequential order, from the oldest transaction number to the most recent transaction number. RESTORE may take its input from a UNIX file on any device that supports such files.

  • The current transaction number in the database must match the starting transaction number of each successive input to the RESTORE.

  • If the BACKUP -INCREMENTAL was created using -TRANSACTION=1, create a new database with MUPIP CREATE and do not access it, except the standalone MUPIP commands INTEG -FILE, EXTEND, and SET before initiating the RESTORE.

-Extend

Specifies whether a MUPIP RESTORE operation should extend the database file automatically if it is smaller than the size required to load the data.

The format of the EXTEND qualifier is:

-[NO]E[XTEND]

M activity between backups may automatically extend a database file. Therefore, the database file specified as the starting point for a RESTORE may require an extension before the RESTORE. If the database needs an extension and the command specifies -NOEXTEND, MUPIP displays a message and terminates. The message provides the sizes of the input and output database files and the number of blocks by which to extend the database. If the RESTORE specifies more than one incremental backup with a file list, the database file may require more than one extension.

By default, RESTORE automatically extends the database file.

Examples for MUPIP RESTORE

$ mupip restore backup.dat $backup_dir/backup.bk1, $backup_dir/backup.bk2, $backup_dir/backup.bk3

This command restores backup.dat from incremental backups stored in directory specified by the environment variable backup_dir.

$ mupip restore gtm.dat '"gzip -d -c online5pipe.inc.gz |"'

This command uses a pipe to restore gtm.dat since its last DATABASE backup from the bytestream backup stored in online5pipe.inc.gz.

RUNDOWN

When database access has not been properly terminated, RUNDOWN properly closes currently inactive databases, removes abandoned GT.M database semaphores, and releases any IPC resources used. Under normal operations, the last process to close a database file performs the RUNDOWN actions, and a MUPIP RUNDOWN is not required. If a database file is already properly rundown, a MUPIP RUNDOWN has no effect. If in doubt, it is always to safe to perform a rundown. FIS recommends the following method to shutdown a GT.M application or the system:

  • Terminate all GT.M processes, and

  • Rundown any and all database files that may be active.

MUPIP RUNDOWN checks for version mismatch. If there is a mismatch, it skips the region and continues with the next region. This makes it easier for multiple (non-interacting) GT.M versions to co-exist on the same machine. Note that GT.M does not support concurrent access to the same database file by multiple versions of the software.

The format of the RUNDOWN command is:

RU[NDOWN] {-FILE file-name|-REGION region-list]}

MUPIP RUNDOWN clears certain fields in a file that is already closed. This facilitates recovery from a system crash or other operational anomaly.

Use RUNDOWN after a system crash or after the last process accessing a database terminates abnormally. RUNDOWN ensures that open databases are properly closed and ready for subsequent use. RUNDOWN has no effect on any database that is actively being accessed at the time the RUNDOWN is issued.

To ensure database integrity, all system shutdown algorithms should include scripts that stop at GT.M processes and perform RUNDOWN on all database files.

The RUNDOWN command may include one of the following qualifiers:

-F[ile] 
-R[egion] 

If the RUNDOWN command does not specify either -File or -Region, it checks all the IPC resources (shared memory) on the system and if they are associated with a GT.M database, attempts to rundown that file.

-File

Specifies that the argument is a file-name for a single database file. The -FILE qualifier is incompatible with the REGION qualifier. If the rundown parameter consists of a list of files, the command only operates on the first item in the list.

Incompatible with: -REGION

-Region

Specifies that the argument contains one or more region-names that identify database files mapped by the current Global Directory. Use the wild card "*" to rundown all inactive regions in a global directory.

Incompatible with: -FILE

When MUPIP RUNDOWN has no qualifier, it performs rundown on all inactive database memory sections on the node. Because this form has no explicit list of databases, it does not perform any clean up on regions that have no abandoned memory segments but may not have been shutdown in a crash.

-Override

Overrides the protection that prevents MUPIP RUNDOWN from performing a rundown of a replication-enabled (with BEFORE_IMAGE) database or a non-replicated NOBEFORE-journaled database that was abnormally shutdown. The protection involves issuing the MUUSERLBK error for a previously crashed replication-enabled (with BEFORE IMAGE journaling) database and the MUUSERECOV error for a non-replicated or NOBEFORE-journaled database. Both these errors prevent complications related to data recovery from a journal file or a replication-enabled database.

SET

Modifies certain database characteristics. MUPIP SET operates on either regions or files.

[Note] Note

In regions that have journaling enabled and on, users can switch journal files without either requiring standalone access or freezing updates.

The format of the SET command is:

SE[T] {-FI[LE] file-name|-REG[ION] region-list} 
 -A[CCESS_METHOD]={BG|MM}
 -B[YPASS]
 -DE[FER_TIME]=seconds
 -E[XTENSION_COUNT]=integer(no of blocks)
 -F[LUSH_TIME]=integer
 -G[LOBAL_BUFFERS]=<integer>
 -JN[LFILE]
 -JO[URNAL]=journal-option-list
 -L[OCK_SPACE]=integer
 -M[UTEX_SLOTS]=integer
 -[NO]INST[_FREEZE_ON_ERROR]
 -PA[RTIAL_RECOV_BYPASS]
 -REP[LICATION]={ON|OFF}
 -RES[ERVED_BYTES]=integer] 
 -S[TANDALONENOT]
 -V[ERSION]={V4|V6}
 -W[AIT_DISK]=integer 
  • The file-name (or region-list) identifies the target of the SET.

  • The SET command must include one of the following qualifiers which determine whether the argument to the SET is a file-name or a region-list.

  • Exclusive access to the database is required if the MUPIP SET command specifies -ACCESS_METHOD, -GLOBAL_BUFFERS, -LOCK_SPACE or -NOJOURNAL, or if any of the -JOURNAL options ENABLE, DISABLE, or BUFFER_SIZE are specified.

The following section describe the qualifiers of the MUPIP SET command.

-Access_method

Specifies the access method (GT.M buffering strategy) for storing and retrieving data from the global database file. The format of the ACCESS_METHOD qualifier is:

-A[CCESS_METHOD]=code

-PArtial_recov_bypass

Sets the CORRUPT_FILE flag in the database fileheader to FALSE. The CORRUPT_FILE flag indicates whether a region completed a successful recovery. For more information, refer to the CORRUPT_FILE qualifier in Chapter 10, Database Structure Editor.

-File

Specifies that the argument is a file-name for a single database file. The format of the FILE qualifier is:

-F[ILE]

Incompatible with: -REGION

-Region

Specifies that the argument is a region-list which identifies database file(s) mapped by the current Global Directory. The format of the REGION qualifier is:

-R[EGION]

SET -REGION changes multiple files when the parameter contains a list and/or wildcards.

Incompatible with: -FILE

-Extension_count

Specifies the number of GDS blocks by which an existing database file extends. A file or region name is required. This qualifier requires standalone access.

The format of the EXTENSION_COUNT qualifier is:

-E[XTENSION_COUNT]=integer    

-Flush_time

Specifies the amount of time between deferred writes of stale cache buffers. The default value is 1 second and the maximum value is 1 hour. -FLUSH_TIME requires standalone access. The format of the FLUSH_TIME qualifier is:

-F[LUSH_TIME]=[[[HOURS:]MINUTES:]SECONDS:]CENTISECONDS

-Global_buffers

Specifies the number of cache buffers for a BG database. This qualifier requires standalone access.The format of the GLOBAL_BUFFERS qualifier is:

-G[LOBAL_BUFFERS]=integer

For more information on ways to determine good working sizes for GLOBAL_BUFFERS, refer to Chapter 4: “Global Directory Editor.

In general, increasing the number of global buffers improves performance by smoothing the peaks of I/O load on the system. However, increasing the number of global buffers also increases the memory requirements of the system, and a larger number of global buffers can increase the probability of the buffers getting swapped out. If global buffers are swapped out, any performance gain from increasing the number of global buffers will be more than offset by the performance impact of swapping global buffers. Most applications use from 1,000 to 4,000 global buffers for database regions that are heavily used. FIS does not recommend using fewer than 256 buffers except under special circumstances.

The minimum is 64 buffers and the maximum is 65536 buffers. By default, MUPIP CREATE establishes GLOBAL_BUFFERS using information entered in the Global Directory.

On many UNIX systems, default kernel parameters may be inadequate for GT.M global buffers, and may need to be adjusted by a system administrator.

-Lock_space

Specifies the number of pages allocated to the management of M locks associated with the database. The size of a page is always 512 bytes.

The format of the LOCK_SPACE qualifier is:

-L[OCK]_SPACE=integer
  • The maximum LOCK_SPACE is 65,536 pages.

  • The minimum LOCK_SPACE is 10 pages.

  • The default LOCK_SPACE is 40 pages.

  • A file or region name is required to assign lock space.

  • For more information on LOCK_SPACE, refer to Chapter 4: “Global Directory Editor.

  • This qualifier requires standalone access.

-INST_freeze_on_error

Enables or disables custom errors in a region to automatically cause an Instance Freeze. This flag modifies the "Inst Freeze on Error" file header flag.

For more information on creating a list of custom errors that automatically causae an Instance Freeze, refer to “Instance Freeze”.

For more information on promptly setting or clearing an Instance Freeze on an instance irrespective of whether any region is enabled for Instance, refer to the Starting the Source Server” section of the Database Replication chapter.

-Mutex_slots

Sets the size of a structure that GT.M uses to manage contention for the principal critical section for a database. Performance issues may occur when there are many processes contending for database access and if this structure cannot accommodate all waiting processes. Therefore, FIS recommends setting this value to a minimum of slightly more than the maximum number of concurrent processes you expect to access the database.

The minimum value is 64 and the maximum value is 32768. The default value is 1024.

-Journal

Specifies whether the database allows journaling and, if it does, characteristics for the journal file. The format of the JOURNAL qualifier is:

-[NO]J[OURNAL][=journal-option-list]
  • -NOJOURNAL specifies that the database does not allow journaling. And also it does not accept an argument assignment.

  • -JOURNAL specifies journaling is allowed. It takes one or more arguments in a journal-option-list.

  • For detailed description of the all JOURNAL qualifiers and its keywords, refer to Chapter 6: “GT.M Journaling.

-Qdbrundown

Quickens normal process shutdown where a large number of processes accessing a database file are required to shutdown almost simultaneously, for example, in benchmarking scenarios. When a terminating GT.M process observes that a large number of processes are attached to a database file and QDBRUNDOWN is enabled, it bypasses checking whether it is the last process accessing the database. Such a check occurs in a critical section and bypassing it also bypasses the usual RUNDOWN actions which accelerates process shutdown removing a possible impediment to process startup. By default, QDBRUNDOWN is disabled.

Note that with QDBRUNDOWN there is a possibility of race condition that might leave the database fileheader and IPC resources in need of cleanup. Although QDBRUNDOWN minimizes the probability of such a race condition, it cannot eliminate it. When using QDBRUNDOWN, FIS recommends an explicit MUPIP RUNDOWN of the database file after the last process exits, to ensure the cleanup of database fileheader and IPC resources.

-REServed_bytes

Specifies the size to be reserved in each database block. RESERVED_BYTES is generally used to reserve room for compatibility with other implementations of M or to observe communications protocol restrictions. The format of the RESERVED_BYTES qualifier is:

-RES[ERVED_BYTES]=size
  • RESERVED_BYTES may also be used as a user-managed fill factor.

  • The minimum RESERVED_BYTES is 0 bytes. The maximum RESERVED_BYTES is the block size minus the size of the block header which is 7 or 8 depending on your platform. Realistic determinations of this amount should leave room for at least one record of maximum size.

-Version

Sets the block format version (Desired DB Format field in the file header) for all subsequent new blocks. The format of the VERSION qualifier is:

-V[ERSION]={V4|V6}
  • MUPIP UPGRADE and MUPIP REORG -UPGRADE set the Desired DB Format field in the database file header to V6 while MUPIP REORG -DOWNGRADE sets it to V4.

  • To set the version to V4, the current transaction number (CTN) of the database must be within the range of a 32-bit maximum.

  • V6 block format is compatible with the V5 block format. The longer key and longer records (spanning nodes) features of V6 format are automatically disabled when used with GT.M V5.* versions.

  • For more information on the upgrading or downgrading your database, refer to the release notes document of your current GT.M version.

Examples for MUPIP SET

Example:

$ mupip set -journal=on,nobefore -region "*"

This example enables NOBEFORE image journaling and turns on journaling for all regions.

$ mupip set -version=V4 -file mumps.dat

Database file mumps.dat now has desired DB format V4

This example sets the block format to V4 for all subsequent new blocks in V6 database file mumps.dat.

Example:

$ mupip set -version=v6 -file mumps.dat

Database file mumps.dat now has desired DB format V5

This example sets the block format to V6 for all subsequent new blocks in V4 database file mumps.dat.

Example:

mupip set -flush_time=01:00:00:00 -region DEFAULT

This example sets flush time to 1 hour. You can also specify flush time in any combination of [[[HOURS:]MINUTES:]SECONDS:]CENTISECONDS. MUPIP interprets -FLUSH_TIME=360000 or -FLUSH_TIME=00:60:00:00 as -FLUSH_TIME=01:00:00:00.

Example:

$ mupip set -region REPTILES -inst_freeze_on_error

This example enables custom errors in region REPTILES to cause an Instance Freeze.

SIZE

Estimates and reports the size of global variables using a format that is similar to the one that appears at the end of the MUPIP INTEG -FULL report. In comparison with MUPIP INTEG -FAST -FULL, MUPIP SIZE provides the option of choosing any one of the three estimation techniques to estimate the size of global variables in a database file. These techniques vary in measurement speed and estimate accuracy. The format of the MUPIP SIZE command is:

MUPIP SI[ZE] [-h[euristic]=estimation_technique] [-s[elect]=global-name-list] [-r[egion]=region-list]

The optional qualifiers of MUPIP SIZE are:

-Heuristic=estimation_technique

Specifies the estimation technique that MUPIP SIZE should use to estimate the size of global variables. The format of the -HEURISTIC qualifier is:

-h[euristic]={sc[an][,level=<lvl>] | a[rsample][,samples=<smpls>] | i[mpsample][,samples=<smpls>]}
  • smpls is the number of samples and must be greater than zero (0)

  • lvl is a positive or negative tree level designation and -(level of the root block) <= lvl <= (level of the root block)

estimation-technique is one of the following:

  • scan,level=<lvl>

    Traverses the global variable tree and counts the actual number of records and blocks at levels from the root down to the level specified by lvl (default is 0, the data blocks). If the given level is non-negative, it is the lowest block level of the global for which the count is requested. So, 0 means all blocks, 1 means all index blocks, 2 means all index blocks of level 2 and above, and so on. SCAN counts a negative level from the root of the global tree where -1 means children of the root.

  • arsample,samples=<smpls>

    Uses acceptance/rejection sampling of random tree traversals to estimate the number of blocks at each level. It continues until the specified number of samples (default is 1,000) is accepted.

  • impsample,samples=<smpls>

    Uses importance sampling of random tree traversals to weight each sample of the specified number of samples (default is 1,000) in order to estimate size of the tree at each level.

  • If -HEURISTIC is not specified, MUPIP SIZE uses the ARSAMPLE,SAMPLE=1000 estimation technique.

[Important] Important

For large databases, MUPIP SIZE is faster than MUPIP INTEG -FAST -FULL. IMPSAMPLE is expected to be the fastest estimation technique, followed by ARSAMPLE and then SCAN.

In terms of accuracy, MUPIP INTEG -FAST -FULL is the most accurate.

-Select

Specifies the global variables on which MUPIP SIZE runs. If -SELECT is not specified, MUPIP SIZE selects all global variables.

The format of the SELECT qualifier is:

-s[elect]=global-name-list

global-name-list can be:

  • A comma separated list of global variables.

  • A range of global variables denoted by start:end syntax. For example, -select="g1:g4".

  • A global variable with wildcards, for example, "g*" (the name must be escaped to avoid shell filename expansion)

  • "*" to select all global variables.

-Region

Specifies the region on which MUPIP SIZE runs. If REGION is not specified, MUPIP SIZE selects all regions. The format of the REGION qualifier is:

-R[EGION]=region-list

Examples:

$ mupip size -heuristic="impsample,samples=2000" -select="y*" -region="AREG"

This example estimates the size of all global variable starting with "y". It uses importance sampling with 2000 samples on the region AREG.

$ mupip size -heuristic="scan,level=-1"

This example counts the number of blocks and records at 1 level below the root of the database tree.

$ mupip size -heuristic="arsample" -select="g1:g3"

This example estimates the size of global variables g1, g2 and g3 using accept/reject sampling with the default number of samples regardless of the region in which they reside.

[Note] Note

Apart from randomness caused by sampling heuristics, MUPIP SIZE also has randomness from concurrent updates because it does not use the snapshot technique that MUPIP INTEG uses.

STOP

Terminates a GT.M image. The image executes an orderly disengagement from all databases that are currently open by the process, and then exits. A MUPIP STOP performs a kill -15 and therefore may also be used to stop non-GT.M images.

The format of the STOP command is:

MUPIP ST[OP] process-id
  • Use the shell command ps to display a list of active process names and process identifiers (PIDs).

  • To STOP a process belonging to its own account, a process requires no privileges. To STOP a process belonging to another account, MUPIP STOP must execute as root.

TRIGGER

Examines or loads trigger definitions. The format of the MUPIP TRIGGER command is:

TRIGGER {-TRIG[GERFILE]=<trigger_definitions_file> [-NOPR[OMPT]]|
[-SELE[CT][=name-list|*][<select-output-file>]}

Before you run the MUPIP TRIGGER command:

  1. Set the value of the environment variable gtmgbldir: to specify the value of a current global directory.

  2. Ensure that the key size, record size, block size of your database is sufficient for storing trigger definition. You may have to set the key and record sizes larger than the database content would otherwise require.

The qualifiers of the MUPIP TRIGGER command are as follows:

TRIGgerfile=<trigger_definitions_file>

Loads a trigger definition file to the database. The format of the TRIGGERFILE qualifier is:

-TRIG[GERFILE]=<trigger_definitions_file> [-NOPR[OMPT]]
  • For information on the syntax and usage of a trigger definition file, refer to GT.M Programmer's Guide.

  • A MUPIP TRIGGER -TRIGGERFILE operation occurs within a transaction boundary, therefore, if even one trigger from the trigger definition file fails to parse correctly, MUPIP TRIGGER rolls back the entire trigger definition file load. MUPIP TRIGGER operations have an implicit timeout of zero (0), meaning the read must succeed on the first try or the command will act as if it received no input.

  • MUPIP TRIGGER -TRIGGERFILE ignores blank lines and extra whitespace within lines. It treats lines with a semi-colon in the first position as comments and ignores their content.

  • MUPIP TRIGGER compiles the XECUTE action string and rejects the load if the compilation has errors.

  • Always specify the same value for the environment variable gtm_chset during loading and executing triggers. If you specify different values of gtm_chset during loading and executing triggers, MUPIP TRIGGER generates a run-time error (TRIGINVCHSET). GT.M does not prevent a process from updating different nodes with triggers using a different character set, however, GT.M prevents a process from updating the same triggering node with different character sets. Your coding practice, for all database updates, should be to ensure that you provide the same value for gtm_chset during load compilation and run-time compilation.

  • Incompatible with: -SELECT

[Note] Note

The trigger update summary reports count not only names and option changes as "modified" but also cases where a -COMMANDS list changed, even though those are functionally additions or deletions of separate trigger definitions.

SELECT=name-list

Provides a facility to examine the current trigger definition. SELECT produces a list of the current triggers for a comma-separate list of global variables or trigger names. The format of the SELECT qualifier is:

-SELE[CT][=name-list[*]|*][ <select-output-file>]

  1. Name-list can include global names, delimited with a leading caret (^), and/or trigger names (user-defined or auto-generated) with no leading caret. You can specify a trailing asterisk(*) with either.

  2. With no arguments specified, GT.M treats -SELECT as -SELECT="*" and extracts a list of all current triggers.

  3. Optionally, you can specify a file name to redirect the output of the command. If you do not specify a file name, MUPIP TRIGGER prompts for a file name. If you respond with an empty string (RETURN), MUPIP TRIGGER directs the output to STDOUT.

[Note] Note

The output from the MUPIP TRIGGER -SELECT command may not be identical to your trigger definition file. This is because GT.M converts some semantically identical syntax into a single internal representation; while -SELECT output may not be identical to the -TRIGGERFILE input, it has the same meaning. Additionally, MUPIP TRIGGER -SELECT displays a field called "Cycle" as part of a comment. Cycle is the number of trigger definition updates (addition, modification, or deletion) performed on a global.

Examples for MUPIP TRIGGER

This section provides step-by-step instructions for creating, modifying, and deleting triggers. Triggers affect all processes updating a database unlike, for example, environment variables such as $gtmroutines which work on a per process basis. Therefore, FIS recommends that you should always have carefully planned procedures for changing triggers in your production environment.

To create a new trigger for global node ^Acct("ID"):

  1. Using your editor, create a trigger definition file called triggers.trg with the following entry:

    +^Acct("ID") -name=ValidateAccount -commands=S -xecute="Write ""Hello Earth!"""
  2. Execute a command like the following:

    $ mupip trigger -triggerfile=triggers.trg

    This command adds a trigger for ^Acct("ID"). On successful trigger load, this command displays an output like the following:

    File triggers.trg, Line 1: ^Acct trigger added with index 1
    =========================================
    1 triggers added
    0 triggers deleted
    0 trigger file entries not changed
    0 triggers modified
    ========================================= 

    Now, every S[et] operation on the global node ^Acct("ID") executes the trigger.

  3. Execute a command like the following:

    $ mupip trigger -select="^Acct*"

    This command displays the triggers. A sample output looks like the following:

    ;trigger name: ValidateAccount#  cycle: 1
    +^Acct("ID") -name=ValidateAccount -commands=S -xecute="Write ""Hello Earth!""" 

To modify an existing trigger for global node ^Acct("ID"):

You cannot directly replace an existing trigger definition with a new one. With the exception of -NAME and -OPTIONS, to change an existing trigger, you have to delete the existing trigger definition and then add the modified trigger definition as a new trigger. Note that GT.M performs two different trigger comparisons to match trigger definitions depending on whether or not S[ET] is the trigger invocation command. If there is a S[ET], then the comparison is based on the global name and subscripts, PIECES, [Z]DELIM, and XECUTE. If there is no SET, GT.M compares only the global node with subscripts and the -XECUTE code value.

  1. Begin by executing the following command:

    $ mupip trigger -select="^Acct*"
    Output file: 
  2. Specify trigger_mod.trg as the output file. This file contains entries like the following:

    ;trigger name: ValidateAccount#  cycle: 1
    +^Acct("ID") -name=ValidateAccount -commands=S -xecute="Write ""Hello Earth!"""
  3. Using your editor, open trigger_mod.trg and change + (plus) to - (minus) for the trigger definition entry for ValidateAccount and add a new trigger definition for ^Acct("ID"). To avoid inconsistent application behavior, it is important to replace an old trigger with a new one in the same transaction (Atomic). The trigger_mod.trg file should have entries like:

    ;trigger name: ValidateAccount#  cycle: 1-^Acct("ID") -name=ValidateAccount -commands=Set -xecute="Write ""Hello Earth!"""
    ;trigger name: ValidateAccount#+^Acct("ID") -name=ValidateAccount -commands=Set -xecute="Write ""Hello Mars!""" 
  4. Execute a command like the following:

    $ mupip trigger -triggerfile=trigger_mod.trg
  5. This command displays an output like the following:

    File trigger_mod.trg, Line 1: ^Acct trigger deleted
    File trigger_mod.trg, Line 3: ^Acct trigger added with index 1
    =========================================
    1 triggers added
    1 triggers deleted
    0 trigger file entries not changed
    0 triggers modified
    =========================================

    Congratulations! You have successfully modified the xecute string of ValidateAccount with the new one.

To delete an existing trigger for global node ^Acct("ID"):

  1. Begin by executing the following command:

    $ mupip trigger -select="^Acct*"
    Output file:
  2. Specify trigger_delete.trg as the output file. This file contains entries like the following:

    ;trigger name: ValidateAccount#  cycle: 3
    +^Acct("ID") -name=ValidateAccount -commands=S -xecute="Write ""Hello Mars!"""
  3. Using your editor, change + (plus) to - (minus) for the trigger definition entry for ValidateAccount. Alternatively, you can create a file with an entry like -ValidateAccount.

  4. Now, execute a command like the following:

    $ mupip trigger -triggerfile=trigger_delete.trg

    This command displays an output like the following:

     File trigger_delete.trg, Line 2: ^Acct trigger deleted
    =========================================
    0 triggers added
    1 triggers deleted
    0 trigger file entries not changed
    0 triggers modified
    =========================================

You have successfully deleted trigger "ValidateAccount".

To change a trigger name for global node ^Acct("ID"):

  1. Using your editor, create a new file called trigger_rename.trg and add a trigger definition entry for ValidateAcct with the same trigger signature as ValidateAccount. Your trigger definition would look something like:

    +^Acct("ID") -name=ValidateAcct -commands=S -xecute="Write ""Hello Mars!"""
  2. Verify that the ValidateAccount trigger exists by executing the following command:

    $ mupip trigger -select="^Acct*"
    Output file:
  3. Respond with an empty string (Press Enter). Confirm that the trigger summary report contains an entry like the following:

    ;trigger name: ValidateAccount#  cycle: 3
    +^Acct("ID") -name=ValidateAccount -commands=S -xecute="Write ""Hello Mars!"""
  4. Now, execute a command like the following:

    $ mupip trigger -triggerfile=trigger_rename.trg

    This command displays an output like the following:

    =========================================
    0 triggers added
    0 triggers deleted
    0 trigger file entries not changed
    1 triggers modified
    =========================================

    You have successfully changed the trigger name ValidateAccount to ValidateAcct.

UPGRADE

Upgrades the file-header of a database. The format of the MUPIP UPGRADE command is:

UP[GRADE]
  • It increases the size from 4 bytes to 8 bytes of file-header fields such as current transaction number (CTN), maximum TN and others that contain transaction numbers.

  • It resets the various trace counters and changes the database format to V5. This change does not upgrade the individual database blocks but sets the database format flag to V5.

  • It also initializes a counter of the current blocks that are still in V4 format. It decrements this counter each time an existing V4 format block is converted to V5 format. When the counter is 0, the entire database gets converted.

Example for MUPIP UPGRADE

Example:

$ mupip upgrade mumps.dat

This example upgrades the file-header of mumps.dat to V5 format.