HP NonStop TMF Operations and Recovery Guide Abstract This manual describes how to perform day-to-day operations with the HP NonStop™ Transaction Management Facility (TMF), how to dump and archive audit information and the database, and how to recover from error conditions. This manual is intended for system managers and operators. Product Version TMF G07 Supported Releases This publication supports G06.
Document History Part Number Product Version Published 128234 NonStop TM/MP D42 July 1997 136589 NonStop TM/MP D46 May 1998 422843-001 NonStop TM/MP D46 March 2001 522417-001 TMF G07 August 2002 522417-002 TMF G07 April 2004
HP NonStop TMF Operations and Recovery Guide Index Tables What’s New in This Manual vii Manual Information vii New and Changed Information viii About This Manual xi Who Should Read This Manual xi How This Manual is Organized xi TMF Documentation xii Other Documentation xiii Notation Conventions xiv 1.
2. Routine Maintenance (continued) Contents 2.
3. Occasional Operations (continued) Contents 3.
. The TMF Catalog Contents 6.
. Recovery Methods (continued) Contents 7.
C. Managing SQL Objects Contents C. Managing SQL Objects Audited Objects C-1 TMF Guidelines for SQL Objects C-1 Operations for SQL/MP Only C-2 Operations for Both SQL/MP and SQL/MX C-6 Impact of SQL Operations on Online Dumps C-8 Index Tables Table 1-1. Table 1-2. Table 1-3. Table 1-4. Table 2-1. Table 2-2. Table 2-3. Table 2-4. Table 2-5. Table 3-1. Table 4-1. Table 4-2. Table 7-1. Table C-1.
What’s New in This Manual Manual Information HP NonStop TMF Operations and Recovery Guide Abstract This manual describes how to perform day-to-day operations with the HP NonStop™ Transaction Management Facility (TMF), how to dump and archive audit information and the database, and how to recover from error conditions. This manual is intended for system managers and operators. Product Version TMF G07 Supported Releases This publication supports G06.
What’s New in This Manual New and Changed Information New and Changed Information This publication has been updated to reflect new product names: • • Since product names are changing over time, this publication might contain both HP and Compaq product names. Product names in graphic representations are consistent with the current product interface.
What’s New in This Manual • New and Changed Information Section 7, Recovery Methods, revises the following discussions and includes other minor corrections and clarifications. ° Displaying Backout Process Activity, to include a caution that this topic is subject to ongoing change and referring readers to a new manual supplement for the most current information. ° Volume Recovery, to revise incorrect information and present revised EMS messages.
What’s New in This Manual New and Changed Information Lastly, Appendix D, TMF Configuration Limits and Defaults, has been removed from this manual and hereafter will appear only in TMF Reference Manual and TMF Management Programming Manual, the manuals that contain TMF reference information.
About This Manual This manual describes methods for maintaining the HP NonStop™ Transaction Management Facility (TMF) on HP NonStop servers. This manual also describes TMF recovery methods that can be used to maintain the integrity and consistency of databases for online transaction processing (OLTP) applications.
TMF Documentation About This Manual Section 2, Routine Maintenance, describes how to perform routine maintenance on TMF objects, including audit-trail volumes, data volumes, local and distributed transactions, and TMF operations. Section 3, Occasional Operations, tells how to perform TMF operations that are needed only periodically and are not considered part of routine TMF maintenance.
Documentation Description About This Manual Documentation Description • • • • • • • TMF Introduction Read this manual first. It provides a general overview of TMF concepts and capabilities for business professionals, application designers and programmers, and system managers and administrators. TMF Glossary Refer to this manual to look up technical terms used in the TMF documentation set.
Notation Conventions About This Manual • • • • • • • Distributed Systems Management/Software Configuration Manager (DSM/SCM) Event Management Service (EMS) File Utility Program (FUP) Measure Subsystem Pathway/TS Surveyor Subsystem Various programming languages, including COBOL85, Pathway SCREEN COBOL, FORTRAN, TAL, Pascal, C, C++, and SQL (NonStop SQL implementation). Notation Conventions Hypertext Links Blue underline is used to indicate a hypertext link within text.
General Syntax Notation About This Manual each side of the list, or horizontally, enclosed in a pair of brackets and separated by vertical lines. For example: FC [ num ] [ -num] [ text] K [ X | D ] address-1 { } Braces. A group of items enclosed in braces is a list from which you are required to choose one item. The items in the list may be arranged either vertically, with aligned braces on each side of the list, or horizontally, enclosed in a pair of braces and separated by vertical lines.
Change Bar Notation About This Manual If there is no space between two items, spaces are not permitted. In the following example, there are no spaces permitted between the period and any other items: $process-name.#su-name Line Spacing. If the syntax of a command is too long to fit on a single line, each continuation line is indented three spaces and is separated from the preceding line by a blank line. This spacing distinguishes items in a continuation line from items in a vertical list of selections.
1 Overview of TMF Maintenance and Recovery This section provides an overview of the maintenance tasks performed for TMF. It also describes the TMF STATUS and TMF INFO displays. These two displays let you monitor the status and attributes of TMF, and contain information vital for smooth TMF operation.
Overview of TMF Maintenance and Recovery • • Corrective Tasks Back up the TMF catalog and configuration files (Section 2, Routine Maintenance and Section 7, Recovery Methods). Create Disk Space Analysis Program (DSAP) reports for audit-trail volumes and volumes that contain audited files (Section 7, Recovery Methods). Corrective Tasks Take the following actions only when there is a deficiency or problem on your system: • • • • • • • Reconfigure the audit dump configuration (Section 4, Audit Dumps).
Overview of TMF Maintenance and Recovery Viewing Your TMF System Viewing Your TMF System As the TMF operator, you should be familiar with the TMF configuration at your node. The TMFCOM STATUS and TMFCOM INFO commands provide this information. For instructions on using TMFCOM, see the TMF Reference Manual. Displaying TMF Status Use the STATUS TMF command to view the status of your TMF system.
Overview of TMF Maintenance and Recovery Displaying TMF Status To recover from this situation, increase the audit-trail capacity as described in Responding to Audit-Trail Overflow on page 3-5. It is important that you determine the cause of the capacity problem so you can correct it and make sure it does not recur. The information in the STATUS TMF display can notify you of a potential problem on the system, which you can usually prevent by taking some action.
Overview of TMF Maintenance and Recovery Displaying TMF Status Table 1-2. TMF States (page 2 of 2) State Meaning Starting (starting state) A START TMF command is in progress, and is in one of the following starting conditions: Services—Audit-trail services and other TMF services are starting. Waiting for network transactions to be resolved—TMF is committing or backing out distributed transactions that did not complete when TMF was last running. Data volumes—Data volumes are starting for TMF processing.
Overview of TMF Maintenance and Recovery Displaying Configuration Attributes Displaying Configuration Attributes Use the INFO TMF command to display the configuration volume, attributes of the audit trails, audit dump process, and parameters that affect the catalog process and the BEGINTRANSACTION procedure. The INFO TMF command includes all of the information displayed by the INFO AUDITDUMP, INFO AUDITTRAIL, INFO BEGINTRANS (only when TMF is running), and INFO CATALOG commands.
Overview of TMF Maintenance and Recovery Displaying Configuration Attributes Table 1-4. Understanding the INFO TMF Display (page 1 of 3) Heading/Attribute Meaning Configuration Volume The volume that contains the TMF configuration files that TMF uses at startup. Audit-Trail Configuration { Master | Auxiliary01…15 } The audit trail for which information is displayed. ActiveVols The active-audit volume names, as specified in an ADD or ALTER AUDITTRAIL command.
Displaying Configuration Attributes Overview of TMF Maintenance and Recovery Table 1-4. Understanding the INFO TMF Display (page 2 of 3) Heading/Attribute Meaning Catalog Configuration retaindepth The number of online dump and associated audit dump generations that are to remain in the TMF catalog, as specified in an ALTER CATALOG command. released { off | on } Tells whether a dump tape’s status changes to Released (On) or Scratch (Off) when the tape is marked for deletion.
Overview of TMF Maintenance and Recovery Displaying Configuration Attributes Table 1-4. Understanding the INFO TMF Display (page 3 of 3) Heading/Attribute Meaning AUTOABORT The length of time that a transaction can run before TMF automatically aborts it. RECRMCOUNT For heterogeneous transactions, the maximum number of recoverable resource managers that can be registered for the entire TMF system (spanning a single EXPAND node).
Overview of TMF Maintenance and Recovery Displaying Configuration Attributes HP NonStop TMF Operations and Recovery Guide —522417-002 1- 10
2 Routine Maintenance This section describes how to perform routine maintenance on your TMF system’s components.
Understanding Audit-Trail File Names Routine Maintenance Understanding Audit-Trail File Names An audit-trail file name consists of three parts: volume, subvolume, and file ID: $active-audit-volume The system manager uses the ADD AUDITTRAIL or ALTER AUDITTRAIL command to specify from 1 to 16 active-audit volumes for the audit trail. ZTMFAT All TMF audit trails are stored in the ZTMFAT subvolume. AA | BB...
Displaying Audit-Trail Activity Routine Maintenance Auxiliary01: Active audit trail capacity used: 54% First pinned file: $AUX1.ZTMFAT.BB000003 Reason: Required by the MAT. Files: $AUX1.ZTMFAT.BB000001( available ) $AUX1.ZTMFAT.BB000002( available ) $AUX1.ZTMFAT.BB000003( active, dumped ) $AUX1.ZTMFAT.BB000004( active, dumped ) $AUX1.ZTMFAT.BB000005( active, dumped ) $AUX1.ZTMFAT.BB000006( active, current ) $AUX1.ZTMFAT.
Displaying Audit-Trail Activity Routine Maintenance Table 2-1. Understanding the STATUS AUDITTRAIL Display (page 2 of 2) Audit-Trail Status Meaning Files | Current file (file status, dump status) The names of the active, preallocated, overflow, and restored files in the audit trail. If the DETAIL option is not entered in the STATUS AUDITTRAIL command, then only the current audit-trail file is shown here.
Why Audit-Trail Files Stay Pinned on a Volume Routine Maintenance Why Audit-Trail Files Stay Pinned on a Volume In the STATUS AUDITTRAIL display, the line labeled, “First pinned file:” refers to the oldest audit-trail file that cannot yet be reused or purged from the active or overflowaudit volume. There is always at least one active audit-trail file on disk, so the status display always shows a file name on this line. The display also shows the reason that the file is pinned; these are described next.
Why Audit-Trail Files Stay Pinned on a Volume Routine Maintenance tapes. Archive mode is allowed only if the audit trail for this data volume is configured for audit dumping. See Changing the Data Volume Configuration on page 3-10 for more information. Reason: Might be needed to restart TMF Meaning. This audit-trail file contains control information needed by TMF to restart after a system failure.
Initiating an Audit-Trail File Rollover Routine Maintenance There are two main disadvantages to using the UNPINAUDIT command: first, it requires stopping RDF, thus removing substantial database protection until the subsystem is restarted; second, it risks the need for database resynchronization, which can involve substantial time and effort.
Rollover Errors Routine Maintenance Rollover Errors If TMF cannot find a preallocated or an available file for an audit-trail rollover, it generates the following EMS message: Unable to find an available audit trail file for name audit trail. Use the STATUS AUDITTRAIL command to determine why there are no files available for the rollover. See Why Audit-Trail Files Stay Pinned on a Volume on page 2-5 for suggestions on freeing audit-trail files for reuse.
Understanding Data Volume States Routine Maintenance You can display the status for an individual data volume by entering the volume name in the STATUS DATAVOLS command: TMF 11> STATUS DATAVOLS $DATA1 See the TMF Reference Manual for complete instructions on using the STATUS DATAVOLS command. Table 2-2 describes the information in the STATUS DATAVOLS display. Table 2-2. Understanding the STATUS DATAVOLS Display Heading Meaning Volume The data volume name, as specified in an ADD DATAVOLS command.
Understanding Data Volume States Routine Maintenance State: Unknown Meaning. A data volume can be in the unknown state only when TMF is in the process of stopping. The volume is not configured as a data volume or it is configured but has been shut down. TMF has no information about the volume. Action. Use the STATUS DATAVOLS command again when TMF is running. State: Unconfigured Meaning. The volume is not configured as a data volume or an audit-trail volume.
Understanding Data Volume States Routine Maintenance State: Waiting for transaction resolution Meaning. There may be transactions in progress that affect the data volume. This state normally lasts a short time; it may last longer if there is a long-running transaction on the system, or if a homogeneous or heterogeneous distributed transaction cannot complete because of a network partition.
Understanding Data Volume States Routine Maintenance SCF PRIMARY command is discussed in the SCF Reference Manual for G-Series RVUs, and the ALTER TMF, SWITCHPROCESS TMP command is explained in the TMF Reference Manual. State: Started Meaning. The volume is ready to process transactions. If a data volume in this state stops because of a physical or disk process problem, it is automatically returned to the started state the next time it is operational. Action.
Understanding Data Volume States Routine Maintenance Action. When the volume is ready to be used for transaction processing, use the ENABLE DATAVOLS command. State: Down Meaning. The volume would be enabled under normal conditions, but is currently inaccessible. This can happen because of a physical disk or disk process problem, or because TMF is stopped. Action. Repair the disk, if necessary, and bring it back online.
Maintaining Transactions Routine Maintenance Action. If the wrong volume is mounted, mount the correct one. If you want to use the mounted volume, you must delete the volume and then re-add it to the TMF configuration; use the DISABLE DATAVOLS, DELETE DATAVOLS, and ADD DATAVOLS commands to omit this volume from the volume recovery. Maintaining Transactions Transactions are the foundation of a TMF system. It is vital to make sure that TMF can process transactions when they are initiated by a system user.
Displaying Transaction Activity Routine Maintenance tm-flags specifies a number representing flags used internally by TMF. If this number is zero, it does not appear in displays of the transaction identifier presented by the STATUS TRANSACTIONS command. cpu is the number of the processor from which the transaction originates. seq-num is a sequence number assigned by TMF to the transaction. The number distinguishes the transaction from other transactions originating in the same processor on the same node.
Displaying Transaction Activity Routine Maintenance The same command issued on \SYS2 would show the following information: Transaction Identifier ---------------------\SYS1.0.40302 Process ------(3,54) State ----active Parent -----\SYS1 Children -------- \SYS2 is unaware of the part of the transaction that affects \SYS3 and vice versa; only \SYS1 knows about \SYS2 and \SYS3. In the next example, \SYS2 accesses a server on a remote system, \SYS4.
Understanding Transaction States Routine Maintenance Table 2-3. Understanding the STATUS TRANSACTIONS Display Heading Meaning State The operational state of the transaction, as described in the following section. Parent The name of the system that sends a distributed transaction to another node to perform work on it. Children The names of any systems that receive and perform work on behalf of a distributed transaction.
Verifying that New Transactions Can Start Routine Maintenance enabled and new transactions are allowed to start. There are several reasons that cause BEGINTRANSACTION to become disabled, however; under this condition, new transactions are not allowed to start. Any user allowed to use TMFCOM can issue this command while TMF is running.
Verifying that New Transactions Can Start Routine Maintenance Reason: TMF is stopped, is stopping and has already disabled BEGINTRANSACTION, or is starting and has not yet enabled BEGINTRANSACTION. Meaning. This is a transitional state while TMF is stopping or starting. Action. No action is needed. Reason: The available TMFLIB memory in CPU number is running low. Meaning. The percentage of extended segment memory allocated by TMFLIB is at or above the level that causes TMF to disallow new transactions.
Maintaining Distributed Transactions Routine Maintenance Maintaining Distributed Transactions TMF can service two kinds of distributed transactions: • • Homogeneous distributed transactions, where portions of a transaction are processed by TMF systems on two or more Expand nodes (NonStop systems). Heterogeneous distributed transactions, where portions of a transaction are processed under the control of multiple transaction managers: TMF and one or more foreign transaction managers.
Normal Distributed Transaction Processing Routine Maintenance Normal Distributed Transaction Processing Table 2-5 summarizes the usual progression of states that a homogeneous distributed transaction goes through in the parent node and in a child node. Note that a distributed transaction can involve not just one, but several child nodes. In such a case, the transaction exists simultaneously in the parent node and in all involved child nodes. Table 2-5.
What Happens When a Communication Link Goes Down Routine Maintenance Group TRANSACTION PROCESSING Publications, available from X/Open Publications at the following Web location: http://www.opengroup.org/pubs/catalog/tp.htm These publications can also be ordered through many bookstores.
What Happens When a Link is Restored Routine Maintenance What Happens When a Link is Restored When a communications link is restored, the normal sequence of events for homogeneous distributed transactions resumes where it was interrupted. The TMPs that had lost touch with one another reestablish communication, and exchange information about distributed transactions that were in progress.
Maintaining TMF Operations Routine Maintenance An example of a STATUS TRANSACTIONS, DETAIL command output showing some heterogeneous transactions follows: TMF 42> STATUS TRANSACTIONS, DETAIL Transaction Identifier : \TSII.4.90273 Start Time : 20-Jan-2002 19:23:57 Process : Parent : TUX-A2_NT@MICROSOFT.1 Child : State : active # Attempts to Abort : 0 Starting MAT Seq. No : 800 Transaction Identifier Start Time Process Parent Child State # Attempts to Abort Starting MAT Seq.
Maintaining TMF Operations Routine Maintenance • • • Volume recovery Dump files (online dumps) Recover files Each TMF operation has its own number, to distinguish it from another operation of the same type that was used recently. Use the STATUS OPERATIONS command to see the status of TMF operations in progress and operations that recently completed. Any user allowed to use TMFCOM can use this command when TMF is running.
Viewing EMS Messages Routine Maintenance If you want to cancel a particular operation, you can use the CANCEL OPERATIONS command. This command affects only TMF file-recovery and file-dump operations. To remove other types of operations, you must use the STOP TMF, ABRUPT command.
Viewing EMS Messages Routine Maintenance To see details about any message, you can press the F11 key to see the Event Detail Screen. 2002-03-10 16:03 EVENT DETAIL Page 1 END 2002-03-10 16:02:22 \SF.$TMP HP.TMF.D10 008 TMF *0008* TMP $TMP : Rollover to audit file $MAT.ZTMFAT.AA002655. Cause: The Transaction Monitor Process (TMP) rolled over an audit file. Effect: The operation completes. Recovery: Informative message only; no corrective action is needed.
Viewing EMS Messages Routine Maintenance The DISPLAY OPERATIONS command displays TMF event messages as follows: TMF 63> DISPLAY OPERATIONS 50 Event Messages: NonStop TMF on \TSII *0155* DUMP FILES [50] TMP Process: Begin operation NonStop TMF on \TSII *0217* DUMP FILES [50] OnlineDump Process #1 OnlineDumpMgmt: Dump serial: 2108 File-set-list: $ALTVOL.*.*, $BLAST.*.*, $SIGN.*.*, $SPOOL.*.*, $MAIL03.*.*, $MAIL04.*.*, $MAIL06.*.*, $MAIL09.*.
Routine Maintenance Keeping Current System Information Keeping Current System Information You can easily keep track of your TMF system and other system components by maintaining a command file that contains a copy of your present configuration, and by printing copies of the output from TMF status and information commands and other system reports you routinely run.
Routine Maintenance Keeping Current System Information HP NonStop TMF Operations and Recovery Guide —522417-002 2- 30
3 Occasional Operations This section describes how to perform TMF operations that are needed only periodically; they are not considered part of routine TMF maintenance.
Stopping TMF Occasional Operations terminates (as a result of STOP TMF, ABRUPT). Very soon thereafter, the backout process terminates but is not restarted by the new TMP. In this event, aborting transactions are hung. To recover from this situation, enter a TMFCOM ALTER TMF, SWITCHPROCESS TMP command. In response, the TMP restarts a new TMF backout process, and aborting transactions are then completed. The ALTER TMF, SWITCHPROCESS TMP command is explained in the TMF Reference Manual.
NOWAIT Option Occasional Operations When you need to shut down your TMF system, use the STOP TMF command; you must be a member of the super user group to issue this command.
Altering the Size of an Audit Trail Occasional Operations whether their transactions were committed or aborted. Aborted transactions are undone by the backout process when TMF is started again. Caution. The STOP, ABRUPT command, of course, can disrupt customer applications. If the audit trails are not disturbed while TMF is down, any transactions aborted when the STOP, ABRUPT operation occurs should be properly backed out when TMF is restarted, and the database should remain consistent.
Responding to Audit-Trail Overflow Occasional Operations Responding to Audit-Trail Overflow The overflow threshold is the capacity to which an audit trail can fill before TMF copies the oldest audit-trail file to an overflow-audit volume. Audit trails with an overflow threshold of 80% (default) or slightly higher should rarely exceed that threshold.
Responding to Audit-Trail Overflow Occasional Operations Reason: Long-running transaction Meaning. All audit-trail files affected by a transaction must remain on the active or overflow volumes until the transaction is committed or aborted. Normally, TMF automatically aborts transactions that run longer than two hours; however, if the autoabort function has been turned off, a transaction can run an excessively long time, causing the audit trail to fill. Caution.
Responding to Capacity-Based Transaction Aborts Occasional Operations Recovery Mode on page 3-11 for more information on using archive recovery mode. If, however, there has been a sudden burst of audit information generated, or if there is a permanent increase in the audit generation rate, consider increasing the size of the audit trail or increasing the overflow threshold. Responding to Capacity-Based Transaction Aborts Meaning.
Occasional Operations Using the SCF STOP DISK Command on Audit-Trail Volumes In the following example, the files per active-audit volume are increased to 6 in the MAT configuration: TMF 21> ALTER AUDITTRAIL MAT, FILESPERVOLUME 6 Adding Another Active-Audit Volume Adding an active-audit volume increases the audit tail capacity by the number of files configured to reside on each volume of an audit trail; if there is not enough disk space for these files, the volume cannot be added. Note.
Disabling and Enabling Data Volumes Occasional Operations Disabling and Enabling Data Volumes Data volumes that were in the started state when TMF was last stopped are automatically started for transaction processing when you next start TMF.
Occasional Operations Disabling/Enabling Data Volumes for Servicing Disabling/Enabling Data Volumes for Servicing If you need to disable a configured data volume for servicing, the proper way to do so is as follows: 1. Issue a DISABLE DATAVOLS command to shut the volume down cleanly within the TMF environment. 2. Issue an SCF STOP DISK command to bring the volume down within the system environment. 3.
Adding New Data Volumes Occasional Operations Adding New Data Volumes You use ADD DATAVOLS commands to add data volumes to your TMF configuration. Note. TMF is shipped from the factory with the $DSMSCM disk volume configured as a TMF data volume. Although you should not remove $DSMSCM as a TMF data volume, you are free to add other TMF data volumes to the configuration. See also the information about the preconfiguration of active-audit volumes under Adding Another Active-Audit Volume on page 3-8.
Permanently Removing Data Volumes Occasional Operations archive mode frees audit-trail space sooner, which can prevent overflow or begintransaction-disable conditions. Caution. If you use archive recovery mode, you must perform regular online dumps to ensure that the audit dumps stay current in the TMF catalog.
Replacing Damaged Data Volumes Occasional Operations Replacing Damaged Data Volumes If a data volume gets physically damaged and you need to replace it, the proper way to do so is as follows: 1. Issue a DISABLE DATAVOL command to shut down the damaged volume. 2. Issue a DELETE DATAVOL command to delete the volume from the TMF configuration.
Associating a Data Volume with a Different Audit Trail Occasional Operations If you received an error message in Step 1, indicating that the volume did not shut down cleanly, you can force the volume to be deleted by including the ALLOWINCONSISTENCY option in the DELETE DATAVOL command. Caution. After the data volume has been deleted with the ALLOWINCONSISTENCY option, volume recovery cannot return it to a consistent state. 3.
Renaming Data Volumes Occasional Operations If the volume did not shut down cleanly in Step 1, you can force the volume to be added by including the IGNOREPREVIOUSCONFIG option in the ADD DATAVOL command. Caution. Volume recovery cannot repair any inconsistencies that exist when a data volume is added with IGNOREPREVIOUSCONFIG specified, even if the data volume is returned to its previous configuration environment. 4.
Controlling Transaction Processing Occasional Operations Controlling Transaction Processing Occasionally, you may have to interrupt the normal flow of TMF operations by manipulating when or for how long transactions are processed. This section describes the situations that may require your intervention, and how to manage each situation.
Disabling New Transactions Occasional Operations Reason: A DISABLE BEGINTRANS command was issued Meaning. The BEGINTRANSACTION procedure has been manually stopped by a TMF operator. This action may be taken to perform maintenance that requires all TMF volumes to be in a consistent state. New transactions cannot begin until an ENABLE BEGINTRANS command is issued. Action. Use the ENABLE BEGINTRANS command to start the BEGINTRANSACTION procedure, thereby allowing new transactions to start.
Changing the Autoabort Configuration Occasional Operations data volume. This kind of maintenance should be performed when there is little or no transaction activity. Caution. Disabling new transactions stops transaction processing on your system. This action will probably cause your transaction processing applications to fail, so you should stop your applications before disabling transactions. If you must disable new transactions, choose a time when the interruption will affect system users the least.
Changing the Autoabort Threshold Occasional Operations Setting the autoabort threshold to a non-zero value means that TMF automatically backs out transactions that exceed the autoabort threshold. By default, the autoabort threshold is two hours. Setting the autoabort threshold to 0 turns the autoabort feature off, so that transactions can run until completion, regardless of the time required.
Controlling Individual Transactions Occasional Operations ALTER BEGINTRANS command with an AUTOABORT timeout value higher than the present disconnect timer value. Note. This problem occurs only if you change the disconnect timer setting from its default value (30 seconds); that is, the AUTOABORT timeout value can be set lower than the disconnect timer value if the disconnect timer value is not changed from its default.
Resolving Distributed Transactions Occasional Operations The ABORT TRANSACTION command provides two options to accommodate different situations. The AVOIDHANGING Option Use the AVOIDHANGING option when you want to remove a hung transaction without compromising data integrity. Use this option, for example, when data integrity is more important than the availability of a particular set of files.
Deleting Transactions Occasional Operations Table 3-1. Resolving Distributed Transactions Transaction State at Home Node Action to Take at Remote Node Aborted Issue the RESOLVE TRANSACTION command with the STATE ABORTED option. Aborting Issue the RESOLVE TRANSACTION command with the STATE ABORTED option. Committed Issue the RESOLVE TRANSACTION command with the STATE COMMITTED option. Nonexistent Issue the RESOLVE TRANSACTION command with the STATE ABORTED option.
Gathering Information About Errors and Failures Occasional Operations The following command removes transaction number 5769602 that originated in CPU 4 of the system in which the command is issued: TMF 50> DELETE TRANSACTION 4.5769602 Caution. The DELETE TRANSACTION command can leave your database in an inconsistent state that cannot be corrected by the TMF recovery process. Contact the Global Customer Support Center (GCSC) or your service provider before issuing this command.
Gathering Information About Errors and Failures Occasional Operations • If the policies at your site permit: • • Copies of any audit-trail files you believe might be related to the problem (for example, those for which audit-reading errors are reported) Relevant information about the application running when the problem occurred For problems involving processor halts or hangs, in addition to the standard items, please supply: • • Processor (CPU) dumps Copies of the following files from the $SYSTEM.
4 Audit Dumps Audit dumps preserve audit-trail files for use by the file recovery process. The audit dump process copies audit-trail files from disk to tape, or from disk to disk when the files are full and no longer needed by outstanding transactions or volume recovery.
Displaying Dump Media Information Audit Dumps The following example shows a STATUS AUDITDUMP command display: TMF 5> STATUS AUDITDUMP AuditDump Status: Master: State: enabled, Status: active, Process: $X824 File: $MAT1.ZTMFAT.AA000012 AUXILIARY01: Not configured for dumping AUXILIARY02: State: DISABLED, Status: inactive Table 4-1 describes the status and state values that can appear in an audit dump status display. Table 4-1.
Making Audit Dumps Audit Dumps Making Audit Dumps For a dump to tape, the audit dump process locates the audit-trail file that is ready to be dumped and gets the name of a scratch tape from the TMF catalog. If the tape is not mounted, the labeled-tape process generates an event message like the following: $ZSVR: 0033 MOUNT TMF018 WITH RING "TMF Audit-Dump ($X025) of $MAT.ZTMFAT.AA000047. Tape #1.
Solving Audit Dump Problems Audit Dumps No operator intervention is required to process a disk dump. If an audit dump to disk fails, the audit dump’s temporary file is not written to disk and the process is tried again.
Pausing and Resuming Audit Dumps Audit Dumps Pausing and Resuming Audit Dumps You can use the DISABLE AUDITDUMP and ENABLE AUDITDUMP commands to control the audit dump process: • • DISABLE AUDITDUMP makes the audit dump process unavailable. This command does not affect an audit dump in progress. ENABLE AUDITDUMP makes the audit dump process available. The DISABLE AUDITDUMP and ENABLE AUDITDUMP commands can be issued only by members of the super user group.
Dumping to Remote Systems Audit Dumps Dumping to Remote Systems Dumping audit-trail files to a remote system is not considered a TMF distributed operation. A remote system does not have to be running TMF to receive audit dumps. You can dump audit trails to either a tape drive or a disk on a remote system. Tape Dumping Use the ALTER AUDITDUMP command to identify a remote system for dumping audittrail files to tape.
5 Online Dumps Online dumps are copies of audited files on tape or disk. These dumps preserve audited files for use by the file recovery process. If your database is damaged, the file recovery process restores the online dump files to disk and uses audit trail files to reconstruct the database.
Making Online Dumps Online Dumps Making Online Dumps You can make online dumps only when TMF is running. Use the DUMP FILES command to make online dumps, specifying the names of the audited files to be dumped. The online dump process copies each file to tape or disk and makes an entry in the TMF catalog for each file.
Selecting Dump Options Online Dumps See the TMF Reference Manual for instructions on using the DUMP FILES command. Selecting Dump Options Use the DUMP FILES command to specify which audited files are dumped. Files are selected or not based on the file names specified in the DUMP FILES command. File names are entered in the DUMP FILES command syntax as follows: DUMP FILES { fileset } { ( fileset [,fileset ] ... ) } [,NOT {file-set } {(file-set [,file-set]...
Selecting Dump Options Online Dumps The file-name pattern syntax is: [[$pattern.]pattern.]pattern In this syntax, pattern consists of one or more characters. Allowable characters are letters, digits, asterisks (*), and question marks (?). The maximum length of a pattern is 8 characters, including wild-card characters. Wild-card characters can appear in any portion of a name, for as many times as there can be characters in that portion.
DUMP FILES Command Examples Online Dumps • • The TAPEMEDIA option specifies which tapes to use when dumping the audited files. A TMF scratch tape is always acceptable for an online dump; if one is already mounted, or mounted instead of the specified tape, it will be used. The DISKMEDIA option specifies where the dumps should be recorded. At least one volume must be specified, with a maximum of 16 volumes. If a list of volumes is given, the dump process tries to use the first disk.
Online Dumps Dumping Enscribe Alternate-Key Files and Partitioned Files The following example shows a DUMP FILES command that specifies a file set list and a NOT file set list to skip some $SYSTEM subvolumes: 28> TMFCOM TMF 1> DUMP FILES $SYSTEM.*.*, BLOCKSIZE 28 & >>>NOT ($SYSTEM.SYSTEM.*, $SYSTEM.ZTMFAT.*, $SYSTEM.SYS01.*) The following example shows a DUMP FILES command that specifies disk volumes as the dump media: 29> TMFCOM TMF 1> DUMP FILES $DATA.*.*, DISKMEDIA ($AUD01, $AUDX.DF) Note.
Dumping SQL Objects Online Dumps 4. Use the FUP ALTER command to change the nonaudited alternate-key file back to audited. See the File Utility Program (FUP) Reference Manual for instructions on using FUP commands. Dumping SQL Objects TMF dumps only the SQL objects you specify in the DUMP FILES command: it does not automatically dump dependent objects, such as indexes and views or secondary partitions.
Disk Dumping Online Dumps Here is a DUMP FILES command example for making an online dump to disk on a remote system: TMF 3> DUMP FILES $DATA.*.*, DISKMEDIA (\REMOTE1.$DATA02.DF, >>>\REMOTE1.$DATA03.DF) & See the TMF Reference Manual for instructions on using the DUMP FILES command.
6 The TMF Catalog The TMF catalog records audit and online dump media: it specifies where all dumped files reside and which dump media are available for reuse. This section describes how the TMF catalog functions and the operations you perform to maintain it.
Maintaining the TMF Catalog The TMF Catalog 6. When all of the online dump files associated with a particular dump serial number have been changed to released status, all entries for that serial number are deleted. For dumps on tape, the associated tape media are changed from assigned status to scratch status (or to released status, if you specified RELEASED ON in an ALTER CATALOG command). For dumps on disk, the status is changed from assigned to purged. 7.
Displaying the Catalog The TMF Catalog • • The names of the tape or disk volumes on which the file resides The names of the oldest audit-trail files (MASTER and AUXILIARY) necessary to recover the file You initiate online dumps with the DUMP FILES command, as described in Section 5, Online Dumps. A single online dump can include many audited files that share a unique dump serial number. Displaying the Catalog Use the INFO DUMPS command to see dump media information recorded in the TMF catalog.
Displaying the Catalog The TMF Catalog The following example shows an INFO DUMPS command that produces a report of currently assigned audit dumps to disk: 28> TMFCOM/ OUT $S.#DUMP1/ TMF 6> INFO DUMPS *.*.
Changing the State of a Dump The TMF Catalog Note. Use the INFO DUMPS command after each online dump to get a detailed report of dumps currently recorded in the TMF catalog. Save your reports in a disk file stored in a safe location, sorted by date. You can also manually track online dump entries by using the forms provided in Appendix A, Dump Tracking Forms.
Changing the Catalog Configuration The TMF Catalog The following example demonstrates how a dump could accidentally be deleted if you change the status of the last assigned entry in the dump to invalid or released: TMF 10> ALTER DUMPS $DATA.TEMP.F3,SERIAL 100,INVALID ON TMF 11> INFO DUMPS,DETAIL,SERIAL 100 File Dump Name Serial Date-Time ---- ------ ---------- Dump Type ---- Dump Master Data Status ------ ---- ------ Media Media Type Status ---- ------ Media Name ---- Part ---- Copy ---- $DATA.
Changing the Catalog Configuration The TMF Catalog Determining the Status of a Tape Volume Upon Release When all of the dumps contained on a tape volume are released, the status of the tape volume normally changes from assigned to scratch. If you want to change that status to released instead, specify RELEASED ON in an ALTER CATALOG command, as follows: TMF 25> ALTER CATALOG RELEASED ON When a tape’s status is scratch, the tape can be used for receiving new dumps.
Reentering Deleted Dumps The TMF Catalog Reentering Deleted Dumps You use the ADD DUMPS command to reenter online dump and audit dump entries that were mistakenly deleted from the TMF catalog or to recover a destroyed TMF catalog. Note. The ADD DUMPS command only re-creates entries in the TMF catalog, it does not recreate actual lost or damaged dumps themselves. The dump entries are only effective if the dumps they describe actually exist on available media.
Reentering Deleted Dumps The TMF Catalog TMF catalog at any time through the TMFCOM OBEY command. More information about this approach, along with a full example, appears in the ADD DUMPS and INFO DUMPS command descriptions in the TMF Reference Manual. The following example shows how to use the OBEYFORM option to format INFO DUMPS command output as command file text that can be executed by TMFCOM: TMF 26> INFO /OUT DMPINFO/ DUMPS *.*.
Removing Dumps from the Catalog The TMF Catalog To reenter the audit dump $ZTMF.ZTMFAT.AA000503 into the TMF catalog, issue the ADD DUMPS command, with the TIME option, as follows: TMF 36> ADD DUMPS $ZTMF.ZTMFAT.AA000503, SERIAL 1582, >>>TYPE AUDITDUMP, TAPEMEDIA TMF236:1:1, & >>>TIME 23 Jan 2002, 03:10:31 & Next, assume the INFO DUMPS, DETAIL command has displayed the following information for the online dump $DATA.PANDADA.
Changing Dump Locations The TMF Catalog then you can retry the DELETE DUMPS command when the problem has been corrected. There are many reasons why you might not be able to purge a disk file: the disk’s file directory could contain a damaged sector, for example, or another process might have the file open. As long as other valid ASSIGNED dumps exist on a medium, that medium retains its ASSIGNED status.
Using Tapes of Different Sizes The TMF Catalog rack. Using this scheme, tape ABC12 occupies the twelfth slot in the third rack (C) of cabinet AB. You can specify reel identifiers using uppercase and lowercase letters; TMF001 is the same as tmf001. If you have more than one system in the same area, you might want to use one character of the reel identifier to indicate which system the tape belongs to.
Adding Tape Media to the Catalog The TMF Catalog This INFO TAPEMEDIA command displays a list of scratch tape volumes: 28> TMFCOM TMF 1> INFO TAPEMEDIA, STATUS SCRATCH Media Name Media Type Media Status -----------------------------------ATM007 tape scratch ATM008 tape scratch ATM009 tape scratch Adding Tape Media to the Catalog Use the ADD TAPEMEDIA command to add tape volumes to the TMF catalog. TMF tape volumes are labeled tapes, created by HP system labeled-tape processing.
The TMF Catalog • • Removing Tape Volumes from the Catalog Released: not to be used for file recovery or for receiving new dumps Bad: physically damaged, not usable for file recovery or receiving new dumps Initially, you define a tape as a scratch volume when you add it to the TMF catalog using the ADD TAPEMEDIA command. The tape automatically becomes assigned when it receives an audit dump or online dump.
7 Recovery Methods TMF automatically protects your database with its backout and volume recovery processes. You can perform file recovery on your database, if necessary, as long as you have routinely done online dumps and audit dumps. This section discusses how TMF recovery processes work and gives examples of how to recover from or prevent a variety of situations that could damage your database.
Displaying Backout Process Activity Recovery Methods • • • Communication is lost between two nodes accessed by the transaction. The primary processor for the disk process of a volume accessed by the transaction fails while the transaction is active. Both the primary and the backup processors for the disk process of any data volume fail while the transaction is active on that system.
Volume Recovery Recovery Methods PROCESS command to increase the EXTENDEDSEGSIZE attribute of the backout process and then stop the process. TMF automatically restarts the process with the larger extended segment allocation. Refer to the TMF Reference Manual for instructions on using the ALTER PROCESS command and to the TMF Planning and Configuration Guide for specific recommendations.
Recovering Multiple Volumes Recovery Methods Volume recovery repairs the audited files on a volume by: 1. Redoing the changes written to cache but not to disk at the time the volume went down: this redo action ensures that the files reflect all the work recorded in the audit trail. During this step, the volume recovery process generates EMS Message 401: Phase 1 of recovery completed at atseqno atseqno RBA rba. 2.
Volume Recovery Failures Recovery Methods Volume Recovery Failures When the volume recovery process fails to recover a volume, you can usually correct the problems that caused the failure. Consider the following guidelines: • • • • • • A volume must be up before it can be repaired by the volume recovery process. Use the SCF STATUS DISK command to view the state of the volume. Use the SCF START DISK command to change the state, if necessary.
Volume Recovery Example Recovery Methods Volume Recovery Example The following volume recovery example applies to situations in which TMF is in the started state. If you need to restart several data volumes that are down, and you know that volume recovery will take a long time to run (because there was significant transaction activity or audit record generation during or after the time these volumes went down), consider using the DISABLE DATAVOLS command to disable the volumes before bringing them up.
File Recovery Recovery Methods File Recovery The file recovery process reconstructs audited files when the copy on disk is not usable. A file could become unusable for one or more of the following reasons: • • • • • A disk media failure occurs. The volume recovery process recovers a data volume but is unable to recover one or more of the audited files that reside there. An audited file is mistakenly purged. An application program incorrectly changes the database.
Recovery Methods RECOVER FILES Command With No Options 5. Reads the active-audit trail to find the incomplete transactions that affected files specified in the RECOVER FILES command. During this step, the file recovery process produces EMS Message 402: Phase 2 of file recovery completed at atseqno atseqno RBA rba. 6. Backs out any partial transactions remaining in the files. During this step, the file recovery process generates EMS Message 403: Phase 3 of recovery completed at atseqno atseqno RBA rba.
Checking File-Recovery Status Recovery Methods Checking File-Recovery Status The file recovery process generates event messages while it runs. Check the EMS log to monitor the process. Alternatively, you can use the STATUS OPERATIONS command (see Maintaining TMF Operations on page 2-24) to check the status of the file recovery operation. When the file recovery process completes, perform an online dump of the volume on which you recovered files and return to storage all dump tapes used during the recovery.
RECOVER FILES Command Specification Recovery Methods RECOVER FILES Command Specification You specify which audited files are to be recovered by using the RECOVER FILES command. Files are selected or not based on the RECOVER FILES file-set list and the NOT attribute. File names are entered in the RECOVER FILES syntax as follows: RECOVER FILES {file-set } {(file-set [,file-set]...)} [,NOT {file-set } {(file-set [,file-set]...
RECOVER FILES Command Specification Recovery Methods Enter file-set in the following format: [[volume.]subvolume.]file-id Note. If you plan to refer to SQL/MX objects in a file-set list, you must use the Guardian names of the underlying files in all TMFCOM commands. You can run the MXGNAMES utility to convert one or more objects’ ANSI names to their underlying Guardian file names. You can then use the Guardian file names in the file-set list.
RECOVER FILES Command Specification Recovery Methods NOT fileset identifies one or more files that are not to be recovered, whether they are specified in file-set and regardless of their undo-needed or redo-needed status. The NOT file-set list allows the same pattern-matching (wild-card) characters described in the file-set discussion. The NOT file-set information cannot exceed the size of the SPI message buffer that supports communication between TMFCOM and TMFSERVE, which is 28 KB.
RECOVER FILES Command Specification Recovery Methods TOFIRSTPURGE specifies that the file recovery process should search the audit trail for the first purge record for the specified file-set list and recover those files as they existed before the purge. All files specified in the RECOVER FILES command are restored to the point at which the first of them was purged: when the file recovery process finds the first purge record, it stops.
RECOVER FILES Command Specification Recovery Methods most recent consistent state. The location is specified by the atseqno and rba parameters: atseqno specifies the sequence number of the MAT file where recovery is to stop. For this value, you enter only the numeric portion of the file name. For example, to recover to a relative byte address in MAT file AA000239, you enter only 239 as the atseqno value. rba specifies the relative byte address (byte offset) in the MAT file where recovery is to stop.
RECOVER FILES Command Specification Recovery Methods MAP NAME[S] {old-fileset-list TO new-fileset} {(old-fileset-list TO new-fileset [,old-fileset-list TO new-fleset]...)} allows files to be recovered to different volumes, subvolumes, and file IDs than the ones from which they were dumped. The new (target) files, however, must be located on the same node (system) and same instance of TMF as the old (source) files.
Performing File Recovery Recovery Methods Wild-card Characters in old-fileset-list In old-fileset-list, you can use wild-card characters in the volume, subvolume, file ID fields as follows: * An asterisk matches from 0 through 8 letters, digits, or a combination of these, in the position where it appears. ? A question mark matches exactly one letter or digit, in the position where it appears. Wild-card Characters in new-fileset In new-fileset, you cannot use the question mark as a wild-card character.
Performing File Recovery Recovery Methods DISK command, the ENABLE DATAVOLS command, or both to start data volumes for TMF processing. The SCF START DISK command is described in the SCF Reference Manual for G-Series RVUs. 4. If your data volumes are mirrored, you might choose to shut down one mirror before performing file recovery. (Issue an SCF STOP DISK command for one half of a mirrored pair of disk volumes. The SCF STOP DISK command is described in the SCF Reference Manual for G-Series RVUs.
Recovering Only Files from a Particular Dump Recovery Methods If an entire disk volume is destroyed, you can rely on file recovery to determine which files to recover (as long as there are online dumps of the files). For example, to recover all audited files on $DATA, issue the command: TMF 32> RECOVER FILES $DATA.*.*, FROMARCHIVE Specify any additional RECOVER FILES options, as described previously in this section, in the discussion of the RECOVER FILES Command. 8.
Retaining Audit Files Restored from Tape on Restore-Audit Volumes Recovery Methods The following RECOVER FILES command uses the MAP NAMES option to recover the file T32, originally stored on $TMF.TMF01, to $DATA.TMF01.T32: TMF 92> RECOVER FILES $TMF.TMF01.T32, & >>>MAP NAMES ($TMF.*.* TO $DATA1.*.*) . . . By using wild-card characters in the MAP NAMES option, you can gain great efficiency and flexibility in specifying source files and target files.
Recovering Audit-Trail Files Dumped to Disk Recovery Methods Remember: MAXRETAINEDATFILES optimizes access time for files archived on tape; RESET MAXRETAINEDATFILES maximizes available disk space. Recovering Audit-Trail Files Dumped to Disk For audit-trail files dumped to disk, TMF opens the disk dumps directly, rather than copying them to a restore-audit volume. This operation is automatic for all recoveries involving audit-trail dumps on disk.
Recovery Methods Responding to Incorrect Updates to the Database Always keep copies of these command files and reports, as well as the latest version of any command files used to configure TMF (or the output listing from the INFO TMF command). There are also actions that can make recovery procedures more difficult to perform: • • • Do not stop TMF when you do not know how to fix a problem.
Recovery Methods Responding to Accidental Loss of an Audited SQL Object 3. Issue a RECOVER FILES command with the FROMARCHIVE option and either the TIME option or the TOFIRSTPURGE option and any other options needed to recover the purged file. If you want to recover all files up to the first file purged in a fileset, it is more straightforward and risk-free to use the TOFIRSTPURGE option rather than the TIME option. 4. Make a new online dump of the file once the file recovery process has completed.
Recovery Methods Recovering a File when Recovery to a Timestamp Does Not Succeed Recovering a File when Recovery to a Timestamp Does Not Succeed In certain unusual circumstances, the RECOVER FILES command with the TIME option might not succeed. Such a failure typically results in File System Error 80, reported in EMS Message 0169 or 0356. As an example, the following message might be logged: TMF *0169* RECOVER FILES [34] FileRecovery Process #1: system error 80 encountered on audited file $TSNAZ.TMPRD.
Recovery Methods Responding to Loss of Files on NonStop SMF Disk Volumes SMF virtual disk, the logical file name might be \$SYS.$L1.SOME.DATA and the physical file name might be $PHYS27.ZYS00000.A0000K29. For a file that is not managed by the SMF software, the direct file name and physical file name are both the same (for instance, \SYS.$P1.MORE.DATA).
Recovery Methods Responding to Accidental Loss of an Active-Audit Volume The following RECOVER FILES command illustrates the recovery of all audited logical files located on the logical volumes $L1, $L2, $L3, and $L4, which reside on the physical volume $P7: TMF 40> RECOVER FILES ($L1.*.*, $L2.*.*, $L3.*.*, $L4.*.*), & >>>WHEREPHYSVOLIS $P7, FROMARCHIVE . . . For more information about the SMF product, see Storage Management Foundation User’s Guide.
Restoring the ZTMFCONF Subvolume Recovery Methods • • Create reports including changed records (rows) and compare the output to expected results. You can do this with an application report generator (if one exists), with Enform, or with the report writer feature in the SQL conversational interface. Check the contents of the TMF audit trail to verify the correctness of transaction after-images.
Responding to a TMF Crash Recovery Methods 4. Issue a STOP TMF, ABRUPT command. TMF opens and reads the configuration files restored in Step 3. 5. If you altered the AUDITTRAIL, AUDITDUMP, CATALOG, or PROCESS configuration after the last backup of ZTMFCONF, redo those changes. The ALTER AUDITTRAIL, AUDITDUMP OFF command cannot be performed until TMF is restarted. However, the ALTER AUDITTRAIL, AUDITDUMP ON command should be performed now, if applicable.
Restarting TMF in a Distributed Transaction Environment Recovery Methods Unless the TMF crash was due to a STOP TMF, ABRUPT command, you should evaluate the cause and eliminate it. Left uncorrected, the problem may recur, lengthening the current outage or causing a future outage. Examine the EMS messages generated by TMF: they should indicate that a TMF crash occurred, and list the primary reason for it.
Recovery Methods Recovering From a Complete System Failure If TMF is unable to communicate with a parent node, TMF startup waits. If you cannot restore the required communication path or cannot wait for this to occur, you may have to manually resolve the pending distributed transactions. Refer to Controlling Individual Transactions on page 3-20 for information on resolving transactions.
Recovering From a Complete System Failure Recovery Methods depends on whether or not distributed transactions exist between the parent and child nodes, and on each transaction’s state when the parent node failed. To determine this information, issue a STATUS TRANSACTION command at the child node when it is running the parent node’s configuration. Also, make note of any distributed transactions that exist on the child node that involve the parent node.
Recovery Methods Recovering Your TMF Environment to a New System Following Disaster If the TMF system at the child node cannot communicate with a foreign transaction manager and any imported transaction branches remain in the in-doubt state, TMF startup will wait until the transactions are complete. If you cannot restore the communication path or cannot wait for this to occur, you may have to manually resolve the pending imported transactions.
Recovery Methods Recovering Your TMF Environment to a New System Following Disaster HP NonStop TMF Operations and Recovery Guide —522417-002 7- 32
A Dump Tracking Forms This appendix contains forms for you to keep track of audit dumps and online dumps. Use the forms in this appendix as hardcopy records of audit dumps and online dumps; you can make photocopies of these forms to use at your site.
This page left intentionally blank.
Audit Trail File Dumped Date Dump Begun System Name: ____________________________ Form for Tracking Audit Dumps to Disk Time Names of Dump Files VST001.
This page left intentionally blank.
Audit Trail File Dumped Date Time Dump Begun System Name: ____________________________ Form for Tracking Audit Dumps to Tape Used Drive Tape Tape Volume ID Part Number Number Copy Offsite Tapes Date Date Sent Ret’d VST002.
This page left intentionally blank.
Dump Serial Number Files Dumped System Name: ____________________________ Form for Tracking Online Dumps to Disk Date Time Dump Begun Master Data Audit Trail Sequence Number Names of Dump Files VST003.
This page left intentionally blank.
Dump Serial Number Files Dumped Date Time Dump Begun System Name: ____________________________ Form for Tracking Online Dumps to Tape Master Data Audit Trail Sequence Number Tape Drive Used Tape Volume ID Part No. Copy No. Date Sent Date Ret’d Offsite Tapes VST004.
This page left intentionally blank.
B Managing Enscribe Files This appendix summarizes how to create and manage audited Enscribe database files on a TMF system. It includes these topics: Topic Page Creating Audited Files B-1 Altering the Audit Attribute B-2 Determining if a File is Audited B-3 Purging an Audited File B-4 Using Format 2 Files B-4 FUP Command Guidelines B-5 Creating Audited Files You create audited Enscribe database files interactively by issuing a FUP CREATE command.
Managing Enscribe Files Altering the Audit Attribute When working with Enscribe files, you should understand both formats and when they are used. To learn more about them, see Using Format 2 Files on page B-4. Altering the Audit Attribute You can alter the audit attribute of a file interactively by issuing a FUP ALTER command. You can alter the audit attribute of a file only when TMF is running and the disk volume on which the file resides is a configured data volume enabled for transaction processing.
Changing a File from Audited to Nonaudited Managing Enscribe Files Changing a File from Audited to Nonaudited If you alter the audit attribute of a file from audited to nonaudited, the following results occur: • • • All TMF protection for the file is eliminated. Backout, volume recovery, and file recovery no longer protect the file. All online dump entries for the file are marked INVALID ON and RELEASED ON in the TMF catalog.
Purging an Audited File Managing Enscribe Files The FUP INFO output also identifies crash-open files and files that require file recovery. Crash-open files are identified by a question mark (?) beside the file name; files requiring recovery are identified by the letter R beside the file name (if “redo” is required, file recovery must be used to recover the file; if only “undo” is required, volume recovery might be able to recover the file): 128> FUP INFO $DATA.SALES.* CODE $DATA.
Managing Enscribe Files FUP Command Guidelines Through a FUP SET command, you can explicitly request format 2 for a newly created file. As an example, the following FUP commands create an audited, key-sequenced format 2 file named ORDERS in the subvolume FILES on the volume $APPL. 48> FUP - VOLUME $APPL.
Managing Enscribe Files The DUP Command The DUP Command You can use the FUP DUP command to duplicate an audited file, but the destination file is created as a nonaudited file. As with the FUP COPY command, you can issue a FUP ALTER command once the file has been duplicated to change the audit attribute of the destination file to audited. Caution. Do not use FUP DUP commands or the BACKUP/RESTORE utilities on audit-trail files except when instructed to do so by your service provider.
Managing Enscribe Files The PURGEDATA Command The PURGEDATA Command You can use the FUP PURGEDATA command to delete the contents of an audited file. Should the TMF file recovery feature be initiated on this file, it will restore the existing online dump and then redo the PURGEDATA operation when encountered in the TMF audit trail. If you mistakenly issue a FUP PURGEDATA command, you can recover the file by issuing a RECOVER FILES command with the TIME option set to a time before the data was purged.
Managing Enscribe Files The RENAME Command HP NonStop TMF Operations and Recovery Guide —522417-002 B- 8
C Managing SQL Objects This appendix summarizes how to create and manage audited HP NonStop SQL/MP and HP NonStop SQL/MX objects on a TMF system. It includes these topics: Topic Page Audited Objects C-1 Impact of SQL Operations on Online Dumps C-8 Audited Objects SQL objects consist of audited components that must reside on TMF data volumes. For this reason, TMF is required for all systems on which SQL/MP and SQL/MX objects are defined and managed.
Managing SQL Objects Operations for SQL/MP Only Operations for SQL/MP Only In SQL/MP, when you create a table, you can set the AUDIT file attribute to determine whether the table is audited. At any time thereafter, you can alter the AUDIT attribute setting or display its current value. The following discussion explains how to perform these and other SQL/MP operations. Note. Remember: the detailed operations described in this subsection apply to SQL/MP only, and not to SQL/MX.
Operations for SQL/MP Only Managing SQL Objects In the following example, the AUDIT attribute of TABLE1 is altered through SQLCI, so the table, indexes, and dependent views are subsequently audited: >> ALTER TABLE TABLE1 AUDIT; In the following example, the AUDIT attribute of TABLE1 is altered through SQLCI, so the table, indexes, and dependent views are subsequently nonaudited: >> ALTER TABLE TABLE1 NO AUDIT; You can alter the AUDIT attribute of a table only when TMF is active, the disk volume that c
Operations for SQL/MP Only Managing SQL Objects If you mistakenly alter the AUDIT attribute from audited to nonaudited and the table has not been modified since it was altered to nonaudited, do the following to restore the table to its original condition: • • Change the AUDIT attribute back to audited. Make a new online dump of the table.
Operations for SQL/MP Only Managing SQL Objects You can also query the SQL catalog table, FILES, to obtain the AUDIT attribute of an object, or list of objects, in the catalog. The following command, for example, queries the FILES table of the catalog $DATA.SALESCAT to generate a list of all audited objects in that catalog: 25> SQLCI >> SELECT FILENAME, AUDIT FROM FILES; FILENAME ---------------------------------. . . \SIERRA.$DATA.SALES.CUSTOMER \SIERRA.$DATA.SALES.ODETAIL \SIERRA.$DATA.SALES.
Managing SQL Objects Operations for Both SQL/MP and SQL/MX For more information about TMF considerations for the COPY command, see SQL/MP Reference Manual. Loading Data from an Audited SQL/MP Table From SQLCI, you can use the LOAD command to load data from an audited table, but the destination table must be an existing nonaudited table. If the destination table is not empty, its contents are overwritten. Once the destination table is loaded, you can alter its AUDIT attribute to audited.
Managing SQL Objects Operations for Both SQL/MP and SQL/MX If you use the TMF file-recovery feature, make an online dump of all Guardian files associated with a newly created table: the file-recovery process cannot recover these items unless at least one online dump of them has been made. (In SQL/MX, to return a list of these items and their underlying Guardian file names, you can use the MXGNAMES utility, described in the SQL/MX Reference Manual.
Impact of SQL Operations on Online Dumps Managing SQL Objects performing the drop commits or aborts. A dump could accidentally be deleted from the TMF catalog if the last assigned object in the dump is changed to the released state. For more information about dropping audited objects, see the SQL/MP Installation and Management Guide or the SQL/MX Installation and Management Guide as appropriate to your SQL software.
Impact of SQL Operations on Online Dumps Managing SQL Objects Table C-1. Impact of SQL Operations on TMF Online Dumps (page 2 of 3) SQL Statement CREATE INDEX Option Effect Recovery Strategy MOVE (simple move) Deletes the source partition, thus invalidating all of its online dumps Make a new online dump of the target partition to retain TMF file recovery protection. MOVE (one-way split) Invalidates all online dumps of the source partition.
Impact of SQL Operations on Online Dumps Managing SQL Objects Table C-1. Impact of SQL Operations on TMF Online Dumps (page 3 of 3) SQL Statement RESTORE Option Effect Recovery Strategy MOVE (simple move of a whole partition) Deletes the source partition, thus invalidating all of its online dumps. Make a new online dump of the target partition to retain TMF file recovery protection. REUSE Does not invalidate any online dumps of the reused partition.
Index A ABORT TRANSACTION command AVOIDHANGING option 3-21 IGNOREDATAERRORS ON option 3-21 use of 3-6, 3-20/3-21, 7-3 Aborted state 2-17 Aborting state 2-17 ABRUPT option 3-3 Active state 2-17 Active-audit volumes accidental loss of 7-25 adding 3-8 configuring 2-2 files per 3-7 pinning audit-trail files 2-7 ADD AUDITTRAIL command 2-2 ADD DATAVOLS command 2-14, 3-11 ADD DUMPS command example 6-10 reentering dumps in the TMF catalog 6-8 TIME attribute 6-8 ADD TAPEMEDIA command adding tape volumes to the TMF c
B Index Audit dumps (continued) displaying configuration attributes 1-6, 4-1 media information 4-2 status 1-3/1-4 dumping to remote systems 4-6 enabling and disabling 4-5 for file recovery 7-7 operator tasks for making 4-3 pausing and resuming 4-5 pinning audit-trail file 2-6 reentering in the TMF catalog 6-8 solving problems 4-4 state and status values 4-2 understanding entries in the TMF catalog 6-2 Audit files, retaining on restore-audit volumes 7-19 Audit trail volumes see Active audit volumes Audit t
D Index Clean data volumes 2-13 Commands see individual commands Committed state 2-17 Communication line failures 2-22 Configuration attributes changing 3-10/3-15 displaying 1-6, 4-1, 6-2 Configuration subvolume, restoring 7-26 Configuration volume backing up 2-29 displaying 1-6 COPIES option 5-4 CPU allocating memory 2-19 disabling data volumes during reload 7-6 for TMF processes 7-2 D Data volumes adding 3-11 associating with a different audit trail 3-14 changing the configuration 3-10/3-15 clean 2-13
E Index DUMP FILES command (continued) dumping to a remote system 5-7 example 5-5 SYSTEM option 5-7 use of 5-2/5-6 Dumps recovering only files from particular 7-18 see also Online Dumps see Audit Dumps E EMS messages audit dump errors 4-4 failed transaction backout 7-3 file recovery 7-9 rollover errors 2-8 TMF crash 7-28 viewing 2-26/2-28 ENABLE AUDITDUMP command 4-5 ENABLE BEGINTRANS command 3-16 ENABLE DATAVOLS command recovering multiple volumes 7-4 use of 3-9 Enabling data volumes 3-9/3-10 Enscribe a
L Index INFO TMF command general use of 1-6 viewing audit dump attributes 4-1 viewing the catalog configuration 6-2 L LAST REEL attribute 1-8 Location, recovering files to a new 7-18 Logical file names 7-23 Long-running transactions aborted by autoabort function 3-18 causing audit trail to fill 3-6 M Maintenance tasks see Operator tasks MAP NAMES parameter, RECOVER FILES command 7-15/7-16 Master audit-trail file (MAT) 2-2, 2-7 MAXRETAINEDATFILES attribute 1-7 Migrating between software releases 1-2 MXGN
P Index Operator tasks (continued) pausing and resuming audit dumps 4-5 performing file recovery 7-7/7-18 preventative maintenance 7-20 responding to audit-trail overflow 3-5/3-8 solving audit dump problems 4-4 starting TMF 3-1 stopping TMF 3-2 summary 1-1 tracking system information 2-29 viewing EMS messages 2-26/2-28 Overflow-audit volumes 1-7, 2-5/2-7 P Parent nodes 2-20 Partitioned databases, dumping files 5-5 Pattern matching in file-sets 5-3, 7-11 Physical file names 7-23 Preallocated audit-trail f
S Index Remote nodes audit dumps to 4-6 online dumps to 5-7 RESOLVE TRANSACTION command 3-2 Resource managers 2-24 Restore-audit volume 1-7, 2-4, 7-7 Restore-audit volumes 7-19 RETAINDEPTH attribute 1-8, 6-6 Rollforward see File recovery Rollover see Audit trail rollover ROUNDROBIN attribute 1-8, 6-7 ROUNDROBIN parameter, ALTER CATALOG command 6-7 S SCF PRIMARY command 2-10, 2-11, 2-13 SCF RESET DISK command 2-12 SCF STOP DISK command 2-12 Search method, TMF catalog 6-7 SERIAL parameter, RECOVER FILES co
T Index SYSTEM option sending audit dumps to a remote system 4-6 sending online dumps to a remote system 5-7 SYSTEM parameter of RECOVER FILES command 7-13 T Tape volumes, TMF catalog 6-11/6-14 TAPEMEDIA option 5-5 TIME parameter of RECOVER FILES command 7-13 TMF crash 7-27 displaying status 1-3/1-4 recovering from a complete system failure 7-29 restarting in a distributed transaction environment 7-28 starting 3-1 states 1-4 stopping 3-2/3-4 tracking information 2-29 TMF catalog adding tape volumes 6-13
U Index Transactions abnormal activity 7-25 aborting 3-20 backout of 7-1 controlling individual 3-20 deleting 3-22 displaying activity 2-15/2-16 displaying begin-transaction status 2-17 distributed, resolving 3-21/3-22 identifiers 2-14 long-running 3-6 operator tasks for maintaining 2-14/2-19 pinning audit-trail files 2-5 reasons new transactions cannot start 2-18/2-19, 3-16/3-17 see also Distributed transactions see also Local transactions states 2-17 TRANSCOUNTTHRESH 1-8, 2-18 W Waiting for transaction
W Index HP NonStop TMF Operations and Recovery Guide —522417-002 Index -10