Database Administration Guide Release 18.5.00, 2nd Edition
CA IDMS™
This Documentation, which includes embedded help systems and electronically distributed materials, (hereinafter referred to as the “Documentation”) is for your informational purposes only and is subject to change or withdrawal by CA at any time. This
Documentation is proprietary information of CA and may not be copied, transferred, reproduced, disclosed, modified or duplicated, in whole or in part, without the prior wri tten consent of CA.
If you are a licensed user of the software product(s) addressed in the Documentation, you may print or otherwise make available a reasonable number of copies of the Documentation for internal use by you and your employees in connection with that software, provided that all CA copyright notices and legends are affixed to each reproduced copy.
The right to print or otherwise make available copies of the Documentation is limited to the period during which the applicable
l i cense for such software remains in full force and effect. Should the license terminate for any reason, i t is your responsibility to certi fy in writing to CA that all copies and partial copies of the Documentation have been returned to CA or destroyed.
TO THE EXTENT PERMITTED BY APPLICABLE LAW, CA PROVIDES THIS DOCUMENTATION “AS IS” WITH OUT WARRANTY OF ANY KIND, INCLUDING WITHOUT LIMITATION, ANY IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NONINFRINGEMENT. IN NO EVENT WILL CA BE LIABLE TO YOU OR ANY THIRD PARTY FOR ANY LOSS OR DAMAGE,
DIRECT OR INDIRECT, FROM THE USE OF THIS DOCUMENTATION, INCLUDING WITHOUT LIMITATION, LOST PROFITS, LOST INVESTMENT, BUSINESS INTERRUPTION, GOODWILL, OR LOST DATA, EVEN IF CA IS EXPRESSLY ADVISED IN ADVANCE OF THE POSSIBILITY OF SUCH LOSS OR DAMAGE.
The use of any software product referenced in the Documentation is governed by the applicable license agreement and such
l icense agreement is not modified in any way by the terms of this notice.
The manufacturer of this Documentation is CA.
Provided with “Restricted Rights.” Use, duplication or disclosure by the United States Government is subject to the restrictions
set forth in FAR Sections 12.212, 52.227-14, and 52.227-19(c)(1) - (2) and DFARS Section 252.227-7014(b)(3), as applicable, or their successors.
Copyright © 2014 CA. Al l rights reserved. All trademarks, trade names, service marks, and logos referenced herein belong to their respective companies.
CA Technologies Product References
This document references the following CA products:
■ CA ACF2™ for z/OS
■ CA ADS™
■ CA Culprit™
■ CA Endevor/DB™ for CA IDMS™ (CA Endevor/DB)
■ CA IDMS™
■ CA IDMS™/DC (DC)
■ CA IDMS™/DC or CA IDMS™ UCF (DC/UCF)
■ CA IDMS™ Performance Monitor
■ CA IDMS™ Presspack
■ CA IDMS™ UCF (UCF)
■ CA OLQ™ Online Query for CA IDMS™ (CA OLQ)
■ CA Top Secret® for z/OS
Contact CA Technologies
Contact CA Support
For your convenience, CA Technologies provides one site where you can access the information that you need for your Home Office, Small Business, and Enterprise CA Technologies products. At http://ca.com/support, you can access the following
resources:
■ Online and telephone contact information for technical assistance and customer services
■ Information about user communities and forums
■ Product and documentation downloads
■ CA Support policies and guidelines
■ Other helpful resources appropriate for your product
Providing Feedback About Product Documentation
If you have comments or questions about CA Technologies product documentation, you can send a message to [email protected].
To provide feedback about CA Technologies product documentation, complete our
short customer survey which is available on the CA Support website at http://ca.com/docs.
http://www.ca.com/supportmailto:[email protected]://ca.com/docshttp://ca.com/docs
Documentation Changes
The following documentation updates were made for the 18.5.00, 2nd Edition release of this documentation:
■ RESTRUCTURE Util ity Statement (see page 833)—Renamed from RESTRUCTURE SEGMENT Util ity Statement.
■ Page Groups (see page 56)—Descriptions modified to l ift restrictions on index sets spanning page group boundaries.
■ DBNAME Statement (see page 165)—VERIFY ON/OFF parameter description notes describing the run time check changed to support Mixed Page Group Indexes.
■ AREA Statement (see page 463)—The description of the FORCE option for the default usage mode was added.
■ Default Ready Mode Using Navigational DML (see page 934)—The description of
the FORCE option was added.
■ Usage (see page 466)—Considerations for using the FORCE Option with ADS Dialogs were added.
■ Quick Reference Information (see page 1023)—This new appendix contains
reference information that was previously available in the DB Admin Quick Reference Guide.
■ DISPLAY/PUNCH ALL Statement (see page 116)—The RECursive parameter that
appends “AS SYNTAX.” or “AS COMMENT.” to each generated line of output was added.
Contents 7
Contents
Chapter 1: Introduction 27
Who Should Use This Guide ....................................................................................................................................................... 27
Using This Guide ........................................................................................................................................................................... 27
Syntax Diagram Conventions ..................................................................................................................................................... 29
Chapter 2: CA IDMS Environment 33
Overview ........................................................................................................................................................................................ 33
Multiuser Environment ....................................................................................................................................................... 34
Single-user Environment..................................................................................................................................................... 35
Data Sharing Environment.................................................................................................................................................. 36
CA IDMS/DC and CA IDMS UCF.................................................................................................................................................. 37
CA IDMS/DB Components .......................................................................................................................................................... 37
Database Management System......................................................................................................................................... 37 Dictionaries............................................................................................................................................................................ 38
Physical Database Definition.............................................................................................................................................. 39
Logical Database Definition ................................................................................................................................................ 39
Security .......................................................................................................................................................................................... 39
Getting Started ............................................................................................................................................................................. 40
Towards a Production Environment ................................................................................................................................. 41
Tools for Database Definition and Maintenance.................................................................................................................... 44
Chapter 3: Defining Physical Databases 45
Overview ........................................................................................................................................................................................ 45
Segments ............................................................................................................................................................................... 47
DMCLs .................................................................................................................................................................................... 48
Database Name Tables........................................................................................................................................................ 49
Separating Logical and Physical Database Definitions........................................................................................................... 49
Before You Begin .......................................................................................................................................................................... 50
Chapter 4: Defining Segments, Files, and Areas 51
Segments, Files, and Areas ......................................................................................................................................................... 51 Segments ............................................................................................................................................................................... 51
Files ......................................................................................................................................................................................... 52
Areas....................................................................................................................................................................................... 52
Planning ......................................................................................................................................................................................... 54
8 Database Administration Guide
Segment Boundaries............................................................................................................................................................ 54
Mapping Areas to Files ........................................................................................................................................................ 55
Page Ranges .......................................................................................................................................................................... 55
Page Groups .......................................................................................................................................................................... 56
Records Per Page.................................................................................................................................................................. 57
Page Reserve ......................................................................................................................................................................... 58
Resolving Symbolic Parameters ......................................................................................................................................... 59
Synchronization Stamps...................................................................................................................................................... 60
Specifying Data Set Name Information ............................................................................................................................ 61
Procedure for Defining Segments ............................................................................................................................................. 62
More Information................................................................................................................................................................. 65
Chapter 5: Defining, Generating, and Punching a DMCL 67
DMCLs ............................................................................................................................................................................................ 67
Data Sharing Attributes............................................................................................................................................................... 71
Database Buffers .......................................................................................................................................................................... 73
Journal Buffers and Journal Files ............................................................................................................................................... 74
Sizing Journal Buffers........................................................................................................................................................... 77
Sizing Journal Files................................................................................................................................................................ 78
Adding Segments to the DMCL .................................................................................................................................................. 80
Required Segments .............................................................................................................................................................. 80
File Limitations...................................................................................................................................................................... 82
Area Status ............................................................................................................................................................................ 82
Sharing Update Access to Data.......................................................................................................................................... 84
Area Overrides ...................................................................................................................................................................... 85
File Overrides ........................................................................................................................................................................ 86
Procedure for Defining a DMCL ................................................................................................................................................. 87
Making the DMCL Accessible to the Runtime Environment ................................................................................................. 89
More Information................................................................................................................................................................. 90
Chapter 6: Defining a Database Name Table 91
Overview ........................................................................................................................................................................................ 91
Planning ......................................................................................................................................................................................... 94
SQL Considerations .............................................................................................................................................................. 94
Non-SQL Considerations ..................................................................................................................................................... 95
Restricting Subschema Names........................................................................................................................................... 99
Application Dictionaries ...................................................................................................................................................... 99
Defining the Default Dictionary .......................................................................................................................................100
Conflicting Names ..............................................................................................................................................................101
Mixed Page Groups and Maximum Records Per Page ................................................................................................101
Sharing Database Name Tables .......................................................................................................................................103
Contents 9
Defining and Generating the Database Name Table ...........................................................................................................104
More Information...............................................................................................................................................................105
Chapter 7: Physical Database DDL Statements 107
Statement Summary ..................................................................................................................................................................107
Components of a Physical DDL Statement ............................................................................................................................110
Naming Conventions .................................................................................................................................................................111
Using Lowercase Letters in Identifiers ...........................................................................................................................112
Keywords as Identifiers .....................................................................................................................................................112
Entity Currency ...................................................................................................................................................................113
Generic DISPLAY/PUNCH Statement ......................................................................................................................................114
DISPLAY/PUNCH ALL Statement ..............................................................................................................................................116 ARCHIVE JOURNAL Statements ...............................................................................................................................................131
AREA Statements........................................................................................................................................................................135
BUFFER Statements ...................................................................................................................................................................156
DBGROUP Statements ...............................................................................................................................................................163
DBNAME Statements.................................................................................................................................................................165
DBTABLE Statements .................................................................................................................................................................171
DISK JOURNAL Statements .......................................................................................................................................................177
DMCL Statements.......................................................................................................................................................................183
FILE Statements ..........................................................................................................................................................................200
JOURNAL BUFFER Statements .................................................................................................................................................208
SEGMENT Statements ...............................................................................................................................................................211
TAPE JOURNAL Statements ......................................................................................................................................................217
Summary of Physical Database Limits ....................................................................................................................................220
Chapter 8: Defining a Database Using SQL 223
Overview ......................................................................................................................................................................................224
Executing SQL Data Description Statements .........................................................................................................................225
Creating a Schema......................................................................................................................................................................226 Creating a Table..........................................................................................................................................................................228
Defining a CALC Key ...................................................................................................................................................................230
Defining an Index .......................................................................................................................................................................231
Defining a Referential Constraint ............................................................................................................................................232
Dropping a Default Index ..........................................................................................................................................................233
Creating a View...........................................................................................................................................................................235
Chapter 9: Defining a Database Using Non-SQL 237
Overview ......................................................................................................................................................................................237
Schemas and Subschemas ........................................................................................................................................................238
10 Database Administration Guide
Schema and Subschema Compilers ........................................................................................................................................240
Defining a Schema......................................................................................................................................................................241
SCHEMA Statement ...........................................................................................................................................................241
AREA Statements................................................................................................................................................................243
RECORD Statements ..........................................................................................................................................................244
SET Statements ...................................................................................................................................................................252
VALIDATE .............................................................................................................................................................................253
Defining a Subschema ...............................................................................................................................................................255
Subschema Statement ......................................................................................................................................................255
AREA Statements................................................................................................................................................................256
RECORD Statements ..........................................................................................................................................................257
SET Statements ...................................................................................................................................................................258 LOGICAL RECORD Statements ..........................................................................................................................................260
PATH-GROUP Statements .................................................................................................................................................261
Subschema Validation and Generation ..........................................................................................................................261
Security Checking .......................................................................................................................................................................263
Checking Compiler Security..............................................................................................................................................264
Checking Registration Override Security .......................................................................................................................265
Checking Verb Security......................................................................................................................................................266
Checking Component Security .........................................................................................................................................267
Establishing Schema and Subschema Currency....................................................................................................................269
Reporting on Schema and Subschema Definitions ..............................................................................................................270
More Information...............................................................................................................................................................270
Chapter 10: Using the Schema and Subschema Compilers 271
Overview ......................................................................................................................................................................................271
More Information...............................................................................................................................................................271
Online Compiling ........................................................................................................................................................................272
Batch Compiling..........................................................................................................................................................................273
Coding DDL Schema and Subschema Statements ................................................................................................................274
Statement Components ....................................................................................................................................................274 Delimiting Statements .......................................................................................................................................................275
Compiler Comments ..........................................................................................................................................................276
Input Format .......................................................................................................................................................................277
Error Handling.....................................................................................................................................................................278
More Information about Messages ................................................................................................................................279
Coding Keywords, Variables, and Comment Text ................................................................................................................280
Coding Keywords................................................................................................................................................................280
Coding Entity-Occurrence Names ...................................................................................................................................280
Coding User-Supplied Values ...........................................................................................................................................281
Coding Comment Text .......................................................................................................................................................283
Contents 11
Compiler-Directive Statements ...............................................................................................................................................285
Output From the Compilers .....................................................................................................................................................285
Source Code and Load Modules ......................................................................................................................................285
Schema and Subschema Listings .....................................................................................................................................287
Chapter 11: Compiler-Directive Statements 289
Overview ......................................................................................................................................................................................289
DISPLAY/PUNCH ALL Statement ..............................................................................................................................................290
Syntax ...................................................................................................................................................................................290
Parameters ..........................................................................................................................................................................291
Usage ....................................................................................................................................................................................294
Example................................................................................................................................................................................298 DISPLAY/PUNCH IDD Statement..............................................................................................................................................298
Syntax ...................................................................................................................................................................................298
Parameters ..........................................................................................................................................................................299
Example................................................................................................................................................................................299
INCLUDE Statement ...................................................................................................................................................................299
Syntax ...................................................................................................................................................................................300
Parameters ..........................................................................................................................................................................300
Usage ....................................................................................................................................................................................300
Example................................................................................................................................................................................301
SET OPTIONS Statement ...........................................................................................................................................................301
Syntax ...................................................................................................................................................................................302
Parameters ..........................................................................................................................................................................305
Usage ....................................................................................................................................................................................315
Examples ..............................................................................................................................................................................319
More Information...............................................................................................................................................................319
SIGNOFF Statement ...................................................................................................................................................................319
Syntax ...................................................................................................................................................................................319
Usage ....................................................................................................................................................................................320
SIGNON Statement ....................................................................................................................................................................320 Syntax ...................................................................................................................................................................................321
Parameters ..........................................................................................................................................................................321
Usage ....................................................................................................................................................................................323
More Information...............................................................................................................................................................324
Chapter 12: Operations on Entities 325
ADD Operations ..........................................................................................................................................................................325
MODIFY Operations ...................................................................................................................................................................326
DELETE Operations.....................................................................................................................................................................327
VALIDATE Operations ................................................................................................................................................................327
12 Database Administration Guide
DISPLAY/PUNCH Operations ....................................................................................................................................................328
Syntax ...................................................................................................................................................................................329
Parameters ..........................................................................................................................................................................329
Usage ....................................................................................................................................................................................331
Examples ..............................................................................................................................................................................332
More Information...............................................................................................................................................................332
Chapter 13: Parameter Expansions 333
Overview ......................................................................................................................................................................................333
Expansion of boolean-expression ...........................................................................................................................................333
Syntax ...................................................................................................................................................................................333
Parameters ..........................................................................................................................................................................334 Usage ....................................................................................................................................................................................337
Expansion of db-record-field....................................................................................................................................................337
Syntax ...................................................................................................................................................................................337
Parameters ..........................................................................................................................................................................338
Usage ....................................................................................................................................................................................338
Expansion of lr-field ...................................................................................................................................................................338
Syntax ...................................................................................................................................................................................339
Parameters ..........................................................................................................................................................................339
Usage ....................................................................................................................................................................................339
Expansion of module-specification .........................................................................................................................................340
Syntax ...................................................................................................................................................................................340
Parameters ..........................................................................................................................................................................340
Usage ....................................................................................................................................................................................341
More Information...............................................................................................................................................................341
Expansion of user-specification ...............................................................................................................................................341
Syntax ...................................................................................................................................................................................341
Parameters ..........................................................................................................................................................................342
Usage ....................................................................................................................................................................................342
Expansion of user-options-specification ................................................................................................................................342 Syntax ...................................................................................................................................................................................343
Parameters ..........................................................................................................................................................................343
Expansion of version-specification..........................................................................................................................................344
Syntax ...................................................................................................................................................................................344
Parameters ..........................................................................................................................................................................344
Examples ..............................................................................................................................................................................345
Chapter 14: Schema Statements 347
Overview ......................................................................................................................................................................................347
SCHEMA Statement ...................................................................................................................................................................347
Contents 13
Syntax ...................................................................................................................................................................................348
Parameters ..........................................................................................................................................................................350
Usage ....................................................................................................................................................................................355
Examples ..............................................................................................................................................................................357
AREA Statement .........................................................................................................................................................................357
Syntax ...................................................................................................................................................................................357
Parameters ..........................................................................................................................................................................359
Usage ....................................................................................................................................................................................363
Examples ..............................................................................................................................................................................364
RECORD Statement ....................................................................................................................................................................365
Syntax ...................................................................................................................................................................................365
Parameters ..........................................................................................................................................................................368 Usage ....................................................................................................................................................................................383
Examples ..............................................................................................................................................................................390
More Information...............................................................................................................................................................393
Element Substatement..............................................................................................................................................................393
Syntax ...................................................................................................................................................................................393
Parameters ..........................................................................................................................................................................396
Usage ....................................................................................................................................................................................405
Examples ..............................................................................................................................................................................415
More Information...............................................................................................................................................................420
COPY ELEMENTS Substatement...............................................................................................................................................420
Syntax ...................................................................................................................................................................................421
Parameters ..........................................................................................................................................................................421
Usage ....................................................................................................................................................................................422
Examples ..............................................................................................................................................................................422
SET Statement.............................................................................................................................................................................423
Syntax ...................................................................................................................................................................................424
Parameters ..........................................................................................................................................................................426
Usage ....................................................................................................................................................................................438
Examples ..............................................................................................................................................................................441 VALIDATE Statement .................................................................................................................................................................446
Syntax ...................................................................................................................................................................................446
Usage ....................................................................................................................................................................................446
REGENERATE Statement ...........................................................................................................................................................447
Syntax ...................................................................................................................................................................................447
Parameters ..........................................................................................................................................................................447
Usage ....................................................................................................................................................................................448
Chapter 15: Subschema Statements 449
Overview ......................................................................................................................................................................................449
14 Database Administration Guide
Syntax Order .......................................................................................................................................................................449
SUBSCHEMA Statement ............................................................................................................................................................450
Syntax ...................................................................................................................................................................................450
Parameters ..........................................................................................................................................................................452
Usage ....................................................................................................................................................................................458
Examples ..............................................................................................................................................................................462
AREA Statement .........................................................................................................................................................................463
Syntax ...................................................................................................................................................................................464
Parameters ..........................................................................................................................................................................465
Usage ....................................................................................................................................................................................466
Example................................................................................................................................................................................469
RECORD Statement ....................................................................................................................................................................469 Syntax ...................................................................................................................................................................................470
Parameters ..........................................................................................................................................................................471
Usage ....................................................................................................................................................................................474
Example................................................................................................................................................................................477
SET Statement.............................................................................................................................................................................477
Syntax ...................................................................................................................................................................................477
Parameters ..........................................................................................................................................................................478
Usage ....................................................................................................................................................................................479
Example................................................................................................................................................................................480
LOGICAL RECORD Statement ...................................................................................................................................................481
Syntax ...................................................................................................................................................................................481
Parameters ..........................................................................................................................................................................482
Usage ....................................................................................................................................................................................485
Examples ..............................................................................................................................................................................485
PATH-GROUP Statement...........................................................................................................................................................486
Syntax ...................................................................................................................................................................................487
Parameters ..........................................................................................................................................................................491
Usage ....................................................................................................................................................................................510
Example................................................................................................................................................................................513 VALIDATE Statement .................................................................................................................................................................513
Syntax ...................................................................................................................................................................................513
Usage ....................................................................................................................................................................................513
GENERATE Statement................................................................................................................................................................514
Syntax ...................................................................................................................................................................................514
Parameters ..........................................................................................................................................................................515
LOAD MODULE Statement........................................................................................................................................................515
Syntax ...................................................................................................................................................................................515
Parameters ..........................................................................................................................................................................516
Usage ....................................................................................................................................................................................518
Examples ..............................................................................................................................................................................519
Contents 15
DISPLAY/PUNCH SCHEMA Statement.....................................................................................................................................519
Syntax ...................................................................................................................................................................................519
Parameters ..........................................................................................................................................................................520
Example................................................................................................................................................................................521
Chapter 16: Writing Database Procedures 523
Database Procedures.................................................................................................................................................................523
Specifying a Procedure..............................................................................................................................................................523
Common Uses of Database Procedures .................................................................................................................................524
Coding Database Procedures ...................................................................................................................................................527
Area Procedures .................................................................................................................................................................529
Record Procedures.............................................................................................................................................................529 Database Procedure Blocks ..............................................................................................................................................529
Establishing Communication Between Programs and Procedures ...........................................................................536
Specifying When to Call Database Procedures .............................................................................................................537
Link Editing Database Procedures ...................................................................................................................................537
Executing Database Procedures ......................................................................................................................................538
Resetting the Error-Status Indicator ...............................................................................................................................538
Methods for Invoking Procedures...........................................................................................................................................540
DBSTUB1 Invocation Method...........................................................................................................................................541
DBSTUB2 Invocation Method...........................................................................................................................................542
Considerations for Non-Reentrant or Non-LE-Compliant Database Procedures ...................................................544
Database Procedure Example ..................................................................................................................................................545
Chapter 17: Allocating and Formatting Files 549
Making Files Accessible to CA IDMS/DB.................................................................................................................................549
Types of Files...............................................................................................................................................................................549
File Access Methods ..................................................................................................................................................................551
Creating Disk Files ......................................................................................................................................................................552
File Characteristics .............................................................................................................................................................554 More Information...............................................................................................................................................................555
Formatting Files ..........................................................................................................................................................................556
Considerations for Native VSAM Files ....................................................................................................................................557
More Information...............................................................................................................................................................558
Chapter 18: Buffer Management 559
Planning Database Buffers........................................................................................................................................................559
How Many Buffers Do You Need?...................................................................................................................................560
How Many Pages Should a Buffer Contain? ..................................................................................................................561
How Large Should a Buffer Page Be? ..............................................................................................................................563
16 Database Administration Guide
Choosing a Method for Storage Acquisition..................................................................................................................564
Managing Buffers Dynamically ................................................................................................................................................565
Tuning Buffers for Performance ..............................................................................................................................................566
Using Chained Reads .................................................................................................................................................................567
Using Read and Write Drivers ..................................................................................................................................................570
More Information...............................................................................................................................................................570
Chapter 19: Journaling Procedures 571
Journaling Overview ..................................................................................................................................................................571
Journaling Under the Central Version ............................................................................................................................572
Journaling in Local Mode ..................................................................................................................................................572
Journal Files.................................................................................................................................................................................573 Journal Record Entries.......................................................................................................................................................573
Checkpoints .........................................................................................................................................................................574
Avoiding Duplicate LID Values .........................................................................................................................................576
Two-Phase Commit Journaling ........................................................................................................................................577
I/O Error or Corruption of a Journal File ........................................................................................................................579
Formatting Journal Files............................................................................................................................................................580
Offloading Disk Journal Files ....................................................................................................................................................580
When CA IDMS/DB Switches Journal Files.....................................................................................................................581
How to Offload the Disk Journal......................................................................................................................................582
Handling Full Journal Files ................................................................................................................................................583
After System Shutdown ....................................................................................................................................................584
User Exits and Reports for Journal Management.................................................................................................................585
Influencing Journaling Performance .......................................................................................................................................586
Reducing Journal File I/O ..................................................................................................................................................586
Improving Warmstart Performance................................................................................................................................588
Reducing Recovery Time...................................................................................................................................................589
More Information...............................................................................................................................................................590
Chapter 20: Two-Phase Commit Processing 591
Two-Phase Commit Overview..................................................................................................................................................591
Terminology ........................................................................................................................................................................592
Typical Commit Flows........................................................................................................................................................593
Prepare and Commit Outcomes ......................................................................................................................................594
Recovery From Failure.......................................................................................................................................................595
Two-Phase Commit within CA IDMS .......................................................................................................................................595
Use of Two-Phase Commit ...............................................................................................................................................596
External Coordinators and Participants .........................................................................................................................597
Resource Managers, Interfaces and Exits ......................................................................................................................598
Interests and Roles.............................................................................................................................................................600
Contents 17
Commit Optimizations ......................................................................................................................................................600
Transaction Identifiers ......................................................................................................................................................601
Transaction States..............................................................................................................................................................604
Transaction Outcomes ......................................................................................................................................................606
Chapter 21: Backup and Recovery 607
Database Backup and Recovery Overview ............................................................................................................................607
Backup Procedures ....................................................................................................................................................................608
Back Up After a Normal System Shutdown ...................................................................................................................609
Backup While the DC/UCF System is Active ..................................................................................................................609
Back Up Before and After Local Mode Jobs ..................................................................................................................614
Automating the Backup Process......................................................................................................................................616 Automatic Recovery...................................................................................................................................................................618
Warmstart ...........................................................................................................................................................................619
Automatic Rollback ............................................................................................................................................................623
Resynchronization..............................................................................................................................................................626
Distributed Transaction Recovery Considerations ...............................................................................................................629
Completing Distributed Transactions Using DCMT ......................................................................................................632
Incomplete Transactions and Manual Recovery ..........................................................................................................633
Deleting Resource Managers ...........................................................................................................................................636
Manual Recovery........................................................................................................................................................................637
Recovery From a Quiesced Backup .................................................................................................................................638
Recovery From a Hot Backup ...........................................................................................................................................641
Reducing Recovery Time...................................................................................................................................................648
Recovering a Large Number of Files ...............................................................................................................................650
Recovery Procedures After a Warmstart Failure..................................................................................................................651
Recovery Procedures from Database File I/O Errors ...........................................................................................................653
Recovery Procedures from Journal File I/O Errors ...............................................................................................................657
Recovery Procedures for Local Mode Operations................................................................................................................662
No Journaling ......................................................................................................................................................................662
Journaling to a Tape Device..............................................................................................................................................662 Journaling to a Disk Device ...............................................................................................................................................662
Using an Incomplete Journal File.....................................................................................................................................663
Recovery Procedures for Mixed-Mode Operations .............................................................................................................664
Data Sharing Recovery Considerations ..................................................................................................................................666
Considerations for Recovery of Native VSAM Files..............................................................................................................670
Chapter 22: Loading a Non-SQL Defined Database 673
Database Loading .......................................................................................................................................................................673
Loading Database Records Using FASTLOAD ........................................................................................................................674
General Considerations.....................................................................................................................................................675
18 Database Administration Guide
FASTLOAD Procedure ................................................................................................................................................................677
Loading Database Records Using a User-Written Program ................................................................................................677
Organizing Input Data for a User-Written Program .....................................................................................................678
Loading the Database ........................................................................................................................................................681
More Information...............................................................................................................................................................682
Chapter 23: Loading an SQL-Defined Database 683
Database Loading .......................................................................................................................................................................683
Loading Considerations .............................................................................................................................................................686
Contents of the Input File .........................................................................................................................................................690
Loading Procedures ...................................................................................................................................................................691
Steps That Apply to All Load Procedures .......................................................................................................................692 Full Load Procedure ...........................................................................................................................................................692
Phased Load Procedure.....................................................................................................................................................694
Segmented Load Procedure .............................................................................................................................................695
Stepped Load Procedure...................................................................................................................................................697
More Information...............................................................................................................................................................700
Chapter 24: Monitoring and Tuning Database Performance 701
Monitoring Guidelines...............................................................................................................................................................701
Monitoring Facilities ..................................................................................................................................................................702
Database Statistics .............................................................................................................................................................703
Items to Monitor and Tune ......................................................................................................................................................706
Journal Use ..........................................................................................................................................................................706
Buffer Utilization ................................................................................................................................................................707
Space Management and Database Design ....................................................................................................................707
Indexing Efficiency .............................................................................................................................................................709
Tuning an Index ..................................................................................................................................................................710
Database Locks ...................................................................................................................................................................711
Longterm Locks...................................................................................................................................................................716 SQL Processing ....................................................................................................................................................................716
Reducing I/O................................................................................................................................................................................717
By Caching Files in Memory..............................................................................................................................................718
Through Database Reorganization..................................................................................................................................719
Through Application Design .............................................................................................................................................720
Through Database Design.................................................................................................................................................720
By Using UPDATE STATISTICS (SQL-Accessed Databases)...........................................................................................721
Chapter 25: Dictionaries and Runtime Environments 723
Dictionaries..................................................................................................................................................................................723
Contents 19
Physical Components of a Dictionary .............................................................................................................................724
Logical Components of a Dictionary ...............................................................................................................................725
Assigning Dictionary Areas to Segments ........................................................................................................................726
Sharing Dictionary Areas...................................................................................................................................................727
CA-supplied Dictionary Definitions .........................................................................................................................................728
Logical Database Definitions ............................................................................................................................................730
Protocols, Nondatabase Structures, and Modules ......................................................................................................733
Defining New Dictionaries .........................................................................................................................