CONTENTS Title Page Copyright Page Send Us Your Comments Preface Technical Changes and New Features 1 Introduction to Database Administration 1.1 Information for the New Database Administrator 1.2 Availability Features of DEC Rdb 1.2.1 Online Backup Operations 1.2.2 Online By-Area and By-Page Restore and Recovery Operations, and By-Area Move Operations 1.2.3 Disabling Journaling for Write-Once Storage Areas 1.2.4 Cluster and Network-Wide Automatic Recovery 1.2.5 Automatic Cleanup 1.2.6 Online DBA Activities 1.2.7 Offline DBA Activities 1.2.8 DBA Activities Requiring a Database Reload Operation 1.2.9 Quick and Automatic Database Recovery 1.2.10 Database Integrity 1.2.11 Checking Database Integrity and Evaluating Performance 1.3 Database Maintenance Operations 1.4 Creating Sample Single-File and Multifile Databases 2 Monitoring Your DEC Rdb Databases 2.1 The DEC Rdb Monitor Process 2.1.1 Starting and Stopping the Monitor Process Interactively 2.1.2 Renaming the Monitor Log File 2.1.3 Changing the Monitor Process Priority 2.1.4 Reopening the Monitor Log File 2.1.5 Reading the Monitor Log File 2.2 Listing Active User Information 2.3 Displaying Clusterwide User Information 2.4 Information About Database Characteristics 3 Security Auditing in DEC Rdb 3.1 An Overview of DEC Rdb Security Auditing 3.1.1 Default Security Auditing and RMU Security Auditing Commands 3.1.2 Use of OpenVMS Security Auditing 3.1.3 Monitoring Security Auditing Resources 3.2 Security Audit Event Types 3.2.1 The AUDIT Event Type 3.2.2 The DACCESS Event Type 3.2.3 The PROTECTION Event Type 3.2.4 The RMU Event Type 3.3 Defining Security Events to Be Audited 3.3.1 Setting User-Level Information for Security Auditing 3.3.2 Setting Audit Access to Database Objects (DACCESS Auditing) 3.3.3 Enabling and Disabling Event Information for Security Auditing 3.3.4 Starting and Stopping Security Auditing and Other Auditing Characteristics 3.4 Reviewing Security Audit Information 3.4.1 Interpreting Security Auditing Alarm Information 3.4.1.1 Interpreting AUDIT Event Alarm Information 3.4.1.2 Interpreting DACCESS Event Alarm Information 3.4.1.3 Interpreting PROTECTION Event Alarm Information 3.4.1.4 Interpreting RMU Event Alarm Information 3.4.2 Using the RMU/LOAD/AUDIT Command 3.4.3 Reviewing Audit Journal Records 4 Opening and Closing a Database 4.1 Opening a Database 4.1.1 Using the RMU/OPEN Command 4.1.2 Attaching to a Database 4.2 Closing a Database 4.2.1 Closing a Database and Using SQL 4.2.2 Using the /NOABORT Qualifier to Close a Database 5 Verifying the Integrity of Your DEC Rdb Database 5.1 Why You Should Verify Your Database 5.2 Causes of Database Corruption 5.3 What Happens When You Verify Your Database 5.4 What the Full Verify Operation Checks 5.5 What Problems the Full Verify Operation Can Detect 5.6 Devising a Full Verify Strategy to Detect Problems 5.7 Interaction of RMU/VERIFY Command Qualifiers 5.8 Measuring and Improving Verification Performance 5.9 Examples of Verify Operations on the MF_PERSONNEL Sample Database 5.10 Using the RMU/VERIFY Command Qualifiers to Troubleshoot Suspected Problems 5.10.1 Using a Checksum Verification to Detect Page Corruption 5.10.2 Detecting a Data Integrity Corruption 5.10.3 Summary of RMU/VERIFY Command Qualifiers for Troubleshooting 5.11 Examples of Database Corruption 5.11.1 Line Index Corruption 5.11.2 Logical Area Corruption 5.11.3 Data Integrity Corruption 6 Repairing or Altering a Database 6.1 Using RMU/REPAIR 6.2 Using RdbALTER 6.2.1 Attaching to a Database 6.2.2 Clearing a Corruption Flag 6.2.3 Selecting the Area Page for Altering 6.2.4 Displaying Page Contents 6.2.5 Changing Page Contents 6.2.6 Moving Database Files 6.2.7 Moving Data 6.2.8 Using RMU/ALTER to Remove References to .RUJ Files 6.2.9 Clearing an Inconsistent Flag 6.2.10 Changing the Radix 6.2.11 Verifying Alterations 6.2.12 Keeping a Log or an Audit Trail of Alterations 6.2.13 Completing Transactions 6.2.14 Exiting from the RdbALTER Utility 6.2.15 Accessing Online Information 7 Backing Up Your Database 7.1 The Type and Frequency of Database Backup Operations 7.1.1 Full and Complete Database Backup Operations 7.1.2 Incremental Database Backup Operations 7.1.2.1 Full and Complete, and Incremental Sample Backup Procedures 7.1.3 Full and Incremental By-Area Backup Strategies 7.1.3.1 Performing a Full and Complete Backup Operation 7.1.3.2 Performing a By-Area Backup Operation for Only the Updatable Storage Areas 7.1.3.3 Performing a By-Area Backup Operation for All Read-Only and Write-Once Storage Areas 7.1.4 Performing Complete and By-Area Incremental Backup Operations 7.1.5 The Online Backup Operation 7.2 RMU/BACKUP and OpenVMS SET_DEFAULT Qualifiers for Special Tasks 7.2.1 Specifying the File Protection for a Backup File 7.2.2 Checking the Database Page Checksum During a Backup Operation to Disk 7.3 Backing Up a Database Directly to Tape 7.3.1 Using a Single Tape Drive 7.3.2 Using Multiple Tape Drives 7.3.3 Underrun Errors and Use of the /CRC Qualifier 7.3.4 Specifying the Density for the Output Volume 7.3.5 Checking Tape Labeling 7.4 A Summary of Backup Operation Options and Qualifiers 8 Restoring Your Database 8.1 Full Database Restore Operations 8.2 Incremental Restore Operations 8.3 A Sample Restore Procedure 8.4 Performing By-Area Restore Operations 8.4.1 Performing an Online By-Area Restore Operation on One Storage Area 8.5 Performing By-Page Restore Operations 8.6 Restoring Only the Root File from a Database Backup File 8.7 Restoring a Database Directly from Tape 8.7.1 Using a Single Tape Drive 8.7.2 Using Multiple Tape Drives 8.8 Exceeded Quotas During a Database Restore or Backup Operation 8.9 Modifying Database Characteristics During a Restore Operation 8.9.1 Modifying After-Image Journaling Characteristics 8.9.2 Modifying SPAM Threshold Values 8.9.3 Modifying Blocks per Page 8.9.4 Restoring List Storage Areas to WORM Optical or Read/Write Disk Devices 8.10 Performing Additional Tasks During a Restore Operation 8.10.1 Using an Options File to Restore a Database 8.10.2 Creating a Duplicate Database During a Restore Operation 8.10.3 Moving Database Files 8.10.4 Moving and Updating Data Dictionary Information 8.11 Using the SQL EXPORT and IMPORT Statements 9 After-Image Journaling and Recovery 9.1 The After-Image Journal File 9.1.1 Information Written to the .AIJ File 9.1.2 After-Image Journaling 9.1.2.1 Journal Management: Choosing Between Using a Single Extensible Journal or Using Multiple Fixed-Size Journa 9.1.3 Additional Considerations for Devising a Journaling Strategy 9.1.4 Considerations for Devising a Journaling Strategy for List Data on WORM Media 9.1.5 Steps for Enabling Journaling and Creating .AIJ Files 9.1.5.1 Setting the Size of the After-Image Journal Allocation 9.1.5.2 Setting the Size of the After-Image Journal Extents for a Single Extensible Journal File 9.1.5.3 Understanding Allocation and Extent Size, Inner Workings, and I/O Operation Cost Factors for a Single ExteJ 9.1.6 Placement of the .AIJ Files 9.1.7 Trade-Offs Between Accumulating Multiple .AIJ Files and Using Regular Incremental Backup and Restore Operations 9.1.8 Backing Up .AIJ Files to Disk or Tape 9.1.8.1 Backing Up a Single Extensible .AIJ File to Tape 9.1.8.2 Backing Up Multiple Fixed-Size .AIJ Files to Disk 9.1.9 Displaying the Contents of an .AIJ File 9.1.10 Recovering from a Lost .AIJ File 9.1.11 Optimizing .AIJ Files 9.1.12 Fast Commit Transaction Processing, Checkpointing, After-Image Journaling, and Backing Up .AIJ Files 9.1.12.1 Changes to the .AIJ File 9.1.12.2 Effects of Fast Commit Transaction Processing on the AIJ Backup Procedure 9.1.12.3 Disk Space Requirements for an AIJ Backup Operation with Fast Commit Transaction Processing Enabled for a S 9.2 Recovering a Database from Journal Files 9.2.1 Steps for Recovering a Database 9.2.2 Order to Apply .AIJ Files 9.2.3 When to Back Up the .AIJ File Relative to an Online Incremental or Full Backup Operation 9.3 Example of Database Backup and Journaling Operations 10 Recovery-Unit Journaling and Recovery 10.1 Journaling and Recovery for Update Transactions 10.2 The Recovery-Unit Journal File 10.2.1 Placement of the .RUJ File 10.2.2 Improving Performance of the Automatic Recovery Process 10.2.3 Displaying the Contents of an .RUJ File 11 Understanding Internal Database File Structure 11.1 Types of Data Storage 11.1.1 All Tables in One File of a Single-File Database 11.1.2 Each Table in a Separate File of a Multifile Database 11.1.3 A Combination of Tables in a Single File of a Multifile Database 11.1.4 One Table in Several Files of a Multifile Database 11.2 Storage Areas and Storage Maps 11.2.1 Storage Areas with Uniform Page Format 11.2.2 Storage Areas with Mixed Page Format 11.2.3 Storage Maps 11.3 Displaying Data Storage Areas and Snapshot Files 11.3.1 Display Format for Logical Areas, .SNP Files, and Database Pages 11.3.2 Using the RMU/DUMP/AREA Command 11.3.3 Using the RMU/DUMP/LAREA Command 11.3.4 Displaying .SNP Files 11.3.5 Snapshot Page Tail 11.4 Data Storage Page Structure 11.4.1 Page Header for a Data Storage Page 11.4.2 Line Index for a Data Storage Page 11.4.3 TSN Index for a Data Storage Page 11.4.4 Locked and Unlocked Free Space for a Data Storage Page 11.4.5 Storage Segment Structure for a Data Storage Page 11.4.5.1 User-Stored Data Storage Segments 11.4.5.2 List Storage Segments 11.4.5.3 Index Node Storage Segments 11.4.5.3.1 Sorted Index Node Records 11.4.5.3.2 Hashed Index Node Records 11.4.6 Page Tail for a Data Storage Page 11.4.7 Fragmented Storage Records 11.5 Space Area Management (SPAM) Page Structure 11.5.1 SPAM Pages in Storage Areas with Uniform Page Format 11.5.1.1 Area Bit Maps 11.5.1.2 Area Inventory Pages 11.5.2 SPAM Pages in Storage Areas with Mixed Page Format 11.5.3 SPAM Pages in Storage Areas with Mixed Page Format Without a Placement Index 12 Handling Bugcheck Dumps 12.1 Troubleshooting DEC Rdb 12.1.1 Types of Bugcheck Dumps 12.1.2 Locations of Bugcheck Dump Files 12.1.3 Defining the RDM$BUGCHECK_DIR Logical Name 12.2 Understanding Error Messages and Bugcheck Dump Exceptions 12.2.1 The %RDMS-F-TERMINATE Error 12.2.2 Exceeding Quotas 12.2.2.1 Disk Quota Exceeded 12.2.2.2 Process Quota Exceeded 12.2.3 Using an Invalid dbkey in an Update Transaction 12.3 Reporting a Bugcheck Dump 12.3.1 Getting a Bugcheck Dump 12.3.2 Examining a Bugcheck Dump 12.3.3 The Contents of a Bugcheck Dump 12.4 Submitting an SPR