Express Reorg: How to save your weekend Laura Rochon Ajilon Consulting.

Slides:



Advertisements
Similar presentations
Debugging ACL Scripts.
Advertisements

Euro/File Demonstration Domino Software Limited. EURO/File EURO/FILE works on a very simple principle and requires four steps to perform a run: Define.
Page Footer Keed Education Oracle Database Administration Basic Copyright 2009 Keed Education BV Version Concept.
UNESCO ICTLIP Module 4. Lesson 3 Database Design, and Information Storage and Retrieval Lesson 3. Information storage and retrieval using WinISIS.
HORIZONT 1 ProcMan ® The Handover Process Manager Product Presentation HORIZONT Software for Datacenters Garmischer Str. 8 D München Tel ++49(0)89.
ICS 421 Spring 2010 Indexing (1) Asst. Prof. Lipyeow Lim Information & Computer Science Department University of Hawaii at Manoa 02/18/20101Lipyeow Lim.
Introduction to Structured Query Language (SQL)
Recap of Feb 27: Disk-Block Access and Buffer Management Major concepts in Disk-Block Access covered: –Disk-arm Scheduling –Non-volatile write buffers.
Introduction of z/OS Basics © 2006 IBM Corporation Chapter 5: Working with data sets.
Introduction to z/OS Basics © 2006 IBM Corporation Chapter 6: Using Job Control Language (JCL) and System Display and Search Facility (SDSF)
Introduction to Structured Query Language (SQL)
Chapter 5: Working with data sets
Quark QuarkXPress 4 Intermediate Level Course. Working with Master Pages The Document Layout Palette allows you to add, delete, and move document and.
1 B+ Trees. 2 Tree-Structured Indices v Tree-structured indexing techniques support both range searches and equality searches. v ISAM : static structure;
Reference Manager Making your life easier! Updated September 2007.
Backup and Recovery Part 1.
9 Copyright © Oracle Corporation, All rights reserved. Oracle Recovery Manager Overview and Configuration.
Database Management Systems, R. Ramakrishnan and J. Gehrke1 Tree-Structured Indexes Chapter 9.
11 MAINTAINING THE OPERATING SYSTEM Chapter 5. Chapter 5: MAINTAINING THE OPERATING SYSTEM2 CHAPTER OVERVIEW Understand the difference between service.
Backup & Recovery 1.
Administration etc.. What is this ? This section is devoted to those bits that I could not find another home for… Again these may be useless, but humour.
1.A file is organized logically as a sequence of records. 2. These records are mapped onto disk blocks. 3. Files are provided as a basic construct in operating.
Ch 51 Internal Commands COPY and TYPE. Ch 52 Overview Will review file-naming rules.
Lesson 7-Creating and Changing Directories. Overview Using directories to create order. Managing files in directories. Using pathnames to manage files.
Recovery Manager Overview Target Database Recovery Catalog Database Enterprise Manager Recovery Manager (RMAN) Media Options Server Session.
A Simple Cobol Example – ISPF vs RDz Enterprise Systems1.
Copyright © 2007, Oracle. All rights reserved. Managing Concurrent Requests.
Extents, segments and blocks in detail. Database structure Database Table spaces Segment Extent Oracle block O/S block Data file logical physical.
Agenda for Today Chapter 5 –Skip Lesson 2 Review questions Midterm Chapter 6 Review questions.
Click to add text Introduction to z/OS Basics © 2006 IBM Corporation Chapter 6: Using Job Control Language (JCL) and System Display and Search Facility.
Architecture Rajesh. Components of Database Engine.
10/21/2015 M Sliming 1 Intro to IDMS Margaret Sliming.
Module 16: Performing Ongoing Database Maintenance
Chapter 7 File I/O 1. File, Record & Field 2 The file is just a chunk of disk space set aside for data and given a name. The computer has no idea what.
7 1 Chapter 7 Introduction to Structured Query Language (SQL) Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
Introduction to the new mainframe © Copyright IBM Corp., All rights reserved. Chapter 4: Working with data sets.
Diagnostic Pathfinder for Instructors. Diagnostic Pathfinder Local File vs. Database Normal operations Expert operations Admin operations.
XP Practical PC, 3e Chapter 3 1 Installing and Learning Software.
JCL Day 2. 2 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0 Agenda for Day 2  DD statement  Syntax  Parameters  Procedures.
VSAM Alternate Indexes Department of Computer Science Northern Illinois University August 2005.
JCL Day 3. 2 Copyright © 2005, Infosys Technologies Ltd ER/CORP/CRS/OS02/003 Version No: 1.0 Agenda for Day 3  VSAM data sets  Definition & Types 
Lecture 31 Creating Executable Programs on the Mainframe Tuesday, January 20, 2009.
Introduction to Database, Fall 2004/Melikyan1 Hash-Based Indexes Chapter 10.
Introduction to z/OS Basics © 2006 IBM Corporation Chapter 7: Batch processing and the Job Entry Subsystem (JES) Batch processing and JES.
1  process  process creation/termination  context  process control block (PCB)  context switch  5-state process model  process scheduling short/medium/long.
Linux Commands C151 Multi-User Operating Systems.
File Management Section
10 Managing Rollback Segments Objectives Planning the number and size of rollback segments Creating rollback segments using appropriate storage.
Introduction to the new mainframe © Copyright IBM Corp., All rights reserved. Chapter 6: Using Job Control Language (JCL) and System Display and.
Creating Indexes on Tables An index provides quick access to data in a table, based on the values in specified columns. A table can have more than one.
Maintenance Practices. Goal  Automate the necessary DBA chores to put organizations on the path of having healthier, consistent and more trustworthy.
1Software Development Using KIDS Software Development using KIDS Developed by David Whitten WorldVistA Education Meeting Las Cruces, NM May 2007.
3rd Annual Plex/2E Worldwide Users Conference Title text for Title or Divider pages should be either 40 pt for short titles/28 pt for subtitles or 32 pts.
1 Tree-Structured Indexes Chapter Introduction  As for any index, 3 alternatives for data entries k* :  Data record with key value k   Choice.
IFM APPORTIONMENTS Elisa Vick
Tree-Structured Indexes Chapter 10
DB2 Smart Recovery with RXDB2I2 By JRH Golden State Software Inc. © Copyrighted 1997, 2008.
Active-HDL Server Farm Course 11. All materials updated on: September 30, 2004 Outline 1.Introduction 2.Advantages 3.Requirements 4.Installation 5.Architecture.
TNPM v1.3 Flow Control. 2 High Level Instead of each component having flow control settings that govern only its directory, we now have a set of flow.
Database Management Systems 3ed, R. Ramakrishnan and J. Gehrke1 Tree-Structured Indexes Chapter 10.
MapReduce: Simplied Data Processing on Large Clusters Written By: Jeffrey Dean and Sanjay Ghemawat Presented By: Manoher Shatha & Naveen Kumar Ratkal.
© 2009 IBM Corporation IWS z/OS SPEs Auditing enhancements.
FILES AND EXCEPTIONS Topics Introduction to File Input and Output Using Loops to Process Files Processing Records Exceptions.
Cloning Flow for
Database application MySQL Database and PhpMyAdmin
Finding more space for your tight environment
Topics Introduction to File Input and Output
B+-Trees and Static Hashing
Overview of VSAM and Defining a Cluster
Topics Introduction to File Input and Output
Presentation transcript:

Express Reorg: How to save your weekend Laura Rochon Ajilon Consulting

Laura Rochon Started working with CA-IDMS in 1983 Joined Cullinet in 1985 Left CA in 1992, has been consulting ever since Joined Ajilon Consulting in January 2005 IUA Board member since 1998 CQUI President

Agenda Overview of Unload/Reload Overview of Express Reorg Express Reorg Execution Considerations Test results Conclusion

Overview of Unload/Reload UnloadReload DB

Overview of Unload/Reload UnloadSORT1DBL2 SORT2DBLX SORT3DBL3SORT4DBL4 ReloadUnload DB

Overview of Express Reorg DB UnloadReload DB Unload Reload Control file

Overview of Express Reorg New functionality: – Add or remove fields from index key – Change order of set

Overview of Express Reorg 4 major phases: – SETUP Allocates control file Specifies what is to be done – UNLOAD Unloads data – RELOAD Reloads data – CLEANUP Delete work files (but not control file) Unlock areas

Overview of Express Reorg Unload: – Area sweep for most records, except: Record stored VIA system-owned index VIA record CALC records with duplicate option

Overview of Express Reorg Unload (cont’d) – Records assigned target page CALC records VIA records Direct records

Overview of Express Reorg REORG slicing: – Based on DIVIDE PROCESSING n WAYS – Generally, each area is divided symmetrically – If total size of all areas is less than 200 pages, 1 slice – Areas and subareas that contain only system indexes not divided and assigned to a slice

Overview of Express Reorg REORG slicing (cont’d) – User-owned indexes are processed with the slice of the owner record – System-owned indexes assigned to index group and processed indepently of slices

Overview of Express Reorg Reorg processing is divided into tasks and grouped into phases RELOAD phase is divided into – Reload phases 1 thru 6 Each reload task in a given task must successfully complete before processing can move to next Reload phase – Rebuild phases 1 thru 4

Overview of Express Reorg Unload Rebuild 1 REORG: Reload 1 Reload 2 Reload 3 Reload 4 Reload 5 Reload 6 Rebuild 2 Rebuild 3 Rebuild 4 Cleanup Reload Unload Cleanup DB

Express Reorg Execution Parameters JCL Work Files Output Processing Job submission

Express Reorg Parameters SEGMENT source-segment USING source-ssc AREA area RELOAD INTO target-db USING target-ssc DMCL dmcl-name DIVIDE PROCESSING n WAYS REUSE WORKFILES AS SORTEXIT SHARE NOTIFY notify-interval REORG setup options :

Express Reorg Parameters REORG execution options: CLEANUP STOP AFTER SETUP UNLOAD RELOAD NO CREATE UNLOAD WORKFILES RELOAD ALL SUBMIT

Express Reorg Parameters REORG other parameters : CLEANUP STATUS REPORT ONLY

Express Reorg JCL //BCF EXEC PGM=IDMSBCF,REGION=0M //STEPLIB DD DSN=idms.loadlib,DISP=SHR //SYSIDMS DD * Sysidms parameters //SYSLST DD SYSOUT=* //SYSPRINT DD SYSOUT=* //SORTMSG DD SYSOUT=* //SORTWRKnn DD UNIT=unit,SPACE=(CYL,(mmm,nnn)) //SYSIPT DD * Reorg parameters //RORGCTL DD DSN=rorgctl-file,DISP=SHR //RORGJCL DD DSN=jcl-file,DISP=SHR

Express Reorg JCL RORGCTL file: – Describes the specifics of the REORG operation – Contains status information – Fixed-length, LRECL=4096 – Initialized during setup – Should not have DISP=OLD or DISP=NEW

Express Reorg JCL RORGJCL file: – Contains JCL for parallel jobs – Job name should be short enough to append 1+ characters – 1 step: IDMSBCF with following syntax: REORG; – Should have DB files and RORGCTL file

Express Reorg Work Files The number of work files proportional to number of jobs submitted Work files can be manually allocated Work files allocated automatically by using new command CREATE DSMODEL Can specify several CREATE DSMODEL

Express Reorg Work Files REORG uses following DDNAME prefixes: – WU -- unload/reload work files – WI -- Index Rebuild work files – WS-- Sort output work files – WD-- DBKEYS work files

Express Reorg Work Files CREATE DSMODEL creates a temporary model of data set attributes Must include information : – Where to create work file – Space – Blocksize

CREATE DSMODEL

Express Reorg Work Files Sizing work files: – Very hard to estimate – Run REORG STOP AFTER UNLOAD with dummied work files.

Express Reorg Work Files Number of files grows exponentially: example of WU* files: Divide n waysNo reuseReuse workfiles

Output

Output

Output

Output

Output

Output

Output

Output

Output

Express Reorg Processing If Target files same as Source files – REORG STOP AFTER UNLOAD – If not SHARE, UNLOCK AREAS – FORMAT files – REORG with STOP AFTER CLEANUP & SUBMIT – Backup – IDMSDBAN (optionally) – PRINT SPACE (optionally)

Express Reorg Processing If Target files with different DDnames – Format new files – REORG with STOP AFTER CLEANUP – Backup – PRINT SPACE – IDMSDBAN (optionally)

Express Reorg Processing If Target files different but same DDnames – Format new files – REORG with STOP AFTER UNLOAD (REORG jcl and jcl in RORGJCL have old DDnames) – REORG with STOP AFTER CLEANUP and SUBMIT (REORG jcl and jcl in RORGJCL have new files)

Job Submission Automatic job submission Manual job submission Restarting REORG

Automatic Job Submission Jobs automatically submitted – at end of SETUP phase – If SUBMIT parameter is specified REORG will submit – 1 job for each slice – 1 job for each index group Maximum jobs submitted = 2x no slices

Manual Job Submission Can manually submit REORG job(s) Job will examine control file and determine if there is work to be done If no work, waits until some other job completes a task If work is needed, it performs that work

Restarting REORG If a REORG job fails, other jobs will try to restart the task that failed If problem is not temporary (work file too small), problem needs to be corrected, then REORG can be submitted with SUBMIT. In some severe cases, you might need to restart REORG from the beginning

Considerations Relative REORG performance Efficiency of the reorganized database Work files

Relative REORG performance Usually runs in less time than normal UNLOAD/RELOAD, however….. Best to try it out first

DB Efficiency DB might not be as efficient as reorganized by UNLOAD/RELOAD REORG reloads in forwards fashion whereas UNLOAD/RELOAD reloads in backwards fashion REORG can result in more CALC & VIA overflow especially if long sets

Work Files Work files HAVE to be on disk Hard to estimate their size

Tests Results Unload/reload Reorg 2 waysReorg 3 waysReorg 4 waysReorg 5 ways 50.5% 58.4% 63.8% 64.5% TSTDML (46,116 pages)

Tests Results Unload/reload Reorg 2 waysReorg 3 ways 27.2% 44.0% 1 Area unloaded (120,000 pages going to 147,000 pages) 1 Area affected (45,000 pages)

Tests Results 1 Area unloaded (427,720 going to 428, ) 3 Areas affected (39,000 pages 160,000 pages 294,000 pages) % 51.1% Unload/reload Reorg 3 ways Reorg 5 ways

Conclusion Can reduce the time to reorganize a database up to 50-60% Easy to use Needs lots of disk space