CONTENTS Title Page Copyright Page Preface 1 New Features and Technical Changes 1.1 The Two-Phase Commit Feature 1.2 Enhancements to Multi-Threaded Backup and Restore 1.2.1 Areas on a Bound Volume Set 1.2.2 Message Displayed When Incremental Backup Does Not Include All Areas 1.2.3 Large Areas Processed Sequentially 1.2.4 Verification of Area Names 1.2.5 Efficient Tape Utilization for High-Density Tapes 1.2.6 Support for TA90 Tape Drives 1.2.7 Improved Performance for TA90, TK70, and TU81-Plus Tapes 1.2.8 Device Error-Checking 1.2.9 Tape Header Characteristics 1.2.10 Checking Tape Characteristics 1.3 Converting VAX DBMS Databases for Version 4.2 1.4 Enhancements to the Database Restructuring Utility 1.4.1 Removing Items from a Database By Using DRU 1.4.2 Restructuring Your Database in BATCH UPDATE Mode 1.4.3 The /RESTRUCTURE Qualifier of the DBO/INTEGRATE Command Is Obsolete 1.5 Specifying Set Lists Using the DBO/ANALYZE Command 1.6 Transferring Bind Parameters 1.7 Enhancements to the DBO/SHOW STATISTICS Stall Screen 1.8 DBO/DUMP/USERS Display Enhanced 1.9 Log Message Frequency for DBO/VERIFY 1.10 Null Date Field Default 1.11 FDML Unique Data Item Names 1.12 DBO Database Modification Are Journaled 1.13 Executable Images Are Shipped with Kit 1.14 Summary of Diagnostic Totals Change 1.15 Record Lock Conversion 2 Problems Corrected in VAX DBMS Version 4.2 2.1 Recovering a Database That Uses Read-Only Areas 2.2 Rebinding to the Remote Database After a Link Is Lost 2.3 Problems Corrected in Multi-Threaded Backup and Restore 2.3.1 Fatal Errors Print to Log File 2.3.2 Corrupt Backup file 2.3.3 Incorrect Area Message 2.3.4 File Names Longer Than 31 Characters 2.3.5 Locks on SPAM Pages 2.3.6 Backup Did Not Prompt for a Return 2.3.7 Writing SPAM Pages to Disk 2.3.8 Incorrectly Checking the TAD 2.3.9 Error Handling Enhanced 2.4 Problems Corrected in Backup and Restore 2.4.1 DBO/RESTORE Produced Confusing Message for Tapes Mounted /FOREIGN 2.4.2 Specifying an Invalid Backup File for DBO/RESTORE 2.4.3 Using the /CHECKSUM Qualifier Sometimes Caused an Erroneous Message 2.5 DBO/INITIALIZE Erroneously Initialized Read-Only Storage Areas 2.6 Checksum Errors During DBO/VERIFY 2.7 VAX COBOL DML Picks Up Incorrect Time Stamp 2.8 DBO and DML UWA Generators Incorrectly Generated Function Calls 2.9 Problems Corrected in VAX DBMS FDML 2.9.1 In FDML, the STRUCTURE Statement Preceding the INVOKE Statement Caused Incorrect Module Name 2.9.2 Labels in FDML IF Statements Caused Errors 2.9.3 FDML Parser 2.9.4 FDML Checks Illegal Syntax 2.10 Subschema and Security Schema Mismatching 2.11 Restructuring Causes B-Trees to Increase in Depth 2.12 Network Error Message Formerly Displayed Password 2.13 DBQ Could Display Only the First 256 Characters of a Field 3 Restrictions, Problems, and Documentation Errors 3.1 Restrictions 3.1.1 Initializing by Area 3.1.2 Updating Multiple Databases When Using Streams 3.1.3 Full Backup After Adding an Area 3.1.4 Incremental Backups Prior to Version 4.2 Cannot Be Applied 3.1.5 Specifying an Invalid Backup File for DBO/RESTORE/MULTITHREAD 3.1.6 Long Backup File Names Truncated 3.1.7 Using DBO/RESTORE/PATH with Run-Time-Only Version 3.1.8 Using Shareable Images with Streams 3.1.9 Shutting Down VAX Rdb/VMS Monitor and Running VAX DBMS Causes an Error 3.1.10 Restructuring Changes Are Sometimes Not Immediately Visible 3.1.11 Removing the First Area from a Record WITHIN Clause 3.1.12 Sometimes the DBO/DUMP/HEADER Command Fails to Show the Restructuring Date 3.1.13 DRU Changes Require a Large .RUJ File 3.1.14 Do Not Specify a Version Limit on a Directory Containing .RUJ Files 3.1.15 Do Not Destroy .RUJ Files When the Database Is in an Inconsistent State 3.1.16 Path Names Rather Than Logical Names Stored in Root 3.1.17 Using VAX DATATRIEVE with VAX DBMS 3.1.18 Accessing Occurring Items in DBQ 3.1.19 Using the VMS Debugger with VAX DBMS 3.1.20 Including Modules in Programs By Using the DML Precompiler 3.1.21 Creating Shareable Images Containing DML or Callable DBQ Statements 3.1.22 Using DBO/SHOW STATISTICS Command 3.1.23 Using the FORTRAN /PARALLEL Qualifier with FDML 3.1.24 VAX FORTRAN Rounds Floating Point Numbers 3.1.25 VAX FORTRAN-HPO Compiler 3.1.26 Using Keeplists with FDML and Callable DBQ or DBM$KPL_COUNT 3.1.27 Do Not Use the Distributed File Server with VAX DBMS Databases 3.1.28 Using the Precompiler Character ( # ) in Comments 3.1.29 Using the COMMIT RETAINING Clause 3.1.30 VAX COBOL Generates a Different Stream Name 3.1.31 Using VAX COBOL 3.1.32 Using the DML WHERE Clause 3.1.33 Producing a Listing of VAX BASIC Programs 3.1.34 Using the DBO/SHOW Command in a VAXcluster Environment 3.1.35 DBQ SET PICTURE for Remote Database Access 3.1.36 Assign Similar or Equal Priorities to VAX DBMS Users 3.1.37 Schema and Storage Schema Sometimes Contain Negative Version Numbers 3.1.38 Updating CDD/Plus During Multiple-User Access 3.1.39 Update the Root File After Restructuring or Integrating Your Database 3.2 Known Problems 3.2.1 VAX COBOL Zero Record Items Handled Incorrectly 3.2.2 Failure Sometimes Occurs When Executing VMS Library Subroutines 3.2.3 Remote Node Termination 3.2.4 DBO/VERIFY Problem Releasing Locks 3.2.5 Using Product Files in SYS$SPECIFIC Directories 3.2.6 Linking DML Programs 3.2.7 Using DML/SHOW with VAX BASIC Programs 3.2.8 Deleting a Schema from a Dictionary 3.2.9 Erroneous Error Message Sometimes Appears During DBO/VERIFY 3.3 Documentation Errors and Omissions 3.3.1 Using the DBO/CLOSE/ABORT Command 3.3.2 Readying a Transaction During DBR 3.3.3 Mounting Tapes for Backup and Restore Utilities 3.3.4 DECLARATION Clause for FDML INVOKE Statement Omitted 3.3.5 Spaces After a Hyphen in DBQ Continued Statement 3.3.6 DBO/RESTORE/MULTITHREAD Qualifiers Omitted 3.3.7 Correct Limitations for the /OPTIONS Qualifier in DBO 3.3.8 Use ON STREAM Clause for Run Unit with VAX DBMS and VAX DATATRIEVE 3.3.9 DDL/MODIFY Command Accepts Multiple Source Files 3.3.10 Numbers Display Format 3.3.11 Offset Locations in DBM$STATS Descriptions Are Incorrect 3.3.12 FIND Statement Description 3.3.13 Nesting Loops in DBQ 3.3.14 Invoking a Database from a Program 3.3.15 Formatting Data for DBO/LOAD and DBO/UNLOAD Utilities 3.3.16 Defining RECORD Permission 4 Introduction to the Two-Phase Commit Protocol 4.1 Distributed Transactions 4.2 Two-Phase Commit Protocol 4.3 Walkthrough of a Two-Phase Commit Transaction 5 Programming the Two-Phase Commit Protocol 5.1 Deciding to Use Two-Phase Commit 5.2 Programming for Two-Phase Commit 5.2.1 Starting a Distributed Transaction 5.2.2 Joining a Distributed Transaction 5.2.3 Ending a Distributed Transaction 5.3 Handling Program Errors 6 Managing the Two-Phase Commit Environment 6.1 Regulating User Participation in Distributed Transactions 6.2 Handling Unexpected System Failures 6.2.1 Failure Before Voting 6.2.2 Failure After Voting 6.2.3 Failure After Voting with Coordinator Unavailable 6.3 Resolving Blocked Participants 6.3.1 Blocked Transaction Participant Scenario 6.3.2 Identifying Blocked Participants 6.3.3 Manually Resolve Blocked Participants 6.4 Restoring a Database Containing Blocked Participants 7 Managing Distributed Deadlock Situations 7.1 Identifying a Distributed Deadlock Situation 7.2 Resolving a Distributed Deadlock Situation 7.3 Determining Time-Out Durations 8 Using DECtrace with VAX DBMS Applications 8.1 Overview of DECtrace 8.2 How to Collect Event Data for VAX DBMS 8.2.1 Describing VAX DBMS Events and Items 8.2.2 Creating a Selection 8.2.3 Scheduling Data Collection 8.2.4 Registration IDs 8.3 Collecting Workload Information for RdbExpert 8.4 How to Create a Report Based on Collected Data 8.4.1 Formatting and Merging Data Files 8.4.2 Generating a Report 8.4.3 Creating a Customized Report 8.5 VAX DBMS Database Relations 8.5.1 VAX DBMS Performance Class Database Relations 8.5.2 VAX DBMS Workload Class Database Relations A DBO/DUMP Command DBO/DUMP Database B DBO/RESOLVE Command DBO/RESOLVE C DBO/DUMP/AFTER_JOURNAL Command DBO/DUMP/AFTER_JOURNAL D DBO/RECOVER Command DBO/RECOVER E VAX FORTRAN Example of Two-Phase Commit F VAX COBOL Example of Two-Phase Commit G Using CDD/Plus Version 4.1 with VAX DBMS G.1 Defining a CDD/Plus Dictionary G.1.1 Defining Your Private CDD/Plus Dictionary G.1.2 Using the System Default CDD/Plus Dictionary G.2 Examining CDD Metadata G.3 Migrating Metadata into CDD/Plus G.4 Adapting Definitions for DML Programs That Reference CDD$TOP G.5 Accommodating Products That Do Not Support CDD/Plus Format G.6 Deleting Old CDD Metadata G.7 Distributing Schemas to Remote Notes G.8 CDO Commands G.8.1 DIRECTORY Command G.8.2 SHOW GENERIC DBM$SCHEMA Command G.8.3 SHOW GENERIC CDD$DATABASE Command G.8.4 SHOW USES Command G.8.5 SHOW USED_BY Command G.8.6 DELETE GENERIC CDD$DATABASE Command G.8.7 DELETE GENERIC DBM$SCHEMA Command G.8.8 DEFINE DIRECTORY Command G.8.9 DELETE DIRECTORY Command G.8.10 DELETE DICTIONARY Command G.8.11 CDD/PLUS Protocols for VAX DBMS G.8.12 CDD/Plus Entity Protocols for VAX DBMS Databases DBM$AREA Entity DBM$REALM Entity DBM$SCHEMA Entity DBM$SECURITY_SCHEMA Entity DBM$SET Entity DBM$STORAGE_SCHEMA Entity DBM$SUBSCHEMA Entity G.8.13 CDD/Plus Relationship Protocols for VAX DBMS Databases DBM$AREAS Relationship DBM$DATA_AGGREGATES Relationship DBM$REALMS Relationship DBM$SEC_SCHEMA_INST Relationship DBM$SECURITY_SCHEMAS Relationship DBM$SET_MEMBERS Relationship DBM$SET_OWNERS Relationship DBM$SETS Relationship DBM$STORAGE_SCHEMAS Relationship DBM$STO_SCHEMA_INST Relationship DBM$SUBSCHEMAS_INST Relationship DBM$SUBSCHEMAS Relationship EXAMPLES 3-1 VAX FORTRAN Program Using Keeplist Addresses 5-1 MAIN.PAS 5-2 DB1SUB.PAS 5-3 DB2SUB.PAS 8-1 Sample DECtrace Summary Report Based on VAX DBMS Data 8-2 Using Reporting Options to Generate a Customized Report 8-3 Sample DECtrace Report Based on VAX DBMS Data E-1 MAIN.FOR E-2 DB1SUB E-3 DB2SUB F-1 TWOPC_MAIN.COB F-2 TWOPC_EAST.COB F-3 TWOPC_WEST.COB FIGURES 4-1 Example of A Distributed Transaction 4-2 Starting a Distributed Transaction 4-3 Ending a Distributed Transaction 4-4 Prepare Phase of the Two-Phase Commit Protocol 4-5 Resource Manager Executes Prepare Phase 4-6 Participants Vote 4-7 Coordinator Writes Commit Record 4-8 Executing the Commit Phase 4-9 Resource Managers Execute the Commit Phase 4-10 Acknowledging the Commit 6-1 Distributed Transaction with Blocked Transaction Participants 7-1 Transaction in a Distributed Deadlock TABLES 8-1 VAX DBMS Events 8-2 Resource Utilization Items 8-3 VAX DBMS Data Items 8-4 Translation of CODE_QUADWORD Item Values 8-5 Events and Items Available in the ALL Class for VAX DBMS 8-6 Events and Items Available in the PERFORMANCE Class for VAX DBMS 8-7 Events and Items Available in the WORKLOAD Class for VAX DBMS 8-8 DECtrace Reports 8-9 Columns for Table EPC$1_40_DATABASE 8-10 Columns for Table EPC$1_40_DATABASE_ST 8-11 Columns for Table EPC$1_40_ATTACH 8-12 Columns for Table EPC$1_40_TRANSACTION 8-13 Columns for Table EPC$1_40_TRANSACTION_ST 8-14 Columns for Table EPC$1_40_REQUEST 8-15 Columns for Table EPC$1_40_REQUEST_ST 8-16 Columns for Table EPC$1_40_DATABASE 8-17 Columns for Table EPC$1_40_DATABASE_ST 8-18 Columns for Table EPC$1_40_TRANSACTION 8-19 Columns for Table EPC$1_40_TRANSACTION_ST 8-20 Columns for Table EPC$1_40_REQUEST 8-21 Columns for Table EPC$1_40_REQUEST_ST G-1 Attribute Protocols for VAX DBMS