DSM Database Operations Guide

*HyperReader

  CONTENTS

  Title Page

  Copyright Page

  Preface

  Acknowledgment

  1      Introduction to Database Operations

  DSM Global Storage

  DSM Database Sets

  Volume Sets
    Volumes
    User Class Identifier

  Distributed Data Processing

  Specifying Globals with Extended Global Syntax

  2      Managing Database Sets, Volume Sets, and Globals

  DSM File Name Defaults in Utilities

  Database Set Management Utilities ( ^DBSMAN )

  Utilities for Managing DSM Volume Sets
    Volume Management Utility ( ^VOLMAN )
      Creating DSM Volume Sets ( CREATE^VOLMAN )
      Extending Volume Sets ( EXTEND^VOLMAN )
      Adding a Volume to a Volume Set ( ADD^VOLMAN )
      Changing the Maximum Number of Globals on a Volume Set ( MAXGLO^VOLMAN2 )
      Enabling Expanded String Length on a Volume Set ( EXPSTR^VOLMAN2 )
    Displaying the Volume Set Table ( ^%VOLTAB )
    Mounting Volume Sets with Alternate Names
    Creating Read-Only Volume Sets

  Mounting DSM-11 Compatible Volume Sets

  Using User Class Identifiers ( UCIs )
    Creating UCIs ( ^UCIADD )

  Global and UCI Placement, Growth, and Optimization
    Global Levels and Disk Access
    Global Overflow
    Overflow from One Volume to Another
    Placing UCIs on a Volume Set
    Global Disk Block Allocation ( ^UCIGAM and ^%GLOMAN )
      Global Placement
      Controlling Global Growth

  Global Protection
    Global Protection Scheme
    Default Protection
    Changing Global Protection
    Changing Global Attributes
    Modifying Default Global Attributes
    Changing Programmer and Application Mode Restrictions in ^SYS

  Process Local Disk Buffering in the Global Database Handler

  Global Translation
    Overview
    Translation and Schema Tables
    Using Global Translation
    Library Globals and Translation
    Using the Global Translation Utility ( ^CONTR )
    Using the ^%TRAN Utility

  Global Translation Extrinsic Functions
    UCI and Volume Set Name for a Translated Global
    UCI and Volume Set Name for a Replicated Global

  3      Using Distributed Data Processing

  Overview of DSM Distributed Data Processing (DDP)

  Accessing Remote Globals

  Global Reference Resolution

  DDP Networks
    Ethernet DDP Links
    DECnet DDP Links
    Interenvironment DDP Links

  DDP Nodes

  DDP Circuits

  DDP Autoconfigure

  DDP Groups

  DDP Circuit Connection Security

  DDP Software Components

  DDP Communications Overview
    Request Transmission
    Request Reception

  DDP and Cluster-Mounted Volume Sets
    DDP Services for Cluster-Mounted Volume Sets

  Configuring and Starting DDP
    Loading the DSM DDP Driver
    Using the ^CONFIG Utility to Configure DDP
    Configuring DDP Links
      Configuring Ethernet Links
      Configuring DECnet Links
    Starting DDP

  DDP Log Files

  DDP Utilities
    Starting Up or Shutting Down DDP ( START^DDPLNK and STOP^DDPLNK )
    Configuring DDP ( ^CONDDP )
    Controlling DDP Global Requests ( ^DDPREQ )
    Modifying the DDP Security Database ( ^DDPSEC )
    Examining or Modifying a Logical Circuit ( ^DDPCIR )
    Controlling Circuits Using the ^DDPUTL Utility
    Using the DDP Performance Statistics Utility ( ^DDPSTA )

  References to String-Collated or 7-Bit Globals

  4      Using Cluster-Mounted Database Sets

  Overview

  Maintaining High Availability in a VMScluster Environment

  Using Cluster-Mounted Database Sets with DDP and Journaling

  Setting Up Configurations with Cluster-Mounted Database Sets

  Starting Up and Shutting Down DSM Configurations in a VMScluster Environment

  Monitoring Configurations with Cluster-Mounted Database Sets

  Accessing Cluster-Mounted Databases

  5      Selecting a Method for Sharing the DSM Database

  Goals of a Shared Database System

  Disk Caching and DSM Systems

  Using DDP for a Shared Database System

  Using Cluster-Mounted Volume Sets for a Shared Database System

  Selecting DDP or Cluster-Mounted Volume Sets for Database Sharing

  Combining DDP-Served and Cluster-Mounted Volume Sets in a VMScluster Environment

  6      Maintaining DSM Database Integrity

  Levels of Database Integrity

  Database Failure Modes

  Protection from Media Failures
    Physical Disk Shadowing
    Database Backup with After-Image Journaling

  Protection from System Failures
    Before-Image Journaling
    Using After-Image Journaling with Before-Image Journaling
    Journaling in a VMScluster Environment
    Recovery Process in a VMScluster Environment

  Database Backup Techniques
    Full Database Backup
    Incremental Database Backup
      Cumulative Incremental Backup
      Serial Incremental Backup
      Performing an Incremental Backup
      Restoring an Incremental Backup
      Updating the Backup Revision Number

  7      Using DSM Journaling

  Journaling Resources

  Journaling Processes
    Journal Process
    Recovery Process
    DDP Servers

  Journal Files
    Before-Image Journal File
    After-Image Journaling Files
      After-Image Journal Files
      After-Image Log File

  Setting Up Before-Image and After-Image Journaling
    Creating a Before-Image Journal File ( ^BIJINIT )
    Creating After-Image Journal Files ( ^JRNINIT )
    Enabling Before-Image and After-Image Journaling

  Before-Image Journaling Utilities
    Examining the Before-Image Journal File ( ^BIJEXAM )
    Forcing the Before-Image Journal File ( ^BIJFORC )

  After-Image Journaling Utilities
    Journal File Utilities
      Add Journal File Name ( ADDFIL^JRNL )
      Close Current Journal File ( CLOSEFI^JRNL )
      Create New Log File ( NEWLOG^JRNL )
      Display Journal File Label ( LABEL^JRNL )
      Display Journal File Names ( DISPLAY^JRNL )
      Initialize Journal File ( ^JRNINIT )
      Open Current Journal File ( OPENFIL^JRNL )
    Global Utilities ( SETJRN^%GLOMAN )
    Journal List Utilities
    Journal Operator Utilities
      Pause Journaling ( PAUSE^JRNL )
      Disable Transaction Processing ( TPOFF^JRNL )
      Resume Journaling ( RESUME^JRNL )
      Enable Transaction Processing ( TPON^JRNL )
      Journal Status ( STATUS^JRNL )

  Generating After-Image Journal Files

  Recovering from Media Failure (Dejournaling)
    Dejournaling from a DSM-11 Journal Tape ( DSM11^DEJRNL )
    Dejournaling from the After-Image Log File ( LOG^DEJRNL )
    Dejournaling from Selected Files and Globals ( FILE^DEJRNL )

  Writing a Customized Dejournaling Utility
    %DEJRNL External Routine
    %GDECOD External Routine
    %GLSDAT External Routine

  Recovering from a System Failure

  Using Command Procedures to Perform Database Backups
    Standard Calling Interface
    Volume Set Access Control ( ^VOLINH )
      Set Read Only Access ( SRO^VOLINH )
      Clear Read Only Access ( CRO^VOLINH )
    After-Image Journal File Management
      Journal Process Control and Status Inquiry Routines
        Returning the Journaling Status (status=$$STATUS^JRNLIB(vsnam,.what))
        Disabling Journaling (status=$$DISABLE^JRNLIB(vsnam,[,nxtflg]))
        Enabling Journaling (status=$$ENABLE^JRNLIB(vsnam))
      Journal File List Management Routines
        Reading the Contents of the Journal File (status=$$GETLIST^JRNLIB(vsnam,.jrnlst[,lock]))
        Storing the Journal File List (status=$$PUTLIST^JRNLIB(vsnam,.jrnlst[,unlock]))
        Locking the Journal File List (status=$$LOCK^JRNLIB(vsnam))
        Releasing the Journal File List Lock (status=$$UNLOCK^JRNLIB(vsnam))
        Opening the Next File on the Journal List (status=$$NEXTFILE^JRNLIB(vsnam))
      Journal File Management Routines
        Creating A New Journal File (status=$$CREATE^JRNLIB(vsnam,glsfil,jrnfil,size[,owrt]))
        Marking the Journal File (status=$$MARKFULL^JRNLIB(jrnfil))
        Creating a New Journal Log File (status=$$NEWLOG^JRNLIB(vsnam))
        Returning a Message for the Status Code (text = $$ERROR^JRNLIB(status))
    User Open Callback
      Specifying and Invoking the Callback Routine
      Environment When the Callback Routine is Executed
      Callback Routine Example
    DCL User Interface
      Journal STATUS DCL Interface
      DCL Interface for Journal List Utilities
    Incremental Backup and Restore ( ^BACKUP )
      Incremental Backup ( ENT^BACKUP )
      Update Backup Revision Number ( ENT^BACKUP )
    Full Database Backup Command Procedure
    Incremental Database Backup Command Procedure

  8      Checking and Repairing Database Integrity

  Integrity Checker Utility ( ^IC )

  Fast Integrity Checker Utility ( ^FASTIC )

  Creating Command Procedures to Perform Integrity Checking

  Database Repair Utility ( ^FIX )

  9      Using Transaction Processing

  Introduction to Transaction Processing

  Transaction Recovery Units
    DSM Transaction Processing Mechanisms
    Recovery Unit Isolation and Serialization

  Configuring DSM for use with Transaction Processing
    Transaction Database Sets and Globals
    Creating Transaction Processing Volume Sets
    Initializing Transaction Processing Journal Files
    Defining the Transaction Database Set
    Using the ^CONFIG Utility to Configure Transaction Processing
    Configuring Volume Sets for Routine and Temporary Globals

  Controlling Transaction Processing Activities

  Monitoring Transaction Processing Activities

  Recovery Unit Programming Techniques
    Recovery Unit Bracketing
      $ZULEVEL, $ZUID, and Nested Recovery Units
      Read-Only Recovery Units
    Programming for Isolation and Concurrency
    High Concurrency Locking Techniques
      Shared Read Locks
      Protected Write Locks
    Recovery Unit Error Handling
    Writing Restartable Recovery Units

  A   Converting DSM-11 Databases to DSM Volume Sets

  Overview

  TARGET Volume Set Size Requirements

  Procedure for Converting the DSM-11 Database
    Direct Conversion
    Two-Step Conversion
    Using the ^CON11 Utility

  B   Overview of Data Storage

  DSM Block Types
    Layout of DSM Blocks
    Map Blocks
    Global Directory Blocks
    Global Pointer Blocks
    Global Data Blocks
    Source Routine Blocks
    Compiled Routine Blocks

  Collating Sequence
    Numeric Collating Sequence
    ASCII Collating Sequence
    Implementation of Collating Sequence

  EXAMPLES

  2-1        Using the ^VOLMAN Utility to Create a Volume Set

  2-2        Using ^CONFIG to Mount DSM-11 Compatible Disks

  2-3        Using ^UCIADD to Add a UCI

  2-4        Using ^%GLOMAN to Create New Globals

  2-5        Using the ^UCIGAM Utility

  3-1        Using ^CONFIG to Set Up DDP

  4-1        Using ^CONFIG to Set Up Cluster-Mounted Database Sets

  7-1        Using the ^CONFIG Utility to Enable BIJ and AIJ

  7-2        Writing a Customized Dejournaling Utility

  7-3        Callback Example

  7-4        Full Database Backup Command Procedure

  7-5        Incremental Database Backup Command Procedure

  8-1        Running the ^FIX Utility

  9-1        Using ^CONFIG to Set Up Transaction Processing

  9-2        ^TPSTA Report

  9-3        Restartable Recovery Unit

  9-4        Restartable Recovery Unit with NEW Command

  A-1        Running the ^CON11 Utility

  A-2        Running DSM$VOLUPG.COM

  FIGURES

  1-1        DSM Global Storage Hierarchy

  1-2        DSM-11 Compatible Database Set

  1-3        VMS Database Set

  1-4        Transaction Database Set

  1-5        Multivolume Volume Sets

  1-6        Backing Up a Multivolume Volume Set

  1-7        Database Organization

  1-8        Accessing Globals in a DDP Environment

  2-1        Global Initialization

  2-2        Typical Global Layout

  2-3        Disk Allocation for Two UCIs

  2-4        Global Data Growth Area Allocation for Three Globals

  2-5        Relationship Between Default UCIs, Translation Tables, and the Schema Table

  2-6        Algorithm for Nonlibrary Global References

  2-7        Algorithm for Library Global References

  3-1        Three-Node Ethernet Network

  3-2        Ethernet Network Configurations in Two DDP Groups

  3-3        DDP Software Components and Server Processes

  3-4        Two VMScluster Members Mounting the Same Volume Set

  3-5        One VMScluster Member Mounting a Volume Set

  3-6        Mixed Cluster/Noncluster Environment

  3-7        DECnet DDP Link Between Two DDP Nodes

  4-1        Common Access to Volume Set AAA

  5-1        Single-Node System with Access to Volume Set AAA

  5-2        Three-Node System with DDP Access to Volume Set AAA

  5-3        Three-Node System with a Cluster-Mounted Volume Set

  5-4        Efficiency of Cluster-Mounted Volume Sets

  5-5        DDP Performance

  5-6        DDP and Cluster-Mounted Database Sharing Statistics

  5-7        Combined DDP/Cluster-Mounted Shared Database System

  6-1        Levels of Database Integrity

  6-2        Database Shadowing

  7-1        Relationship Between DSM Journal Processes in a VMScluster Environment

  9-1        Transaction Database Set

  9-2        Nested Recovery Units

  B-1        Relationship of Blocks in a DSM Global

  B-2        DSM Global Block

  B-3        Map Block

  B-4        Global Directory Block

  B-5        Protection Code Byte Assignments

  B-6        A Global Key

  B-7        Global Pointer Block

  B-8        Global Data Block

  TABLES

  2-1        Bit Representation for Masks

  5-1        Database Sharing Methods

  7-1        Status Error Code Messages

  8-1        Fast Integrity Checker Messages