Db2 v8 Db2 Adm Tools
Db2 v8 Db2 Adm Tools
Version 7 Release 2
SC18-9552-14
IBM DB2 Administration Tool for z/OS
Version 7 Release 2
SC18-9552-14
Note:
Before using this information and the product it supports, read the information in “Notices” on page 659.
This edition applies to Version 7, Release 2 of IBM DB2 Administration Tool for z/OS (product number 5697-L90)
and to all subsequent releases and modifications until otherwise indicated in new editions.
This edition replaces SC18-9552-13.
© Copyright IBM Corporation 1995, 2010.
US Government Users Restricted Rights – Use, duplication or disclosure restricted by GSA ADP Schedule Contract
with IBM Corp.
Contents
Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
Contents v
Deleting a LISTDEF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
Managing TEMPLATEs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
Adding, editing, or deleting a TEMPLATE . . . . . . . . . . . . . . . . . . . . . . . 226
| Upgrading the TEMPLATE control tables . . . . . . . . . . . . . . . . . . . . . . . . 227
Utility Template panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
Utility Template — Dataset Name panel . . . . . . . . . . . . . . . . . . . . . . . . 231
| Substitution variables in utility templates for PUNCHDDN when using a WSL . . . . . . . . . . . 233
TEMPLATE usage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
| Using the utility template to unload data from LOBs . . . . . . . . . . . . . . . . . . . . . 236
| Using the utility template to unload data from an XML column . . . . . . . . . . . . . . . . . 237
Chapter 13. Migrating DB2 objects, data, and catalog statistics . . . . . . . . . . . 291
Step 1. Specify the objects to migrate information . . . . . . . . . . . . . . . . . . . . . . 293
Step 2. Generate batch jobs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295
Step 3. Run the batch jobs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298
Step 4. Optional: Transfer the jobs/work statement list and data to the target system . . . . . . . . . . 299
Step 5. Run the batch define, reload, and optional jobs . . . . . . . . . . . . . . . . . . . . 299
Work data sets used by the DB2 Admin Migrate function . . . . . . . . . . . . . . . . . . . 300
Creating naming conventions for work data sets that are created by the DB2 Migrate function . . . . . . 302
Chapter 15. Using the Batch Restart programs: ADBTEP2 and ADBTEPA . . . . . . 339
Introduction to ADBTEP2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340
Parameters passed to ADBTEP2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 340
Using ADBTEP2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343
Dialog support for batch job checkpoint table . . . . . . . . . . . . . . . . . . . . . . . 344
Restarting an ADBTEP2 job. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345
| The ADBTEP2 summary report . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347
| Using ADBTEP2 with LOBs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348
Overview of ADBTEPA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350
Using ADBTEPA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351
Restarting ADBTEPA after a failure . . . . . . . . . . . . . . . . . . . . . . . . . . . 352
ADBOPT parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 352
Pausing ADBTEP2 and ADBTEPA . . . . . . . . . . . . . . . . . . . . . . . . . . . 353
Contents vii
System Parameters — Archive Log panel . . . . . . . . . . . . . . . . . . . . . . . . 398
Unrecognized Macro Parameters panel . . . . . . . . . . . . . . . . . . . . . . . . . 398
Displaying buffer pool status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399
Altering buffer pools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399
Displaying buffer pool hit ratios . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401
Displaying archive log information . . . . . . . . . . . . . . . . . . . . . . . . . . . 402
Setting archive log parameters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403
Archiving the current DB2 log. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404
Displaying log information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 404
Changing DB2 system checkpoint frequency . . . . . . . . . . . . . . . . . . . . . . . . 405
Displaying or updating communications settings . . . . . . . . . . . . . . . . . . . . . . 405
Displaying or updating the LOCATIONS table . . . . . . . . . . . . . . . . . . . . . . 406
Displaying or updating the LUNAMES table . . . . . . . . . . . . . . . . . . . . . . . 407
Displaying or updating the IPNAMES table . . . . . . . . . . . . . . . . . . . . . . . 408
Displaying or updating the LUMODES table . . . . . . . . . . . . . . . . . . . . . . . 408
Displaying or updating the MODESELECT table . . . . . . . . . . . . . . . . . . . . . 409
Displaying or updating the USERNAMES table . . . . . . . . . . . . . . . . . . . . . . 409
Displaying or updating the LULIST table . . . . . . . . . . . . . . . . . . . . . . . . 410
Displaying or cancelling distributed threads . . . . . . . . . . . . . . . . . . . . . . . . 410
Displaying location details and threads . . . . . . . . . . . . . . . . . . . . . . . . . . 412
Starting DDF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413
Stopping DDF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 413
Managing stored procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414
Displaying or altering stored procedures . . . . . . . . . . . . . . . . . . . . . . . . 414
Creating stored procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 416
| Creating native SQL procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . 417
Displaying stored procedure statistics . . . . . . . . . . . . . . . . . . . . . . . . . 423
Starting all stored procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . . 423
Stopping all stored procedures . . . . . . . . . . . . . . . . . . . . . . . . . . . 423
Creating views of stored procedures. . . . . . . . . . . . . . . . . . . . . . . . . . 424
Displaying views of stored procedures . . . . . . . . . . . . . . . . . . . . . . . . . 424
Managing functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 425
Displaying or altering functions . . . . . . . . . . . . . . . . . . . . . . . . . . . 425
Creating functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427
Displaying function statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . 428
Starting all functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429
Stopping all functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429
Creating views of functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430
Displaying views of functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 430
Backing up and recovering a DB2 subsystem . . . . . . . . . . . . . . . . . . . . . . . . 431
Backing up the DB2 subsystem . . . . . . . . . . . . . . . . . . . . . . . . . . . 431
Specifying a point in time to which to recover . . . . . . . . . . . . . . . . . . . . . . 432
Recovering the DB2 subsystem . . . . . . . . . . . . . . . . . . . . . . . . . . . 433
Contents ix
Chapter 23. Using copies of the DB2 catalog . . . . . . . . . . . . . . . . . . . 533
Adding entries to the catalog copy version table. . . . . . . . . . . . . . . . . . . . . . . 534
Catalog copies at remote sites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 537
Using previously defined multiple copies of the DB2 catalog . . . . . . . . . . . . . . . . . . 537
Notices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 659
Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 660
Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 663
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 665
Contents xi
xii User's Guide and Reference
Tables
1. Significant DB2 Admin concepts and tasks xvi 15. Work data sets for DB2 Admin Redefine 285
2. Overview of steps for tailoring DB2 Admin 30 16. Work data sets for DB2 Admin Migrate 300
3. Libraries to allocate to your TSO LOGON 17. Work data sets for DB2 Admin Migrate with
PROC . . . . . . . . . . . . . . 42 DB2 UNLOAD . . . . . . . . . . . 300
4. Parameters that you can tailor from the 18. Work data sets for DB2 Admin Migrate with
General Customization Parameters panel. . . 44 HPU . . . . . . . . . . . . . . 301
5. Main panels that you can tailor. . . . . . . 61 19. ADBOPT parameters for ADBTEP2 and
6. Controlling the granularity of profiles. . . . 72 ADBTEPA . . . . . . . . . . . . 352
| 7. The keyword values of the request 20. Types of changes . . . . . . . . . . 451
| parameters for each object type . . . . . 179 21. Status of changes . . . . . . . . . . 451
| 8. Replacement values for symbolic variables for 22. The DB2 catalog table ignore fields . . . . 483
| templates for PUNCHDDN . . . . . . . 234 23. Generic ignore specifications . . . . . . 485
| 9. Sequence of applying multiple jobs from a 24. Translation mask names . . . . . . . . 508
| work statement list for renaming a database . 243 | 25. Mask application details . . . . . . . . 512
10. Work data sets for DB2 Admin Rename 26. DB2 Admin primary commands . . . . . 612
Database . . . . . . . . . . . . . 244 27. DB2 Admin special line commands . . . . 617
11. Work data sets for DB2 Admin Redefine 249 28. DB2 Admin utility line command codes 623
12. Work data sets for DB2 Admin Alter Restore 271 29. DB2 Admin data type conversions, part 1 627
13. Work data sets for DB2 Admin Alter ALC 273 | 30. DB2 Admin data type conversions, part 2 628
14. Matrix for data type and length changes that
do not require data conversion. . . . . . 276
Users of this information should understand basic DB2 concepts and facilities.
The technical changes for this edition are summarized in Summary of changes.
Specific changes since the previous edition of this book are indicated by a vertical
bar (|) to the left of a change. Editorial changes that have no technical significance
are not noted.
Always check the DB2 Tools Product publications page for the most current
version of this publication:
http://www.ibm.com/software/data/db2imstools/db2tools-library.html
www.ibm.com/software/data/db2imstools/support.html
This information uses special fonts and labeling conventions for quickly identifying
various types of information:
v Commands are displayed in UPPERCASE.
v Definitions of terminology are displayed using italic font and are introduced
using the label Definition.
v Examples are displayed using monospaced font and are introduced using the
label Example.
Use the following tips to help you improve your message searches:
v You can search for information on codes by entering the code; for example, enter
-327.
v Enter the complete or partial message number. You can use wild cards (* or ?) in
the message number to broaden your search; for example, DFS20??I.
Using LookAt
LookAt is an online facility that you can use to look up explanations for most of
the IBM messages you encounter, as well as for some system abends and codes.
Using LookAt to find information is faster than a conventional search because in
most cases LookAt goes directly to the message explanation.
You can use LookAt from the following locations to find IBM message
explanations for z/OS elements and features, z/VM®, VSE/ESA, and Clusters for
AIX® and Linux®:
v The Internet. You can access IBM message explanations directly from the LookAt
Web site at http://www.ibm.com/eserver/zseries/zos/bkserv/lookat/.
v Your z/OS TSO/E host system. You can install code on your z/OS or z/OSe
systems to access IBM message explanations, using LookAt from a TSO/E
command line (for example, TSO/E prompt, ISPF, or z/OS UNIX® System
Services running OMVS).
v Your Microsoft® Windows® workstation. You can install code to access IBM
message explanations on the z/OS Collection (SK3T-4269) using LookAt from a
Microsoft Windows command prompt (also known as the DOS command line).
v Your wireless handheld device. You can use the LookAt Mobile Edition with a
handheld device that has wireless access and an Internet browser (for example,
Internet Explorer for Pocket PCs, Blazer, or Eudora for Palm OS, or Opera for
Linux handheld devices). Link to the LookAt Mobile Edition from the LookAt
Web site.
You can obtain code to install LookAt on your host system or Microsoft Windows
workstation from a disk on your z/OS Collection (SK3T-4269) or from the LookAt
Web site (click Download, and select the platform, release, collection, and location
that suit your needs). More information is available in the LOOKAT.ME files
available during the download process.
DB2 Admin uses dynamic SQL to access the DB2 catalog tables and to present the
information in an easy-to-use ISPF interface.
DB2 Admin is one of several IBM tools that can help you manage database
administration and the change management process.
Topics:
v “What does DB2 Admin do?” on page 4
v “Database administration and change management solutions” on page 6
v “DB2 Admin features and benefits” on page 7
v “DB2 Admin documentation and updates” on page 15
v “Accessibility features” on page 16
v “Summary of changes” on page 17
| DB2 Admin simplifies the complex tasks associated with safely managing DB2
| objects and schema throughout the application lifecycle with the least possible
| impact to availability. The key attributes of DB2 Admin are:
| v Allows you to navigate the DB2 catalog quickly and easily
| v Builds and executes dynamic SQL statements without requiring you to know the
| exact SQL syntax
| v Manages and tracks changes made to DB2 object definitions, resolving any
| potential conflicts prior to execution
| v Helps build DB2 commands to execute against databases and tables
| v Builds and executes utility jobs, allowing you to take advantage of LISTDEFs
| and TEMPLATEs for increased productivity
| v Enables you to create, alter, migrate, drop and reverse engineer DB2 objects
| For further details, see the following sections in this topic.
| You will appreciate the easy-to-use comprehensive features of DB2 Admin that
| increase your productivity and the reliability of your DB2 objects:
| Object management
| v Provides in-depth DB2 catalog navigation, which can minimize the time that is
| required to review the catalog. Objects in the catalog are displayed and
| interpreted, and relevant catalog information is presented logically. You can issue
| any DB2 command, including BIND, REBIND, and FREE, against selected plans
| and packages.
| DB2 Admin displays the DB2 catalog quickly and logically:
| – Displays any object in the catalog
| – Displays related DB2 objects through the use of special line commands
| – Interprets catalog information
| – Displays the authorization for objects
| – Displays the static SQL statements from application plans and packages
| – Displays the DDL for existing views
| – Runs on one of multiple copies of the DB2 system catalog
| v Integrated with DB2 utilities to simplify the creation of DB2 utility jobs. JCL can
| be generated for DB2 utilities and can be executed. The use of LISTDEFs and
| TEMPLATEs is also supported.
| v Performs tasks such as alter, create, drop and migrate of DB2 objects
| v Allows reverse engineering of DB2 objects
| v Supports DB2 predictive governing
| v Enables you to alter the definition of a DB2 table
| v Enables you to request the Prompt function, which prompts you before a
| statement is executed
| Security management
| v Displays authorizations that have been granted on any type of DB2 object, and
| enables you to REVOKE these authorizations or GRANT new ones
| v Provides REVOKE impact analysis to prevent inadvertent data loss when you
| revoke authorities
| Performance management
| v Allows complex performance and space queries
| v Contains a built-in EXPLAIN function that allows you to EXPLAIN a query, and
| provides an interpretation of the PLAN_TABLE output into an
| easy-to-understand format
| v Comes with a set of performance health check catalog queries
| v Enables you to perform space-related functions such as resizing page sets, lets
| you move page sets to and from STOGROUP- and VCAT-defined space, and
| helps you estimate space allocations for new table spaces and indexes
| v Enables you to create and manage work statement lists (WSLs) and run them in
| batch
| v Enables you to dynamically manage system parameters
| Change management
| v Allows you to manage and track changes to DB2 objects
| v Allows groups of users to collaborate to build changes by managing information
| through a series of DB2 tables
| v Provides a convenient audit trail that can be used to determine the status of
| objects that are being changed and where those changes have been deployed
| v Allows you to recover changes that have been made and restore database objects
| to their previous state
| System management
| v Allows you to display and cancel threads; display and alter buffer pools; display,
| start, and stop DB2 traces; and set and display the logs
| v Performs various system administration functions, such as updating RLIMITs
| and managing DDF tables
| v Provides a convenient way to administer RLF and DDF tables
| v Manages stored procedure operations, such as creating, displaying or altering
| stored procedures, issuing the DB2 START and STOP STORED PROCEDURE
| command, and showing statistics for stored procedures that are accessed by DB2
| applications
| v Displays current dynamic DSNZPARMs change parameters, generates new
| DSNZPARM modules with changes, and activates those changes in DB2
| Application management
| v Builds and executes dynamic SQL statements without requiring you to know the
| exact SQL syntax
| v Runs most DB2 utilities
| v Enables you to extend existing DB2 Admin applications or to rapidly develop
| new applications
| v Allows you to work with a copy of the DB2 catalog to avoid contention and
| other performance problems on the actual catalog
| v Accesses a remote DB2 catalog where a DDF connection exists between systems.
| This feature enables you to centrally manage all of your DB2 subsystems with a
| single DB2 Admin session.
| v Allows you to execute any dynamic SQL statement through DB2 Admin, or to
| invoke SPUFI
| In managing critical database assets and the change management process, DBAs
| are faced with many challenges, such as:
| v Being able to quickly and easily navigate the DB2 catalog
| v Ensuring that all of the necessary steps are completed when making a change
| v Managing and tracking the changes to the definitions of database objects
| v Propagating changes to other database environments
| v Keeping DB2 software versions current
| v Managing a corrupt database
| Many DB2 Tools provide database management features that are not available in
| DB2 itself or that provide enhancements to capabilities that are built into DB2.
| For example, DB2 Admin allows you to navigate the DB2 catalog quickly and
| easily.
| DB2 Admin provides integration with other DB2 Tools to create additional
| functionality with product-specific line commands for editing tables, analyzing the
| cost of SQL statements, and analyzing potential access path changes. DB2 Admin
| offers a central, ISPF-based access point for other DB2 Tools, such as DB2 Table
| Editor, DB2 SQL Performance Analyzer, and DB2 High Performance Unload.
| DB2 Admin is only one of several DB2 Tools products that provide enhancements
| to the process of database administration and change management for your
| databases.
| Other DB2 tools products that can assist with database administration and change
| management include:
| v DB2 Object Comparison Tool
| v DB2 Storage Management Utility
| v Optim Test Data Management
| v DB2 Table Editor
| v DB2 SQL Performance Analyzer
| v DB2 High Performance Unload
DB2 Admin provides extensive support for displaying the DB2 catalog. The scope
of information that can be displayed is described in this information.
Display any object in the DB2 catalog
You can retrieve catalog data for any DB2 data object. You can specify the
data that is retrieved (for example, you might request that data be
retrieved for all databases that are owned by THOMAS and that have the
prefix D402).
DB2 Admin retrieves catalog data using predefined SELECT statements for
the more commonly used queries. The rows retrieved from the catalog are
displayed using the ISPF table-display service. The display panel can be
the DB2 Admin default panel, from which you can issue various DB2
Admin line commands, or a panel tailored by you for the result of a
particular SQL SELECT. In the latter case, you can use line commands to
issue new SQL calls using information from the columns of rows that have
been returned.
Display related DB2 objects using line commands
You can use DB2 Admin line commands to navigate the catalog. For
example, from a display panel that shows databases, you can use a line
command to show all table spaces in one of the databases. Then, from the
table spaces panel, you could issue a line command to show authorizations
for a table space or show the status of image copies for the table space.
Display catalog information
You can request detailed information about any object in the DB2 catalog.
A request for details about an application plan, for example, returns
information such as the plan's owner, latest bind time, and number of
bytes in the base section.
Show the authorization for DB2 objects
You can retrieve information about the authorizations for all DB2 objects.
From an authorization display panel, you can then grant and revoke
privileges.
Display the static SQL from application plans and packages
You can display the static SQL statements in a plan or a package, which is
useful if you do not have access to a program's source code.
Display the DDL for existing views
You can display the SQL source that created a view, which is useful if you
do not have access to the CREATE VIEW SQL (DDL) statement.
Run with multiple copies of the DB2 catalog
This function allows you to use the DB2 system catalog, one of the many
copies of it, or the catalog of a remote site. You might choose to use a
different copy of the catalog for each weekday, thus associating a backup
with each weekday. Or this feature can allow the system administrator to
You can issue any dynamic SQL statement from your screen or from a data set.
You can build and execute an SQL SELECT statement interactively by using line
commands.
In addition, by entering required parameters from a panel, you can execute the
following SQL statements: GRANT, REVOKE, CREATE, DROP, LABEL ON, and
COMMENT ON. This feature allows you to execute the statements without
knowing the exact SQL syntax; DB2 Admin provides guidance for the required
SQL parameters.
| Use the Change Management function to manage and track the changes that you
| make to the definitions of your DB2 objects. You can use the Change Management
| function to complete all of the steps that are typically involved with changing
| database objects:
| 1. Defining your changes.
| 2. Resolving any conflicts by applying any pending changes for the objects as
| virtual changes.
| 3. Registering the changes.
| 4. Analyzing the changes to generate a work statement list that applies the
| changes.
| 5. Running the changes in the correct order.
| Change Management also makes it easy to back out completed changes. Making
| and managing changes with Change Management provides a convenient audit
| trail.
You can issue any DB2 command against any database or table space that you
have selected using DB2 Admin. For example, you can issue the DISPLAY, START,
and STOP commands against a database.
DB2 commands are passed to the instrumentation facility interface (IFI), and the
result is displayed in ISPF browse.
You can generate the JCL for DB2 utilities and then run them in batch, or you can
include the utility statements in a work statement list to be run at another time or
on another subsystem. This function applies to the utilities for storage groups,
table spaces, tables, and indexes. For example, you can, generate JCL to run the
COPY, REORG, and RUNSTATS utilities for a table space.
The generated JCL consists of a JOB statement, EXEC statement, and all required
DD statements. When the JCL is generated, DB2 Admin invokes ISPF edit, which
lets you change the JCL, submit it, or copy it to another data set.
You can run performance and space utilization queries against a database. The
data that is returned can help you to determine whether you need to:
v Run the RUNSTATS or STOSPACE utilities
v Reorganize or redesign parts of your database or indexes
v Change the locking rule for tables
v Drop an index
v Move tables to separate table spaces
v Extend the primary allocation for a table space or index
v Reduce the size of a table space
You can change the current DB2 SQL ID by entering a new one or by selecting one
from a list of secondary SQL IDs. DB2 Admin displays a list of SQL IDs that you
are allowed to use. The list is created either by simulating or invoking the
authorization exit in your system.
The system administration functions that you can perform using DB2 Admin
include:
v Displaying threads
v Displaying and terminating utilities
v Displaying and managing traces
v Displaying and updating RLIMITs, including the predictive governing limits in
DB2
v Displaying and altering buffer pools
v Displaying and setting archive log parameters and archiving the log
v Displaying DB2 system parameters and updating dynamic parameters
v For DDF (distributed data facility):
– Starting and stopping DDF
– Displaying and updating the communications database (CDB)
– Displaying and canceling distributed threads
Typical uses for the DB2 Admin reverse engineering function include:
v Extracting the DDL for an object before changes are made, so that the changes
are applied to the current definition and are available for fallback purposes.
v Moving DB2 objects to another DB2 subsystem. By using the reverse engineering
function (together with the table unload and load functions), objects can be
moved after a few manual modifications to the generated SQL and batch jobs.
| Certain functions in DB2 Admin and DB2 Object Comparison Tool support or
| produce input and output statements that are used by DB2 or by these two
| products. IBM might provide an alternate statement or alternate form for clauses
| on statements, and might identify one as the preferred syntax, while still
| supporting the alternate form.
| DB2 Admin and DB2 Object Comparison Tool might use preferred or alternate
| forms of syntax. If the statement produced is accepted by the products or by DB2,
| the statement is considered valid. Where it is necessary to produce an accepted
| statement, the products convert to newer syntax. However, the products might
| retain older syntax even if DB2 considers the newer syntax the preferred syntax.
| This might be the case even if no possible use of the older syntax is needed. The
| use of older syntax might persist until IBM deems it is no longer is supported in
| any product form.
You can use DB2 Admin to display, insert, update, or delete predictive governing
rows in the resource limit tables. Furthermore, if DB2 Admin receives a predictive
governing warning (SQLCODE +495) when running a dynamic SQL statement,
DB2 Admin asks you whether the SQL statement should be executed or cancelled.
If the predictive governing estimates that executing a dynamic SQL statement that
was issued from DB2 Admin will exceed the error limit (SQLCODE -495), DB2
Admin displays an error message, and the SQL statement is not executed.
You can use predictive governing limits to prevent users from running wild queries
on catalog tables or any other tables being displayed using DB2 Admin. By using
predictive governing limits for the DB2 Admin package, this type of query can be
inhibited either by setting up a predictive governing warning or an error limit in
the resource limit table.
Related Reading: For more information on predictive governing, refer to the DB2
UDB for z/OS Administration Guide.
You can alter the definition of a DB2 table. Permissible changes include:
v Changing the database, table space, owner, and the name of the table
v Modifying the definitions of table columns
v Changing the sequence of the columns in the table
v Inserting and dropping columns
| You can operate DB2 Admin in DB2 Version 8 and in DB2 Version 9 in any of the
| following DB2 Version 9 modes:
| New-function mode
| In this mode, new DB2 Version 9 functions are supported, including
| enhanced XML support.
| Enabling-new-function mode
| In this mode, DB2 Admin runs as if DB2 Version 8 is used.
| Compatibility mode
| In this mode, DB2 Admin runs as if DB2 Version 8 is used.
You can copy DB2 data to another DB2 system. This is a useful function if you
want to create a separate DB2 test system or if you want to move a test system
into production. You can also use this function to consolidate two separate
database systems into one.
You can extend DB2 Admin to invoke other ISPF applications that you use for DB2
administration and application development. Some applications that you might
want to invoke from DB2 Admin include:
v Security tools
v Vendor DB2 utilities
v Storage management tools
DB2 Admin also enables you to quickly build new ISPF applications for displaying
and maintaining DB2 data. Some of the types of data for which you might build
such applications include:
v Application definition data
v DB2 performance data
v Extra security data
A sample application is included with the product to illustrate how you might use
DB2 Admin to create new applications.
DB2 Admin enables you to perform space-related functions such as resizing page
sets, moving page sets to and from STOGROUP- and VCAT-defined space, and
estimating space allocations for new table spaces and indexes.
DB2 Admin enables you to create and run work statement lists that include sets of
operations. You can execute the entire set, rerun sets, or capture a set of operations
that you create on one system for use on another system.
You can invoke installed IBM DB2 tools that have an ISPF interface—directly from
DB2 Admin. The DB2 Admin Launchpad provides a convenient way of creating a
centralized ISPF table with the names of your tools. By subsequently selecting an
entry in this table, you can easily start up one of the tools.
Performance
Security
DB2 Admin does not expose the security of the DB2 system. All DB2 access is
controlled by the existing security provisions of the DB2 system. You can
optionally configure DB2 Admin to allow users to execute DDL generated to
re-create views dropped as a result of dropping other objects. The user can execute
this DDL even if they do not have the direct authority. This is done by using
auth-switching and has its own safeguards to ensure the DDL is not changed from
that generated by DB2 Admin. A user must have access to a RACF® (or equivalent)
profile to use auth-switching.
DB2 Admin lets you quickly navigate the DB2 catalog and display tables, table
columns, and indexes. If you are authorized by DB2, you can also display the
content of tables either by doing a simple list of the table or by building SQL
statements and executing them against a table.
You can use the DB2 Admin functions to explore unknown databases rapidly or
get a quick overview of a database. None of these uses require that you remember
the exact syntax of DB2 commands or SQL statements.
You can use DB2 Admin to identify and fix problems with your databases. With its
ability to navigate the catalog and use DB2 commands on objects, DB2 Admin can
help you discover, analyze, and fix database problems in a more user-friendly
fashion than is available with native DB2.
You can use DB2 Admin to rapidly develop small applications. As you become
familiar with the tool, you might find the time that it takes to develop small DB2
Admin dialogs is greatly reduced.
Examples:
v If you have a tool at your installation that manipulates DB2 tables,
you can develop your own line command to access it from the DB2
Admin panel that displays tables (implementing the line command as
an SMP usermod). Then you can invoke the table tool as a natural
follow-on to using DB2 Admin.
v Perhaps you'd like to generate more DECLARE statements for a PL/I
table than is possible with the DB2 DCLGEN tool. You can write an
application to invoke DCLGEN directly from the DB2 Admin panel
that displays tables. You can also modify the output you receive from
DCLGEN to, for example, meet your installation's standards and
requirements.
v You might want to build prototypes of SQL SELECT statements. You
can build the statements, test them and, when you are satisfied with
them, copy the statements to a data set to include in your application
program.
v DB2 Admin can help you maintain any DB2 tables that you use for
installation standards and special requirements. You can use DB2
Admin to develop a small application that describes all of the
applications that you have in the system. Or you can use it to display
existing tables that, for example, contain information about DB2 plan
performance or batch job execution statistics.
You can use the table utilities that DB2 Admin generates to copy tables from one
DB2 system to another. You will need to make a few modifications to the
generated JCL.
You can invoke installed IBM DB2 tools that have an ISPF interface directly from
DB2 Admin. DB2 Admin guides you through the process of creating a central table
with the names of your DB2 utilities. After this table is created, you can simply
select an entry in it to start up one of the DB2 tools.
The DB2 and IMS Tools Product publications Web page provides current product
documentation that you can view, print, and download. To locate publications with
the most up-to-date information, refer to the following Web page:
http://www.ibm.com/software/data/db2imstools/db2tools-library.html
You can also access documentation for many DB2 for z/OS and IMS Tools from
the Information Management Software for z/OS Solutions Information Center:
http://publib.boulder.ibm.com/infocenter/imzic
Documentation for many DB2 Tools that run on Linux, UNIX, and Windows
systems can be found in the IBM DB2 Tools for Linux, UNIX, and Windows
Information Center:
http://publib.boulder.ibm.com/infocenter/mptoolic/v1r0/index.jsp
IBM Redbooks® publications that cover DB2 and IMS Tools are available from the
following Web page:
http://www.ibm.com/software/data/db2imstools/support.html
The Data Management Tools Solutions Web site shows how IBM solutions can help
IT organizations maximize their investment in DB2 and IMS databases while
staying ahead of today's top data management challenges:
http://www.ibm.com/software/data/db2imstools/solutions/index.html
To automatically receive a weekly email that notifies you when new technote
documents are released, when existing product documentation is updated, and
when new product documentation is available, you can register with the IBM My
Support service. You can customize the service so that you receive information
about only those IBM products that you specify.
These guides describe how to use ISPF, including the use of keyboard shortcuts or
function keys (PF keys), include the default settings for the PF keys, and explain
how to modify their functions.
New and changed information is indicated by a vertical bar (|) to the left of a
change. Editorial changes that have no technical significance are not noted.
Information has been added or revised for new enhancements and maintenance.
New and changed information is marked by a vertical bar | to the left of the
change. The major additions and changes include:
v A new Prompt to run SQL option is available on panel ADB2GEN. See
“Generating SQL to re-create a DB2 object” on page 172.
v REXX user exits are enabled for COMPRESS and SEGSIZE overwrites. See
“Mask definition syntax” on page 505 and “Specifying a REXX user exit for the
overwrite value” on page 511.
v An option has been added to the Manage Versions panel (ADB2C4) to import a
version file. When this option is selected, you can use the Import Version File
panel (ADB2C44) to import a version file. See “Importing a version file” on page
497.
v New GRANT options for authorizations and roles are available on panel
ADB2GEN. See “Generating SQL to re-create a DB2 object” on page 172.
v A new restriction has been added to using HPU. See “Invoking HPU within a
work statement list” on page 332
v A new topic has been added to Chapter 8. Building and running SQL
statements. See “Revoking system authority from an SQLID” on page 168
v Task help has been added on how to find the value for the Unicode translation
technique field on the General Customization Parameters panel (ADB2CUS1).
See “General Customization Parameters panel” on page 47, Unicode Translation
Technique (no tag).
v DB2 Admin and DB2 Object Comparison Tool might use preferred or alternate
forms of syntax. See “DB2 Admin features” on page 7.
v An example was added to the description of the DB2 load library (:bl2llib.) used
in migration customization. See “Step 8(b). Supplying information about the
customization panels” on page 47
v The DB2 Admin ALC, RENDB, RDEF, and MIG functions and DB2 Object
Comparison Tool support changes to implicit LOB and XML table spaces. See
“Implicit LOB and XML table support” on page 289.
Information has been added or revised for new enhancements and maintenance.
New and changed information is marked by a vertical bar | to the left of the
change. The major additions and changes include:
v Support has been added for cloned table. ADD CLONE and DROP CLONE
options are available on panel ADB21TA. See “Altering a table with the AL line
command” on page 254. The template type CLONE has been added to panel
ADB25TU3, see “TEMPLATE usage” on page 234.
v A new job parameter, Per Process, has been added to panel ADB2W1R. See
“Renaming a database” on page 241
v A new primary command, SCHEMA, can be used to change the CURRENT
SCHEMA. See Table 26 on page 612.
Information has been added or revised for new enhancements and maintenance.
New and changed information is marked by a vertical bar | to the left of the
change. The major additions and changes include:
v A new ADBTEP2 summary report of all activity at the end of or during large or
complex work statement list (WLS) run is provided. See “The ADBTEP2
summary report” on page 347.
v A new SSID primary command can be used to switch to another DB2 SSID. See
Table 26 on page 612. Also see “Step 6. Prepare ADBL CLIST” on page 36 (for
the new parameter QTAB),Table 4 on page 44, and “General Customization
Parameters panel” on page 47.
v New utility options have been added. See Figure 224 on page 356, Figure 228 on
page 364, and Figure 230 on page 366.
v There is a new option, DEFER YES, on the ADB2C11A panel. See Figure 337 on
page 464
v The procedure to create additional DB2 catalog indexes is modified. See“Step 18.
Create additional DB2 catalog indexes” on page 69.
v The requirement to put SADBLINK modules into a library that is in the site link
list has been removed. See “Step 11. Tailor the DB2 Admin Launchpad” on page
66 and “Step 12. Update the APF Authorization table” on page 67.
v The procedure to prepare to run utilities online has been changed to prepare to
run a work statement online. See “Step 13. Prepare to run a work statement
online” on page 68.
v An ASUSER parameter has been added to the ADBL CLIST and the ADB CLIST
to allow establishing a trusted context. See “Step 6. Prepare ADBL CLIST” on
page 36 and “Changing DB2 Admin defaults” on page 123
v Performance panels have been improved. The database name filter has been
moved to the top of the ADB23 panel. See Chapter 10, “Running DB2 Admin
performance queries,” on page 187. Also, the Select line command is now
available on panels ADB2314 and ADB2314X. See “Option 14. Table Space
Maintenance Recommendations panel” on page 209 and “Option 14X. Index
Space Maintenance Recommendations panel” on page 211.
v Issuing the REN line command on panel ADB21X displays a new panel where a
new index name can be specified. See “Renaming an index” on page 281.
v There is a new field, Sub Type, on panel ADB2M1S. to display additional
information about the page sets types. See “Displaying page set statistics” on
page 437.
v Enhancements have been added for Trusted Context and Roles.
– The GEN and DDL commands have been added to the Trusted Contexts
panel. See “The trusted contexts panel” on page 548.
– The object types of Trusted Context and Role have been added to table 7 in
“Generating SQL using wildcard characters” on page 179.
Information has been added or revised for new enhancements and maintenance.
New and changed information is marked by a vertical bar | to the left of the
change. The major additions and changes include:
v A new scenario for creating native SQL procedures was added. See “Creating
native SQL procedures” on page 417.
v Fields were added to the generic ignore field PARTITIONING. See “Generic
ignore fields” on page 485.
v A new trace filter is now available. See “Displaying or managing traces” on page
384.
v Support for new plan management features that are retrofitted into DB2 Version
9. See “Option K. Packages” on page 567 and “Option P. Plans” on page 582.
v New panels ADB2Z2RM and ADB2Z2RI have been added to display, insert, and
update column values of the DSNRMTxx table. See “Displaying or updating the
owner of Resource Limit (RLIMIT) Tables” on page 386.
v Panels ADB26CS, ADB21SAR (Create Table Space), ADB21SA, ADB21SAR
(Redefine Table Space), ADB26CX, ADB21XAR, and ADB21XA have been revised
to support new options for CREATE TABLESPACE, ALTER TABLESPACE,
CREATE INDEX, and ALTER INDEX. See “Creating a table space” on page
155,“Altering a table space” on page 245,“Redefining a table space” on page
247,“Creating a plan table” on page 375, and “Redefining an index” on page 282.
v Panels ADB223 and ADB223T revised to support new data types.
v New data type conversions are supported. See Table 30 on page 628.
v Two restrictions were added to columns in the Alter Table panel. See
“Redefining a table with the ALC line command” on page 257.
Information has been added or revised for new enhancements and maintenance.
New and changed information is marked by a vertical bar | to the left of the
change. The major additions and changes include:
v Enhancement to Catalog Copy functionality to support DB2 V9 catalog tables.
See “Adding entries to the catalog copy version table” on page 534
v New panels to create or alter trusted contexts and roles are accessible from panel
ADB26 and by means of a new CRE line command. See “The trusted contexts
panel” on page 548.
v New options are available on panel ADB26 to create, drop, or comment on
trusted contexts and roles. See “Issuing CREATE, DROP, LABEL ON, and
COMMENT ON statements” on page 152.
v New options are available on panels for CREATE TABLE and ALTER TABLE.
See “Creating a table” on page 156 and “Altering a table with the AL line
command” on page 254
v New options are available on panel ADB25 for UL - Upgrade LISTDEF control
table, and UT - Upgrade TEMPLATE control table. See “Upgrading the LISTDEF
control tables” on page 218 and “Upgrading the TEMPLATE control tables” on
page 227.
Information has been added or revised for new enhancements and maintenance.
New and changed information is marked by a vertical bar | to the left of the
change. The major additions and changes include:
v CREATE and ALTER admin stored procedure functions were enhanced. A third
type of stored procedure, native SQL procedure, has been added, which is
processed in the same dialogues as the other types of stored procedures,
External and SQL. See “Creating stored procedures” on page 416.
v Since native SQL procedures will be a commonly used storage procedure type,
panel ADB21O has been modified so that it displays relevant information for
native SQL procedures, such as version and origin. See “Displaying or altering
stored procedures” on page 414.
v The following native SQL procedure line commands have been added to panel
ADB21O:
– ADDV – to support ALTER PROCEDURE ADD VERSION
– REPV – to support ALTER PROCEDURE REPLACE VERSION
– BIND – to support the BIND DEPLOY command
v A VERSION attribute is provided for an native SQL procedure. The VERSION
attribute indicates which native SQL procedure version or versions to extract.
See “Generating SQL using wildcard characters” on page 179
Information has been added or revised for new enhancements and maintenance.
New and changed information is marked by a vertical bar | to the left of the
change. The major additions and changes include:
v Chapter 1, Chapter 1, “DB2 Admin overview,” on page 3 has been updated, and
a new section, “Database administration and change management solutions” on
page 6 added.
v XML support has been enhanced. A utility template is available to unload data
from an XML column. For more information, see “Using the utility template to
unload data from an XML column” on page 237 and “Running WSL with the
utility template for unloading XML data” on page 330.
v New data types were added to Create and Alter Table administration functions.
See “Altering a table with the AL line command” on page 254.
v There are new Schema mask types of TBSCHEMA and IXSCHEMA, and the
behavior of existing masks OWNER, TBOWNER, and IXOWNER has changed.
See “Mask definition syntax” on page 505.
v Register can insert SET CURRENT SCHEMA statements if they are not provided
by the user. See “Registering a change” on page 457.
Information has been added or revised for new enhancements and maintenance.
New and changed information is marked by a vertical bar | to the left of the
change. The major additions and changes include:
v You can create a change by importing SQL statements from a data set. When
you import the statements, a new change is created and registered. You can now
import multiple delta changes as a group in one change. See “Importing
changes” on page 473.
Information has been added or revised for new enhancements and maintenance.
New and changed information is marked by a vertical bar | to the left of the
change. The major additions and changes include:
v Large object (LOB) support has been enhanced. A utility template is available to
unload data from a LOB column. If you use the utility template for LOBs, the
functions ALC, RDEF, RENAME DB, MIG, and Unload Utility will add an
ADMIN LOBTEMPLATE statement to the work statement list (WSL) to indicate
the existence of a LOB column or columns in the table or tablespace that is
involved in the next UNLOAD statement. If the UNLOAD statement is preceded
with an ADMIN LOBTEMPLATE statement, the UNLOAD statement is modified
by ADBTEP2 to enable the unloading of LOB columns before it is passed to DB2
or High Performance Unload (HPU). Unload LOB support for MIG is allowed
for both WSL and non-WSL; for other functions unload LOB support is only for
WSL. Previous restrictions on LOBs have been removed for ALC, MIG, and
Unload Utility. For more information, see “Using the utility template to unload
data from LOBs” on page 236, “Running WSL with the utility template for
LOBs” on page 329, and “Using ADBTEP2 with LOBs” on page 348.
v XML support has been enhanced. Panels ADB21T* support the implicit tables
that are created for XML columns (TYPE=X) and all other new or modified
catalog columns for SYSTABLES. A new XML line command on panel ADB21T
displays the XML table – similar to what the AUX command does for a table
with LOBs. A new line command XMLR on panel ADB21T is analogous to the
AUXR command for LOBs. It shows information on the XML column(s) of an
XML table on panel ADB21TXR and is issued against either the base table or the
XML table. For more information, see “Using utility options for XML and LOBs”
on page 362, “Option T. Tables, Views, and Aliases” on page 594, and “Option X.
Indexes” on page 600.
v Catalog navigation has been enhanced. See “Option X. Indexes” on page 600.
v When you run a work statement list (WSL), a Load Summary Report is
automatically generated when the WSL contains LOAD utilities. The report
helps you ensure that no data was unexpectedly lost by indicated whether any
records were discard. For more information, see “Running a WSL” on page 320
and “Load summary report” on page 321.
v When a work statement list (WSL) is run and does not complete successfully, a
user who is different from the user who originally ran the WSL can now restart
the WSL. This enhancement also applies to running changes through the Change
Management function. Any user can use the ER line command to edit and
resubmit a change in RUNNING status. The change does not have to be edited
and resubmitted by the user who originally ran a change that did not complete
successfully. For more information, see “Restarting a WSL that was run by
another user” on page 322 and “Running a change” on page 465.
v Masking was enhanced to support overwriting the values for the DEFER,
DEFINE, DSSIZE, PRIQTY, and SECQTY attributes for table spaces and indexes.
Information has been added or revised for new enhancements and maintenance.
New and changed information is marked by a vertical bar (|) to the left of the
change. The major additions and changes include:
v A new field, Generate GRANT statements, has been added to the Migrate
Parameters panel (ADB28M) to allow you to control whether GRANT statements
are generated in the DDL when you migrate objects. Previously, the GRANT
statements were always generated. For more information, see “Step 2. Generate
batch jobs” on page 295.
v A new field, BindError, has been added to the Batch Job Utilities Parameter
panel (ADB2UPA) to let you specify how the Batch Restart program (ADBTEP2)
will handle BIND errors. The value of the field is passed to the ADBTEP2
program by using the new BINDERROR parameter. For more information, see
“Parameters passed to ADBTEP2” on page 340.
v The ability to use authorization switching for DCL statements has been added.
When the job submitter has ALTER authority to the RACF profile that protects
the resource, all DDL and DCL statements can be executed by using the
specified authorization switching ID. For more information, see “Step 22. Tailor
DB2 Admin Authorization Switching” on page 71 and “Using authorization
switching” on page 287.
v The ER command has been enhanced to improve restarting a change that did
not run successfully and is in RUNNING state. When the ER command places
the JCL to run the job in edit mode, a RESTART parameter is now automatically
added to the job card so that the job will restart at the appropriate step when
you resubmit it. For more information, see “Running a change” on page 465.
v For ignores, ignore fields can now be specified for DB2 catalog tables
SYSSTOGROUP and SYSVOLUMES. Also, the generic ignore field specification
for STORAGE now includes SYSVOLUMES.VOLID. For more information, see
“Overview of ignores” on page 482 and “Creating an ignore” on page 487.
v A new DB2 Admin parameter, Verify CCSID, has been added to control whether
DB2 Admin checks the coded character set identifier (CCSID) of the TSO
terminal on which you start a DB2 Admin session to determine if it matches the
CCSID of the plan under which DB2 Admin is running. The default behavior is
to check the CCSIDs. You can use the new field, Verify CCSID, on the Change
DB2 Admin Defaults panel (ADB2P2) to change the setting of the parameter so
that the CCSIDs are not verified. For more information, see “Changing DB2
Admin defaults” on page 123.
Information was added or revised for new enhancements and maintenance. These
additions are marked using the revision symbol | (a vertical bar). The major
changes include:
v To make it easier to rename a table, the REN line command was added to the
Tables, Views, and Aliases panel (ADB21T), and the Rename Table panel
(ADB21TR) has been added to carry out the dialog to rename a table. In
addition, DB2 Admin has been enhanced to use the SQL RENAME TABLE
statement whenever possible to rename a table instead of dropping and
Information was added to the book for Version 7 Release 2 enhancements and for
maintenance. These additions are marked using the revision symbol | (a vertical
bar). The major enhancement for this release is support for Change Management.
Chapter 20, “Managing changes to DB2 objects,” on page 445 has been added to
describe how to use this new feature. Other changes include:
v Chapter 9, “Reconstructing SQL (DB2 Admin Reverse Engineering),” on page 171
has been updated to describe how to use wildcard characters to generically
specify which objects should be extracted when you run GEN in batch mode.
v Chapter 16, “Running DB2 utilities,” on page 355 has been updated to show that
the CHECK LOB utility for SHRLEVEL REFERENCE and SHRLEVEL CHANGE
has been added to the Tables Space Utilities panel (ADB2US) and is available if
you are using DB2 z/OS Version 8 or higher.
v Chapter 13, “Migrating DB2 objects, data, and catalog statistics,” on page 291 has
been updated with the changes to the Migrate Table Spaces panel (ADB28S). If
the migrate parameter is set to NO, the space information will not be shown
automatically, and you can use the SPACE line command to display the
information if needed. “Changing migrate settings” on page 129 describes how
to set the migrate parameter.
v The Create Table panel (ADB26CTF), the ALC Alter Table panel (ADB27C), and
the AL Alter Table panel (ADB21TAB) panel have been modified to provide
support for defining columns with the default Unicode string in tables that have
a Unicode encoding scheme.
v Over twenty panels that have been changed to use a scrollable title field when
the title is longer than the display space.
The following topics assume that you have completed the installation instructions
found in the Program Directory for IBM DB2 Administration Tool for z/OS (GI10-8684).
For every DB2 subsystem on which you want to use DB2 Admin, several tailoring
steps must be completed. Before beginning this tailoring process, gather the names
of all DB2 subsystems on which you want to run DB2 Admin.
| It is recommended that you never modify the SMPE target libraries or run jobs
| from the target libraries. Normally you create run-time libraries based on these
| target libraries. There is also a mechanism in ADBL CLIST to allow you to
| integrate their modifications into a set of separate user libraries that are
| concatenated to the run-time libraries. This way you never lose your modifications.
| Examine these members in your user libraries against the new run-time libraries
| and see if you need to redo your modifications. You can do this manually by
| looking for differences, or by installing a USERMOD so that SMPE tracks your
| changes and notifies you. Using USERMOD is best, then you can examine the new
| member and integrate the new lines of code into your customized version.
Topics:
v “Prerequisites” on page 29
v “Tailoring summary” on page 29
v “Step 1. Create the checkpoint table” on page 31
v “Step 2. Create a segmented table space in a TEMP database” on page
32
| v “Step 3. Set up to use Change Management” on page 33
v “Step 4. Binding application packages and plans” on page 34
v “Step 5. Copy fixed-block libraries to variable-block libraries” on page
36
v “Step 6. Prepare ADBL CLIST” on page 36
v “Step 7. Verify activation of limited functionality” on page 42
v “Step 8. Customize the ISPF environment” on page 44
v “Step 9. Tailor the Main Menu and DB2 Selection Menu” on page 60
v “Step 10. Customize the ADB2UCUS” on page 64
v “Step 11. Tailor the DB2 Admin Launchpad” on page 66
v “Step 12. Update the APF Authorization table” on page 67
| v “Step 13. Prepare to run a work statement online” on page 68
v “Step 14. Create a catalog copy version table” on page 68
v “Step 15. Create views for your own objects in the catalog” on page 69
v “Step 16. Grant SELECT access on catalog tables” on page 69
v “Step 17. Define Reverse Engineering stored procedure for CC/390” on
page 69
v “Step 18. Create additional DB2 catalog indexes” on page 69
v “Step 19. Optimize DSNWZP and DSNZPARM settings” on page 70
v “Step 20. Run the RUNSTATS utility” on page 70
v “Step 21. Define your own line commands” on page 70
v “Step 22. Tailor DB2 Admin Authorization Switching” on page 71
v “Step 23. Verify installation of additional functionality” on page 73
Hardware requirements
DB2 Admin requires the same hardware configuration that is required for DB2
Universal Database™ for OS/390® and z/OS Version 7 Release 1 (5675-DB2) or
later.
Software requirements
DB2 Admin requires the following software (or later versions and releases):
v The following operating systems:
| – z/OS Version 1 Release 6 (5694-A01)
– IBM SMP/E for z/OS and OS/390 Version 3 Release 2 (5655-G44) (for
installation only)
v One of the following versions of DB2:
– DB2 for z/OS and OS/390 Version 7 Release 1 (5675-DB2)
– DB2 for z/OS Version 8 Release 1 (5625-DB2)
| – DB2 Version 9.1 for z/OS (5635-DB2)
| v DB2 Object Comparison Tool Version 7.2 if you plan to use the Change
| Management function.
| If you plan to install DB2 Object Comparison Tool Version 7.2 with DB2 Admin
| Version 7.2, install DB2 Object Comparison Tool Version 7.2 in the same SMP/E
| zones as that for DB2 Admin Version 7.2. (DB2 Object Comparison Tool Version 7.2
| requires DB2 Admin Version 7.2.)
| Tip: Some of the functions in DB2 Admin, such as generating SQL statements to
| reverse engineer DB2 catalog objects, can be run in either the TSO foreground
| or batch. Running in the foreground might require a larger TSO region size. If
| storage allocation fails when you run in the foreground causing an abend
| 4038, increase your TSO region size. To increase the region size, change the
| value of the Size parameter during TSO log-on.
Tailoring summary
After you install DB2 Admin, you must tailor DB2 Admin to your system.
DB2 Admin provides the following items to help you tailor your DB2 Admin
environment:
v Sample batch jobs
v The customization ISPF application (ADB2CUST EXEC)
v SMP/E usermods
The following table summarizes each of the installation steps required to tailor
DB2 Admin to your system.
The information to monitor the execution of the input stream is stored in a DB2
table referred to as the checkpoint table.
After DB2 Admin is successfully installed, create the checkpoint table, ADBCHKPT,
on each DB2 subsystem where ADBTEP2 is to be used in batch mode. Sample
statements to create this table are provided in member ADBCHKPT in the
SADBSAMP library.
Be sure to submit sample job ADBCHKPT on each DB2 subsystem that runs DB2
Admin.
Related concepts
“Using ADBTEP2” on page 343
| Attention: Perform this step only if you are using DB2 for z/OS Version 8 or
| earlier. Do not perform this step if you are using DB2 Version 9.1 for z/OS.
Before submitting sample job ADBTMPDB, modify the job card and the following
items to meet your site naming standards:
v Data set names for your DB2 libraries: RUNLIB, SDSNEXIT, SDSNLOAD
v DB2 subsystem name
v Plan name
v Current SQLID value
v Database name
v Table space name
v SEGSIZE parameter
v BUFFERPOOL parameter
Be sure to submit sample job ADBTMPDB on each DB2 subsystem that runs DB2
Admin and is not set up to support the use of declared temporary tables.
For each DB2 subsystem for which you plan to use Change Management, you
must do the following tasks:
v Create a special database that stores the Change Management information.
v Ensure that you define a qualifier for the database objects in the :cmown. tag
when you run the ADB2CUST EXEC.
Related concepts
“Prerequisites for Change Management” on page 453
“Step 8. Customize the ISPF environment” on page 44
The sample jobs set the default Change Management level to NONE. The default
value will need to be changed later to REQUIRED or OPTIONAL for users to
register changes in the Change Management database.
Before submitting the sample job to create the Change Management database
objects, modify the job card and the following items to meet your requirements:
v The storage group name. The default is ADBGCHG.
v The database name. The default is ADBDCHG.
v The table space names. By default, the names are prefixed with ADBSC
v The owner of the objects in the Change Management database. The default is
ADB. If you change this value, you should also change the corresponding
QUALIFIER on the BIND PACKAGE commands in SAMP member ADBBIND
where indicated in the member and set the customization parameter CMOWN
to the new value.
When the delete change line command is enabled, only the following types of
changes can be deleted:
v Changes that have a status of CANCELED
v Changes that have a type of FAST and a status of FAILED
v Changes that have a type of COMPARE
| Before submitting the sample job to enable the Change Management delete change
| feature, modify the job card and the following items to meet your requirements:
v The owner of the objects in the Change Management database. The default is
ADB.
v The definition of the ADBCHGV1 view. Either accept the default or customize.
v If DB2 Admin will be run with the PLAN parameter, the ADBCDCH package
must be included in the specified plan.
DB2 Admin sample jobs use the DB2 program DSNTIAD to run GRANT
statements. If DSNTIAD is not available at your site, run the required GRANT
statements using SPUFI.
Before submitting sample job ADBBIND, modify the job card and the following
items to meet your site naming standards:
v Data set names for DB2 Admin data sets.
v Data set names for your DB2 libraries: RUNLIB, SDSNEXIT, SDSNLOAD.
v DB2 subsystem name.
v Plan name.
Be sure to submit sample job ADBBIND on each DB2 subsystem that runs DB2
Admin.
When you run sample job ADBBIND for a DB2 Version 7 subsystem, delete the
BIND statement for ADB8SQL. The BIND statement for ADB8SQL is not valid for
a DB2 Version 7 subsystem and will fail with return code 8 and message
DSNT207I.
When running sample job ADBBIND, return code 0 indicates a successful bind.
Non-zero return codes will occur in the following situations:
v A return code of 4 occurs if you are binding on a lower release level of DB2.
DB2 issues error messages when binding DBRMs that contain SQL statements
that reference any DB2 catalog tables or columns that do not exist. These error
messages and the return code of 4 are expected, and no action is required.
| v A return code of 8 occurs if you do not plan to use Change Management and
| did not create the Change Management database objects. Bind failures for the
| following packages are expected:
| – ADBCDTW
| – ADBCEST
| – ADBCIMU
| – ADBCMRQ
| – ADBCPRE
| – ADBCRCC
| – ADBCRCM
| – ADBCRCP
| – ADBCRCR
| – ADBCSRV
| – ADBCUPC
| – ADBCVCP
| – ADBCVEX
| – ADBCVIC
| – ADBCVSX
| No other action is required after you verify that the bind failures are for these
| packages only.
Related concepts
“Introduction to ADBTEP2” on page 340
When using a copy of the DB2 catalog, the DB2 Admin batch programs
(ADB2GEN, ADB27AC, and so on) require you to use the ADB DB2 PLAN name. If
you change the plan name in sample job ADBBIND to something other than ADB,
DB2 Admin uses the specified plan name for all batch programs and these batch
programs are unable to use a copy of the DB2 catalog.
The CLIST library name is SADBCLST and the EXEC library name is SADBEXEC.
If you use CLIST and EXEC libraries that are variable blocked (VB), create VB
versions of these libraries. Member ADBFB2VB in library SADBSAMP contains a
sample job to create VB 255 copies of the EXEC and CLIST libraries. The data set
names of the new VB libraries are the same as the FB libraries, but are suffixed
with .VB.
Before submitting the job, modify the job card and the following items to meet
your site requirements:
| ADB.V720
High-level qualifier for data sets
VLSRNM
Volume-serial (not necessary for SMS)
SYSDA
DASD unit (not necessary for SMS)
Related concepts
“Step 6. Prepare ADBL CLIST”
Related tasks
“Step 7. Verify activation of limited functionality” on page 42
The ADBL CLIST in the SADBCLST library is provided for running DB2 Admin.
The ADBL CLIST brings up the DB2 Admin Main Menu.
| Restriction:
| v ASUSER is only used in DSN connections.
| v If the trusted context does not include the job name submitted,
| the trusted context will not be established.
| CMOWN
| The owner (qualifier) of the Change Management database objects. If you use a
| minus sign with this parameter, the value that is set for the :cmown tag on the
| General Customization Parameters panel is overridden by the DB2 Admin
| default, which is null.
| The following examples show how you can use the CMOWN parameter:
| CMOWN(CMDBADM)
| CMOWN(-)
DASD
The unit name for batch work data sets. If you use a minus sign with this
parameter, the value in the Unit name for batch data sets field on the General
Customization Parameters panel is overridden by the DB2 Admin default,
which is SYSDA.
The following examples show how you can use the DASD parameter:
DASD(SYSALLDA)
DASD(-)
DB2LLIB
List of the DB2 product load module libraries where DB2 is installed if DB2 is
not in the linklist.
DEBUG
Use this parameter only at the request of your IBM service representative.
DMT
You can use the DMT parameter to access the DB2 Tools Launchpad panel.
From this panel, you can either invoke a DB2 tool or you can continue to use
the DB2 Admin functions that are described in this information. If you do not
use the DMT parameter, you go directly to the DB2 Admin functions, but you
cannot launch other DB2 tools from within DB2 Admin.
| DMTID
| Indicates which library from the DB2 Tools Launchpad TLIB list you want to
| select by default. You can specify this parameter from your local front-end
| panel, CLIST, or from a REXX exec that invokes the ADBL CLIST. You will
| specify a number in parenthesis, for example, dmtid(2). An S will be placed in
| the Sel field for the row that you indicate (in this example, the second row) for
| the library that you want to be the default. This library is displayed in the
When using the ADBL CLIST to define the DB2 Admin libraries (using the ISPF
LIBDEF command), the data set naming convention must include the following
components:
v A high-level qualifier specified using PROD, PRODADD, and USERADD.
v A prefix specified using LIBPRE, LIBAPRE, and USERPRE.
v A suffix that must include the following information:
– LLIB load library
– MLIB message library
– PLIB panel library
– SLIB skeleton library
– TLIB table library
– CLIST library CLIST or CLST
– EXEC library
The following example shows how you can use the three pairs of keyword
parameters:
ADBL PROD(ADB.VR01) LIBPRE(SADB)
PRODADD(GOC.VR10) LIBAPRE(ISP)
USERADD(USER01) USERPRE(ISP)
Example:
| %ADBRUN TEST
|
| will ISPF LIBDEF the following data sets:
|
| ISPLLIB DATASET USER.V720.SADBLLIB
| ADB.V720.ISPLLIB
|
| ISPMLIB DATASET USER.V720.SADBMLIB
| ADB.V720.ISPMLIB
|
| ISPPLIB DATASET USER.V720.SADBPLIB
| ADB.V720.ISPPLIB
|
| ISPSLIB DATASET USER.V720.SADBSLIB
| ADB.V720.ISPSLIB
|
| ISPTLIB DATASET USER.V720.SADBTLIB
| ADB.V720.ISPTLIB
|
| and ALTLIB ACTIVATE the following data sets:
|
| APPLICATION(CLIST) DATASET USER.V720.SADBCLST
| ADB.V720.CLIST
|
| APPPLICATION(EXEC) DATASET USER.V720.SADBEXEC
| ADB.V720.EXEC
At this point, you can use DB2 Admin with limited functionality. However, to use
DB2 Admin, the DB2 libraries must be allocated to your TSO session.
Before proceeding to enable DB2 Admin for additional functionality, verify that
DB2 Admin is operational by completing the following steps:
1. Determine where the DB2 DSN command is installed.
2. Make the DB2 Admin ISPF and TSO libraries available to your ISPF session.
You can do this in one of the following ways:
v A. Copy the ADBL CLIST to your standard ISPF and TSO libraries.
v B. Add the DB2 Admin product libraries to your TSO LOGON PROC. The
following table shows the libraries you can allocate to your TSO LOGON
PROC.
Table 3. Libraries to allocate to your TSO LOGON PROC
DDNAME Library DSN Suffix
ISPLLIB SADBLLIB
ISPMLIB SADBMLIB
ISPPLIB SADBPLIB
ISPSLIB SADBSLIB
ISPTLIB SADBTLIB
SYSPROC CLIST or SADBCLST
SYSPROC EXEC or SADBEXEC
Enter:
DB2 system name ===> DB2X Retain DB2 system name ===> YES (Yes/No)
4. Select the DB2 subsystem that you want to use and press Enter. The DB2
Admin Main Menu panel, as shown in the following figure, is displayed.
To invoke DB2 Admin for DB2 subsystem ABCD, enter the following command on
the command line of the ISPF main menu:
To invoke the DB2 Admin Launchpad panel, which enables you to continue using
DB2 Admin functions or to invoke another DB2 tool, enter the following command
on the command line of the ISPF command processor panel (usually ISPF option
6):
%ADBL DMT
To directly invoke DB2 Admin and display all of the active DB2 subsystems that
are available to you, enter the following command on the command line of the
ISPF command processor panel (usually ISPF option 6):
%ADBL SHOW
Related concepts
“Step 5. Copy fixed-block libraries to variable-block libraries” on page 36
To access the DB2 Admin customization panels, run the ADB2CUST EXEC. Invoke
the ADB2CUST EXEC in ISPF option 6, as shown in the following example:
| EXEC 'ADB.V720.SADBEXEC(ADB2CUST)'
The values that are used at execution time are assigned in the following sequence
until a value is located:
1. Keyword parameters that are specified in the ADBL CLIST at execution time.
2. DB2 subsystem-specific customization parameters (specified in panel
ADB2CUS2, DB2 Subsystem Customization Parameters).
3. DB2 subsystem default customization parameters (specified with DB2
subsystem name of *).
4. DB2 Admin general customization parameters (specified in panel ADB2CUS1,
General Customization Parameters).
5. DB2 Admin default parameters (built into DB2 Admin).
You can tailor the parameters listed in the following table. The numbers in the
table refer to the numbers in the previous list.
Table 4. Parameters that you can tailor from the General Customization Parameters panel
ADBL Subsystem Subsystem General
Item to customize CLIST specific default parameters Tag Default
DB2 subsystem name 2 :nick. N/A
DB2 subsystem description 2 :desc. null
text
DB2 security exit type 1 2 3 4 :secexit. STD
Related concepts
“Step 3. Set up to use Change Management” on page 33
“Step 12. Update the APF Authorization table” on page 67
Chapter 24, “Running DB2 Admin across distributed systems,” on page 539
“Step 8(a). Run the customization EXEC”
“Step 8(b). Supplying information about the customization panels” on page 47
Related tasks
“Step 22. Tailor DB2 Admin Authorization Switching” on page 71
Related information
IBM Publications Center
Invoke the ADB2CUST EXEC in ISPF option 6 (TSO) with the following command:
| EXEC 'ADB.V720.SADBEXEC(ADB2CUST)'
| The customization EXEC uses the ISPF LIBDEF command to make additional
| product libraries available. The following algorithm is used to find the data sets for
| these libraries:
1. The high level qualifier for the data set names is generated by removing the
last qualifier from the data set name that contains the customization EXEC.
2. These library types are searched, prefixed with the high level qualifier, until the
data set is found:
CLIST SADBCLST
EXEC SADBEXEC
ISPLLIB SADBLLIB LOAD
ISPMLIB SADBMLIB MSGS
ISPPLIB SADBPLIB PANELS
ISPTLIB SADBTLIB TABLES
| You can use the LIBPRE value when you invoke the customization EXEC to specify
| the first set of characters (up to four) in the final qualifier of the LLIB, MLIB, PLIB,
| and TLIB library types. LLIB, MLIB, PLIB, and TLIB are appended to the LIBPRE
| value, and those are the data sets that must be found. For example, assume that
| you invoke the customization EXEC with the following command:
| EXEC 'ADB.V720.SADBEXEC(ADB2CUST)' 'LIBPRE(MY99)'
To ensure that tables are stored in the correct library, specify the name of the ISPF
table library to use when DB2 Admin is started. Specify the SADBTLIB library and
select additional customization steps on this panel.
The tag value can have any length and any content, but it cannot contain a colon.
The following tag names are recognized by DB2 Admin:
:nick. Name of the DB2 subsystem being described.
:desc. Description to be displayed for this DB2 subsystem.
:secexit.
DB2 security exit type.
:cvtown.
Copy version table owner.
:stcnam.
Started task name of this DB2 subsystem. This tag should be specified only
for a subsystem whose started task name does not follow DB2 conventions.
:grpnam.
DB2 group name of this DB2 subsystem or group. Leave this value blank if
it is not a member of a data sharing group.
:jclass. Job class to be used for batch DB2 utility jobs.
:jsysaff.
SYSAFF job parameter to be used for batch DB2 utility jobs. Specify the
same value that you would specify on a /*JOBPARM S=cccc JECL
statement.
:instparm.
Installation name.
:utilpre.
High-level qualifier (HLQ) or prefix of the data sets that are used in DB2
utility jobs.
:ssid. DB2 subsystem name of the remote DB2 subsystem (blank if local).
:nodenam.
JES node name of the remote DB2 subsystem (blank if local). Specify the
same value that you would specify on either a JES2 /*XMIT or a JES3 //
XMIT DEST=nnnn JECL statement.
:locnam.
DB2 DDF location name of the remote DB2 subsystem (blank if local).
The following DB2 release-specific tags enable you to use DB2 Admin on different
versions of DB2 using the same TSO logon procedure in the same LPAR. The tags
are required when a DB2 subsystem needs libraries that are different from the ones
in the TSO logon procedure and link list. The number of DB2 libraries,
user-defined libraries, and libraries that are specified in the ADBL CLIST must not
exceed 15.
:bl2llib.
DB2 libraries and user-defined libraries.
:bl2rlib.
Run library for DB2 sample program DSNTIAUL.
:bl2mlib.
Message library.
The following Main Menu option tags enable you to tailor the Main Menu without
modifying the panel (ADB2). The tags are prefixed with a letter, from a to j, which
indicates the position of the tag on the Main Menu (a is the first option on the
menu).
:aopt. First option that will be displayed on the Main Menu
:adescr.
Description of the option
:aispf. The ISPF statement that DB2 Admin should execute for this option
:apan. The panel that DB2 Admin should display for this option
:asql. The SQL statement that DB2 Admin should execute for this option
:acmd. The DB2 Admin command for this option
:anewat.
Specifies whether this option should start a new DB2 attachment
(YES/NO)
:bopt. Second option that will be displayed on the Main Menu
:b. The parameters for the second option on the Main Menu
Each of the following DB2 Admin environment variables is listed with its tag in
parentheses. Two levels of specifying tag values exist.
v Use the :nick.* indicator to specify tag values that apply to all subsystems. If a
tag is left blank, the DB2 Admin default value is used.
v Specify subsystem-specific values on tags to override the values that are
specified using :nick.*. You can also use the minus sign (-) to indicate that you
want to use the DB2 Admin default values.
DB2 subsystem name (:nick.)
Name of the DB2 subsystem or the group name of a data sharing group.
An entry with an asterisk (*) as its DB2 subsystem name provides the
default values for all of the DB2 subsystem-specific parameters, except for
the DB2 subsystem started task name and group name. No default values
exist for the started task name and group name. The name specified should
be defined only once.
DB2 subsystem description text (:desc.)
A text description should exist for each DB2 subsystem. The text
description is displayed on panel ADB2SYS when a user by default (as
determined from the specifications made on panel ADB2DB2X) has access
to multiple active DB2 subsystems.
DB2 security exit type (:secexit.)
Selecting option 4 on the DB2 Administration Menu panel displays a list of
alternate SQL IDs that a user can use. To create this list, DB2 Admin
invokes or simulates the DB2 connection exit (DSN3@ATH), and requires
information about the type of exit that is installed.
|
| Figure 8. Session Parameters - 3270 Host panel
|
| 2. From the MVS log, run /display uni,all . Find 01208-xxxxx
| (01208-00037 in this example) in the /D UNI,ALL output (at the bottom
| of this example). The suffix on the string 01208-00037 provides the
| value (E in this case) you need to specify in panel ADBCUS1.
|
Two main panels are provided for you to tailor. The following table shows a
summary of what you can tailor.
An SMP/E usermod is used to tailor these two panels. The source for the usermod
is provided in member ADBU001 in the SADBSAMP library.
You can add DB2 tools (for example, IBM QMF™ and IBM DB2 Performance
Monitor) by modifying the Main Menu panel or by using the customization EXEC
ADB2CUST. If you simply want to add DB2 tools to the menu, do so by using the
ADB2CUST EXEC. If you want to make other changes to the menu, do so by using
an SMP/E usermod.
For example, to add a new DB2 product to the DB2 Administration Menu panel,
modify the set of variables &B, &BOPT, &BDESCR, &BISPF, &BPAN, &BSQL,
&BCMD, and &BNEWAT.
The following figure shows an example of how the Main Menu can appear.
The following variables are available in panel ADB2DB2X. Except for DB2ADB2N,
you can modify these variables to match your site naming standards:
DB2ADB2N
Number of active DB2 subsystems.
DB2ADB2S
DB2 subsystem names that are valid for the user. This variable is initialized
to the DB2 subsystems that are active. If more than one default DB2
subsystem is active for the user, this variable should be set to the DB2
subsystems that the user requires.
DB2ADEFS
Default DB2 subsystems for the user. This variable should be set to the
default DB2 subsystem that the user enters. If only one of these DB2
subsystems is active, it is automatically selected. Otherwise, the DB2
subsystems in DB2ADB2S are displayed to the user.
This tailoring step does not prevent users from using the SYS(nnn) keyword on the
ADBL CLIST to access other DB2 subsystems. Panel ADB2DB2X is only a
productivity aid; not a security definition.
.
.
.
)body cmd(zcmd) expand(!!) smsg(emsg) lmsg(emsg)
'&adb2name !-! &adb2name DB2 Subsystem Selection Exit Panel !-!
;Command ===>|zcmd ! !+
¢emsg
+
% This panel is only shown in DEBUG mode
+
+ DB2 systems: _db2adb2n
+ User : _user
)INIT
VGET (ZVERB) SHARED
IF (&ZVERB=RETURN)
&DB2ADB2S = NONE
.RESP=END
IF (.RESP=&Z)
IF (&DEBUG¬=DEBUG)
.resp = ENTER
&user=&zuser
&DB2ADEFS = &DB2ADB2S
)PROC
if (&DB2AINST=DKIBMX) /* For installation DKIBM */
&uu = Trunc(&user,2) /* uu=user prefix (2 char)*/
&sf = .trail
if (&uu=CC) /* CC user ? */
&DB2ADB2S = 'DB2T DB2X DB2P DB2M DB2D DB2W'
&DB2ADEFS = 'DB2T DB2X DB2P'
if (&uu=IS) /* IS user ? */
&DB2ADB2S = 'DB2T DB2X DB2P DB2M'
&DB2ADEFS = 'DB2T DB2X DB2P'
if (&user=ISTJE,ISTJE2,ISTFL,ISTFL2,ISOKN,DPCHR,DPGROTH)
&DB2ADB2S = 'DB2T DB2X DB2P DB2M DB2D DB2W'
&DB2ADEFS = 'DB2T DB2X DB2P DB2M DB2D DB2W'
if (&uu=DK) /* DK user ? */
&u3=trunc(&sf,3)
if (&u3=BAL,NYK) /* DKBAL or DKNYK user ? */
&DB2ADB2S = 'DB2D'
else /* Normal DK user */
&DB2ADB2S = 'DB2T DB2X DB2P DB2M'
&DB2ADEFS = 'DB2T DB2X DB2P'
if (&uu=DP) /* DP user ? */
&u2=trunc(&sf,2)
if (&u2=EC) /* DPEC user ? */
&DB2ADB2S = 'DB2M'
else /* Normal DP user */
&DB2ADB2S = 'DB2M'
if (&uu=DC) /* DC user ? */
&DB2ADB2S = 'DB2M'
)END
You need to modify this JCL to match your site naming standards.
To do so, modify the ADB2UCUS skeleton, which resides in the ISPSLIB library.
When you subsequently run SMP/E to receive and apply SMP/E usermod
ADBU002, the updated ISPF JCL skeletons will be added to the SADBSLIB library.
The following variables are some of the variables that are available for use (see
skeleton member ADB2UCUT for a complete list):
Variable:
Description:
&AJDATE
Julian date (YYDDD)
&AJDAY
Julian day (DDD)
&AYEAR4
4-digit year (YYYY)
&AGDATE
Gregorian date (YYMMDD)
&ANMON
Numeric month (MM)
&ADAY
Day (DD)
&AYEAR
2-digit year (YY)
&ACMON
3-character month (XXX)
&ATIME
Time (HHMMSS)
&ATIME7
Time with tenths of seconds (HHMMSST)
&ATIME4
Time without seconds (HHMM)
&AHOUR
Hour (HH)
&AMIN
Minute (MM)
All lines that might require tailoring are preceded by SET statements (indicated by
)SET).
Example: This example demonstrates several different types of data set naming
changes using the variable ASYCPY1:
To change the high-level qualifier from the current TSO PREFIX to MYHLQ, specify:
)SET ASYCPY1 = MYHLQ.&DB2SYS..IC.&DBNAME..&NAME(+1) /* CHANGE HLQ TO FIXED STRING
To change the second-level qualifier from the DB2 subsystem ID to TEST, specify:
)SET ASYCPY1 = &PREFIX..TEST.IC.&DBNAME..&NAME(+1) /* CHANGE SUBSYSTEM TO 'TEST'
To insert a high-level qualifier of MYHLQ in front of the current TSO PREFIX and to
remove the DB2 database name, specify:
)SET ASYCPY1 = MYHLQ.&PREFIX..&DB2SYS..IC.&NAME(+1)
/* CHANGE HLQ TO FIXED STRING,
/* INCLUDE PREFIX, REMOVE DBNAME
To use sequential data sets rather than a GDG data set, specify a data set name
that contains date and time values to generate unique data set names:
)SET ASYCPY1 = &PREFIX..IC.&DBNAME..&NAME..D&AJDATE..T&ATIME
To change the LOAD and UNLOAD UIDs such that they contain the TSO user ID,
a time stamp, and a utility type identifier, specify:
)SET PREFXUID = &ZUSER.&ATIME
)SET LOADUID = &PREFXUID.LD
)SET UNLODUID = &PREFXUID.UL
To change the LOAD and UNLOAD UIDs such that they contain the TSO user ID
and a time stamp with tenths of seconds (USERID.HHMMSST), specify:
)SET PREFXUID = &ZUSER..&ATIME7
)SET LOADUID = &PREFXUID
)SET UNLODUID = &PREFXUID
The maximum size of &ZUSER is 8 bytes, the size of a period is 1 byte, and the
size of the &TIME7 (HHMMSST) is 7 bytes. The total maximum size is 16 bytes,
which is the maximum UID size.
Restrictions:
v When modifying data set names, be sure that no data set names run beyond
column 71 in the ADB2UCUS data set. Any characters beyond column 71 are
truncated.
v Data set names, including the periods, cannot be greater than 44 bytes in length.
Be sure that generated data set names are not longer than 44 bytes.
v Utility IDs (UIDs), including the periods, cannot be greater than 16 bytes in
length. Be sure that generated UIDs are not longer than 16 bytes.
v Utility ID (UID) customization does not apply to UIDs in work statement lists
(WSL).
For testing purposes, copy the ADB2UCUS skeleton to a private skeleton library
and make your changes. This private skeleton library must first be allocated in the
ISPSLIB concatenation (using the USERADD parameter of the ADBL CLIST).
After testing is complete, you can use an SMP/E USERMOD to update the DB2
Administration Tool product libraries. A sample SMP/E USERMOD is provided in
member ADBU002 in the SADBSAMP library. Instructions for completing this step
are provided in sample job ADBU002.
Related concepts
“Running WSL with the utility template for LOBs” on page 329
To tailor the DB2 Admin Launchpad, run the ADBL CLIST with the DMT option,
which creates the Launchpad table.
| Note: This APF-authorized library must either be in the system link list, or must
| be registered as the "DB2 Admin APF Library" on customization panel
| ADB2CUS1.
If you intend to use DB2 High Performance Unload (HPU) within work statement
lists, the INZUTILB program must be authorized in a similar manner and should
reside in an APF-authorized library in the system link list.
| Before using HPU within a work statement list, be sure to enable HPU. The main
| HPU program (INZUTILB) needs to be authorized in the IKJTSOnn member of
| PARMLIB.
| Note: This APF-authorized library must either be in the system link list, or must
| be registered as the "DB2 Admin APF Library" on customization panel
| ADB2CUS1.
| The TSO service facility must invoke ADB2ATH and ADB2UTIL as authorized
| programs. Modify SYS1.PARMLIB(IKJTSOxx) and add programs ADB2ATH and
| ADB2UTIL, as shown in the following figure. Adding ADB2ATH and ADB2UTIL
| to SYS1.PARMLIB (IKJTSOxx) will allow the TSO service facility to invoke them as
| authorized.
The ADB2ATH program is used when the DB2 security exit type (:secexit.) is
specified as AUTH. The ADB2UTIL program is used when ADBTEP2 runs DB2
utilities.
Activate the changes immediately or at the next IPL by issuing the following
TSO/E command:
PARMLIB UPDATE(xx)
Before using HPU within a work statement list, be sure to enable HPU. The main
HPU program (INZUTILB) needs to be authorized in the IKJTSOnn member of
PARMLIB.
If you are installing and running two or more different releases of DB2 Admin on
the same DB2 subsystem, ensure that you use the ADB2ATH and ADB2UTIL
authorized programs from the product tape for the higher release when you copy
Chapter 2. Activating DB2 Admin 67
them to the APF-authorized library in your system link list.
Related concepts
“Step 8. Customize the ISPF environment” on page 44
“Invoking HPU within a work statement list” on page 332
| A WSL that invokes a DB2 command or a DB2 utility can be run online only if the
| DB2 libraries are set up properly. If the DB2 load library data set does not reside in
| the system LINKLIST, the data set must be added to the STEPLIB of the TSO logon
| procedure. A WSL that invokes a HPU utility can be run online only if the HPU
| libraries are set up properly. If the HPU load library data set does not reside in the
| system LINKLIST, the data set must be added to the STEPLIB of the TSO logon
| procedure.
| Important: Ensure that all of the data sets in the STEBLIB are APF-authorized;
| otherwise, the entire STEBLIB is not considered to be APF-authorized,
| and the utility jobs will fail.
This table is used to keep track of which DB2 copies are available for use.
If you do not require a copy of the DB2 system catalog or a DB2 catalog of a
remote site, you can ignore this step. Also, you can perform this step later if you
determine that you require a copy of the DB2 system catalog or a remote catalog.
Step 15. Create views for your own objects in the catalog
To create views that allow the creators to update the RUNSTATS information of
their own objects in the catalog, submit job ADBRUNSV in SADBSAMP.
If you plan to make DB2 Admin available to a large number of users, you might
want to grant SELECT on the catalog to PUBLIC AT ALL LOCATIONS, or specify
those IDs that are authorized to see the catalog. To complete this step, run sample
job ADBGC, which is located in SADBSAMP.
You must also bind the package for the stored procedure on each DB2 subsystem
that will use this facility.
The ADB2RE stored procedure dynamically allocates output data sets, as specified
by the CC/390 user. This requires the stored procedure to be defined with
EXTERNAL SECURITY USER. Procedures with this security parameter cannot run
in the non-WLM-managed stored procedure address space (ssidSPAS), but must
run in a WLM-managed stored procedure address space.
| Run sample job ADBCX to create indexes on these tables. ADBCX is located in the
| SADBSAMP library. ADBCX also contains the recommended DB2 catalog indexes
| for improving the performance of the Reverse Engineering functions (GEN).
Related concepts
“Other recommendations for a large number of objects” on page 630
Related information
Chapter 9, “Reconstructing SQL (DB2 Admin Reverse Engineering),” on page 171
It is recommended that you run the RUNSTATS utility on the DB2 catalog to
optimize performance.
Related concepts
“Other recommendations for a large number of objects” on page 630
Related information
IBM Publications Center
The DB2 Admin line command table contains the following columns:
CMD The line command. The line command must be the key in the table.
DESCR
A description of the line command. This description is displayed if you
enter a question mark (?) to request further information.
SQL The SQL statement that is run for this line command.
PAN The panel to be displayed as a result of this line command.
ISPF The ISPF statement that is run for this line command.
ACMD
The DB2 Admin command that is run for this line command.
Create a line command table by writing a small REXX EXEC that defines the ISPF
table. A sample REXX EXEC, ADB21D REXX, is provided in the SADBEXEC
library. This EXEC provides a description of all possible line commands for DB2
Admin option 1.D (panel ADB21D). It also defines four sample user-defined
commands (USERI, USERS, USERC, and USERP). You can refer to this sample REXX
EXEC when writing your own EXEC.
Some EXEC parts (such as ADB21T) use a different style to define the ISPF table
than the style that is used in ADB21D EXEC. Be sure to read any comments in the
EXEC in case the style that is used is different from the ADB21D sample REXX
EXEC.
Related concepts
“Line commands” on page 88
“The application development process” on page 526
Related reference
“DB2 Admin line commands” on page 617
This other user is called the auth-switch ID, and the ID that submits the job is
called the submitter.
Two DB2 Admin functions, Alter Tablespace RDEF and Alter Table ALC, make use
of authorization switching. These functions allow table spaces and tables to be
redefined, which requires that they, and any dependent objects, be dropped and
re-created. However, the job submitter might not have the necessary authority to
rebuild all the objects and authorizations. Authorization switching allows the job
submitter to use an ID that does have the authority to run the DDL to rebuild the
objects.
| For DB2 Admin Authorization Switching to proceed, the job submitter requires
| READ authority to the profile that protects this resource. The standard RACF
| profile rules apply for this resource. An installation can use general or more
| granular profile controls, as listed in the following table.
Table 6. Controlling the granularity of profiles.
Granularity Example
A single profile that protects all FACILITY ADBAUTHS.*
subsystem/user ID combinations
A more granular profile FACILITY ADBAUTHS.DSN.*
The finest degree of control FACILITY ADBAUTHS.DSN.SYSADMZ1
If the FACILITY class is a RACLIST profile, the profiles must be refreshed after
each change using the RACF SETROPTS command.
Restriction: DB2 Admin Authorization Switching requires that the RRS Attach
Facility (RRSAF) of DB2 for OS/390 and z/OS is available.
DB2 Admin -------------- DB2X Generate SQL from DB2 catalog ------------- 15:52
Option ===>
New names/values for generated SQL: (leave blank to use current values)
Object owner. . . . . : > Run SQLID. . . . . . . . . :
Object grantor. . . . : >
Alloc TS size as. . . : DEFINED (DEFINED, USED, or ALLOC)
Database name . . . . :
Storage group for TS. : > Storage group for IX . . . : >
Target DB2 version. . : (Current DB2 version: 815)
Use Masking . . . . . : NO (Yes/No)
Generate catalog stats: NO (Yes/No/Only)
Target cat qualifier: > (Default is SYSIBM)
Figure 14. The Generate SQL from DB2 Catalog panel (ADB2GEN)
is displayed again.
8. Press PF3 twice to return to the DB2 Admin Main Menu.
9. Specify option W to manage work statement lists. The Manage Work
Statements Listspanel, as shown in the following figure, is displayed.
DB2 Admin --------------- DB2X Manage Work Statement Lists -------------- 15:5
Option ===>
10. Specify option 1 to display a list of members in the work statement list data
set.
11. Issue the R line command on member GENTST1 to enter an edit session
where you can create a job that re-creates the SYSDUMMY1 table.
a. Examine this JCL for completeness and press PF3 to exit without
submitting the job.
12. Repeat step 5 on page 73 with the following changes:
v On the ADB2GEN panel, specify BATCH in the Execution mode field.
v On the Specify Work Statement List pop-up panel, specify GENTST2 in the
Work stmt list name field.
13. Submit the batch job.
14. After the batch job completes, repeat step 9 and verify that the GENTST2
member of the work statement list data set matches the GENTST1 member.
Use one of the following methods to improve performance when invoking DB2
Admin:
v Copy the DB2 Admin ISPF and TSO libraries to your standard libraries. Your
standard libraries are allocated in your TSO LOGON procedure or are allocated
dynamically before you invoke ISPF.
v Allocate the DB2 Admin target libraries in the TSO LOGON procedure or
dynamically before you invoke ISPF.
Tip: If possible, define the libraries that you are using for DB2 Admin (and all of
the libraries allocated on the same DD statements before the ones that you are
using for DB2 Admin) to LLA with the FREEZE option. This approach will
significantly reduce the number of input/outputs (I/Os) and the I/O time
used when ISPF and TSO perform a search for DB2 Admin members in the
concatenation sequence.
To make DB2 Admin available while reducing the tailoring effort, use the ADBL
CLIST to allocate the libraries, and invoke DB2 Admin by calling the ADB CLIST.
| For example, you can migrate from DB2 version 8 compatibility mode to
| new-function mode.
| 1. If you are migrating from DB2 for z/OS Version 7 to Version 8 and you use
| Change Management, submit the ADBCHAM8 job in SADBSAMP on all new
| DB2 subsystems to migrate the Change Management database objects.
2. Submit the ADBBIND job in SADBSAMP on all new DB2 subsystems. Doing
this ensures that the changes to the DB2 catalog are reflected in the product's
behavior.
3. If you have defined Reverse Engineering as a stored procedure for DB2 Control
Center for OS/390 and z/OS (CC/390), submit the BIND in member ADBREST
in SADBSAMP.
| 4. If the names of the DB2 load libraries have been changed during the DB2
| migration or if you use Change Management, run the ADB2CUST EXEC. Before
| running the customization procedure, review the DB2 subsystem parameters to
| update the parameters that define the DB2 load libraries or the parameter that
| defines the qualifier for the Change Management database objects.
| 5. If you have defined multiple copies of the DB2 catalog before upgrading to a
| new release or mode, re-run the bind steps for the catalog copies that were
| created in “Using previously defined multiple copies of the DB2 catalog” on
| page 537.
You can generate a list of utility template tables by running the following query:
SELECT TBCREATOR,TBNAME
FROM SYSIBM.SYSCOLUMNS
WHERE COLNO = 28
AND NAME = 'TRTCH'
where owner is the table owner and name is the table name.
The topics in this information describes how to prepare and use the DB2 Admin
Launchpad. Use the DB2 Admin Launchpad to launch installed IBM DB2 tools
directly from a centralized panel. When you launch a tool, you are presented with
the tool's first panel.
Restriction: Only tools that have an ISPF interface can be launched from the DB2
Admin Launchpad function.
Topics:
v “Step 1. Create the Launchpad table” on page 78
v “Step 2. Modify the Launchpad table” on page 79
v “Step 3. Launch tools” on page 82
Related concepts
“Step 6. Prepare ADBL CLIST” on page 36
“Step 11. Tailor the DB2 Admin Launchpad” on page 66
The Launchpad table, named ADBDMT, must contain an entry for each tool that
you want to launch. After the table is created, you need to populate it with the
tools that you want to launch from the launchpad.
After you have created the Launchpad table, run the ADBL CLIST with the DMT
parameter to display it. The following figure shows the table immediately after it
has been created.
Specify DB2 SSID (opt) ===> (Enter '?' for a list of active SSIDs)
Select the DB2 tool you wish to launch or enter its code in the command line.
This panel groups the DB2 tools into the following four categories:
v Administration
v Application Management
v Performance Management
v Recovery and Replication Management
These categories make it easier to locate a tool on the panel. The following fields
are shown on this panel:
Specify DB2 SSID (opt)
You can specify a valid DB2 SSID, which makes it available to any and all
tools that are invoked from the Launchpad. The SSID is stored in variable
DMTSSID. The last SSID specified persists across ISPF sessions.
Sel This column is used to specify the following actions that you wish to
perform:
v ADD to add a new entry
v DEL to delete the entry on that row
v UPD to update the entry on that row
v S or / to start the tool
Code Enter the tool code on the command line at the top of the panel.
Tool name
The name of the tool.
Rel The release or version number of the tool.
You can modify the Launchpad table by using one of the following two methods:
v
Dialog method
The dialog method consists of displaying the Launchpad table by using
the ADBL CLIST with the DMT parameter, and then entering the ADD,
DELETE, or UPDATE command in the Sel column.
v
ADBDMTI EXEC method
Invoke the ADBDMTI EXEC with the ACTION parameter, with its
values ADD, UPDATE and DELETE. Additional values correspond to
the fields on the Launchpad Entry panel; this panel is displayed when
you run the ADBDMTI EXEC. In general, it is easier to enter these
values directly on the panel.
PID
This is the program number of the tool.
REL
This is the release number of the tool. When using several releases
of the same tool, use utmost caution, so as not to get confused. Also,
it is recommended that you assign them unique codes.
NAME
The name of the tool.
CDE
An arbitrary code used to identify or invoke the tool.
GRP
The group number used for grouping the tools on the panel.
STAT
This field indicates the installed status of the tool, and can have a
value of Y or N.
CMD
Use this field to enter an ISPF string used to launch the DB2 tool. It
is probably easier to specify the ISPF string directly in the Command
field of the Launchpad Entry panel.
To update or delete a table entry, you must provide a PID number (with
or without a Rel identifier), a code or a name.
Tool Name :
DB2 Object Comparision Tool for z/OS
Code :
OBJ (User-defined code, for shortcut tool identifier)
Prog No. :
5697-L49 (IBM program product number or equivalent)
Release :
720 (Product release number)
Group :
1 (Tool category, as follows:
1 - Administration Tools
2 - Application Management Tools
3 - Performance Management Tools
4 - Recovery and Replication Management)
Installed : Y (Yes/No)
3. Specify any additional information that identifies the tool. You can specify
information in the following fields:
Tool Name
Enter the name of the DB2 tool with which you want to work.
Code
Enter a user-defined shortcut name to identify a tool. Code values should
be unique. Although it is possible to duplicate code values, doing so could
result in DB2 running the wrong tool when the code is invoked.
Prog No.
Enter the IBM program product number or equivalent.
Release
Enter the release/version number of the tool.
Group
Specify the group in which the tool belongs. These groups help to make all
the tools easier to locate on the display panel. The following values are
permissible:
v 1 - Administration Tools
v 2 - Application Management Tools
v 3 - Performance Management Tools
Important: When you enter a code, make sure that the code is unique
because, the results are unpredictable if multiple tools have the
same code.
Topics:
“Types of DB2 Admin panels” on page 84
v
“Finding the source code for panels” on page 87
v
“Navigating DB2 Admin panels” on page 87
v
“Using DB2 Admin commands” on page 88
v
“Using the DB2 Admin Look Up function” on page 91
v
“Using search arguments to filter data on DB2 Admin panels” on page
v
93
v “Refreshing data on DB2 Admin panels” on page 95
v “Using scrollable fields on DB2 Admin panels” on page 95
v “Checking the status of DB2 Admin” on page 96
v “DB2 Administration Menu panel” on page 97
Related reference
“DB2 Admin line commands” on page 617
| Note: DB2 Admin panels might hide fields or make entry fields output-only in
| some cases (for example, if a version of a DB2 is used that has this
| restriction). Hidden fields cause the appearance of blank lines or spaces, but
| you can disregard these blank lines or spaces. Note that:
| v Data entry fields, both the description preceding the entry field and the
| input field, can be entirely hidden,
| v Data entry fields can be output-only, which means that you can see that
| there is a field there (because the description is visible) but you cannot
| provide a value.
| v A column on a table display can be converted to output-only, or even
| hidden.
The panel in the following figure, is an example that shows the areas on a typical
table display panel.
A
Command line.
On this line, you can enter any DB2 command, ISPF command, or
DB2 Admin primary command.
B
Line command description area.
This area indicates the DB2 Admin line commands that you can
issue from a particular table display panel. You issue a line
If you enter a line command or update a row in the table display and also issue a
scroll request (PF7 to scroll up or PF8 to scroll down), the line command or row
update is processed and the scroll request is ignored.
Related concepts
“Primary commands” on page 88
“Line commands” on page 88
“Special line commands” on page 89
“Using the DB2 Admin Look Up function” on page 91
Issue the DB2 Admin BROWSE primary command from any table display panel to
display the associated BROWSE panel for the object.
DB2 Admin ----------- DB2X Tables, Views, and Aliases ---------- Row 32 of 160
Command ===> BROWSE Scroll ===> PAGE
Figure 20. Issuing the DB2 Admin BROWSE primary command on the Tables, Views, and
Aliases panel (ADB21T)
The BROWSE primary command generates output similar to that shown in the
following figure. Output is in ISPF browse format. The first line is a header with
the DB2 column names. To display the remaining columns, scroll to the right.
DB2 Admin ----- DB2X Browse Result of SQL Select ---- Line 00000000 Col 001 080
Command ===> Scroll ===> PAGE
DB2 Admin can also display data in tables that contain binary large objects
(BLOBs), character large objects (CLOBs), double-byte character large objects
(DBCLOBs), and ROWID columns:
v For BLOBs, DB2 Admin retrieves up to 128 bytes per column and displays the
data in hexadecimal format.
v For CLOBs, DB2 Admin retrieves up to 256 bytes per column and displays the
data in character format.
v For DBCLOBs, DB2 Admin retrieves up to 128 bytes per column and displays
the data in hexadecimal format.
v ROWIDs are displayed in hexadecimal format.
To correct the SQL statement, press END, which redisplays the panel where you
originally issued the SQL statement. DB2 Admin positions the cursor at the point
in the SQL statement where DB2 found the error.
DSNT408I SQLCODE = -104, ERROR: ILLEGAL SYMBOL FRON VALID SYMBOLS ARE FROM
INTO
DSNT418I SQLSTATE = 37501 SQLSTATE RETURN CODE
DSNT415I SQLERRP = DSNHPARS SQL PROCEDURE DETECTING ERROR
DSNT416I SQLERRD = 0 0 0 -1 10 0 SQL DIAGNOSTIC INFORMATION
DSNT416I SQLERRD = X'00000000' X'00000000' X'00000000' X'FFFFFFFF'
X'0000000A' X'00000000' SQL DIAGNOSTIC INFORMATION
Press Enter to see error panel two, as shown in the following figure.
PREPARE
Press END to redisplay the panel in which you entered the incorrect SQL
statement.
For example, in Figure 35 on page 98, the figure caption is “DB2 Administration
Menu Panel (ADB2).” ADB2 is the source code panel name.
If you are developing DB2 Admin applications, you can use the source code name
to quickly locate the source code for a specific panel.
To display the name of the panel in the upper left corner of the panel, issue the
ISPF command PANELID ON.
Related information
Chapter 22, “Writing and modifying DB2 Admin applications,” on page 525
You can enter the following commands on the command line of DB2 Admin
panels:
You can use the following keyboard keys whenever you are in the tutorial:
Enter Display the next panel.
HELP Display the help information for this panel.
END End the tutorial.
UP Display a higher level list of topics.
DOWN
Skip the current topic and go to the next topic (instead of typing SKIP).
RIGHT
Display the next panel (instead of pressing Enter).
LEFT Display the previous panel (instead of typing BACK).
Primary commands
Primary commands can be issued from the command line on DB2 Admin panels.
Most primary commands can be entered on all panels; however, some primary
commands are restricted to certain panels.
For information on the syntax for primary commands, see the Help panels.
Related concepts
“Using table display panels” on page 84
“Controlling DB2 Admin processing” on page 527
Related reference
“DB2 Admin primary commands” on page 612
Line commands
Line commands specify an operation that is to be performed on the information
that is displayed.
Line commands are issued from ISPF table display panels. Specify line commands
in the line command area in front of each row (called the SELECT field).
You also can define your own line commands during installation.
If you enter a line command or update a row in the table display and also issue a
scroll request (PF7 to scroll up or PF8 to scroll down), the line command or row
update is processed and the scroll request is ignored.
Related concepts
“Using table display panels” on page 84
“Step 21. Define your own line commands” on page 70
Related information
Chapter 26, “DB2 Admin commands,” on page 611
A question mark (?) line command indicates that there is not enough room to show
all line commands. Specify ?, to display a list of all valid line commands for that
panel.
Related concepts
“Using table display panels” on page 84
Related reference
“DB2 Admin line commands” on page 617
Use the - line command to exclude a line from a list on table display panels.
Use the = line command to repeat the last line command that you issued.
The panel in the following figure shows how the = line command is used. In this
example, the DIS command has been entered to request a display of the database
named DBEDB1. When DB2 Admin returns from executing the line command, the
asterisk replaces the first character of that command in the Select field. If you
specify = in the Select field of the next line and press Enter, the DIS line command
is executed for database DBEDB2.
Enter the = line command multiple times, as shown in Figure 25 on page 90, to
issue the next line command when DB2 Admin returns from executing the current
line command; the panel where the = line commands are entered is not shown
between executions of the line commands.
Figure 24. Issuing the '=' line command on the Databases panel (ADB21D)
Figure 25. Issuing the '=' line command multiple times on the Databases panel (ADB21D)
Use the / line command to show all column names and their values for the
selected row.
The panel in the following figure illustrates the use of the / line command on
database DSNDB06.
Figure 26. Issuing the '/' line command on the Databases panel (ADB21D)
The panel in the following figure shows the result. All column names and their
values from the catalog table (SYSIBM.SYSDATABASE in this case) are displayed.
To use Look Up, type a question mark (?) in any field that is supported by Look
Up and press Enter. (Not all input fields support Look Up; the fields that do
support Look Up are denoted by a question mark at the end of the field.)
After you press Enter, a list of valid choices is displayed. You can select a value
from this list by entering a plus sign (+) to the left of your choice.
By using Look Up, you can save keystrokes and avoid typing errors. You can also
avoid backing out of the current panel in order to search for the correct object.
An example of using the DB2 Admin Look Up function is shown in the following
figures. In this example, the DB2 Admin Look Up function is supported by two
fields, TABLESPACE and IN, both of which show a question mark in the text to
the right of the field. The table space name TSPACE01 has been entered, but the
character string DSN? is a request to display all databases that begin with DSN.
The following figure shows the results of using Look Up. All databases that begin
with DSN are displayed. Select an item by entering a plus sign (+) in the Select field
next to the desired table entry. In this example, DSN8D81A is selected. When you
press End, DB2 Admin enters this name in the IN field of the previous panel.
Figure 29. Using the DB2 Admin Look Up function — selecting an object on the Databases
panel (ADB21D)
Some fields support the Look Up function. You can use the question mark (?) Look
Up character to search possible values that you can enter in the fields. If the
question mark is entered in a field where the DB2 Admin Look Up function is not
supported, an error message results. The question mark has its own unique
meaning on table display panels.
The plus sign (+) Look Up character should only be used to select an object from
the list returned by the DB2 Admin Look Up function. If the plus sign is entered
on a table not provided by the DB2 Admin Look Up function, an invalid line
command error message is returned.
Related concepts
“Using table display panels” on page 84
You can use a percent sign (%) or an asterisk (*) as a wildcard character in your
search argument. If you use an asterisk as a wildcard character, DB2 Admin
translates it to a percent sign. The asterisk is also displayed as a percent sign when
the panel is re-displayed.
For example, the panel in the following figure shows how you can use a search
argument with wildcard characters in the Name field on the DB2 System Catalog
panel (ADB21) to display all the databases in the DB2 system catalog with names
that contain the characters 'DSN'.
More: +
Object options: DB2 System: DB2X
AO - Authorization options DB2 SQL ID: ISTJE
G - Storage groups P - Plans
D - Databases L - Collections
S - Table spaces K - Packages
T - Tables, views, and aliases M - DBRMs
V - Views H - Schemas
A - Aliases E - User defined data types
Y - Synonyms F - Functions
X - Indexes O - Stored procedures
C - Columns J - Triggers
N - Constraints Q - Sequences
DS - Database structures DSP - DS with plans and packages
Enter standard selection criteria (Using a LIKE operator, criteria not saved):
Name ===> %DSN% > Grantor ===> >
Owner ===> > Grantee ===> >
In D/L/H ===> > Switch Catalog Copy ===> N (N/S/C)
And/or other selection criteria (option xC shows you columns for option x)
Column ===> > Operator ===> Value ===>
When you press Enter, DB2 Admin generates an SQL statement that searches the
DB2 catalog using an SQL LIKE operator to qualify the search for the search
criteria. The following figure shows the ISPF table display that DB2 Admin returns.
All databases that meet the search criteria (have a name that contains the
characters 'DSN') are displayed.
The less than (<) and the greater than (>) symbols denote a scrollable field. A >
symbol indicates that the field can be scrolled to the right, and a < symbol
indicates that the field can be scrolled to the left. Both symbols are displayed when
you are in the middle of data and can scroll either left or right. You can use the
following ISPF commands to work with the field:
v To scroll through the field, type LEFT or RIGHT in the command field, position
the cursor in the field, and press Enter.
v To see the entire contents of the field at once, type EXPAND in the command
field, position your cursor in the scrollable field, and press Enter.
| v To clear the contents of the field, type ZCLRSFLD in the command field,
| position your cursor in the scrollable field, and press Enter. (If your level of
| z/OS does not support the ZCLRSFLD command, you can use the EXPAND
| command to display the entire contents of the field, and then clear the contents
| of the field in the pop-up window.)
Tip: You can assign your PF keys to be the LEFT, RIGHT, EXPAND, and
ZCLRSFLD commands. Using a PF key simulates both typing in the
command and pressing Enter.
For example, the following figure shows the ALTER Table panel. On this panel,
input fields New owner and New name are scrollable. Output field Old name and
output column Column Name are scrollable.
DEPTNO 1 CHAR 3 0 Y Y 1
MYSPECIALNAME_DEPT 2 VARCHAR 36 0 Y Y 2
MGRNO 3 CHAR 6 0 Y Y 3
ADMRDEPT 4 CHAR 3 0 Y Y 4
LOCATION 5 CHAR 16 0 Y Y 5
******************************* END OF DB2 DATA *******************************
As shown in the panel in the following figure, if you were to scroll the Column
Name field to the right, you would see the rest of the column name for column 2,
and a < symbol would appear to show that the field can be scrolled to the left:
Old Operation
Select Column Name Col No Col Type Length Scale Null D Col No Type
* * * * * * * * *
------ <----------------- ------ -------- ------ ------ ---- - ------ ---------
1 CHAR 3 0 Y Y 1
E_DEPTNAME 2 VARCHAR 36 0 Y Y 2
3 CHAR 6 0 Y Y 3
4 CHAR 3 0 Y Y 4
5 CHAR 16 0 Y Y 5
******************************* END OF DB2 DATA *******************************
When you use the STATUS command, the DB2 Admin Status panel is displayed, as
shown in the following figure.
Using the DB2 Admin Status panel, you can verify the environment in which DB2
Admin is running (for example, the current SQL ID and the DB2 release). In
addition, execution control counts are displayed.
The DB2 Administration Menu panel, as shown in the following figure, is referred
to throughout this information.
DB2 Admin includes a sample application as part of the product. You can access
the sample application from this panel by specifying the “hidden” option S.
Remember: This tutorial is based on the DB2 sample database that is provided
with DB2. If you do not have the sample database installed on your
system, you can still follow along with the tutorial by using one of
your own databases.
Topics:
v “Running queries” on page 102
v “Sorting display data” on page 103
v “Running utilities” on page 105
v “Granting authorizations” on page 108
v “Creating views” on page 109
v “Binding plans and packages” on page 110
v “Displaying detailed information about an object” on page 114
v “Reverse engineering objects” on page 115
Figure 36 on page 102 shows the DB2 Administration Menu panel that is displayed
when you start DB2 Admin. The top of the panel shows the DB2 Admin functions
you can choose. The bottom of the panel shows other DB2 tools (in this case, DB2
Interactive and DB2 Object Comparison Tool) that can be invoked from the main
menu; this is a customization option.
Choose option 1 on the panel, as shown in the following figure, to display the DB2
System Catalog panel.
More: +
Object options: DB2 System: DB2X
AO - Authorization options DB2 SQL ID: ISTJE
G - Storage groups P - Plans
D - Databases L - Collections
S - Table spaces K - Packages
T - Tables, views, and aliases M - DBRMs
V - Views H - Schemas
A - Aliases E - User defined data types
Y - Synonyms F - Functions
X - Indexes O - Stored procedures
C - Columns J - Triggers
N - Constraints Q - Sequences
DS - Database structures DSP - DS with plans and packages
Enter standard selection criteria (Using a LIKE operator, criteria not saved):
Name ===> TABLE1 > Grantor ===> >
Owner ===> > Grantee ===> >
In D/L/H ===> > Switch Catalog Copy ===> N (N/S/C)
And/or other selection criteria (option xC shows you columns for option x)
Column ===> > Operator ===> Value ===>
The following figure shows the ISPF table display panel that DB2 Admin returns.
All databases that meet the search criteria are displayed in the Name field.
Related concepts
“Using the DB2 Admin Parameters panel” on page 122
The following figure shows the information DB2 Admin returns when a SORT
primary command is issued. You can also sort on any column by typing the SORT
primary command, putting your cursor in the column to be sorted, and pressing
Enter.
You can save a sort sequence for a panel and the sequence is displayed every time
that the panel is displayed (until specifically deleted). The saved sort sequence for
each panel is saved in an ISPF table named ADBSORT in the user ISPPROF data
set. You can specify the sort sequence for a panel by using the SORT command
(without parameters). Panel ADBSORT is displayed, on which you can save or
delete the sort sequence for that panel.
Using the SORT command, you can also sort the data using the displayed column
header name.
You can navigate the catalog. If you enter the S line command in the Select field
next to database DSN8D81A in the panel in the previous figure, DB2 Admin
displays all table spaces in database DSN8D81A. The results of issuing the S line
command are shown in the following figure.
You can issue commands against DB2 objects. From the Table Spaces panel, you
can issue DB2 commands against DB2 objects. The previous figure demonstrates
DB2 Admin ------- DB2X Browse DB2 Command Output --- Line 00000000 Col 001 080
Command ===> Scroll ===> PAGE
Related concepts
“Running utilities”
Running utilities
You can run DB2 utilities from DB2 Admin.
Redisplay the Table Spaces panel. Specify line command UTL for table space
DSN8S81D. DB2 Admin responds by displaying the utilities that can be run against
a table space, as shown in the following figure.
You can run the COPY utility against the table space by specifying option C, which
requests a full image copy. The following figure shows the JCL that DB2 Admin
returns to you. The JCL is ready to be submitted.
Back to the Table Spaces panel again, you can determine what tables are in a table
space by issuing the T line command. The following figure shows the tables in
table space DSN8S81D.
DB2 Admin ----------- DB2X Tables, Views, and Aliases ----------- - Row 1 of 1
Command ===> Scroll ===> PAGE
To see the columns in a table, issue the C line command against the DEPT table. The
result is shown in the following figure.
Index Table C C C
Select Index Name Owner Table Name Owner U Cols G D L T
* * * * * * * * * *
------ ------------------ -------- ------------------ -------- - ------ - - - -
XDEPT1 DSN8810 DEPT DSN8810 P 1 N Y N 2
XDEPT2 DSN8810 DEPT DSN8810 D 1 N Y N 2
XDEPT3 DSN8810 DEPT DSN8810 D 1 N Y N 2
******************************* END OF DB2 DATA *******************************
Related concepts
“Sorting display data” on page 103
Granting authorizations
You can grant authorizations with DB2 Admin.
You can find the authorizations for any DB2 object by issuing the A line command.
The following figure shows the output that DB2 Admin returns when the A line
command is issued against table DEPT.
Issue the GR line command to grant privileges for the object. The following figure
shows the information that DB2 Admin returns when GR is issued against table
DEPT.
GRANT
ON TABLE
TO
To ===> USERX
>
Creating views
You can create views in DB2 Admin.
From the Tables, View, and Aliases panel, as shown in the following figure, you
can request the SQL source that created a view. To do this, issue the VS line
command against the VDEPT view.
As shown in the following figure, you can request that DB2 Admin display the
definition of the view using ISPF edit.
DB2 Admin -------------- DB2X Create View Source Statements ------------- 00:54
Command ===>
From the System Catalog menu, select option P to list the application plans in the
catalog as shown in the following figure.
Use the M line command from the Application Plans panel to display the DBRMs
for an application plan. The following figure shows the output that DB2 Admin
returns when the M line command is issued against application plan DSNTIAD.
Line commands:
P - Plans B - Browse DBRM S - SQL statements I - Interpretation
To request the actual SQL statements in the DBRM, issue line command S. The
result is shown in the following figure.
From the Application Plans panel, you can issue a Bind, Rebind, or Free line
command for a particular plan. You can also issue a BIND, REBIND, FREE, or
GRANT primary command for all plans listed.
The following figure shows the result when you request a Bind of application plan
DSNTIAD.
More: +
Verify BIND parameters:
BIND PLAN(
Plan name ===> DSNTIAD
) OWNER(
Plan owner ===> DSCGDB2 >
) QUALIFIER(
Qualifier ===> DSCGDB2 > (qualifier to resolve unqualified SQL)
) MEMBER( (use ? to get current values from the catalog)
DBRM members ===> ?
DEGREE(
Parallelism ===> (1 or ANY)
) SQLRULES(
Connect2 rules ===> (DB2 or STD)
) DISCONNECT(
Disconnect ===> (Explicit, Automatic, or Conditional)
) DYNAMICRULES(
Dynamic rules ===> (Run or Bind)
) KEEPDYNAMIC(
Keep dynamic SQL===> (Yes/No)
) DEFER(PREPARE)/NODEFER(PREPARE)
Defer prepare ===> (Yes/No)
) REOPT(VARS)/NOREOPT(VARS)
Re-opt at exec ===> (Yes/No)
) DBPROTOCOL(
3 part protocol ===> (Drda or Private)
) OPTHINT(
Access path hint===> > (hint id)
) PATH(
UDT/UDF/STP path===>
)
ENCODING(
Scheme or CCSID ===> (ASCII, EBCDIC, UNICODE or ccsid)
)
DB2 Admin uses the catalog to automatically find the DBRM members and
libraries for the bind. These are displayed when you press Enter, as shown in the
following figure.
More: +
Verify BIND parameters:
BIND PLAN(
Plan name ===> DSNTIAD
) OWNER(
Plan owner ===> DSCGDB2
) QUALIFIER(
Qualifier ===> DSCGDB2 (qualifier to resolve unqualified SQL)
) MEMBER( (use ? to get current values from the catalog)
DBRM members ===> DSNTIAD
...
Figure 56. DBRM members and libraries for the BIND (ADB21PB)
If an SQL error occurs, DB2 Admin displays the DSNTIAR message, as shown in
the following figure.
When you press Enter, a second error panel opens to display the actual SQL
statement that caused the error as shown in the following figure.
PREPARE
SELECT T.* FROM SYSIBM.SYSTABLES T WHERE T.CREATOR LIKE 'DSN and T.TYP = 'V'
FOR FETCH ONLY
The starting point for reverse engineering can be databases, table spaces, tables,
aliases, synonyms, schemas, data types, functions, stored procedures, triggers,
sequences, or storage groups.
The following figure shows the panel that is displayed when reverse engineering
of database DSN8D81A is requested using the GEN line command.
New names/values for generated SQL: (leave blank to use current values)
Object owner. . . . . : > Run SQLID. . . . . . . . . : SQLIDXXX
Object grantor. . . . : >
Alloc TS size as. . . : DEFINED (DEFINED, USED, or ALLOC)
Database name . . . . :
Storage group for TS. : > Storage group for IX . . . : >
Target DB2 version. . : (Current DB2 version: 810)
Use Masking . . . . . : YES (Yes/No)
Generate catalog stats: NO (Yes/No/Only)
Target cat qualifier: > (Default is SYSIBM)
Press Enter to display the reverse engineering output. This figure shows part of the
result of running reverse engineering on this database.
If you specify Y for REBIND PLAN/PACKAGE on the Generate SQL from DB2
Catalog Panel shown inFigure 60 on page 116, you get not just the Reverse
Engineering output shown in Figure 61 on page 117, but also that shown in the
following figure.
Topics:
v “Using the DB2 Admin Parameters panel” on page 122
v “Changing ISPF settings” on page 122
v “Changing colors and highlights” on page 122
v “Changing DB2 Admin defaults” on page 123
v “Changing/Allocating print data sets” on page 126
v “Changing DB2 Admin prompt options” on page 127
| v “Changing migrate settings” on page 129
v “Changing the SQL ID” on page 129
Related concepts
“DB2 Administration Menu panel” on page 97
Select option P on the Administration Menu panel to display the Change DB2
Admin Parameters panel, as shown in the following figure.
Use this panel to select the DB2 Admin parameters that you want to change. To
select a category of parameters, enter the corresponding option in the Option field
and press Enter.
| DB2 Admin ---------------- DB2 Change DB2 Admin Settings ---------------- 11:10
| Option ===>
|
| 0 - Change ISPF settings DB2 System: DB2X
| 1 - Change colors and highlight DB2 SQL ID: ISTJE
| 2 - Change DB2 Admin defaults
| P - Change/allocate print data set
| BP - Change batch parameters
| PR - Change prompt options
| M - Change migrate settings
||
| Figure 64. Change DB2 Admin Settings panel (ADB2P)
|
Related concepts
“Running queries” on page 102
Select option 0 on the Change DB2 Admin Settings panel, to display the change
ISPF Settings panel.
Use this panel to change standard ISPF settings such as PF keys and default colors.
Select option 1 on the Change DB2 Admin Settings panel to display the Change
Colors and Highlight panel, as shown in the following figure.
Use this panel to change the colors or highlighting scheme (or designations)
technique on DB2 Admin panels.
If you leave an input field on the panel blank, the default value is used. Specify
RESET on the command line to choose default values for all sections of the panel.
Valid Colors : yellow red blue green white pink and turq
Valid Highlights : blink reverse uscore or blank (default)
Color: Highlight:
Headings: YELLOW
Text: BLUE
Highlighted text: TURQ
Messages: RED
Function: WHITE
Input areas: GREEN
Output areas: TURQ
Scrollable fields: BLUE
Scrollable columns: BLUE
Select option 2 on the Change DB2 Admin Settings panel to display the Change
DB2 Admin Defaults panel, as shown in the following figure.
Use this panel to change various parameters that affect the execution of DB2
Admin.
Select option P on the Change DB2 Admin Settings panel to display the
Change/Allocate Print Data Set panel, as shown in the following figure.
Use this panel to allocate a print data set for the DB2 Admin print function.
Select option PR on the Change DB2 Admin Settings panel to display the Prompt
Options panel, as shown in the following figure. Use the Prompt Options panel to
change DB2 Admin prompt options. By turning on the prompt option, you are
prompted before certain SQL statements are run. Specify YES to activate prompting
on the options listed in the following figure.
When any of the prompt options are used, the Statement Execution Prompt panel
is displayed, as shown in the following figure. For example, in the previous figure,
prompting before running authorization statements is requested. The following
figure shows the prompt panel that is displayed before running a request to grant
load access to database TESTDB01.
DB2 Admin is about to execute the statement below. You have asked to be
prompted before DB2 Admin executes this type of statement. What do you want to
do now:
1 - Execute the statement
2 - Edit the statement
3 - Create a batch job with the statement
4 - Add the statement to the work statement list
CAN - Cancel
Work statement list dsn ===>
Work statement list name ===> Action ===> A (Append or Replace)
More: +
Statement that is about to be executed (first 28 lines):
GRANT LOAD
ON DATABASE TESTDB01
TO ISTJE
When more than one SQL statement is to be run, the message (add an A for all
stmts. For example 1A – Execute all stmts) is issued on the Statement
Execution Prompt panel, and the following additional options are available:
In all other cases, DB2 uses the composite privileges, that is, the combined
privileges of your current, primary, and secondary SQL IDs.
Enter: Current:
New DB2 SQL ID ===> DB2 SQL ID: ISTJE
Secondary
S SQL ID
*
- --------
RAVUTS
RAVVB0
RAVW
RGEP
RGET
RGEULA
RGEULR
RGEUPA
RGEUPR
RGEUPS
2. Either enter a new SQL ID in the New DB2 SQL ID field or use the S line
command to select from the list of secondary SQL IDs. The list of secondary
SQL IDs is created by simulating or invoking the authorization exit in your
system. The SET CURRENT SQLID='sqlidname' command is issued to change
the current SQL ID.
Requirement: To change the current SQL ID to one that is not included in the
list of secondary SQL IDs, you must have SYSADM privilege.
The ID you choose remains in effect until you change it again.
Topics:
v “Using the System Catalog panel” on page 132
v “Using a copy of the DB2 catalog” on page 133
v “Selecting a copy of the DB2 catalog” on page 133
v “Creating reports from the DB2 catalog” on page 134
| v “Redefined columns in the DB2 catalog” on page 138
v “DB2 Admin restrictions on DB2 object names” on page 139
Related information
Chapter 25, “System catalog panels,” on page 545
The System Catalog panel is displayed, as shown in the following figure, when
you select option 1 on the DB2 Administration Menu panel. If your display has
fewer than 32 rows, scroll down the panel to view all the rows.
Enter one of the object codes on the command line (for example, D for databases).
You can limit the information that is returned by entering one or more selection
criteria at the bottom of the panel. For example, D402 limits the search to databases
whose names begin with D402. In response to your choices, DB2 Admin creates and
executes an SQL statement that searches the DB2 catalog for the object or
authorization you have requested.
When you specify selection criteria, you can change from a LIKE search (a "fuzzy"
search) to an exact search, using an equal sign (=). You can use the LIKE ON and
LIKE OFF primary commands to toggle between a "fuzzy" search (LIKE ON) and
an exact search (LIKE OFF).
You can save (or not save) your search criteria between DB2 Admin sessions using
the SAVE ON and SAVE OFF primary commands. When the SAVE ON command
is active, the text criteria saved appears on the System Catalog panel. With SAVE
ON, the search criteria is restored when you re-enter a DB2 Admin session.
More: +
Object options: DB2 System: DB2X
AO - Authorization options DB2 SQL ID: ISTJE
G - Storage groups P - Plans
D - Databases L - Collections
S - Table spaces K - Packages
T - Tables, views, and aliases M - DBRMs
V - Views H - Schemas
A - Aliases E - User defined data types
Y - Synonyms F - Functions
X - Indexes O - Stored procedures
C - Columns J - Triggers
N - Constraints Q - Sequences
DS - Database structures DSP - DS with plans and packages
Enter standard selection criteria (Using a LIKE operator, criteria not saved):
Name ===> > Grantor ===> >
Owner ===> > Grantee ===> >
In D/L/H ===> > Switch Catalog Copy ===> N (N/S/C)
And/or other selection criteria (option xC shows you columns for option x)
Column ===> > Operator ===> Value ===>
For optimum performance, specify selection criteria for all authorization options
(xA) and enter a value in the Grantor field or the Grantee field.
Related concepts
“Overview of reports” on page 134
| Overview of reports
| You can you can use the REP command to generate reports that can be saved and
| printed.
| Reviewing printed reports can be faster than stepping through the information
| online. Saving reports about your databases at various points in time also allows
| you to perform trend analysis, which enables you to manage your environment
| more efficiently and more proactively.
| When you issue the REP command, a panel is displayed that allows you to specify
| the content of the report. You choose which types of objects that you want
| included in the report. For example, for a database, you might want a report that
| lists the table spaces, tables, and indexes in the database. Or, for a group of
| schemas, you might want a report that lists the distinct types in each schema.
| After you specify the objects for the report, DB2 Admin generates JCL for a batch
| job that produces the report in a printable format. The batch job contains two
| steps. The first step invokes the GEN function to produce a version file for the
| objects that are to be included in the report. The second step formats the records in
| the version file into a report that is written to a data set.
| The following figure shows an example of the summary section of the report:
|
| ADB2GEN parameters active when this data was collected :
|
| Create Database(s) : Yes Create Tablespace(s) : Yes Create Table(s) : Yes
| Create View(s) : No Create Index(es) : No Create Synonym(s) : No
| Create Alias(es) : No Create Label(s) : No
| Create Triigers : No also for refs not gen'd : No
| Create Foreign key(s) : No also for refs not gen'd : No
| Create User def. Types : No Create Functions : No Create Stored Procedures: No
|
| Column information will not be included in this report.
|
| Figure 74. Example of the summary section
|
| The following figure shows an example of a detailed report section for table
| spaces:
|
| Generating a report
| You can generate reports that can be saved and printed.
| To generate a report:
| 1. From the DB2 Admin Main Menu, specify option 1 to display the System
| Catalog panel.
| 2. Select one of the options that supports the ability to specify the REP command
| to generate a report. The following options support the ability to specify the
| REP command to generate a report:
| v Databases (option D)
| v Table Spaces (option S)
| v Tables, Views, and Aliases (option T)
| v Aliases (option A)
| v Synonyms (option Y)
| v Schemas (option H)
| v Data (or Distinct) Types (option E)
| v Functions (option F)
| v Storage Groups (option G)
| v Stored Procedures (option O)
| v Triggers (option J)
| v Sequences (option Q)
| You can use the fields at the bottom of the panel to specify search criteria to
| filter or limit the number of objects that are displayed.
| 3. Generate a report.
| v To generate a report for the single object, issue the REP line command.
| v To generate a report for all of the listed objects, issue the REP primary
| command.
| The following figure shows the REP command being issued against a database.
|
| When you use either the REP line command or the REP primary command, the
| Generate Report from DB2 Catalog panel, as shown in the following figure, is
| displayed. The Generate Report from DB2 Catalog panel that is displayed
| (ADB2REP, ADB2REPS, or ADB2REP6) and the fields that are included on the
| panel depend on the type of object that the REP command was issued for.
| 4. Fill in the fields on the Generate Report from DB2 catalog panel and press
| Enter.
| 5. Use the panel to specify the following items:
| v The types objects that you want included in the report. Specify Y for each
| object type that you want. For triggers, specify D to include triggers that refer
| to extracted tables.
| v Whether to have the column properties for objects that have associated
| columns included in the report. This field is displayed only when it is
| applicable.
| v The data set information for the report output.
|
| You are now ready to print the data set with the carriage control and rotate
| options specified to review the report.
| In some DB2 catalog tables, when a column with an INTEGER data type became
| too small to hold large values, DB2 added a corresponding column with a FLOAT
| data type to the catalog table to replace the INTEGER column. For example,
| CARDF was added for CARD in SYSTABLES, and FIRSTKEYCARDF was added
| for FIRSTKEYCARD in SYSINDEX. The DB2 SQL Reference shows that the
| INTEGER version of the column is no longer used. When the catalog table is
| queried by using SPUFI (SELECT *), the value for the unused column might be
| displayed as 0 or -1.
| DB2 Admin handles these pairs of INTEGER and FLOAT columns differently than
| DB2 does. For readability, DB2 Admin displays the integer equivalent of the value
| that is in the FLOAT column in the INTEGER column if the value fits. If the value
| is too large, DB2 Admin displays 11 asterisks instead.
| The following columns contain the corresponding integer value of the floating
| point column when the floating point column also is present in the SELECT list:
| v CARD
| v COLCARD
| v FIRSTKEYCARD
| v FULLKEYCARD
| Within a SELECT in DB2 Admin, use one of the following methods to get the real
| value from the DB2 catalog:
| v Do not specify both the integer and floating point column in the SELECT list.
| v Rename one of the columns in the SELECT list by using AS, for example,
| SELECT CARD AS MYCARD.
| v Change the data type in the result, for example, SELECT
| DECIMAL(COLCARD,11,0)
| DB2 Admin puts two restrictions on DB2 object names. Do not use:
| v Object names that contain Unicode characters that cannot be translated into the
| EBCDIC CCSID that DB2 Admin is using.
| v Object names that contain an apostrophe (').
| Object names that contain these characters can be displayed, but when a line
| command is used with either of the restricted object names, an error (SQLCODE
| -104) or warning message might be displayed.
| Related reference
| “DB2 Admin line commands” on page 617
This information describes how to use DB2 Admin to perform the following tasks:
v Issue dynamic SQL statements from your screen, from a data set, or from
program file
v Build and run SQL SELECT, INSERT, UPDATE, and DELETE statements
interactively by using line commands
v Run the following SQL statements by entering required parameters: CREATE,
DROP, LABEL ON, COMMENT ON, GRANT, and REVOKE
The two panels for this function are also used from the system catalog panels,
where they are shown when a line command is issued against an object. When
invoked in this way, the object names contain the object name from the catalog.
Topics:
v “Selecting a method for building and running SQL statements” on page
142
v “Running SQL statements from screen input” on page 143
v “Running SQL statements from a data set” on page 144
v “Running or explaining SQL statements from a program file” on page
144
v “Building SQL SELECT, INSERT, UPDATE and DELETE prototypes” on
page 147
v “Issuing CREATE, DROP, LABEL ON, and COMMENT ON statements”
on page 152
v “Granting and revoking privileges on objects panel” on page 167
v “Revoking system authority from an SQLID” on page 168
Related concepts
“DB2 Administration Menu panel” on page 97
To use the Execute SQL Statements panel to choose how you want to build and
run SQL statements:
1. Select option 2 on the Administration Menu panel. The Execute SQL Statements
panel is displayed, as shown in the following figure,
DB2 Admin ----------- Execute SQL Statements from Screen Input ---------- 01:36
Command ===>
Press ENTER to execute the SQL statement, or enter EDIT on the command line to
edit it. Use command CAPS (OFF/ON) to change the caps mode.
Figure 79. Execute SQL Statements from Screen Input panel (ADB221)
2. Type your SQL statements in the SQL statement field using free form. Separate
each SQL statement with a semicolon (;).
3. Press Enter to run your SQL statements. DB2 Admin runs SQL statements one
at a time.
4. Press Enter to issue subsequent SQL statements.
If an SQL SELECT statement returns rows, the result is shown on the default table
display panel.
You can edit an SQL statement by entering EDIT on the command line.
By default, any SQL statement that you enter is converted to uppercase. To disable
this, use the CAPS OFF primary command.
ISPF library:
Project ===>
Group ===> ===> ===> ===>
Type ===>
Member ===> (blank for member selection list)
ISPF library:
Project ===>
Group ===> ===> ===> ===>
Type ===>
Member ===> (blank for member selection list)
Figure 81. Execute SQL Statements from a Data Set panel (ADB222)
2. Select option 2 to specify that the SQL statements to run or explain are in a
program file and specify the type of program. The types are:
1 COBOL
2 PL/I
If you specify the program type as a parameter when you issue the RUN or
EXPLAIN primary command for the SQL statement, the parameter for the type
overrides the value that is set in the Program type field.
3. Specify the data set name that contains the program. The input data set can be
specified as:
v An ISPF library
v A partitioned or sequential data set
v A pre-allocated ddname
4. Press Enter to display the program file, as shown in the following figure.
5. Use the C line command or the CC block command to select the SQL statement
to run or explain. Only one SQL statement can be selected at a time.
Because prototyping is similar for each of the SQL statements covered by this
option, this information describes only how to build the SELECT statement.
SELECT ?
FROM DSN8810.EMP T
WHERE ?
ORDER BY ?
GROUP BY ?
Commands: EDIT RESET * QUOTE INS UPD DEL COUNT COUNT_BIG
Line commands: S - Show SA - Show ASC SD - Show DESC
AVG, COUNT, COUNT_BIG, MAX, MIN, STDDEV, SUM, VARIANCE - Aggregate functions
<oper><expr>, OR <pred>, IN list, BETWEEN <expr>,<expr> - WHERE predicates
Select Column Name Col Type Length
* * *
---------------------------------- ------------------ -------- -----------
EMPNO CHAR 6
S FIRSTNME VARCHAR 12
S MIDINIT CHAR 1
S LASTNAME VARCHAR 15
S WORKDEPT CHAR 3
PHONENO CHAR 4
HIREDATE DATE 10
JOB CHAR 8
EDLEVEL SMALLINT 2
SEX CHAR 1
BIRTHDATE DATE 10
>30000 SALARY DECIMAL 9
BONUS DECIMAL 9
COMM DECIMAL 9
******************************* END OF DB2 DATA ******************************
SELECT FIRSTNME,MIDINIT,LASTNAME,WORKDEPT,SALARY
FROM DSN8810.EMP T
WHERE SALARY>30000
ORDER BY ?
GROUP BY ?
Commands: EDIT RESET * QUOTE INS UPD DEL COUNT COUNT_BIG
Line commands: S - Show SA - Show ASC SD - Show DESC
AVG, COUNT, COUNT_BIG, MAX, MIN, STDDEV, SUM, VARIANCE - Aggregate functions
<oper><expr>, OR <pred>, IN list, BETWEEN <expr>,<expr> - WHERE predicates
Select Column Name Col Type Length
* * *
---------------------------------- ------------------ -------- -----------
EMPNO CHAR 6
*S FIRSTNME VARCHAR 12
*S MIDINIT CHAR 1
*S LASTNAME VARCHAR 15
*S WORKDEPT CHAR 3
PHONENO CHAR 4
HIREDATE DATE 10
JOB CHAR 8
EDLEVEL SMALLINT 2
SEX CHAR 1
BIRTHDATE DATE 10
SD SALARY DECIMAL 9
BONUS DECIMAL 9
COMM DECIMAL 9
******************************* END OF DB2 DATA *******************************
Use the SD line command, as shown in the previous figure, to add the ORDER
BY clause to the SELECT statement. When you press Enter, the SELECT
statement is updated and displayed, as shown in the following figure.
DB2 Admin --------- DB2X Build SQL SELECT Prototype -------------- Row 1 of 14
Command ===> Scroll ===> PAGE
SELECT FIRSTNME,MIDINIT,LASTNAME,WORKDEPT,SALARY
FROM DSN8810.EMP T
WHERE SALARY>30000
ORDER BY SALARY DESC
GROUP BY ?
Commands: EDIT RESET * QUOTE INS UPD DEL COUNT COUNT_BIG
Line commands: S - Show SA - Show ASC SD - Show DESC
AVG, COUNT, COUNT_BIG, MAX, MIN, STDDEV, SUM, VARIANCE - Aggregate functions
<oper><expr>, OR <pred>, IN list, BETWEEN <expr>,<expr> - WHERE predicates
Select Column Name Col Type Length
* * *
---------------------------------- ------------------ -------- -----------
EMPNO CHAR 6
FIRSTNME VARCHAR 12
MIDINIT CHAR 1
LASTNAME VARCHAR 15
WORKDEPT CHAR 3
PHONENO CHAR 4
HIREDATE DATE 10
JOB CHAR 8
EDLEVEL SMALLINT 2
SEX CHAR 1
BIRTHDATE DATE 10
*SD SALARY DECIMAL 9
BONUS DECIMAL 9
COMM DECIMAL 9
******************************* END OF DB2 DATA *******************************
DB2 Admin -------------- DB2 Result of the SQL SELECT ------------- Row 1 of 8
Command ===> Scroll ===> PAGE
You can also perform SQL prototyping by using the Create View panel
(ADB26CV), as shown in the following figure.
You can use the EDIT command to capture the SELECT statement and store it
in a data set.
CREATE VIEW
Owner ===> > (optional, default is ISTJE)
Name ===> > (? to look up)
( (optional column list)
Col names ===>
Related tasks
“Selecting a method for building and running SQL statements” on page 142
“Running or explaining SQL statements from a program file” on page 144
Restriction: When creating SQL scalar functions, the maximum length of the
return statement is 2MB (32,767KB). When creating SQL stored
procedures, the maximum length of the procedure body is 2MB
(32,767KB).
You can use these examples as models when using this panel to issue other
statements.
Creating a database
Use the Create Database panel to create a new database.
CREATE
DB2 Admin is about to execute the statement below. You have asked to be
prompted before DB2 Admin executes this type of statement. What do you want to
do now:
1 - Execute the statement
2 - Edit the statement
3 - Create a batch job with the statement
4 - Add the statement to the work statement list
CAN - Cancel
Work statement list dsn ===>
Work statement list name ===> Action ===> A (Append or Replace)
More: +
Statement that is about to be executed (first 28 lines):
CREATE DATABASE "DBTEST01"
Figure 92. The Statement Execution Prompt panel (ADB2PSTM) – Creating a new database
Related reference
“Option D. Databases” on page 555
Creating a table
Use the Create Table panel to create a new table.
Optional: In the As model field, specify Y to indicate that you want to use
the LIKE table as a model that you can edit before creating the
table.
v Specify the number of columns for the table. In the panel in the previous
figure, nine columns have been specified.
| 3. Press Enter to continue to the next Create Table Columns panel, as shown in
| the following figure.
Using DB2 Admin, you can create a new index on a table in several ways:
v Select option CX on the Create/Drop/Label/Comment On Objects panel
(ADB26).
v Use the CREX line command on the Tables, Views, and Aliases panel (ADB21T).
v Use the CRE line command on the Indexes panel (ADB21X).
v Select option CX on the Explain panel (ADB2E).
Each of these methods display the create index panels, beginning with the Create
Index panel (ADB26CX).
CREATE INDEX
ON
Table owner===> OWNER1 > (default is ISTJE)
Table name ===> TABLE1 > (? to look up)
Like:
Index owner===> > (required for Like usage)
Index name ===> > (? to look up)
After the index is created, DB2 Admin displays the Create Index – Utilities panel
(ADB26CXU), on which you can run several index utilities, including RECOVER
and RUNSTATS.
Related reference
“Option X. Indexes” on page 600
IS
Label ===>
COMMENT ON TABLE
IS
Remarks ===>
Dropping a table
Use the Drop Table panel to drop a table.
To drop a table:
1. Select option DT on the Create/Drop/Label/Comment On Objects panel. The
Drop Table panel is displayed, as shown in the following figure.
DROP TABLE
Use the Report Drop Impacts field on the Change DB2 Admin Defaults panel
(ADB2P2) to set the default (YES or NO) for these reports.
Tip: Use the Drop Impact Report when dropping DB2 objects to avoid dropping
objects that adversely impact other DB2 objects, plans, and packages.
Figure 102. Using the DROP command on the Databases panel (ADB21D)
2. Press Enter. The Drop Database panel (ADB26DD) is displayed, as shown in the
following figure. If you set the default value for Drop Impact Reports to Yes,
the Report Drop Impacts field contains a YES value. You can enter NO to skip
the Drop Impact Report or proceed.
DROP DATABASE
If you request a Drop Impact Report and press Enter, the DROP Impact
Analysis Summary panel (ADB2DIP) is displayed, as shown in the following
figure.
If you press Enter again, the DROP Impact Analysis Details panel (ADB2DIPD)
is displayed. A portion of this panel is shown in the figure below. This panel
displays all objects that are impacted by dropping the object.
Figure 105. Partial display of DROP Impact Analysis Details panel (ADB2DIPD)
On the DROP Impact Analysis Details panel, you can issue the following
primary commands:
RE-SORT
Re-sort the table to its original sequence.
DROP
Proceed to drop the object.
Sort
Sort the table using one or more columns.
On the DROP Impact Analysis Details panel, you can issue the following line
commands:
S Show further details about an object.
DRD
Drop Restrict on Drop for the object.
Occasionally, DB2 tables contain the Restrict on Drop attribute to prevent users
from accidently dropping them. When attempting to drop one or more tables that
have the Restrict on Drop attribute, DB2 Admin displays the Tables with Restrict
on Drop panel, as shown in the following figure.
DB2 Admin -------------- DB2X Tables with Restrict on Drop -------- Row 1 of 1
Command ===>
Drop Table Restricted
SQL Statement: DROP DATABASE "VNDWLBD0"
DROP statement failed because one or more tables are defined with
RESTRICT ON DROP.
DB2 Admin also displays this panel if a user attempts to drop a database or a table
space that contains one or more tables that have the Restrict on Drop attribute.
To remove the Restrict on Drop attribute from a table, use the DRD line command.
The DRD line command removes the Restrict on Drop attribute without dropping
the table.
When dropping a database, table space, or table, you can use the DROP primary
command to remove the Restrict on Drop attribute from the tables that are
involved and then drop the database, table space, or table.
When the PROMPT option is used while dropping an object, the DROP statement
for the object is displayed. You must select option 1 to run the DROP statement. If
the DROP statement fails (with error code –672) because one or more tables have
the Restrict on Drop attribute, the Tables with Restrict on Drop (ADB26DDR) panel
is displayed. At this point, you can take one of the following actions:
v Use the DROP primary command to remove the Restrict on Drop attribute from
the tables and run the DROP statement again. The DROP primary command
generates an ALTER DROP RESTRICT ON DROP statement for each table,
followed by a DROP statement.
v Use the DRD line command to remove the Restrict on Drop attribute for an
individual table.
v Cancel and exit without running the DROP statement.
2. Specify RT in the Option field and press Enter. The Revoke Table Privileges
panel is displayed, as shown in the following figure.
Enter any character in front of the privilege to revoke it from the user:
ON TABLE
Owner ===> MULTIPLE >
Table ===> ALL >
FROM
From ===> >
BY
By ===> ISTJE
| The following example shows how to revoke system authority from an SQLID and
| run a Revoke Impact Report.
This process, which is called reverse engineering, is accomplished by using the GEN
command to extract the SQL for an object from the DB2 catalog.
Extracting the DDL for an object before changes are made is helpful for ensuring
that the changes are applied to the current definition. The DDL also ensures that
the original object definitions are available for fallback purposes.
When extracting objects in databases, table spaces, and tables, you can also
generate all dependent objects, including: table spaces, tables, indexes, views,
synonyms, aliases, referential constraints, table check constraints, and triggers.
When extracting objects in schemas, you can extract the associated distinct types,
sequences, functions, and stored procedures.
In addition to extracting the DDL for objects, you can also generate the DCL for all
authorizations to the objects and the DML for the catalog statistics for the objects.
You can generate the SQL statements online or with a batch job. Batch jobs are
recommended when you extract many objects from a large catalog.
Topics:
v “Generating SQL to re-create a DB2 object” on page 172
| v “Generating SQL using wildcard characters” on page 179
v “Sample output from generating SQL” on page 182
v “Sample output with the Rebind option” on page 186
Related tasks
“Step 18. Create additional DB2 catalog indexes” on page 69
Related reference
“Option A. Aliases” on page 551
“Option D. Databases” on page 555
“Option E. User-Defined Data Types” on page 560
“Option F. Functions” on page 562
“Option H. Schemas” on page 565
“Option O. Stored Procedures” on page 580
“Option S. Table Spaces” on page 591
“Option T. Tables, Views, and Aliases” on page 594
Tip: You can use the fields at the bottom of the panel to specify search criteria
to filter or limit the number of objects that are displayed.
3. Generate SQL.
v To generate the SQL for a single object, issue the GEN line command for the
object.
v To generate the SQL for all of the listed objects, issue the GEN primary
command.
The following figure shows the GEN line command being issued against a
database.
Figure 113. Databases panel (ADB21D) - Example of issuing the GEN command to reverse
engineer objects
Tip: The DDL line command is a convenient alternative to using the GEN
command when you want to view only the DDL for a single object in the
DB2 catalog. The DDL command does not provide the additional options
that the GEN command does for extracting additional information, such as
constraints, authorizations, or dependent objects like triggers, labels, or
comments. The DDL line command is valid anywhere that the GEN line
command is valid with these exceptions:
172 User's Guide and Reference
v It is not valid on the Schemas panel (Option 1.H).
v It is valid on the Indexes panel (Option 1.X).
| Note: When a native SQL procedure statement size is near the 2 MB boundary,
| sometimes GEN cannot generate the native SQL procedure statement
| DDL. Two scenarios can occur when GEN might not be able to generate
| the native SQL procedure DDL:
| v The native SQL procedure statement is created by GEN by first
| constructing the native SQL procedure options from the catalog fields
| (other than sysroutines.text) and appending the native SQL procedure
| SQL-routine-body that is stored in sysroutines.text. Sometimes the
| resulting DDL statement exceeds 2 MB. This might occur because
| more options are generated by GEN (such as keep default option
| values, when the "DB2 defaults handling" option is set to Keep) than
| were specified when the native SQL procedure was created. When the
| 2 MB is exceeded in this scenario, GEN will issue the ADB1915W
| warning message and generate the native SQL procedure DDL as it is
| stored in DB2. The resulting DDL for the native SQL procedure object
| is the exact contents of the sysroutines.text field. If masking or an
| override was specified (such as change owner, change schema, or Run
| SQLID), the ADB1916E error message will be issued instead and GEN
| processing will stop. This is because GEN cannot complete the request
| within 2 MB for the native SQL procedure DDL with the specified
| masks or overrides.
| v GEN attempts to format each DDL statement so it is easy to read.
| Sometimes during the formatting process the extra bytes added for
| formatting cause the formatted statement length to exceed 2 MB.
| When this occurs, GEN will issue the ADB1919W warning message
| and generate unformatted DDL for the native SQL procedure. If
| masking or an override was specified (such as change owner, change
| schema, or Run SQLID), the ADB1920E error message will be issued
| instead and GEN processing will stop. This is because GEN cannot
| complete the request within 2 MB for the native SQL procedure DDL
| with the specified masks or overrides.
When you use either the GEN line command or the GEN primary command,
the Generate SQL from DB2 catalog panel is displayed, as shown in the
following figure.
The statistic fields that are generated are those that are associated
with the objects that are being generated. (The complete list of
statistics fields are those fields that are set by RUNSTATS that can be
modified and the five statistics columns for table functions in
SYSROUTINES, which are not set by RUNSTATS.)
Target cat qualifier
Specify the qualifier to be used in the INSERT, UPDATE, and
DELETE statements for updating catalog statistics.
v In the third set of fields, specify the output file and execution mode options:
Add to work stmt list
Specify Y to save the output to a work statement list data set. Specify
N to suppress work statement list output.
Data set name
Specify the data set in which DB2 Admin should place the generated
SQL. It must be an valid SPUFI input data set name or SYSOUT=x. The
default is SYSOUT=*. If you leave the field blank, the command output
is created as comments in the output file.
Data set disposition
Specify the disposition of the output data set.
Execution mode
Restriction:
v DB2 Admin does not extract IDCAMS DEFINE CLUSTER
statements for VCAT-defined table spaces and indexes.
| v When you reconstruct a stored procedure that is implemented in
| SQL, DB2 Admin cannot recover the original procedure body
| and replaces the original procedure body with the string
Tip: The ability to generate actual allocated space or actual used space
allocations depends on information in the DB2 catalog. The actual data set
sizes for table spaces and index spaces are not retrieved. Set the Alloc TS
size as field to ALLOC or USED only if you have recently run STOSPACE
and RUNSTATS for the selected objects.
Related information
Chapter 21, “Using masks,” on page 503
IBM Publications Center
| The GEN operation supports the use of request parameters that name the specific
| objects that are to be generated. The request for an object is specified by providing
| values for three keywords: TYPE, QUAL, and NAME. For example, the following
| request generates the DDL for database DSNDB04 and all of the objects that it
| contains:
| TYPE='DB',QUAL='',NAME='DSNDB04'
| The VERSION attribute is only for an native SQL procedure and indicates which
| native SQL procedure version or versions to extract. The VERSION attribute can be
| used to specify a specific version to extract, to extract the active version, or all
| versions.
| TYPE='SP',QUAL='DEMBIN2',NAME='MYSTP',VERSION='V1';
| The values for the qualifier and name can contain zero or more of the following
| wildcard characters:
| v Minus sign (-) represents any single character.
| v Percent sign (%) or asterisk (*) represents one or more characters.
| v Any other character represents a single occurrence of itself.
| The rules for the wildcard characters follow the rules that are used for the LIKE
| predicate.
| The following table shows the values to specify in the TYPE, QUAL, and NAME
| keywords for each type of object:
| Table 7. The keyword values of the request parameters for each object type
| Object Type TYPE QUAL NAME Notes
| Database DB n/a dbanme
| Table space TS dbname tsname
| The request parameters are specified in a data set with a DD name of IN. The
| request parameters must follow the run parameters in the data set. Modify the JCL
| that is generated to reverse engineer objects or modify the JCL that is provided in
| sample program ADBGEN to specify names with wildcard characters. The
| following figure shows an example of the sample program:
|
-------------------------------------------------------------------------------
EDIT SYS01311.T012717.RA000.ISTJE.R0215994 Columns 00001 00072
Command ===> Scroll ===> PAGE
****** ***************************** Top of Data ******************************
Figure 117. Sample output of generating SQL with the REBIND option specified
Related reference
“DB2 Admin Reverse Engineering condition codes” on page 637
Topics:
v “Option 1. Table Spaces Without RUNSTATS Information panel” on
page 189
v “Option 1X. Indexes Without RUNSTATS Information panel” on page
190
v “Option 2. Table Spaces With More Than n Percent Relocated Rows
panel” on page 191
v “Option 3. Indexes With Clustering Level Problems panel” on page 192
v “Option 4. Table Spaces With More Than n Percent Dropped Space
panel” on page 194
v “Option 5. DB2 Table Spaces With Locking Size = 'S' panel” on page 195
v “Option 6. Indexes with 2 or More Levels panel” on page 196
v “Option 7. Indexes with 150 or more leaf page distance panel” on page
198
v “Option 8. Indexes On Tables With Fewer Than n Pages panel” on page
199
v “Option 9. Indexes Not Used By Any Plan or Package panel” on page
200
v “Option 10. Table Spaces Containing More Than One Table panel” on
page 201
v “Option 11. Table Spaces Without SPACE Information panel” on page
202
v “Option 11X. Indexes Without SPACE Information panel” on page 203
v “Option 12. Table Spaces Exceeding Allocated Primary Quantity panel”
on page 205
v “Option 12X. Indexes Exceeding Allocated Primary Quantity panel” on
page 206
v “Option 13. Allocated and Used Space for Table Spaces panel” on page
207
v “Option 14. Table Space Maintenance Recommendations panel” on page
209
v “Option 14X. Index Space Maintenance Recommendations panel” on
page 211
The DB2 Performance Queries panel (ADB23) is displayed when you select option
3 on the Administration Menu panel. Use this panel to select the DB2 performance
and space utilization query you want to run. Select an option, and enter (part of)
the name of the database for which the query should be run. See the descriptions
that appear on each panel in this chapter for more information about each option
shown in the following figure.
The select field on the performance queries panels lets you select an object, which
is then shown on the corresponding system catalog panel. This lets you further
investigate problems or choose to run utilities such as REORG and RUNSTATS.
Tip: For table spaces that do not have RUNSTATS information, run the RUNSTATS
utility on them.
The R line command enables you to quickly move to the Batch Job Utility
Parameters panel (ADB2UPA). Entering the R line command is equivalent to
entering S, UT, and R commands in succession.
The following figure shows the Table Spaces Without RUNSTATS Information
panel.
DB2 Admin --- DB2X Table Spaces Without RUNSTATS ROW 981 TO 1,000 OF 1,000
Command ===> Scroll ===> PAGE
The following table spaces do not have RUNSTATS information. Consider running
the RUNSTATS utility on them.
Tip: For indexes that do not have RUNSTATS information, run the RUNSTATS
utility on the indexes or on the table spaces using INDEX(ALL) option.
The R line command enables you to quickly move to the Batch Job Utility
Parameters panel (ADB2UPA). Entering the R line command is equivalent to
entering S, UT, and R commands in succession.
The following figure shows the Indexes Without RUNSTATS Information panel.
The following indexes do not have RUNSTATS information. Consider running the
RUNSTATS utility on the indexes or on the table spaces using INDEX(ALL).
Index Table
S Index Name Schema Table Name Schema
* * * *
- ------------------ -------- ------------------ --------
ADBCKPTX ADB ADBCHKPT ADB
JOBJECT_TABLE_IX DBE JOBJECT_TABLE DBE
OBJECT_TABLE_IX DBE OBJECT_TABLE DBE
DSN_REGISTER_APPLI DSNRGCOL DSN_REGISTER_APPL DSNRGCOL
DSN_REGISTER_OBJTI DSNRGCOL DSN_REGISTER_OBJT DSNRGCOL
XMAP_TBL DSN8810 MAP_TBL DSN8810
XPARTS DSN8810 PARTS DSN8810
CK0X ISTFL2 CK0 ISTFL2
TFLXLIM ISTFL2 TFLTLIM ISTFL2
TFLXLIM2 ISTFL2 TFLTLIM2 ISTFL2
TFLXLIM3 ISTFL2 TFLTLIM3 ISTFL2
TFLXLIM4 ISTFL2 TFLTLIM4 ISTFL2
TFLXLIM6 ISTFL2 TFLTLIM6 ISTFL2
TFLXLTTX1 ISTFL2 TFLTLTTX1 ISTFL2
TFLXLTTX2 ISTFL2 TFLTLTTX2 ISTFL2
TFLXLTTX3 ISTFL2 TFLTLTTX3 ISTFL2
TFLXLTTX4 ISTFL2 TFLTLTTX4 ISTFL2
TFLXLTTX5 ISTFL2 TFLTLTTX5 ISTFL2
TFLXNOVX1 ISTFL2 TFLTNOVX1 ISTFL2
TFLXNOVY1 ISTFL2 TFLTNOVY1 ISTFL2
TFLXV71 ISTFL2 TFLTV71 ISTFL2
TFLXXXX ISTFL2 TFLTXXX ISTFL2
TF2XLIM4 ISTFL2 TF2TLIM4 ISTFL2
TF2XLIM5 ISTFL2 TF2TLIM5 ISTFL2
XD ISTFL2 TD ISTFL2
TYY_BX ISTFL3 TYY ISTFL3
MAPX ISTJE MAP ISTJE
MAPX1 ISTJE MAPT1 ISTJE
MAPX2 ISTJE MAPT2 ISTJE
Tip: For table spaces that have more than 10 percent relocated rows, that is, rows
that are not located in their original page, reorganize the table spaces or
review the pctfree and/or the free page values to leave more space for rows
to grow during an update.
The O line command enables you to quickly move to the Batch Job Utility
Parameters panel (ADB2UPA). Entering the O line command is equivalent to
entering S, UT, and O commands in succession.
DB2 Admin ------- DB2X Table Spaces with Relocated Rows > 10 Pct --------------
Command ===> Scroll ===> PAGE
The following table spaces have more than 10 percent relocated rows,
that is, rows not located in their original page. Consider reorganizing the
table spaces or redesigning the programs that update the rows.
Figure 121. Table Spaces With More Than n Percent Relocated Rows panel (ADB232)
For indexes that have clustering level problems, the message F.O.P TOO BIG is
displayed and indicates that the number of rows in a far offset position is greater
The O line command enables you to quickly move to the Batch Job Utility
Parameters panel (ADB2UPA). Entering the O line command is equivalent to
entering S, UT, and O commands in succession.
The following figure shows the Indexes With Clustering Level Problems panel.
DB2 Admin -------- DB2X Indexes with Clustering Level Problems ---- Row 1 of 1
Command ===> Scroll ===> PAGE
The following indexes have clustering level problems. 'F.O.P TOO BIG' indicates
that the number of rows in a far offset position is greater than 10 percent.
'CLUSTERED xx' indicates that the index was defined as clustering but RUNSTATS
found the clustering ratio to be less than 95 percent. Consider reorganizing
the table spaces or redesigning your indexes, tables, and/or programs. Things
to consider are insert/update/delete patterns and frequencies, freespace/reorg
frequencies, and clustering sequences.
Consider reorganizing the table spaces or redesigning your indexes, tables, and
programs. Consider the insert/update/delete patterns and frequencies,
freespace/reorganization frequencies, and clustering sequences.
You can change the percent argument by typing over it on the DB2 Performance
Queries panel. The panel in the following figure shows 5 percent as an example.
When a table is dropped from a table space, the space it occupied cannot be
reused. If the percent of dropped space is significant, consider reorganizing the
table spaces and use segmented table spaces for the tables.
You should also run the MODIFY utility against table spaces that have dropped
tables. Doing so removes the details of the table from the DBD.
The O line command enables you to quickly move to the Batch Job Utility
Parameters panel (ADB2UPA). Entering the O line command is equivalent to
entering S, UT, and O commands in succession.
The following figure shows the Table Spaces With More Than n Percent Dropped
Space panel.
DB2 Admin ---- DB2X Table Spaces with More Than 5 Pct Dropped Space -----------
Command ===> Scroll ===> PAGE
The following table spaces have more than 5 percent dropped space. When
a table is dropped from a table space, the space it occupied cannot be reused.
If the percentage of dropped space is significant, you should consider
reorganizing the table spaces and/or using segmented table spaces for the
tables.
Figure 123. Table Spaces With More Than n Percent Dropped Space panel (ADB234)
DB2 uses table space locking when accessing a table in the table space. Only use
locking size = 'S' for read-only tables or tables that are accessed by only one user
(or batch job) at a time. If concurrency between updating tasks or updaters and
readers is required, then consider changing the locking size to 'A' (any locking) by
altering the locksize with an ALTER SQL statement.
The following figure shows the DB2 Table Spaces With Locking Size = 'S' panel.
DB2 Admin --------- DB2X Table Spaces with Locking Size = 'S'------------------
Command ===> Scroll ===> PAGE
The following table spaces have locking size = 'S'. DB2 will use table space
locking when accessing a table in the table space. You probably only want
locking size = 'S' for read-only tables or tables that are accessed by only one
user (or batch job) at a time. Consider changing the locking size to 'A' (any
locking), for example, by altering the locksize with an ALTER SQL statement.
Commands: UT - Utilities
Line commands: S - Select AL - Alter
Lock Number of
S DB Name TS Name Size Tables
* * *
-- -------- -------- ---- ---------
D402D10 D402SCIF S 1
D402D10 D402STIF S 1
D455D005 KBBSCOM S 1
D455D005 KBBSCTAB S 1
D455D005 KBBSIMS1 S 1
D455D005 KBBSPRO S 1
D455D005 KBBSAPP S 1
Figure 124. DB2 Table Spaces With Locking Size = 'S' panel (ADB235)
You can specify the threshold for the number of levels (2 to 99).
The Indexes with 2 or More Levels panel shows the number of index levels. If the
number exceeds 2 or 3, the performance of your application programs might suffer.
Consider reorganizing the indexes more often or redesigning the indexes and
tables. Consider key lengths, free space (pctfree and/or freepage), and
insert/delete/update patterns and frequencies.
The O line command enables you to quickly move to the Batch Job Utility
Parameters panel (ADB2UPA). Entering the O line command is equivalent to
entering S, UT, and O commands in succession.
The following figures shows the Indexes with 2 or More Levels panel.
This panel shows indexes with 2 or more levels. If the number exceeds
2 or 3, it might have a negative impact on the performance of your
application programs. You might consider reorganizing the indexes more
often or redesigning the indexes and tables. Things to consider are
key lengths, free space, and insert/delete/update patterns and
frequencies.
You can specify the threshold for the leaf page distance (150 to 9999).
The leaf distance is defined as 100 times the average number of pages between
successive leaf pages of the index. If this value exceeds 200, consider reorganizing
the index. Also, consider redesigning the indexes. Consider free
space/reorganization frequencies and insert/update/delete patterns and
frequencies.
The O line command enables you to quickly move to the Batch Job Utility
Parameters panel (ADB2UPA). Entering the O line command is equivalent to
entering S, UT, and O commands in succession.
The following figure shows the Indexes with 150 or more Leaf Page Distance
panel.
DB2 Admin---- DB2X Indexes with 150 or More Leaf Page Distanc Row 1 to 7 of 11
Command ===> Scroll ===> PAGE
This panel shows indexes with 150 or more leaf page distance. The
leaf page distance is defined as: 100 times the average number of pages
between successive active leaf pages of the index.If this value exceeds
200, consider reorganizing the index. You might also consider redesigning
the indexes. Things to consider are freespace/reorg frequencies and
insert/update/delete patterns and frequencies.
Figure 126. Indexes with 150 or more Leaf Page Distance panel (ADB237)
You can change the page number argument by typing over it on the DB2
Performance Queries panel. The panel in the following figure shows six pages as
an example.
Consider dropping nonunique indexes that are defined on tables that have less
than 6 pages. Unless the index is on a table in a table space that has multiple
tables, it is unlikely to improve performance but will use resources to maintain its
viability. However, do not drop unique indexes, indexes supporting constraints,
clustering indexes, or the only index on a table without a full evaluation.
The DROP line command enables you to quickly issue a DROP INDEX statement.
Entering the DROP line command is equivalent to entering an S line command and
a DROP line command in succession.
The following figure shows the Indexes On Tables With Fewer Than n Pages panel.
DB2 Admin ------- DB2X Indexes on Tables with Fewer Than 6 Pages Row 30 of 38
Command ===> Scroll ===> PAGE
The following nonunique indexes are defined on tables with less than 6
pages. Such indexes defined on tables with less than 6 pages usually do not
improve performance and should probably be dropped.
Commands: UT - Utilities
Line commands: S - Select DROP - Drop Index
Figure 127. Indexes On Tables With Fewer Than n Pages panel (ADB238)
Consider dropping indexes that are not used by any plan or package with static
SQL if they are not used in QMF or any other dynamic SQL statement.
The DROP line command enables you to quickly issue a DROP INDEX statement.
Entering the DROP line command is equivalent to entering an S line command and
a DROP line command in succession.
The following figure shows the Indexes Not Used By Any Plan or Package panel.
The following indexes are not used by any plan or package with static SQL.
Consider dropping the index if it is not used in QMF or any other dynamic SQL
statement.
Commands: UT - Utilities
Line commands: S - Select DROP - Drop Index
Index Table
Sel Index Name Schema Table Name Schema
* * * *
---- ------------------ -------- ------------------ --------
IBMSNAP_CRITSECX ASN IBMSNAP_CRITSEC ASN
IBMSNAP_PRUNCNTLX ASN IBMSNAP_PRUNCNTL ASN
IBMSNAP_REGISTERX ASN IBMSNAP_REGISTER ASN
IBMSNAP_SUBS_COLSX ASN IBMSNAP_SUBS_COLS ASN
IBMSNAP_SUBS_EVENX ASN IBMSNAP_SUBS_EVENT ASN
IBMSNAP_SUBS_MEMBX ASN IBMSNAP_SUBS_MEMBR ASN
IBMSNAP_SUBS_SETX ASN IBMSNAP_SUBS_SET ASN
IBMSNAP_SUBS_STMTX ASN IBMSNAP_SUBS_STMTS ASN
IBMSNAP_UOW_IDX ASN IBMSNAP_UOW ASN
DSN_REGISTER_APPLI DSNRGCOL DSN_REGISTER_APPL DSNRGCOL
DSN_REGISTER_OBJTI DSNRGCOL DSN_REGISTER_OBJT DSNRGCOL
XACT1 DSN8810 ACT DSN8810
XACT2 DSN8810 ACT DSN8810
XDEPT1 DSN8810 DEPT DSN8810
XDEPT2 DSN8810 DEPT DSN8810
XDEPT3 DSN8810 DEPT DSN8810
XEMP1 DSN8810 EMP DSN8810
XEMP2 DSN8810 EMP DSN8810
XEMPPROJACT1 DSN8810 EMPPROJACT DSN8810
XEMPPROJACT2 DSN8810 EMPPROJACT DSN8810
XMAP_TBL DSN8810 MAP_TBL DSN8810
XPARTS DSN8810 PARTS DSN8810
XPROJ1 DSN8810 PROJ DSN8810
XPROJ2 DSN8810 PROJ DSN8810
XPROJAC1 DSN8810 PROJACT DSN8810
XCONA1 DSN8810 TCONA DSN8810
XDSPTXT1 DSN8810 TDSPTXT DSN8810
XOPTVAL1 DSN8810 TOPTVAL DSN8810
Figure 128. Indexes Not Used By Any Plan or Package panel (ADB239)
Option 10. Table Spaces Containing More Than One Table panel
The Table Spaces Containing More Than One Table panel is displayed when you
select option 10 on the DB2 Performance Queries panel.
The following figure shows the Table Spaces Containing More Than One Table
panel.
DB2 Admin ----- DB2X Table Spaces Containing More Than One Table -- Row 1 of 6
Command ===> Scroll ===> PAGE
The following nonsegmented table spaces contain more than one table. In most
cases, nonsegmented table spaces should only contain one table. Unless you
have good reasons for having more than one table per table space (for example,
you want to cluster small read-only tables in one table space), consider moving
the tables to separate table spaces.
Commands: UT - Utilities
Line commands: S - Select
Number of
S DB Name TS Name Tables
* * *
- -------- --------- ---------
DBEDB1 DBETS1 2
DSN8D81A DSN8S81R 6
DSQDBCTL DSQTSCT1 2
DSQ1STBB DSQ1STBT 9
ISTJED ISTJES 6
RAADB RAATSQRC 2
******************************* END OF DB2 DATA *******************************
Figure 129. Table Spaces Containing More Than One Table panel (ADB2310)
For table spaces that do not have SPACE information in the DB2 catalog, use the
DB2 RUNSTATS and STOSPACE utilities to update the SPACE information.
Consider running these utilities on a periodic basis. You can run RUNSTATS with
options that just update the SPACE fields in the catalog.
The R line command enables you to quickly move to the Batch Job Utility
Parameters panel (ADB2UPA). Entering the R line command is equivalent to
entering S, UT, and R commands in succession.
The following figure shows the Table Spaces Without SPACE Information panel.
The following table spaces do not have SPACE information in the DB2 Catalog.
The DB2 RUNSTATS and SPACE utilities can be used to update the SPACE
information. Consider running these utilities on a periodic basis.
Storage VSAM
S DB Name TS Name Part Group Catalog
* * * * *
-- -------- --------- ------ -------- --------
ADBDCH ADBSCH 0 ADBGCH DB2X
DBEDB1 DBETS1 0 SYSDEFLT DB2X
DBEDB2 DBETSSMP 0 SYSDEFLT DB2X
DSNDB04 A 0 SYSDEFLT DB2X
DSNDB04 AABC1OC9 0 SYSDEFLT DB2X
DSNDB04 AABC1Z#Z 0 SYSDEFLT DB2X
DSNDB04 CK0 0 SYSDEFLT DB2X
DSNDB04 CK1 0 SYSDEFLT DB2X
DSNDB04 DSNRFUNC 0 SYSDEFLT DB2X
DSNDB04 DSNRSTAT 0 SYSDEFLT DB2X
DSNDB04 MMRNAMES 0 SYSDEFLT DB2X
DSNDB04 NAMES 0 SYSDEFLT DB2X
DSNDB04 OBJECTRD 0 SYSDEFLT DB2X
DSNDB04 PLANRTAB 0 SYSDEFLT DB2X
DSNDB04 PLAN1$EE 0 SYSDEFLT DB2X
DSNDB04 PLAN1GVH 0 SYSDEFLT DB2X
DSNDB04 PLAN1PW# 0 SYSDEFLT DB2X
DSNDB04 PLAN15TO 0 SYSDEFLT DB2X
DSNDB04 SRP 0 SYSDEFLT DB2X
DSNDB04 STAFF 0 SYSDEFLT DB2X
DSNDB04 TD 0 SYSDEFLT DB2X
DSNDB04 TESTSORT 0 SYSDEFLT DB2X
DSNDB04 TESTSTUF 0 SYSDEFLT DB2X
DSNDB04 TRI2 0 SYSDEFLT DB2X
DSNDB04 TRI21PD3 0 SYSDEFLT DB2X
DSNDB04 TYY 0 SYSDEFLT DB2X
DSNDB04 T1 0 SYSDEFLT DB2X
DSNDB04 T2 0 SYSDEFLT DB2X
DSNDB04 UTLIST 0 SYSDEFLT DB2X
The R line command enables you to quickly move to the Batch Job Utility
Parameters panel (ADB2UPA). Entering the R line command is equivalent to
entering S, UT, and R commands in succession.
The following figure shows the Indexes Without SPACE Information panel.
DB2 Admin -------- DB2X Indexes Without SPACE Information ----- Row 1 of 88
Command ===> Scroll ===> PAGE
The following indexes do not have SPACE information in the DB2 Catalog.
The DB2 RUNSTATS and SPACE utilities can be used to update the SPACE
information. Consider running these utilities on a periodic basis.
For table spaces that exceed the allocated primary quantity, consider extending the
primary allocation.
The AL line command enables you to quickly move to the Alter Table Space panel
(ADB21SA). Entering the AL line command is equivalent to entering an S line
command and then entering an AL line command.
The following figure shows the Table Spaces Exceeding Allocated Primary
Quantity panel.
DB2 Admin ---- DB2X Table Spaces Exceeding Alloc Primary Quantity Row 14 of 30
Command ===> Scroll ===> PAGE
The following table spaces exceed the allocated primary quantity. Consider
extending the primary allocation.
Note: If the primary or secondary quantity of 4K pages is less than the track
capacity for 4K blocks, then the number of extents shown is too high.
Commands: UT - Utilities
Line commands: S - Select AL -Alter Tablespace
Figure 132. Table Spaces Exceeding Allocated Primary Quantity panel (ADB2312)
For indexes that exceed the allocated primary quantity, consider extending the
primary allocation.
The AL line command enables you to quickly move to the Alter Index panel
(ADB21XA). Entering the AL line command is equivalent to entering an S line
command and then entering an AL line command.
The following figure shows the Indexes Exceeding Allocated Primary Quantity
panel.
DB2 Admin --- DB2X Indexes Exceeding Alloc Primary Quantity ROW 1 TO 9 OF 251
Command ===> Scroll ===> PAGE
The following indexes exceed the allocated primary quantity. Consider extending
the primary allocation.
Note: If the primary or secondary quantity of 4K pages is less than the track
capacity for 4K blocks, then the number of extents shown is too high.
Commands: UT - Utilities
Line commands: S - Select AL - Alter Index
Option 13. Allocated and Used Space for Table Spaces panel
The Allocated and Used Space for Table Spaces panel is displayed when you select
option 13 on the DB2 Performance Queries panel.
The DB2 Performance Queries panel shows the allocated and used space for the
table spaces in the databases you have selected. If the allocated space is much less
than the used space, consider reducing the size of the table spaces.
The AL line command enables you to quickly move to the Alter Table Space panel
(ADB21SA). Entering the AL line command is equivalent to entering an S line
command and then entering an AL line command.
The following figure shows the Allocated and Used Space for Table Spaces panel.
This panel shows the allocated and used space for the table spaces in the
databases you have selected. If the allocated space is much less than the used
space, consider reducing the size of the table spaces.
Note: If the primary or secondary quantity of 4K pages is less than the track
capacity for 4K blocks, then the number of extents shown is too high.
Commands: UT - Utilities
Line commands: S - Select AL - Alter Tablespace
Figure 134. Allocated and Used Space for Table Spaces panel (ADB2313)
On this panel, you can enter values (or use the default values) that are used to
calculate recommendations for actions to take. These recommendations can help
you to determine when to run maintenance functions, such as COPY, REORG, or
RUNSTATS on table spaces, or when to enlarge your DB2 data sets.
Restriction: The recommendations that DB2 Admin provides are based on general
formulas and might not apply or be accurate for every installation.
Further, if the real-time statistics tables contain only a small portion of
information about your DB2 subsystem, the recommendations might
not apply to the entire subsystem.
You can either enter parameters to be used in the formulas that query real-time
statistics tables or you can use the defaults.
The following figure shows the Input Parameters for Real-Time Statistics panel.
The input values specified below are used in the calculations which determine
the recommended table space actions. For a full description of any parameter,
use panel HELP and refer to the entry indicated by the parenthesized keyword.
You can specify your own user values for the fields in the panel in the previous
figure, and switch between these user values and the system default values. Use
the RESET primary command to reset all user values to the system default values.
Figure 136. Table Space Maintenance recommendations panel (ADB2314), which is the
result of panel ADB2314T
On this panel, you can enter values (or use the default values) that are used to
calculate recommendations for actions to take. These recommendations can help
you to determine when to run maintenance functions, such as COPY, REORG, or
RUNSTATS on index spaces, or when to enlarge your DB2 data sets.
Restriction: The recommendations that DB2 Admin provides are based on general
formulas and might not apply or be accurate for every installation.
Further, if the real-time statistics tables contain only a small portion of
information about your DB2 subsystem, the recommendations might
not apply to the entire subsystem.
You can either enter parameters to be used in the formulas that query real-time
statistics tables or you can use the defaults.
The following figure shows the Input Parameters for Real-Time Statistics panel.
The input values specified below are used in the calculations which determine
the recommended index space actions. For a full description of any parameter,
use panel HELP and refer to the entry indicated by the parenthesized keyword.
You can specify your own user values for the fields in the previous figure, and
switch between these user values and the system default values. Use the RESET
primary command to reset all user values to the system default values.
Index <---Recommendations--->
Sel Space DBname Part Nactive Space Ext Copy Reorg Runst Resize
* * * * * * * * * *
--- -------- -------- ---- ----------- ----------- --- ---- ----- ----- ------
AUXTST1X DSNDB04 0 12 48 1 YES YES YES NO
XCUSTLAS DSNDB04 0 12 48 1 YES YES YES NO
XCUST000 DSNDB04 0 12 48 1 YES YES YES NO
AUXBB31X DSNDB04 0 12 48 1 YES YES YES NO
SALE1FAM DSNDB04 0 12 48 1 YES YES YES NO
PLAN1L@B DSNDB04 0 12 48 1 YES YES YES NO
XTBIDENT DSNDB04 0 12 48 1 YES YES YES NO
Figure 138. Index Space Maintenance recommendations panel (ADB2314X), which is the
result of panel ADB2314I
A LISTDEF is a DB2 utility statement, which is used list of database objects. DB2
Utility processing generates a list of objects that matches the LISTDEF pattern or
definition, and passes that list to the intended utility.
For example, if you want to make an image copy of all the table spaces in database
ABC, you no longer need to explicitly list each table space. Instead, you can tell
DB2 to make an image copy of every table space in database ABC. DB2 utility
processing builds the list of objects during execution. The LISTDEF approach not
only saves time, but also prevents an object from being erroneously omitted.
The TEMPLATE utility control statement eliminates the need for certain JCL DD
statements during utility processing. In its simplest form, the TEMPLATE control
statement defines the data set naming convention, but it can also control other
allocation attributes, such as size or location.
The template data set name is constructed during the processing of the utility, and
is based on the template's data set name mask or pattern. The data set name mask
or pattern is also likely to include an object-identifying pattern as part of its name,
such as database or space name. Many variables can be used and combined
together to form distinct and unique data set names. This allows a single utility job
step to cover many data objects (using LISTDEFs, for example) and allows the
target output data sets to be defined dynamically with TEMPLATEs.
DB2 Admin also supports the use of TEMPLATEs for DB2 Admin work data sets
that are created and used in the jobs that are generated for the following functions:
alter, restore, redefine, migrate, and object comparison. As with the utility data
sets, TEMPLATES allow you to define your own data set naming convention and
also control other allocation attributes for these non-utility work data sets. The set
of variables that can be specified for the data set names for these non-utility work
data sets depends on the DB2 Admin function.
Topics:
v “Managing LISTDEFs” on page 217
v “Managing TEMPLATEs” on page 226
v “TEMPLATE usage” on page 234
v “Using the utility template to unload data from LOBs” on page 236
| v “Using the utility template to unload data from an XML column” on
| page 237
Topics:
v “Creating the LISTDEF control tables”
v “Adding a LISTDEF” on page 219
v “Editing a LISTDEF” on page 221
v “Editing a single LISTDEF clause” on page 224
v “Deleting a LISTDEF” on page 226
| ADB25 min ----- DSN9 Utility generation using LISTDEFs and TEMPLATEs ---- 00:33
| Option ===>
|
| L - Manage LISTDEFs DB2 System: DSN9
| T - Manage TEMPLATEs DB2 SQL ID: ISTJE
| TU - Specify TEMPLATE usage
|
| CL - Create LISTDEF control table
| UL - Upgrade LISTDEF control table
| CT - Create TEMPLATE control table
| UT - Upgrade TEMPLATE control table
|
| LISTDEF control table:
| Table owner . . . DSNACC >
| Table name . . . UTLIST >
|
| TEMPLATE control table:
| Table owner . . . DSNACC >
| Table name . . . UTTEMPLATE >
||
| Figure 139. Utility generation using LISTDEFs and TEMPLATEs panel (ADB25)
|
2. Select option CL. The LISTDEF Control Table panel is displayed, as shown in
the following figure.
IN
Database ===> (optional, default is DSNDB04. ? to look up)
Table space ===> (optional, if blank DB2 implicitly creates a TS. ?))
Tip: Use the default name if you intend to use the DB2 Control Center in the
future. Using the standard name eliminates the need to populate the
DSNACC tables when you start using the Control Center. However, if
you do choose the default name, be aware that running the DSNTIJCC
job will drop any existing LISTDEF control tables.
v In the Database and Table Space fields, specify location information for the
control tables.
v In the first set of Index Creator and Index Name fields, specify the name of
the index creator and the name of the index for the basic LISTDEF definition
table (DSNACC.UTLIST by default).
v In the second set of Index Creator and Index Name fields, specify the name
of the index creator and the name of the index for the detailed LISTDEF
definition table (DSNACC.UTLISTE by default). The index creator should
match the name specified for the DSNACC.ULIST table, but the index creator
name must be unique.
4. Press Enter to create the tables.
Related tasks
“Running utilities on LISTDEFs” on page 368
Adding a LISTDEF
Use the LISTDEFs panel to add a LISTDEF to the LISTDEF control tables.
Line commands:
A - Add D - Delete E - Edit UT - Utility selection
U.x - Utility generation
Editing a LISTDEF
With DB2 Admin, you can add, delete, or edit a clause contained in a LISTDEF.
Each LISTDEF consists of one or more clauses; each clause represents a separate
line on the panel. When you initially define a LISTDEF, an empty clause is created.
Use the following instructions to complete the definition of a new, empty clause, to
edit an existing clause, or to delete a clause. You then fill in the fields to complete
the definition of the clause; if you fail to fill in a required field, DB2 Admin
prompts you for it. After a clause is created, you can edit it by typing over the
field you wish to change or you can enter an E to the left of the clause to be
changed. This latter approach can be used to edit a single clause.
1. From the LISTDEFs panel, issue the E line command against the LISTDEF that
you want to edit. The Edit LISTDEF panel is displayed, as shown in the
following figure.
Line commands:
A - Add D - Delete E - Edit UT - Utility generation
C - Copy
Sel # Incl/ Targ Srch Obj Srch Obj Srch Obj Name Cpy Part LOB RI
Excl Obj Type Qual or Pattern
* * * * * * * * * *
--- ---- ------- ---- ---------- -------- ------------------ --- ---- --- --
1 INCLUDE TBSP TABLESPACE DSNDB04 *
2 INCLUDE IXSP TABLE DSNDB04 * Y
******************************* END OF DB2 DATA *******************************
New, empty clauses are identified by a question mark (?) in the Incl/Excl field.
The following fields are shown on this panel:
Line commands:
A - Add D - Delete E - Edit UT - Utility generation
C - Copy
Sel # Incl/ Targ Srch Obj Srch Obj Srch Obj Name Cpy Part LOB RI
Excl Obj Type Qual or Pattern
* * * * * * * * * *
--- ---- ------- ---- ---------- -------- ------------------ --- ---- --- --
1 INCLUDE TBSP TABLESPACE DSNDB04 *
2 INCLUDE IXSP TABLE DSNDB04 * Y
3 ?
******************************* END OF DB2 DATA *******************************
4. Type in the fields to complete the definition of the clause and press Enter to
complete the addition. Alternatively, you can enter an E to the left of the clause
to bring up the Edit LISTDEF clause panel, which can be used to edit a single
clause.
5. To delete a clause, issue the D line command against the clause that you want
to delete.
Related tasks
“Adding a LISTDEF” on page 219
“Editing a single LISTDEF clause”
“Editing a single LISTDEF clause”
Deleting a LISTDEF
Use the LISTDEFs panel to delete a LISTDEF from the LISTDEF control tables.
Managing TEMPLATEs
With DB2 Admin, you can create and maintain TEMPLATEs.
Topics:
v “Adding, editing, or deleting a TEMPLATE”
v “Utility Template panel” on page 228
v “Utility Template — Dataset Name panel” on page 231
Related concepts
“Using table space utilities” on page 356
“Using table utilities” on page 362
“Using index utilities” on page 365
The TEMPLATEs panel, as shown in the following figure, is displayed when you
select option T on the Utility generation using LISTDEFs and TEMPLATEs panel.
The panel also displays when you enter a question mark (?) on the Utility
Template Use panel. The TEMPLATEs panel presents the existing TEMPLATEs
within the control table; the table name is shown in the panel header (in this case,
DSNACC.UTTEMPLATE).
The Utility Template panel is displayed, as shown in the following figure, when
you select option A or E on the TEMPLATEs panel. When adding a TEMPLATE,
the input fields contain blanks. When editing a TEMPLATE, the previously stored
values are displayed, which you can overwrite.
To create a new template, provide a TEMPLATE and a DSN and press Enter.
MODELDCB ===>
BUFNO ===> (Number of BSAM buffers)
DATACLAS ===> (SMS Data class)
MGMTCLAS ===> (SMS Management class)
STORCLAS ===> (SMS Storage class)
RETPD ===> or EXPDL ===>
VOLUMES( ===> > )
VOLCNT ===> (Volume Count)
GDGLIMIT ===> (GDG Limit)
DISP( ===> , , )
To construct a template data set name by selecting the substitution values to use:
1. From the Utility Template panel, enter a ? in the DSN field. The Utility
Template – Data Set Name panel is displayed, as shown in the following figure.
DB2 Admin ------------- DB2X Utility Template - Dataset Name ----------- 11:30
Command===>
DSN Model:
Symbolic Variables:
Restriction: Not all the symbolic variables that are listed are valid variables for
the data set name pattern for the templates for DB2 Admin work
data sets for alter, restore, redefine, migrate and object comparison
processing, and additional variables might apply. To specify any
additional variables that are not listed, use the Non-Symbolic
characters field or type them directly into the DSN Model field.
The example in the following figure uses the previous panel to show a partially
completed DSN model statement; the non-symbolic .TEST. is about to be
appended, followed by the jobname substitution variable.
| The data set name must be fully resolved and have valid qualifiers when the JCL
| is built because the data set for PUNCHDDN also becomes the input to the LOAD
| utility as the //SYSIN DD card. However, when the JCL is built for the data set
| name for PUNCHDDN, the value of some variables is unknown, and placeholder
| values are used instead. For example, if &JO or &JOBNAME is used as a
| substitution variable, JOBNAME is used as the value in the data set name.
Many DB2 utilities use templates for certain ddnames used by the utility. The DB2
utilities that support the use of templates do so via a ddname keyword clause. For
example, REORG TABLESPACE has a WORKDDN() keyword. The WORKDDN
entries in the Template Usage panel correspond to any utility with the WORKDDN
clause that supports templates. Certain keywords allow two parameters, such as
The DB2 Admin work data sets that support the use of templates do so via a
template keyword. For example, the work data set that the DB2 Admin Alter ALC
function uses for the DDL that is extracted from the catalog is ALDDL.
To associate a template with the ddname keyword of a utility data set or template
keyword of a non-utility work data set:
1. Issue the TU (Template Usage) option on the LISTDEFs panel. The Utility
Template Use panel that is similar to the panel that is shown in the following
figure is displayed. The panel contains a list of keywords and columns showing
whether a template is actively associated with that keyword, the name of the
template, and the template's comment.
For example, if you specify RDEF, the Specify RDEF TEMPLATE Usage panel is
displayed, as shown in the figure below.
DB2 Admin ------------- DB2X Specify RDEF TEMPLATE Usage ------------ 11:44
Command ===>
Line commands:
T - Toggle Use On/Off C - Clear data ? - Choose Template for the Keyword
E - Edit Template
| Template type ===> RDEF (UTIL,ALT,MIG,RDEF,RES,OC,MISC)
Generate template statements ===> NO (Yes/No)
Sel Keyword Use Template Comment
--- ------------ --- -------- -------------------------------------------------
RDSQL / JPKRDQL
RDLOAD
RDDROP
RDUNLD
RDUTRELD
RDBIND
RDUTCHK
RDUTRUNS
RDUTCOPY
RDUTUNLD
RDWDD
3. Enter ? in the SEL field and press Enter to associate a template with a
keyword. The Templates panel that shows a list of defined templates is
displayed.
4. Select a template by entering a plus sign (+) next to its name and pressing
Enter. Figure 155 on page 235 is displayed again with a slash (/) in the Use
field and with the template name and its associated comment in the other two
columns. A slash in the USE column for a keyword indicates a TEMPLATE
statement will be built for any utility supporting templates for that keyword.
Related concepts
“Adding, editing, or deleting a TEMPLATE” on page 226
“Using table space utilities” on page 356
“Using table utilities” on page 362
“Using index utilities” on page 365
| When a table that contains multiple LOB columns needs to be unloaded, each LOB
| column requires a partitioned data set (PDS). You can use any utility-supported
| variables to define this template. The variables must be unique to ensure that data
| is not overwritten during unloads. If you do not specify a template, the functions
| (such as ALC, RDEF, and MIG) will use the default template that DB2 Admin
| assigns.
| To set up and use the utility template for LOBs, follow the steps in “TEMPLATE
| usage” on page 234. After you have associated the template name with the
| LOBCOLDDN keyword, the following panel is displayed.
|
| DB2 Admin ------------------ DB2X Utility Template Use ------------------ 11:45
| Command ===>
|
| Line commands:
| T - Toggle Use On/Off C - Clear data ? - Choose Template for the Keyword
| E - Edit Template
| Template type ===> UTIL (UTIL,ALT,MIG,RDEF,RES,OC,MISC)
| Generate template statements ===> YES (Yes/No)
| Sel Keyword Use Template Comment
| --- ------------ --- -------- ------------------------------------------------
| COPYDDN 1 / SCOPY
| COPYDDN 2 / COPYLOC
| DISCARDDN / COPYREM
| ERRDDN / COPYREM
| FILTERDDN / COPYREM2
| INDDN / COPYREM2
| MAPDDN / COPYREM
| PUNCHDDN / SPUNCH
| RECOVERYDDN1 / COPYLOC
| RECOVERYDDN2 / SRCPY1
| UNLDDN / UNLDDN
| WORKDDN 1 / WORKDDN
| WORKDDN 2 / SORTOUT
| LOBCOLDDN / LOBTMPL1
|
|
| Figure 157. Utility Template Use panel (ADB25TU)
| Notes:
| v The ADBL prefix is reserved for LOB template names that will be
| generated by the Run WSL function.
| v The LOBCOLDDN data set name cannot exceed 35 bytes and must be a
| PDS.
| v Do not specify a member name (for example,
| ADB.TEST.LOBCOL.OUT(MEMB2)).
| Related concepts
| “Running WSL with the utility template for LOBs” on page 329
| “Using ADBTEP2 with LOBs” on page 348
| “Using utility options for XML and LOBs” on page 362
| When a table that contains multiple XML columns needs to be unloaded, each
| XML column requires a partitioned data set (PDS). You can use any
| utility-supported variables to define this template. The resulting data set name that
| is built using the variables must be unique to ensure that data is not overwritten. If
| To set up and use the utility template for XML data, follow the steps in
| “TEMPLATE usage” on page 234. After you have associated the template name
| with the XMLCOLDDN keyword, the following panel is displayed.
|
| DB2 Admin ------------------ DB2X Utility Template Use ------------------ 11:45
| Command ===>
|
| Line commands:
| T - Toggle Use On/Off C - Clear data ? - Choose Template for the Keyword
| E - Edit Template
| Template type ===> UTIL (UTIL,ALT,MIG,RDEF,RES,OC,MISC)
| Generate template statements ===> YES (Yes/No)
| Sel Keyword Use Template Comment
| --- ------------ --- -------- ------------------------------------------------
| COPYDDN 1 / SCOPY
| COPYDDN 2 / COPYLOC
| DISCARDDN / COPYREM
| ERRDDN / COPYREM
| FILTERDDN / COPYREM2
| INDDN / COPYREM2
| MAPDDN / COPYREM
| PUNCHDDN / SPUNCH
| RECOVERYDDN1 / COPYLOC
| RECOVERYDDN2 / SRCPY1
| UNLDDN / UNLDDN
| WORKDDN 1 / WORKDDN
| WORKDDN 2 / SORTOUT
| XMLCOLDDN / XMLTMPL1
|
|
| Figure 158. Utility Template Use panel (ADB25TU)
| Notes:
| v The ADBX prefix is reserved for XML template names that will be
| generated by the Run WSL function.
| v The XMLCOLDDN data set name cannot exceed 35 bytes and must be a
| PDS.
| v Do not specify a member name (for example,
| ADB.TEST.XMLCOL.OUT(MEMB2)).
| Related concepts
| “Running WSL with the utility template for unloading XML data” on page 330
| “Using utility options for XML and LOBs” on page 362
Topics:
v “Changing databases” on page 240
v “Changing table spaces” on page 245
v “Changing tables” on page 252
v “Changing indexes” on page 280
v “Changing views” on page 287
v “Using authorization switching” on page 287“Implicit LOB and XML
table support” on page 289
For certain changes that are supported by the DB2 ALTER statement, DB2 Admin
uses a DB2 ALTER statement to makes the changes.
Other types of changes are more-complex and are not supported by the DB2
ALTER statement. DB2 Admin allows certain complex changes and creates the
steps that are necessary to carry out those changes. DB2 Admin attempts to
preserve as many of the dependent definitions as possible, such as indexes, views,
check constraints, synonyms, aliases, and authorizations to these objects. To make
these more-complex changes, DB2 Admin generates a set of batch jobs. For
example, to make complex changes to a table, DB2 Admin generates a set of batch
jobs that extracts the existing table definition, unloads the table data, converts the
table definition to the new definition, and reloads the data.
After DB2 Admin generates the batch jobs, you can review them and then submit
them to perform the changes.
You can use the Batch Restart program, ADBTEP2, to restart or resume the
execution of an Alter job at an intermediate point, in the event that one of the SQL
statements in the input stream fails. In addition, you can combine the generated
Alter batch jobs into a single job.
Related information
Chapter 15, “Using the Batch Restart programs: ADBTEP2 and ADBTEPA,” on
page 339
Changing databases
You can change some of the attributes of a database, including the name of the
database.
To alter a database:
1. Use the AL line command on the Databases panel. The Alter Database panel is
displayed, as shown in the following figure.
2. Specify Alter in the Type of Operation field. The Alter Database panel is
displayed, as shown in the following figure.
ALTER DATABASE
Database ===> EMPDB
BUFFER POOL
Buffer pool ===> BP0 (BP0-BP49, BP8K0-9, BP16K0-9, BP32K-BP32K9 or blank)
INDEXBP
Index Bpool ===> BP0 (BP0, BP1,... or BP49or blank)
STOGROUP
Storage group ===> SYSDEFLT > (storage group name)
3. Alter the buffer pool, index buffer pool, or storage group values.
4. Press Enter to run the ALTER DATABASE statement.
Related tasks
“Renaming a database”
Renaming a database
Use RENAME to rename the database.
To rename a database:
1. Use the AL line command on the Databases panel to display the Alter Database
panel.
2. Specify Rename in the Type of Operation field. The Rename Database panel is
displayed, as shown in the following figure.
The data sets that are created and used by the DB2 Admin Rename Database
function are shown in the following table.
Related tasks
“Renaming a database” on page 241
“Creating naming conventions for work data sets that are created by the DB2
Admin Rename Database function”
Creating naming conventions for work data sets that are created
by the DB2 Admin Rename Database function
You can use templates to create your own naming conventions for the work data
sets that are created by the DB2 Admin Rename Database function.
To use templates to create naming conventions for work data sets that are created
by the DB2 Admin Rename Database function:
1. Specify Yes in the Generate template statements field on the Rename Database
Parameters panel (ADB21DAJ).
2. Ensure that you have constructed template data set names and have associated
the templates with the appropriate work data sets. You can use the TU primary
command on the Rename Database Parameters panel (or option 5 on the
Administration Menu panel) to manage the templates for the work data sets.
You can specify the following variables when you construct the data set name
pattern for a template for a redefine work data set:
v The following functional variable:
&DDNAME.
An internal DDNAME for the data set, not the DDNAME in the JCL
v The following variables that are supported for normal DB2 utility template
processing:
To make changes that are more complex and are not supported by the ALTER
TABLESPACE statement, DB2 Admin generates a set of batch jobs to implement
the changes.
To change a table space, you issue either the AL command or the AL command
followed by the RDEF primary command.
v Use the AL line command to make changes that are supported by the ALTER
TABLESPACE statement.
v Use the AL line command followed by the RDEF command to make
more-complex changes that are not supported by the ALTER TABLESPACE
statement. RDEF invokes the DB2 Admin Alter Redefine function, which
generates the batch jobs that are required to redefine the table space (unload the
existing table space, drop the table space, create the new definition of the table
space, and reload the data).
You can use authorization switching when you redefine table spaces if
authorization switching is enabled on the subsystem.
When you specify your table space redefinition parameters, you can choose to
save your request to a work statement list.
When you redefine table spaces , the DB2 Admin Redefine function creates and
uses one or more work data sets.
For partitioned table spaces, a detail line is displayed for each partition. You can
alter any partition by updating the attributes, such as Pct Free. To apply the same
change to all partitions within the table space, provide a value on the All Part
field.
To change certain parameters, you must stop and restart the associated object. In
these cases, DB2 Admin runs a STOP table space or STOP index (or partition)
command and checks that the object is in a fully-stopped state. If stopped, it runs
an ALTER TABLESPACE statement, followed by a START command. If the object is
not in a fully-stopped state, the STOP Check – Action panel, as shown in the
following figure, prompts you to perform one of the following actions:
v Re-check and continue if in STOP state.
v Issue the ALTER statement.
v Cancel the operation.
If an object is not stopped when the ALTER TABLESPACE statement runs (for
example, if others are holding locks on the object), a -626 SQLCODE is displayed.
Object is not in a fully-stopped state (STATUS field has STOP), and must be in
order for the pending actions to be successful. The current USE information is
displayed below.
What do you want to do now:
1 - Re-check and continue if in STOP state. Re-display USE if not
2 - Perform any pending actions, regardless of the object's state
3 - Exit and do not perform any pending actions
*******************************************************************************
DSNT360I @ ***********************************
DSNT361I @ * DISPLAY DATABASE SUMMARY
* GLOBAL USE
DSNT360I @ ***********************************
DSNT362I @ DATABASE = DSN8D81A STATUS = RW
DBD LENGTH = 16142
DSNT397I @
NAME TYPE PART STATUS CONNID CORRID USERID
-------- ---- ---- ------------------ -------- ------------ --------
DSN8S81D TS STOPP TSO SYSADM SYSADM
- MEMBER NAME V81A
******* DISPLAY OF DATABASE DSN8D81A ENDED **********************
DSN9022I @ DSNTDDIS 'DISPLAY DATABASE' NORMAL COMPLETION
******************************* Bottom of data ********************************
You can use the RDEF command to further redefine the table space definition.
Related tasks
“Redefining a table space”
By using this panel, you can change many table space attributes. You can also
convert to or from a partitioned table space and change the segment size. When
converting to or from a partitioned table space, a second panel is displayed to help
you either create a partitioning index or to convert a clustering index to a
partitioning index, or vice-versa.
Remember: The actual changes to the table space attributes, such as splitting a
partition or removing a partition for a partitioned table space, do not
take place until you submit the batch jobs. When you submit the
batch jobs, data is unloaded and reloaded according to the new table
space definitions.
The data sets that are created and used by the DB2 Admin Redefine function are
shown in the following table.
Table 11. Work data sets for DB2 Admin Redefine
Template
Default data set name Description keyword
prefix.worklist.CREBIND Rebind statements RDBIND
prefix.worklist.DDL DDL extracted from the catalog RDSQL
Related concepts
“Utility Template panel” on page 228
“Changing indexes” on page 280
Related tasks
“Utility Template — Dataset Name panel” on page 231
“Creating naming conventions for work data sets that are created by the DB2
Admin Redefine function”
“Redefining an index” on page 282
Creating naming conventions for work data sets that are created
by the DB2 Admin Redefine function
You can use templates to create your own naming conventions for the work data
sets that are created by the DB2 Admin Redefine function.
&DDNAME.
An internal DDNAME for the data set, not the DDNAME in the JCL
&DB2SYS.
The DB2 subsystem ID
&TBCTR.
Table counter (applicable only when HPU is used for unloading)
&WORKLIST.
Worklist name specified on the Alter Tablespace Redefine panel
(ADB21SAJ)
v The following variables that are supported for normal DB2 utility template
processing:
Changing tables
With DB2 Admin, you can make changes to columns in a table and to views, keys,
and indexes that are related to tables.
In addition, DB2 Admin supports the following DB2 Version 8 functionality for
changing a table:
Adding partitioning key
When creating a partitioned table, table-controlled partitioning is initiated
by specifying the new PARTITIONING KEY clause, which identifies the
columns and values used to delimit partition boundaries. When the new
clause is used, the definition of the table is complete and data can be
inserted into the table. After establishing table-controlled partitioning,
index-controlled partitioning is no longer an option. Any attempt to create
an index on this table with the VALUES clause is disallowed.
Adding partitions
You can add partitions to a partitioned table, up to the maximum limit, as
determined by the parameters that are specified when the table was
initially created. The next available physical partition number is used.
Partitions can be added to the table using the ALTER TABLE ADD PART
statement.
Changing partition boundaries
You can modify the limit keys of the partitions in tables that use
table-controlled partitioning using the ALTER TABLE ALTER PART
VALUES statement.
Rotating partitions
Rotating partitions allows old data to roll away, while reusing the partition
for new data. The ALTER TABLE ALTER PART ROTATE FIRST TO LAST
statement is used. You can specify that all data rows in the oldest partition
be deleted by using the RESET keyword and then by specifying a new
high boundary so that the partition becomes the last logical partition in
sequence and is ready to hold new data that is added.
Clustered tables
The VOLATILE clause indicates to DB2 that a table should be treated as a
clustered table. Clustered tables are accessed with index access whenever
possible for SQL statements. Clustered tables experience a high incidence
of lock contention because the clustered rows logically belong together and
To change a table, you issue either the AL line command or ALC line command
against a table on the Tables, Views, and Aliases panel:
v Use the AL line command to make certain changes that are supported by the
ALTER TABLE statement. DB2 Admin issues an ALTER TABLE statement to
make the changes.
v Use the ALC line command to make more-complex changes that are not
supported by the ALTER TABLE statement. ALC invokes the DB2 Admin Alter
ALC function, which generates the batch jobs that are required to redefine the
table. In some cases, DB2 Admin detects that an ALTER TABLE statement can be
used to make the changes, and you are given the choice of using DB2 Smart
Alter to run the ALTER TABLE statement immediately instead of generating and
using batch jobs to update the table.
You can use authorization switching while redefining tables if authorization
switching is enabled on the subsystem.
When you redefine tables, the DB2 Admin Redefine function creates and uses
one or more work data sets.
Restrictions:
v Changes to column names are retrofitted into views. All other
column actions are not retrofitted, and any changes to a column's
data type are not verified against the views.
The views that require editing are documented in both the
converted DDL and in the batch job output with messages
ADBC053W and ADBC053I.
v Columns that are involved in partitioning should not be modified
because DB2 Admin does not drop the underlying table space with
its definition of partitioning values. It is possible to change
partitioning values.
v A warning is displayed if you attempt to modify columns in the
primary key. With line command UP (update primary key), you
can circumvent the warning. You can use the ADDFK primary
command to propagate the primary key update to foreign-key
related tables.
v If you modify columns that are in a foreign key, DB2 Admin does
not automatically modify the primary key of parent tables. To
propagate the column updates to primary and foreign key tables,
use the ADD primary command from the Alter Table panel
(ADB27C) to initiate the Alter Tables dialog, where RI-related
tables or other tables can be included in the Alter JCL stream.
v DB2 Admin informs you when a specific data type conversion is
allowed. Data type conversions can be one of the following types:
– Numeric to numeric (small integer, integer, decimal float)
– Character to character (character and VARCHAR)
– Date time to date time (date, time, time stamp)
DB2 Admin ----------- DB2X Tables, Views, and Aliases -------- Row 1 to 7 of 7
Command ===> Scroll ===> CSR
Figure 166. Tables, Views, and Aliases panel (ADB21T) - Using the AL command
Altering a partition
1. From the Tables, Views, and Aliases panel (ADB21T), issue the AL line
command against the partitioned table that you want to alter a partition for.
The Alter Table panel (ADB21TA) is displayed.
2. Type an S before ADD/ALTER PART and press Enter. The Alter Partitioned
Table panel (ADB21TAV) is displayed.
3. Change the limit key values for any of the partitions.
4. Use the CONTINUE primary command to run the ALTER TABLE statement.
The partitions are altered with their new values.
Rotating a partition
1. From the Tables, Views, and Aliases panel (ADB21T), issue the AL line
command against the partitioned table that you want to rotate partitions for.
The Alter Table panel (ADB21TA) is displayed.
2. Type an S before ADD/ALTER PART and press Enter. The Alter Partitioned
Table panel (ADB21TAV) is displayed.
3. Use the ROTATE primary command to rotate a partition. A pop-up panel
(ADB21TAV) is displayed.
Before you redefine a table, see “How the DB2 Admin Alter ALC function works”
on page 272.
DB2 Admin ----------- DB2X Tables, Views, and Aliases -------- Row 1 to 6 of 6
Command ===> Scroll ===> PAGE
Figure 168. Tables, Views, and Aliases panel (ADB21T) - Invoking the Alter ALC function
2. Issue the ALC line command against the table that you want to change. The
Alter Table panel is displayed, as shown in the following figure. The panel
displays some identifying information about the table, the action that is
required to change the table, the number of rows that fit in the current page
size, and the current columns of the table.
| The following restrictions for DB2 V9 apply to the Alter Table panel:
| v The target table space must be of the same partitioning type as the existing
| table space (partition by growth or partition by range).
| v XML NOT NULL NO DEFAULT columns cannot be added to the table since
| there is no DB2 default value to use.
| v RENAME COLUMN is not possible if a view exists on the table. DB2 only
| requires that the column not be referenced in a view, but it is
| programmatically difficult to make that determination.
DEPTNO 1 CHAR 3 0 N N 1
DEPTNAME 2 VARCHAR 36 0 N N 2
MGRNO 3 CHAR 6 0 Y Y 3
ADMRDEPT 4 CHAR 3 0 N N 4
LOCATION 5 CHAR 16 0 Y Y 5
******************************* END OF DB2 DATA *******************************
Figure 170. Alter Table Space Option panel (ADB27C) - example of a larger row length than
page size
If the row length is smaller than the current page size, you do not need to alter
the table or table space; the alter process will continue, and the job step that
creates the new table definition will succeed. However, you can improve space
utilization either by changing the table definition or by changing the page size,
especially when the current page size allows for more rows than the DB2 limit
of 255 rows per page.
For example, the Alter Table Space Option panel that is shown in the following
figure indicates that the current page size is 8192 (8K), but that it would save
space to change the page size to 4K. Fewer rows exceed the 255 maximum with
4K page size than with the other page sizes.
Figure 171. Alter Table Space Option panel (ADB27C) - example of a smaller row length than
page size
5. Fill in the fields of the Alter Parameters panel and press Enter. Specify the
following items:
v Whether the ALTER TABLE (ALC) request should be placed in a work
statement list
v Data set information for the generated jobs
v Output job options
v Optional utility job steps, such as RUNSTATS and REBIND
v Whether to use active templates
The jobs to perform the alter are generated, and an ISPF Edit session is
displayed. If you specified YES for the Enable Restore field, you will be
prompted for the name of data set for the restore jobs before DB2 Admin
generates the jobs.
Related concepts
“Changing tables” on page 252
“How the DB2 Admin Alter ALC function works” on page 272
“Using DB2 Admin Smart Alter” on page 269
Related tasks
“Redefining a table space” on page 247
“Restoring a changed table” on page 270
“Recovering a table if changes fail” on page 270
DEPTNO 1 CHAR 3 0 N N 1
I DEPTNAME 2 VARCHAR 36 0 N N 2
MGRNO 3 CHAR 6 0 Y Y 3
ADMRDEPT 4 CHAR 3 0 N N 4
LOCATION 5 CHAR 16 0 Y Y 5
******************************* END OF DB2 DATA *******************************
4. Fill in the fields, as shown in the following figure, to define the new column
and press Enter. The Alter Table panel is displayed again.
DEPTNO 1 CHAR 3 0 N N 1
DEPTNAME 2 VARCHAR 36 0 N N 2
? 5 ? ? ? 0 INSERT
MGRNO 3 CHAR 6 0 Y Y 4
ADMRDEPT 4 CHAR 3 0 N N 5
LOCATION 5 CHAR 16 0 Y Y 6
******************************* END OF DB2 DATA *******************************
Figure 176. Alter Table panel (ADB27C) - Specifying attributes for the inserted column
Requirement: If you insert a new column at the end of an existing table, the
column must be defined with a null value or a specified default
value.
To specify a user-defined data type or a default value for the new column, you
can use the U line command to display the Update Column panel, as shown in
the following figure. Press Enter to return to the Alter Table panel.
5. Complete Step 4 through Step 6 to generate and run the jobs that will insert the
column.
DEPTNO 1 CHAR 3 0 N N 1
DEPTNAME 2 VARCHAR 36 0 N N 2
MGRNO 3 CHAR 6 0 Y Y 3
ADMRDEPT 4 CHAR 3 0 N N 4
U LOCATION 5 CHAR 16 0 Y Y 5
******************************* END OF DB2 DATA *******************************
3. Either type over the fields of the column that you want to update, or issue the
U line command against the column. The U line command allows you to
change more attributes. When you use the U line command, the Update
Column panel, as shown in the following figure, is displayed. The current
Restriction: When you update a column, you can increase its length but not
decrease it. If you decrease the length, existing data might be
truncated. To decrease the length, you must unload the table, drop
the table definition, re-create the table using the new format, and
reload the data.
DB2 Admin ------------- DB2X ALTER: UPDATE Column Number 5 ------------- 10:54
Command ===>
4. Make your changes to the column and press Enter to redisplay the Alter Table
panel.
About primary key columns
If you are altering a primary key column of a table, an additional
primary command, ADDFK, is available on panel ADB27C to propagate
the primary key column updates for the target table to all tables
affected by the update. All tables become part of the ALTER JCL and
are displayed on the Alter Tables panel (ADB27CA).
About identity columns
If you are altering a table that contains an identity column and the
table is being dropped and re-created, the column definition becomes
GENERATED BY DEFAULT to preserve current data values. The first
value that will be generated for the identity column (the START WITH
clause) is also changed. The new START WITH value, which is the
value that will be assigned next to the identity column, is the last
unassigned value (MAXASSIGNEDVAL in SYSIBM.SYSSEQUENCES)
plus the increment value (INCREMENT in SYSIBM.SYSSEQUENCES).
If values were cached, any existing unassigned values in the cache that
have not been used are lost. Loss of unassigned cached values causes a
gap between the last assigned value of the identity column and the
new starting value.
5. Complete Step 4 through Step 8 to generate and run the jobs that will insert the
column.
Line commands:
FC - From Column TC - To Column T - To Table ALC - Alter FK
From: To:
Sel Column Name Rel Name Owner Name Column Name
* * * * *
--- ------------------ -------- -------- ------------------ -------------------
ALC ACTNO RPAA DSN8810 ACT ACTNO
PROJNO RPAP DSN8810 PROJ PROJNO
4. As shown in the following figure, issue the A line command against the foreign
key that you want to change.
ALTER TABLE
5. As shown in the following figure, make your changes for the foreign key in the
Alter Table panel that is displayed.
6. Press F3 twice to return to the Alter Tables panel.
7. Complete Step 4 through Step 8 to generate and run the jobs that will change
the foreign key.
Another way to rename a table without using the ALC line command to
redefine the table is to use the REN line command from the Tables, Views,
and Aliases panel.
The Alter Table panel is displayed.
3. Type the new name of the table in the New name field.
4. Complete Step 4 through Step 8 to generate and run the jobs that will rename
the table.
In some cases, DB2 Admin can determine that the table can be renamed by
executing a RENAME TABLE statement online without having to generate
batch jobs that will drop and re-create the table. When this is possible, you will
be prompted as to whether you want to use this smart alter process.
You can use the DB2 Admin Smart Alter function in the following situations only:
v To add a new column to the end of an existing table. The column must be
defined as having a null value or a specified default value.
v To update a column if the column data type is specified as VARCHAR. Only the
length can be increased.
| v To rename a table if the table does not have a trigger, view, or synonym defined
| on it.
| Remember: If you make any other changes to the table that would require that the
| table be dropped and re-created, you lose the ability to use DB2
| Admin Smart Alter. DB2 Admin Smart Alter also cannot be used if
| you are altering multiple tables and any one of the tables must be
| dropped and re-created; batch jobs are generated to make the changes
| to all of the tables.
For example, to use the DB2 Admin Smart Alter function to insert a new column
named COMMENT into table NEWDEPT, enter the ALTER primary command on
the Alter Table panel (ADB27C) and press Enter. The next Alter Table panel
(ADB27CTC) is displayed, as shown in the following figure.
DB2 Admin has determined that this table might be altered by executing the SQL
statement below rather than through a set of generated batch jobs.
All statements might not be visible due to space limitations.
ALTER TABLE "DSN8810"."NEWDEPT" ADD "COMMENT" CHAR(30) NOT NULL WITH DEFAULT;
On this panel, you can either immediately run the SQL statement or you can
generate a batch job to update the table.
Related tasks
“Redefining a table with the ALC line command” on page 257
To recover a table:
1. Drop the new table if it has been created.
2. Re-create the original table using the extracted DDL.
3. Load the table by using the unload data set. Remember to change the LOAD
utility statement to RESUME YES if other tables exist in the table space.
4. Create a new image copy of the table space.
5. Run RUNSTATS on the table.
Related tasks
“Redefining a table with the ALC line command” on page 257
To be able to restore a table, you must specify whether restore should be enabled
when you alter the table. Only changes that are made by using the ALC line
command can be restored.
When DB2 Admin generates the jobs for the alter, it also generates the jobs that are
necessary to restore the table to its original condition and places them in the data
set that you identified. The restore jobs will return the table to its original
definition and reload the original data. The restore jobs include any changes that
are made by the Smart Alter function.
To return the table to its original definition with its original underlying data after it
is altered, submit the restore jobs.
If you do submit the restore jobs to undo the changes, be aware that any changes
that are made to the data after the alter (ALC process) is performed are lost. Also,
after the work statement list is generated, any changes that are made directly to
the work statement list without going through the ALC process are not considered
for the restore process.
Related concepts
“Utility Template panel” on page 228
Related tasks
“Redefining a table with the ALC line command” on page 257
Related reference
“Work data sets used by the DB2 Admin Alter Restore function”
“Work data sets used by the DB2 Admin Alter ALC function” on page 273
Work data sets used by the DB2 Admin Alter Restore function:
The DB2 Admin Alter Restore function creates and uses work data sets to restore a
table to its original state.
The following figure shows the data sets that the DB2 Admin Alter Restore
function creates and uses to restore a table to its original state.
Table 12. Work data sets for DB2 Admin Alter Restore
Template
Default data set name Description keyword
prefix.worklist.RSTR.DDL DDL for the objects before restore RSDDL
prefix.worklist.RSTR.CNT Load control cards for the objects RSPUNCH
before restore
prefix.worklist.RSTR.ULD Unloaded data from the objects RSUNLDD
before the restore
prefix.worklist.DDL.ALL DDL for all objects before applying RSALTDDL
alters (including Smart Alters)
You can use templates to create your own naming conventions for the work data
sets. You enable the templates the same way that you enable the templates for the
work data sets that are used by the DB2 Admin Alter ALC function. The valid
variables for the templates for the restore work data sets are the same as the valid
variables for the work data sets for the ALC function.
After you specify your changes in the online dialogs, you use the CONTINUE
primary command to generate the batch jobs that perform the actual alter
operation. (In some cases, DB2 Admin detects that an ALTER TABLE statement can
be used to make the changes, and you are given the choice of using DB2 Smart
Alter to run the ALTER TABLE statement immediately instead of generating and
using batch jobs to update the table.)
Before the required batch jobs are generated, the Alter Parameters panel is
displayed. On the Alter Parameters panel, you specify various information, such
as:
v The worklist name
v The PDS where you want the various jobs placed and the prefix to be used for
generated data sets (the prefix is not used if templates are used)
v The prefix to be used for generated data sets (the prefix is not used if templates
are used)
v The member name of a single job, if you want to combine the generated jobs
v Optional steps to run after the table is redefined, such as REORG
You can also use the BP command to update the unit type and space parameters
that are used for allocating the work and unload data sets.
When you press Enter on the Alter Parameters panel, the DB2 Admin Alter ALC
function generates the jobs and displays a PDS EDIT session for the specified job
PDS that contains the jobs. The generated jobs are:
v ST1RE - Reverse engineering
v ST1REALL - Reverse engineering when restore is enabled (optional)
v ST2ULnnn - Unload data for table nnn
v ST3AC - Convert
v ST4AR - Alter related merge DDL (optional)
v ST5DC - Drop and re-create
v ST6RLnnn - Reload data
v ST7CD - Check Data (optional)
v ST8ICnnn - Image Copy
v ST9RS - Runstats (optional)
v ST10RB - Rebind (optional)
v ST11DL - Delete work data sets, except those for restore and unload (optional)
DB2 Admin does not generate the conversion job step if it can determine that data
conversion is not needed.
The numeric values in these job names are adjusted to occur sequentially if you
omit optional steps or DB2 Admin determines that the conversion step is not
needed. For example, if related objects are not included, ST5DC becomes ST4DC.
| If you choose to have the statements that are necessary to make the changes put in
| a work statement list (WSL) and specify that the WSL is to be generated online
| instead of with a batch job, JCL to create the WSL is generated and run online.
| Messages are displayed to indicate the status as each step is run. When the online
| processing is complete, a work data set is displayed. This work data set contains
| the messages that would be seen in the job output if the WSL had been generated
| with a batch job.
You can use authorization switching when you redefine tables if authorization
switching is enabled on the subsystem.
Related tasks
“Redefining a table with the ALC line command” on page 257
“Redefining a partitioning index” on page 284
Related reference
Chapter 27, “DB2 Admin data type conversions,” on page 627
“Work data sets used by the DB2 Admin Alter ALC function”
Work data sets used by the DB2 Admin Alter ALC function
The DB2 Admin Alter ALC function creates and uses work data sets.
The following figure shows the work data sets that the DB2 Admin Alter ALC
function creates and uses.
Table 13. Work data sets for DB2 Admin Alter ALC
Template
Default data set name Description keyword
prefix.worklist.DDL DDL extracted from the catalog ALDDL
prefix.worklist.DDL.CONV DDL for the modified table ALDDLC
prefix.worklist.DDL.CONV.MOD Additional DDL added to the DDL ALDDLCM
for the modified table (ALDDLC)
prefix.worklist.DDL.MOD DDL modified for dropped objects ALMOD
prefix.worklist.IFF Interface file to batch jobs ALIFF
prefix.worklist.CMD Rebind control statements ALCMD
prefix.worklist.CNT.Tnnn LOAD utility statements, where ALCNT
Tnnn is a string assigned to the
object by DB2 Admin, with nnn
beginning with 1
prefix.worklist.ULD.Tnnn Unload data set of records, where ALULD
Tnnn is a string assigned to the
object by DB2 Admin, with nnn
beginning with 1
prefix.worklist.CNC.Tnnn Converted LOAD utility ALCNC
statements, where Tnnn is a string
assigned to the object by DB2
Admin, with nnn beginning with 1
prefix.worklist.ULC.Tnnn Converted unload data set of ALULDC
records, where Tnnn is a string
assigned to the object by DB2
Admin, with nnn beginning with 1
The relationships between tables and their associated data sets are included in
summary format in the JCL as a comment on the Convert step. In addition, the
table being loaded is included as a comment in each LOAD step.
Related concepts
“Utility Template panel” on page 228
“How the DB2 Admin Alter ALC function works” on page 272
Related tasks
“Utility Template — Dataset Name panel” on page 231
“Restoring a changed table” on page 270
“Creating naming conventions for work data sets that are created by the DB2 Alter
ALC function”
Creating naming conventions for work data sets that are created by the DB2
Alter ALC function:
You can use templates to create your own naming conventions for the work data
sets that are created by the DB2 Admin Alter ALC function.
To use templates to create naming conventions for the work data sets that are
created by the DB2 Admin Alter ALC function:
1. Specify Yes in the Generate template statements field on the Alter Parameters
panel.
2. Ensure that you have constructed template data set names and have associated
the templates with the appropriate work data sets. You can use the TU primary
command on the Alter Parameters panel (or option 5 on the Administration
Menu panel) to manage the templates for the work data sets. You can use the
TU primary command on the Alter Tablespace Redefine - JCL panel (or Option
5 on the Administration Menu panel) to manage the templates for the work
data sets.
You can specify the following variables when you construct the data set name
pattern or mask for a template for a DB2 Admin Alter ALC (or DB2 Admin
Alter Restore) work data set:
&DB. Database name
&TS. Table space name
&USERID.
Batch user ID
When the DB2 Admin Alter ALC function skips the conversion
job step
Under certain conditions when you use the ALC command to change a table, DB2
Admin can determine that the step that occurs between the unload and load steps
to convert the data is not necessary.
Performance can improve when DB2 Admin can omit the conversion step from the
batch job.
When the data conversion step is skipped, a converted unload data set is not
created. Data is loaded into the table from the unload data set.
To alter indexes, views, or foreign keys that are related to tables being altered on
the Alter Table panel (ADB27C), issue either the REL primary command or REL
line command on the Alter Tables panel (ADB27CA). The Alter Related panel
(ADB27CR) is displayed, shown in the following figure, showing indexes, views,
and foreign keys for that table. By using line commands, you can add the related
object to the Alter list.
Commands: ADDINDEX
Line commands: A - Alter object S - Show object
Dep.
S Type Creator Name Views Rel Name Note
* * * * * *
- ----------- -------- ------------------ ------ -------- ---------------------
INDEX DSN8810 XEMP1 0
INDEX DSN8810 XEMP2 0
VIEW DSN8810 VASTRDE2 0
VIEW DSN8810 VDEPMG1 2
VIEW DSN8810 VEMP 0
VIEW DSN8810 VEMPDPT1 0
VIEW DSN8810 VEMPLP 0
VIEW DSN8810 VPHONE 0
VIEW DSN8810 VPROJRE1 3
VIEW DSN8810 VSTAFAC2 0
VIEW VND03TB DAVES 0
VIEW WSCHRAY TEST_ONEROW_V 0
******************************* END OF DB2 DATA *******************************
You can use the ADDINDEX command to create a new index on the table. You can
use the A line command to alter an object. For views, the view DDL is displayed in
an edit session. If you modify or save the view DDL, the new view DDL is
captured and the view is added to the Alter list.
For indexes, the index is displayed in the Alter Index Redefine panel. Entering
information on this panel causes the new index DDL to be captured and the index
is added to the Alter list. Any changes to column or table names are reflected as
part of the Alter Related panel.
For foreign keys, the definition of the foreign key is displayed on the Alter Table
panel. Any changes that are defined for column or table names are reflected as part
of the Alter Table panel. Columns added to, dropped from, or re-sequenced in the
parent table's primary key need to be updated on the Alter Table panel.
Restriction: For views, you must add or remove columns that you want inserted
or deleted to the DDL during the edit session.
After an object is added to the Alter list, if the base table name or columns in the
table are changed, the related objects that refer to that table are flagged on the
Alter Tables panel (ADB27CA) as possibly requiring you to edit them again. On
the Alter Tables panel, these tables are marked with an E in the Chg Rqd column.
When changing a view, you are prompted to decide whether the view should be
created with or without a column list. If the view was originally created without a
column list, the decision causes the view DDL to contain the column names from
the result table or to be absent of column names (depending on the decision). If the
view was originally created with column names, the DDL again contains column
names, regardless of the decision.
Only one level of views is presented on the Alter Related panel (ADB27CR). Each
view that is displayed on the panel shows the number of views that are derived
from this view. To alter a view on a view, first alter the parent view to add it to the
Alter list. On the Alter Tables panel (ADB27CA), you can then issue the REL line
command on a view to show the first level of views that are based on this view.
Related concepts
“Changing tables” on page 252
Commands:
ALTER - generate jobs ADDFK - Add Foreign Key-affected tables
Line commands:
A - Alter Object D - Delete S - Select Object REL - Alter related
FK - Add Foreign Key-affected tables E - Edit DDL CD - Convert to Drop
RS - Reset RI-FK flags
To add a table, provide an owner and name below and hit Enter
Owner ===> > (Creator)
Name ===> > (Table Name. ? to look up)
RI RI FK Chg Object
Sel Creator Name T DB Name TS Name Rels Add Add Rqd Action
* * * * * * * * * *
--- -------- ------------------ - -------- -------- ------ --- --- --- -----
DSN8810 DEPT T DSN8D81A DSN8S81D 5 NO NO DROP
******************************* END OF DB2 DATA *******************************
The Alter Tables panel is displayed with only the initial table from ADB27C
listed in the Alter list.
You can use the Owner and Name fields to directly add a table or to look up
tables that you want to add.
The following primary commands are shown on the panel:
ADDFK
Use the ADDFK primary command to add tables that are involved in a
Changing indexes
To change an index, you issue either the AL line command or the AL line
command followed by the RDEF command against the index.
Altering an index
Use the Alter Index panel to alter an index.
To alter an index:
1. Use the AL line command on the Indexes panel (ADB21X). The Alter Index
panel is displayed, as shown in the following figure.
For a partitioning index, a detail line is displayed for each partition. You can alter
any partition by updating the available attribute, such as %Free. To apply the same
change to all partitions of the index, provide a value in the All Parts row.
To change certain parameters, you must stop and restart the associated object. In
these cases, DB2 Admin issues a STOP table space or STOP index (or partition)
command and checks that the object is in a fully-stopped state. If stopped, it issues
an ALTER INDEX statement, followed by a START command. If the object is not in
a fully-stopped state, the STOP Check - Action panel prompts you to perform one
of the following actions:
v Re-check
v Issue the ALTER
v Cancel the operation
If an object is not stopped when the ALTER TABLESPACE statement is run (for
example, if others are holding locks on the object), a -626 SQLCODE is displayed.
Related concepts
“Changing indexes” on page 280
Related tasks
“Redefining an index” on page 282
| Renaming an index
| Use the Rename Index panel to rename an index.
| To rename an index:
| 1. Use the REN line command on the Indexes panel (ADB21X). The Rename Index
| panel is displayed, as shown in the following figure.
|
Redefining an index
Use the Redefine Index panel to redefine an index.
To redefine an index:
1. Use the RDEF primary command on the Alter Index panel (ADB21XA). The
Redefine Index panel is displayed, as shown in the following figure.
The data sets that are created and used by the DB2 Admin Redefine function are
shown in the following table.
Table 15. Work data sets for DB2 Admin Redefine
Template
Default data set name Description keyword
prefix.worklist.CREBIND Rebind statements RDBIND
Changing views
To make changes to a view, DB2 Admin generates a set of jobs that drop the view
and then re-create it.
To change a view:
1. Use the ALC line command on the Tables, Views, and Aliases panel (ADB21T).
Panel ADB27CAA might appear briefly while the definition of the view is being
retrieved. An SQL CREATE VIEW statement for the view is displayed in an
ISPF Edit Session.
2. Edit the CREATE VIEW statement to make the changes that you want and
press PF3. The Alter Tables panel (ADB27CA) is displayed. It shows an action
of DROP.
If you did not change the CREATE VIEW statement or did not save the
changes, the view either is not displayed on the Alter Tables panel or is
displayed with an action of NONE.
3. Enter the ALTER command to display the Alter Parameters panel
Complete Step 6 through Step 8 to generate and run the jobs that will change the
view.
This other user is termed the auth-switch ID, and the ID that submits the job is
termed the submitter.
The Alter Tablespace RDEF and Alter Table ALC functions make use of
authorization switching. These commands enable you to redefine a table space or a
table. Because this action also requires the object to be dropped, objects that are
dependent on the target object are also dropped. Authorizations to those objects
and dependent objects are lost.
DB2 Admin generates the DDL and DCL necessary to rebuild the altered objects
and to restore the dependent objects and authorities. However, the job submitter
might have authority to re-create the target objects, but not the authority to
re-create dependent objects or to grant authorities to the dependent objects. In this
case, you can enable a job submitter to use an ID that has the necessary authority
to execute the DDL to rebuild the objects.
| If the job submitter has ALTER authority to the RACF profile that protects the
| resource, all DDL and DCL statements are run using the auth-switch ID. The rules
| and protection mechanisms for READ authority do not apply for ALTER authority.
| When authorization switching is enabled, the batch job panels for Alter Tablespace
| RDEF and Alter Table ALC have an additional input field called Authorization
| Switch ID . Use this field to enter the auth-switch ID to be used to run the eligible
| statements in the file that contains the DDL and DCL statements.
| The DDL that is generated by the batch jobs for these two functions is prepared for
| authorization switching; that is, it contains functional comments that other DB2
| Admin components use with authorization switching.
| If the special value <NONE> is specified in the Authorization Switch ID field, the
| DDL is not prepared to be used with authorization switching, but an authorized ID
| can run the DDL. For example, the authorized ID can run the DDL using
| ADBTEP2.
Tip: Carefully preserve the original DDL file until the objects and dependencies
are restored. After the object is dropped, the ADB2GEN process cannot be
used to regenerate the original environment. Running the ADB2GEN step
again without proper care can overwrite the original DDL file, making
reconstruction difficult.
The batch program, ADBTEPA, runs the DDL, either under the authority of the
submitter or under the auth-switch ID authority. Two input parameters are
required for authorization switching. These parameters are specified one-per line
on the ADBOPT DD card in the ADBTEPA step.
Example
| //CREATE EXEC PGM=ADBTEPA,DYNAMNBR=100,
| // PARM='/SSID(DSN8),WORKLIST(TESTYA)'
| //STEPLIB DD DISP=SHR,DSN=ADB.V72.SADBLINK
| // DD DISP=SHR,DSN=DSN.DSN8.SDSNEXIT
| // DD DISP=SHR,DSN=DSN.DSN8.SDSNLOAD
| //SYSTSPRT DD SYSOUT=*
| //ADBPRINT DD SYSOUT=*
To use DB2 Admin Authorization Switching, the job submitter must have access to
the following two separate entities:
v The plan that is passed to program ADBTEPA using the ADBOPT parameter
PLAN
v A RACF profile that protects a special resource
Only certain DDL statements are executed using the authorization switch ID
authority. DROP statements, for example, are always executed using the
submitter's authority. Any DDL that has been manually added to the file or that
has been edited can be executed only under the submitter's authority. COMMIT
statements can be added where appropriate.
| Because the DDL contains SET CURRENT SQLID statements, the ID that runs the
| statement must have the intended SQLID as one of its secondary authorization
| IDs, or have SYSADM authority.
| The DB2 Admin ALC, RENDB, RDEF, and MIG functions and DB2 Object
| Comparison Tool generate multiple image copies when there are implicit LOB or
| XML table spaces defined for the tables. Generating multiple image copies requires
| that either a SYSCOPY TEMPLATE is defined and used for the operations, or that
| the default is used. If no template is provided, this default is used:
| DSN(&US..&SSID..&DB..&SN..&UQ)
|
Chapter 12. Changing DB2 objects 289
290 User's Guide and Reference
Chapter 13. Migrating DB2 objects, data, and catalog statistics
DB2 Admin enables you to migrate (or copy) DB2 object definitions, the data for
the objects, and the catalog statistics for the objects from one DB2 subsystem to
other DB2 subsystems.
You can migrate any combination of this set of information (object definitions,
data, and statistics) for DB2 databases, table spaces, and tables, as well as their
dependent objects.
When you migrate information, DB2 Admin attempts to preserve as many of the
dependent definitions as possible, such as indexes, views, table checks, synonyms,
aliases, and authorizations to these objects.
The following five steps summarize the process of using the DB2 Admin Migrate
function:
1. Specify the information that you want to migrate. You can migrate object
definitions, the data in the objects, the catalog statistics for the objects, or any
combination there of.
When you specify to migrate catalog statistics, INSERT, UPDATE, and DELETE
statements that will modify the catalog statistics are generated. The statements
are generated with the qualifier of the target catalog that you specify, and the
statistic fields that are generated are those that are associated with the objects
that are being migrated. (The complete list of statistics fields are those fields
that are set by RUNSTATS that can be modified and the five statistics columns
for table functions in SYSROUTINES, which are not set by RUNSTATS.)
2. Generate batch jobs.
| You can choose to have the migrate batch jobs generated online or in batch.
3. Run the batch jobs.
4. Optional: Transfer the jobs and data to the target system.
You perform this step only when the node names for the source and target
systems are different.
5. Run batch define and reload jobs and other optional jobs.
In the event that one or more SQL statements fails when you are running a
migrate job, you can use the Batch Restart program (ADBTEP2) to restart or
resume the job at an intermediate point. In addition, you can combine the
generated migrate batch jobs into fewer jobs.
Topics:
“Step 1. Specify the objects to migrate information” on page 293
v
“Step 2. Generate batch jobs” on page 295
v
“Step 3. Run the batch jobs” on page 298
v
“Step 4. Optional: Transfer the jobs/work statement list and data to the
v
target system” on page 299
v “Step 5. Run the batch define, reload, and optional jobs” on page 299
v “Work data sets used by the DB2 Admin Migrate function” on page 300
Related reference
“Option T. Tables, Views, and Aliases” on page 594
Related information
Chapter 15, “Using the Batch Restart programs: ADBTEP2 and ADBTEPA,” on
page 339
IBM Publications Center
After you press Enter, DB2 Admin displays the Migrate Table Spaces panel
(ADB28S) so that you can choose whether to migrate all table spaces within
that database. Use the D line command to omit table spaces from this list. You
can also add additional databases to the list by using the ADD primary
command. Follow the instructions on panels ADB28AD and ADB28ADD to add
databases. On panel ADB28ADD, issue the S line command to select additional
databases to be migrated.
When you issue the MIG line command on a table space, DB2 Admin displays
the Migrate Table Spaces panel, where you can view the size of the table spaces
and the number of referential constraints. The following figure shows an
example MIG line command being issued against a table space.
Chapter 13. Migrating DB2 objects, data, and catalog statistics 293
| DB2 Admin ------------------- DB8A Migrate Table Spaces ------ Row 1 to 2 of 2
| Command ===> Scroll ===> PAGE
|
| Commands: MIG - Generate jobs ADD - Add table spaces
| MIGRI - Add all RI related table spaces
| Line commands:
| D - Delete T - Show tables ADDRI - Add RI related table spaces
| RIT - Show RI related tables
|
| Data Table No of Table RI VSAM
| Select Base Space Part Tables LOB Relations Added KB Used
| * * * * * * * *
| ------ -------- -------- ------ ------ --- ----------- ----- -----------
| DSN8D81U NEWDEPT 0 1 NO 6 NO 48
| DSN8D81U NEWPHONE 0 1 NO 6 NO 48
|
|
| Figure 191. Table Spaces panel (ADB28S) - migrate table spaces example
|
For table spaces, you can use the ADD primary command to add more table
spaces to be migrated. Follow the instructions on panels ADB28AS and
ADB28ASD. On panel ADB28ASD, issue the S line command to select
additional table spaces to be migrated.
| Tip: The DB2 Admin migrate setting, which you can set on the Change
| Migrate Settings panel (ADB28MS), controls whether the space
| information is gathered and displayed. By default, the value of the setting
| is YES. If the value is NO, the space information is not gathered and is not
| displayed, and the VSAM KB Used column is hidden. A SPACE line
| command is displayed on the panel instead, and you can issue the
| command to display the space information if needed. Collecting and
| displaying the space information only when needed can reduce the time
| that is needed to process the MIG command.
When you issue the MIG line command on a table, DB2 Admin displays the
Migrate Tables panel. The following figure shows an example of migrating a
table.
Table RI
Select Name Owner DB Name TS Name LOB Relations Added
* * * * * * *
------ ------------------ -------- -------- -------- --- ----------- -----
EMP DSN8610 DSN8D61A DSN8S61E NO 4 NO
******************************* END OF DB2 DATA *******************************
For tables, you can use the ADD primary command to add more tables to be
migrated. Follow the instructions on panels ADB28AT and ADB28ATD. On
panel ADB28ATD, issue the S line command to select additional tables to be
migrated.
The DB2 Admin migrate panels provide the following primary commands that
you can issue:
MIG Migrates the objects in the list.
Chapter 13. Migrating DB2 objects, data, and catalog statistics 295
| DB2 Admin ------------------- DSN7 Migrate Parameters ------------------- 12:03
| Option ===>
|
| Please specify the following for DB2 Admin Migrate: DB2 System: DB2X
| DB2 SQL ID: ISTJE
| More: +
| Worklist name . . . . . . . : (also used as middle qualifier in DSNs)
|
| Data set information:
| PDS for jobs . . . . . . : MYMIGR.JCL
| Prefix for datasets . . . : ISTJE
|
| Target system parameters:
| DB2 subsystem id (SSID) . : DB2X DB2 release . . . . .: 810
| Target system node name . : Submit job at local .: NO (Yes/No)
| DB2 load library . . . . : SYS1.DSNDB2X.SDSNLOAD
| DB2 sample pgm load lib . : DB2.DSN810.RUNLIB.LOAD
| New TS storage group . . : > New IX storage group : >
| New database . . . . . . : New owner of objects : >
| New grantor . . . . . . . : >
| Catalog qualifier . . . . : > (default SYSIBM , only applicable
| when scope contains catalog stats.)
| Migrate options:
| Generate MIG jobs in batch . . . : N (Yes/No)
| Generate work stmt list . . . . . : N (Yes/No)
| Use masking for batch migrate . . : N (Yes/No, N if stmt list is Y)
| Combine job steps . . . . . . . . : Y (Yes/No, Yes if HPU is Yes)
| Member prefix for combined jobs : ADBMG (default ADBMG)
| Scope of migrate:
| DDL . . . . . . . . . . . . . . : Y (Yes/No)
| Data . . . . . . . . . . . . . : Y (Yes/No)
| Catalog statistics . . . . . . : N (Yes/No)
| DROP on target before CREATE . . : N (Yes/No,No if scp. is data only)
| Generate GRANT statements . . . . : N (Yes/No)
| Create storage group . . . . . . : N (Yes/No)
| Run SQLID . . . . . . . . . . . . : (Blank, a SQLID, or <NONE>)
| Unload method . . . . . . . . . . : U (U - Unload, H - HPU)
| Parallel utilities. . . . . . . . : Y (Yes/No)
|
| Optional steps after reload:
| Run CHECK DATA . . . . . . . . . : N (Yes/No)
| Run RUNSTATS . . . . . . . . . . : N (Yes/No)
| Run IMAGE COPY . . . . . . . . . : N (Yes/No)
| Run REBIND . . . . . . . . . . . : N (Yes/No)
|
| Utility control options:
| Generate template statements . . : NO (Yes/No)
| Use customized utility options . : (Yes/No)
|
| BP - Change batch job parameters
| TU - Specify template usage
| UO - Customized utility options
||
| Figure 193. Migrate Parameters panel (ADB28M)
|
2. Specify the following information on the Migrate Parameters panel:
v The PDS where the generated jobs are to be stored
v Data set information
v Target system parameters
v Migrate options
v Optional jobs to be run after the reload
v Utility control options
Refer to the online help for detailed information about the fields in the panel.
| If you specify to have the migrate jobs generated in batch, DB2 Admin creates a
| work data set (MIGVARS) that stores the parameter information specified on
| the panel and the necessary ISPF tables to use as input for the generation of the
| migrate source and target JCL. Similar to the other migrate work data sets that
Note: The CHECK, RUNSTATS, and COPY requests are not generated for
implicitly created table spaces.
| The REBIND option generates rebinds of the source packages for the
| target system.
Restriction: If you specify Yes for the DROP on target before CREATE field,
any RESTRICT ON DROP conditions for tables are not considered.
If a table has RESTRICT ON DROP, you will need to remove it for
the DROP statement to complete successfully.
3. Press Enter. DB2 Admin starts to generate the jobs required for migration.
The panels that are displayed and the action to take next depends on whether
you chose to generate the migrate jobs online or in batch.
4. Specify whether to generate the migrate jobs online or in batch.
v If you choose to generate the migrate jobs online, review the messages that
are displayed in the Migrate Progress pop-up panel. These messages provide
information about the status of building the jobs.
When DB2 Admin finishes generating the jobs, it invokes an ISPF Edit
session. An example of this edit screen is shown in the following figure.
Press F3 to exit the edit session.
v If you choose to generate the migrate jobs in batch, submit the job that is
displayed in the ISPF Edit session that is invoked. This batch job generates
the jobs that are required for migration.
The member name for the batch job is either
– <Member prefix for combined jobs>.S0, if you chose to combine the job
steps
– SST0BAT, if you chose not to combine the job steps
Chapter 13. Migrating DB2 objects, data, and catalog statistics 297
An example of the edit screen is shown in the following figure.
Step 4. Optional: Transfer the jobs/work statement list and data to the
target system
After you have run the batch jobs, perform this step only if the source and target
systems are different; that is, the node names for the source and target systems are
not the same.
If the source and target database systems are on separate machines, it might be
necessary to transfer the information electronically or by using a portable medium,
such as a tape.
To transfer the jobs/work statement list and data to the target system:
If you combined job steps, these jobs are located in the group xxxxSE. Run the
second group having the name of xxxxSE on the source system after all jobs in the
first group are complete.
If your source and target DB2 subsystems are on the same machine, do not run the
delete data sets on the source system job (SST5DE or xxxxSE) until you run all of
the jobs for the target system.
If you request that a work statement list be generated, the job name xxxSE is used
(when not connected to a remote system). Otherwise, the name xxxLE is used. This
job specifies the data set names with the work statement list that is required to be
transferred to the target system, along with a job step to delete the data sets. Do
not run the step to delete the data sets if you are using the work statement list.
Review the following target system jobs and submit them in the following
sequence:
1. TST1CR - Creates objects and changes the catalog statistics (updates, inserts,
and deletes) on target system.
2. TST2RLn - Reloads data; n is an integer. If many table spaces are being
reloaded, multiple reload jobs can be created.
3. TST3CK - Performs CHECK DATA (optional).
4. TST4RS - Runs RUNSTATSs (optional).
5. TST5IC - Performs an image copy (optional).
6. TST6RB - Rebinds (optional).
Chapter 13. Migrating DB2 objects, data, and catalog statistics 299
7. TST7DE - Deletes data sets on target system.
If you combined job steps, these jobs are located in the group xxxxT1. Run group
xxxxT1 on the target system. If you performed “Step 4. Optional: Transfer the
jobs/work statement list and data to the target system” on page 299 to transfer the
jobs and data to the target system, ensure that all the jobs from group xxxxSE are
complete before running group xxxxT1.
If you specified the current system node name as the name of the target system
node name, the source and target systems are the same. Therefore, you will run
these jobs for Step 5 on the same system as the jobs that you ran for the source
system in “Step 3. Run the batch jobs” on page 298.
The following figure shows the data sets that the DB2 Admin Migrate function
creates and uses.
Table 16. Work data sets for DB2 Admin Migrate
Template
Default data set name Description keyword
prefix.worklist.DDL DDL and DML that is constructed from MISQL
the catalog
prefix.worklist.DDDL DROP statements for drop objects MISDROP
prefix.worklist.COL Identity column information MICOL
prefix.worklist.CMD Rebind output MIGCMD
| prefix.worklist.MIGVARS Partitioned data set for ISPF tables that are MIGSHVR
| required for generating the MIG jobs in
| batch
prefix.worklist.ADB28W1U Work statement list data set MIUCONV
prefix.worklist.ADB28W3U Work statement list data set MIUOTHR
prefix.worklist.ADB28WDD Work statement list elements MI2WDD
prefix.worklist.ADB28W2T Input data set for the merge program MIMLSIN
prefix.worklist.ADB28W2U Intermediate data set used by the merge MIMLSOT
program
The DB2 Admin Migrate function also uses data sets for the unloaded data, load
control statements, and converted load control statements. The naming convention
for the data sets differ depending on whether the DB2 UNLOAD utility or DB2
High Performance Unload (HPU) is used to unload the data.
The following figure shows the data sets for migrations with DB2 UNLOAD.
Table 17. Work data sets for DB2 Admin Migrate with DB2 UNLOAD
Template
Default data set name Description keyword
prefix.worklist.CNT.Sn Load utility control statements, where Sn PUNCHDDN1
is a string assigned to the object by DB2
Admin, with n beginning with 1
The following figure shows the data sets for migration with HPU.
Table 18. Work data sets for DB2 Admin Migrate with HPU
Template
Default data set name Description keyword
prefix.worklist.CNT.Tn Load utility control statements, where Tn MICTLIU
is a string assigned to the object by DB2
Admin, with n beginning with 1
prefix.worklist.ULD.Tn Unload data sets for a non-partitioned MIDTVNP
object, where Tn is a string assigned to the
object by DB2 Admin, with n beginning
with 1
prefix.worklist.ULD.Tn.Pm Unload data sets for a partitioned object, MIDATVP
where Tn is a string assigned to the object
by DB2 Admin, with n beginning with 1,
and Pm is a string that identifies the
object's partition number, with m
beginning with 0001
prefix.worklist.CNC.Tn Converted load utility control statements, MICTLOU
where Tn is a string assigned to the object
by DB2 Admin, with n beginning with 1
The relationship between the table name and Tn and the relationship between the
table space name and the Sn are listed as comments in the front part of the
generated job or work statement list.
DB2 Admin Migrate deletes these data sets when they are no longer needed.
Chapter 13. Migrating DB2 objects, data, and catalog statistics 301
Related concepts
“Utility Template panel” on page 228
Related tasks
“Utility Template — Dataset Name panel” on page 231
“Step 3. Run the batch jobs” on page 298
To use templates to create naming conventions for the work data sets that are
created by the DB2 Admin Migrate function:
1. Specify YES in the Generate template statements field on the Migrate
Parameters panel.
2. Use the TU primary command on the Migrate Parameters panel (or Option 5
on the Administration Menu panel) to manage the templates for the work data
sets. You can use the TU primary command on the Alter Tablespace Redefine -
JCL panel (or Option 5 on the Administration Menu panel) to manage the
templates for the work data sets.
The valid variables that can be specified when constructing the data set name
pattern for a template for a migrate work data set include:
v The following functional variables:
| &ADB28PRE.
| Prefix for data sets specified on the Migrate Parameters panel
| (ADB28M)
&DB2SYS.
The DB2 subsystem id
&WORKLIST.
Worklist name specified on the Migrate Parameters panel (ADB28M)
v The following variables that are supported for normal DB2 utility template
processing:
Chapter 13. Migrating DB2 objects, data, and catalog statistics 303
304 User's Guide and Reference
Chapter 14. Using work statement lists
DB2 Admin work statement lists (WSLs) allow you to create and maintain a set of
operations that you can run online or in batch mode.
You can run the entire set of operations, rerun sets of operations or capture a set of
operations that are created on one subsystem and use those operations on another
subsystem.
Topics:
v “Work statement lists” on page 306
v “Managing work statement lists” on page 310
v “Sample scenario for creating and using a work statement list” on page
323
v “Running WSL with the utility template for LOBs” on page 329
v “Running WSL with the utility template for unloading XML data” on
page 330
v “Using DB2 High Performance Unload within a work statement list” on
page 332
v “Creating work statement lists manually” on page 334
Related concepts
“DB2 Administration Menu panel” on page 97
Related tasks
“Renaming a database” on page 241
In general, the statements in a WSL are standard statements or commands that you
would normally code to perform a task. Entries in a WSL can include items in any
of the following categories:
v SQL statements:
– Data definitions, such as CREATE, DROP, ALTER, and RENAME
– Authorization changes, such as GRANT and REVOKE
– Data manipulation changes, such as INSERT, UPDATE, and DELETE
v DSN commands: such as BIND, REBIND, FREE, and RUN
v DB2 commands: such as START, STOP, ALTER, and SET
v Utilities statements
v REXX and CLIST statements
v DB2 Admin instructions, which follow a product-specific syntax for performing
certain complex operations.
To create WSLs using the following DB2 Admin basic functions, activate prompting
using the PROMPT primary command. REXX and CLIST statements are not
activated via PROMPT. There is no comparable method.
v Definition SQL (CREATE, DROP, ALTER, and RENAME)
v Authorization SQL (GRANT and REVOKE)
v Update SQL (INSERT, UPDATE, and DELETE)
v DSN commands (BIND, REBIND, FREE, and RUN)
v DB2 commands (START, STOP, ALTER, and SET)
v REXX and CLIST statements
Recommendation: Use the PROMPT Options panel to activate the Prompt facility.
The Prompt facility allows you, on a statement type level, to
specify whether prompting is active for the statement type.
If the WSL name already exists, you can choose to add the GEN output to the end
of the current contents of that WSL or to replace the current contents of the WSL
with the GEN output.
After entering information in the fields, you are prompted to specify the WSL
library and member name. If the WSL name already exists, you can choose to add
the ALC output to the end of the current contents of that WSL or to replace the
current contents of the WSL with the ALC output. The next panel displays the JCL
that you must run to populate the WSL.
After entering information in the fields, you are prompted to specify the WSL
library and member name. If the WSL name already exists, you can choose to add
On the following panels, you can specify that utility statements be placed into a
WSL:
v Table Utilities panel (ADB2UT)
v Table Space Utilities panel (ADB2US)
v Index Utilities panel (ADB2UX)
v Storage Group Utilities panel (ADB2UG)
v Create Index Utilities panel (ADB26CXU)
v LISTDEF panel (ADB25LU)
After entering information in the fields, you are prompted to specify the WSL
library and member name. If the WSL name already exists, you can choose to add
the utility statements to the end of the current contents of that WSL or to replace
the current contents of the WSL with the utility statements.
If you clone a WSL that includes a statement containing delimited identifiers, DB2
Admin removes the quotation marks from the identifier if it does not require
delimiters.
They can be accessed by other users and are protected by RACF. By storing WSLs
in ISPF tables, they can easily be moved to other systems or installations. A WSL
can be created on one system and changed or executed on another system. The
following scenarios are possible:
v Local use only: Generate the WSL on subsystem DB2-1. Clone the WSL many
times with different owners and names for the objects. Execute the WSL on
DB2-1.
v Local customization and remote execution: Generate the WSL on subsystem
DB2-1. Clone the WSL many times with different owners and names for the
objects. Send the WSL to subsystem DB2-2. Execute the WSL on DB2-2.
v Remote customization and execution: Generate the WSL on subsystem DB2-1.
Send the WSL to DB2-2. Clone the WSL many times with different owners and
names for the objects. Execute the WSL on DB2-2.
Restriction: Do not use the DDL line command to generate the SQL for a specific
WSL. You can manually edit an existing WSL using the specified
option provided on the WSL panel.
| You can run a WSL either in batch (the R line command) or online (the O line
| command).
When you use the R line command to run a WSL in batch, one or more jobs are
created. Each job includes a step to run the Batch Restart Program ADBTEP2 and
the job's set of input instructions (batch statement list) for ADBTEP2.
| When you use the O line command to run a WSL online, ADBTEP2 is run online
| and all input instructions are processed sequentially.
When you run a WSL in batch, DB2 Admin generates multiple jobs when it
encounters the PARALLEL command in the WSL. DB2 Admin generates the
following job names:
<prefix><m><seqnumber>
<prefix>
A specified prefix. The prefix can be from 4 to 6 characters, depending on
the number of parallel jobs.
<m> The first character in the word following the PARALLEL command. For
example, U for UNLOAD; R for RELOAD.
<seqnumber>
The generated sequence number. The sequence number can be from 1 to 3
characters (n to nnn), depending on the number of parallel jobs:
| You can restart failed work statement list jobs by re-issuing the R or O line
| command on the Work Statement Library List panel (ADB2W1). If the WSL
| contains PARALLEL processing capability, the WSL must be restarted in the same
| mode that it was originally run (either online or batch). A failed parallel process
| that was originally submitted as a batch job cannot be restarted in online mode,
| and vice versa.
Use this panel to manage an entire WSL library or to manage a single WSL.
| DB2 Admin ----------- Work Statement List Library: IWORKSTMT.LIST Row 1 from 17
| Command ===> Scroll ===> PAGE
|
| Line commands:
| S - Show R - Run in batch D - Delete C - Copy A - Append Q - Clone
| I - Interpret V - Validate E - Edit 0 - Run online
|
| Sel Name Size Created Changed ID
| * * * * *
| --- -------- ----- ---------- ---------------- --------
| BASE 153 2005/04/12 2005/04/12 17:12 J148286
| REBIND 5 2005/04/08 2005/04/08 11:28 J148286
| ST4 5 2005/02/25 2005/02/25 08:34 J148286
| ST5 7 2005/02/25 2005/02/25 08:32 J148286
| ST8 8 2005/02/24 2005/02/24 18:32 J148286
| TEST 8 2005/04/28 2005/04/28 10:25 J148286
| TEST1 6 2005/04/26 2005/04/26 11:00 J148286
| TEST2 5 2005/04/28 2005/04/28 12:26 J148286
| T1
| ******************************* END OF DB2 DATA *******************************
||
| Figure 197. Work Statement List Library panel (ADB2W1)
|
This panel shows the contents of the WSL library, with each list on a separate
line.Use the following line commands to manage WSLs within a WSL library:
S Show the WSL.
R Run in one or more batch jobs.
D Delete the WSL from the library.
C Copy this WSL and append it to the WSL where the A line command has
been or will be specified.
A Append the WSL to this member from where the C line command has been
or will be specified.
Q Clone the existing WSL member for use on other DB2 subsystems.
I Interpret the WSL.
Tip: To perform a search for a string in the WSL, invoke the EDIT
command to display all of the statements, then use FIND to search for
a specific text string.
| O Run the WSL online.
| When you run a WSL online, certain program or utilities that are intended
| to be run in batch might issue messages to the terminal. Make note of these
| messages, and press Enter to clear the messages.
Related tasks
“Cloning work statement lists”
“Interpreting a WSL” on page 316
“Validating a WSL” on page 317
To clone a WSL:
1. Select option 1 on the Manage Work Statement Lists panel.
2. On the Work Statement List Library panel (ADB2W1), issue the Q line
command on a WSL that you want to clone. The Clone Work Statement List
panel is displayed, as shown in the following figure.
| Tip: The fields to specify overwrite values for table space or index space
| attributes are no longer available on this panel because masking is
| changed to include the support to specify overwrite values for PRIQTY
| and SECQTY. When you edit the mask while under the control of the
| DB2 Admin masking macro, you can import your old overwrite values
| by using the command, COPY 'overwrites_data_set_name' after .ZL, where
| 'overwrites_data_set_name is the name of your old overwrites data set. The
| COPY command appends the contents of the specified overwrites data
| set to the mask contents.
The following field is also available for specifying values:
Apply masking to data set names
Specifying Yes in this field causes name masking to be applied to data set
names. Name masking is useful when DB2 Admin generates data set
names with qualifiers that are based on database object names. This field
While using the Clone Work Statement List panel, you can browse the message
data set for a cloned WSL by specifying the appropriate message output file (if it
was changed from the default) and issuing the M primary command.
Cloning can be performed on a WSL containing any valid commands and valid
SQL statements.
Related concepts
“Mask definitions” on page 505
Related tasks
“Viewing a WSL library” on page 311
Viewing a WSL
You can view and manage a single WSL.
DB2 Admin ----------- Show Work Statement List: CREATE ------------ Row 1 of 4
Command ===> Scroll ===> Page
Line commands:
D - Delete I - Insert E - Edit C - Copy M - Move A - After B - Before
R - Repeat
Interpreting a WSL
Before running a WSL, you might want to check the contents of the WSL to see
what types of statements that it contains.
Interpreting a WSL allows you to generate a report that selectively lists the
different SQL statements, DB2 commands, and utility statements that the WSL
contains.
To interpret a WSL:
1. Issue the I command on the Work Statement List Library panel. The Interpret
Work Statement List Options panel is displayed, as shown in the following
figure.
2. Choose those statement types that you want interpreted (see the previous
figure for statement types) and press Enter. The Interpret Work Statement List
report is generated, as shown in the following figure. The S line command to
show an object is valid only for objects that are in the catalog, such as
databases, table spaces, and indexes.
Related tasks
“Viewing a WSL library” on page 311
Validating a WSL
Validating a WSL allows you to generate a report about the syntax and the impact
to other objects.
Before running a WSL, you might want to have the syntax of the SQL statements
checked and assess the impact that running the WSL would have on objects.
When you validate a WSL, DB2 Admin checks the syntax of each SQL statement in
isolation from any other SQL statements in the WSL; it ignores any SQL statements
that precede the statement currently being checked. Thus, DB2 Admin can
generally report all syntactic errors but might miss semantic errors that can result
from not being able to see previous statements. For example, if the name of a data
type is required in a certain position in the syntax, DB2 Admin does not verify that
the name of the data type is either a built-in data type or a user-defined data type
that has been previously defined.
| Note: For native SQL procedures, even if validation is successful, the object's
| existence in the body of the native SQL procedure cannot be known at
| procedure run time (or during procedure call).
The impact analysis portion of the validate report lists the impact to the objects by
these categories:
Implicitly dropped objects
Existing objects that are implicitly dropped but not re-created by the WSL.
Explicitly dropped objects
Existing objects that are explicitly dropped but not re-created by the WSL.
Recreated objects
Existing objects that are implicitly or explicitly dropped and re-created by
the WSL.
To validate a WSL:
1. Issue the V command on the Work Statement List Library panel. The JCL to
generate the batch job to produce the Validate Work Statement List report is
displayed.
2. Submit the JCL. The Validate Work Statement List report is generated and
displayed, as shown in the following figure.
--------------------------------------------------------------------------------
REFERENCE FOR CATALOG OBJECT STATUS
--------------------------------------------------------------------------------
IMPLICITLY DROPPED OBJECTS - Existing catalog objects that are implicitly
dropped and not recreated by the WSL.
TEMPORARY OBJECTS - Objects that are created and dropped during
execution of the WSL. Temporary objects do not
exist in the catalog before or after WSL execution.
CREATED OBJECTS - Objects that are created by the WSL that did not
exist in the catalog.
EXPLICITLY DROPPED OBJECTS - Existing catalog objects that are explicitly
dropped and not recreated by the WSL.
ALTERED OBJECTS - Existing catalog objects that are modified by
ALTER statements in the WSL.
RECREATED OBJECTS - Existing catalog objects that are implicitly or
explicilty dropped and later recreated by the WSL.
--------------------------------------------------------------------------------
ALTERED OBJECTS
---------------
Function NBRON.SPECIFICFFFF1
TEMPORARY OBJECTS
-----------------
Sequence NBRON.org_seq
Table Space DSN8D72A.DSN8S72D
Table DSN8720.DEPT
Table DSN8720.ABCDTB
CREATED OBJECTS
----------------
Table NBRON.TBDSN80
RECREATED OBJECTS
------------------
Table QUADPB02.TBADPB02
Table Space DBADPB02.TPADPB01
View QUADPB02.VWADPB02
View QUADPB02.VWADPB04
View QUADPB02.VWADPB05
View QUADPB02.VWADPB06
View QUADPB02.VWADPB09
View QUADPB02.VWADPB12
View QUADPB02.VWADPB14
View QUADPB02.VWADPB15
View QUADPB02.VWADPB16
View QUADPB02.VWADPB17
View QUADPB02.VWADPB18
View QUADPB02.VWADPB19
Index QUADPB02.IPADPB01
Index QUADPB02.IPADPB02
Referential constraint QUADPB02.TBADPB02 QUADPB02.TBADPB01 FKADPB03
Referential constraint QUADPB02.TBADPB01 QUADPB02.TBADPB02 FKADPB02
Referential constraint QUADPB02.TBADPB04 QUADPB02.TBADPB02 FKADPB04
Referential constraint QUADPB02.TBADPB05 QUADPB02.TBADPB02 FKADPB07
Related tasks
“Viewing a WSL library” on page 311
| Running a WSL
| You can run a WSL.
| To run a WSL:
| 1. Issue the R (Run in batch) command or the O (Run online) command on the
| Work Statement List Library panel for the WSL that you want to run. If you
| choose to run in batch, the JCL to generate the batch job is displayed.
| 2. Submit the JCL.
| The load summary report helps you ensure that no data was unexpectedly lost.
| The example in the following figure shows a load summary report in which the
| number of input and loaded records for three tables were the same, but records
| were discarded for another table.
|
| 15697-L90 IBM DB2 Administration Tool for Z/OS Load Summary Report for Worklist(ST8)
|
|
| Table owner Table name Input Loaded Discarded Status
| ------------------ ------------------ ----------- ----------- ----------- --------
| "SYSADM" "TBADAS01" 1255 1255 0 ********
| "SYSADM" "TBADAS02" 855 799 56 discards
| "SYSADM" "TBADAS03" 2033 2033 0 ********
| "SYSADM" "TBADAS04" 1444 1444 0 ********
||
| Figure 204. Example of load summary report
|
| When the report contains a large number of rows, you will need to scroll through
| the report to see all of the information in the report. When the table name exceeds
| the number of characters that can be displayed in the Table Name field, a footnote
| suffix is added to the table name, and the full table name is displayed at the
| bottom of the report. The following example shows the format that is used to
| display long table names:
|
In this scenario, two databases are used, each with two tables. DB2 Object
Comparison Tool produces the tasks that upgrade the older, outdated database to
the new database. This sample directs these tasks to a WSL. The following figure
shows the DB2 Object Comparison Tool after defining the inputs and the masking
that is required, and proceeding to the Step 5. Generate Compare Jobs panel.
Compare options:
Suppress DROP of objects : N (Yes/No)
Suppress DROP of columns : N (Yes/No)
Suppress adding columns . : N (Yes/No)
Options:
Single compare job . . . : Y (Yes/No)
Member name of single job : COMPARE (default COMPARE )
Generate apply jobs . . . : N (Yes/No)
As work statement list . : Y (Yes/No to append to work stmt list)
Figure 206. DB2 Object Comparison Tool — Generate Compare Jobs panel
The new WSL name is ROYCDOC1 and the As work statement list field indicates
that the job should be saved as a WSL. Next, a panel prompts for the data set in
which to store the new WSL. If the data set does not exist, it is created. A DB2
Object Comparison Tool JCL job is now generated for this new WSL. Running this
job produces the WSL that can be used to upgrade the old tables to the new tables.
The following figure shows the result of selecting option 1 on panel ADB2W
(option W from the Main Menu) to show the list of WSLs, including the new WSL
just created.
Line commands:
Line commands:
S - Show R - Run in batch D - Delete C - Copy A - Append Q - Clone
I - Interpret V - Validate E - Edit
Figure 208 on page 325 and Figure 209 on page 326 show the contents of the new
WSL, using the SHOW line command.
The TYPE column specifies the statement type (DDL statement, DB2 command,
DB2 utility, etc.) for statements that are placed in the batch statement list when
running the WSL. The ADM type statements are control statements that can control
the number of jobs created when the WSL is run.
Line commands:
D - Delete I - Insert E - Edit C - Copy M - Move A - After B - Before
R - Repeat
When you run the WSL (by issuing the R line command on the option 1 panel),
you are prompted for a library name, a prefix to use for the job name, and whether
the job name should equal the member name. The following figure shows the jobs
that are created when you select Run Work Statement List.
Figure 210. The jobs that are generated from running the WSL.
The Run command produced five jobs. This example is changing two tables;
therefore, two unload jobs (ROYCU001 and ROYCU002) are created. These two
jobs can be run in parallel. The ROYC2 job performs all the DDL tasks and can be
run after the unload jobs have successfully completed. The final two jobs,
ROYCR001 and ROYCR002, reload the data and can be run in parallel. The
COMPARE job is shown in the previous figure but does not need to be in the same
library as the other WSL jobs.
...
| If you use the utility template for LOBs, the Run WSL function (like other
| functions such as ALC, RDEF, and MIG) will add an ADM statement (ADMIN
| LOBTEMPLAT) to indicate the existence of a LOB column or columns in the table
| or tablespace that is involved in the next UNLOAD statement.
| where
| <n> Indicates the existence of n number of LOB columns in the next unload.
| <DSNPrefix>
| The dataset prefix, which can have a maximum length of 35 bytes.
| When the Run WSL function reads each ADMIN LOBTEMPLATE statement, the
| Run WSL function performs the following steps:
| 1. Generates a unique name for the template.
| where
| ADB Indicates that it is an admin template.
| Running WSL with the utility template for unloading XML data
| You can run work statement lists (WSLs) with XML by using the utility template
| for XML, or by using a customization skeleton, or you can run WSLs by default.
| If you use the utility template for XML, the Run WSL function will repeat the
| ADMIN XMLTEMPLATE n statement n times.
| where
| <n> Indicates the existence of n number of XML columns in the next unload.
| <DSNPrefix>
| The dataset prefix, which can have a maximum length of 35 bytes.
| When the Run WSL function reads each ADMIN XMLTEMPLATE statement, the
| Run WSL function performs the following steps:
| 1. Appends a qualifier as needed for the template. Ensure that your data set is
| unique after the qualifier is appended.
| where
| ADB Indicates that it is an admin template.
| X Indicates that it is an XML template.
| nnnn Is a running sequence number for each XML template.
| 2. Repeats the given template statement into n templates by adding a name for
| the template and adding a suffix for the data set, as shown in the following
| example:
| ADMIN XMLTEMPLATE <n> DSN <DSNPrefix>...<and other attributes like UNIT, SPACE...>
| The Run WSL function then replaces the preceding statement with the
| following set of statements:
| ADMIN XMLTEMPLATE ADBX1 DSN <DSNPrefix>...<and other attributes like UNIT, SPACE...>
| ADMIN XMLTEMPLATE ADBX2 DSN <DSNPrefix>...<and other attributes like UNIT, SPACE...>
| .
| .
| .
|
| ADMIN XMLTEMPLATE ADBXn DSN <and other attributes like UNIT, SPACE...>
| The Run WSL function places the templates before the corresponding
| UNLOAD statement by replacing the ADMIN XMLTEMPLATE statement that
| was generated by the DB2 Admin functions.
| The ADMIN XMLTEMPLATE statement triggers ADBTEP2 to make the
| necessary modifications to the UNLOAD statement.
| Attention: The data set name pattern will be modified to include an
| additional qualifier when multiple XML or LOB columns exist in the object
| being unloaded and &TS or &SN are not included and the unload method
| chosen is DB2. If the unload method chosen is HPU, this check or modification
| is not performed as HPU will detect a data set collision and fail the unload.
| Restriction: If ADBTEP2 encounters too few XML templates for the object
| being unloaded, it wll issue message ADB5224E and end
| processing.
|
In addition, when using ALTER table space redefine against a single table space,
you can use HPU as the unload method.
The Migrate function has a slightly different implementation than other functions,
as the unload is performed before the work statement list is created, using regular
JCL and not under the control of the ADBTEP2 program.
For functions other than MIGRATE, you decide to use HPU when you run the
work statement list. On the Work Statement List Library panel (ADB2W1), enter
the R line command to display the HPU Unload Prompt pop-up panel
(ADB2WHPU) that indicates that an unload is being performed. At that time, you
can decide whether to use HPU.
You can port a work statement list from subsystem to subsystem. For example, if a
work statement list is created on a subsystem that does not have HPU enabled,
you can copy that work statement list to another subsystem that has HPU enabled.
If you do not select HPU at run time, the work statement list runs using the DB2
utility. Prior to submitting the work statement list jobs, you can choose between
the DB2 utility and HPU.
Restriction: After the run is started, the unload method cannot be changed. For
example, a job that fails using the DB2 UNLOAD utility cannot be
restarted using HPU.
When an HPU job is being run using a work statement list, partitioned table
spaces are unloaded by partition. The subsequent loading of the data is performed
in parallel when possible; otherwise, the data sets are concatenated to form a single
input stream.
You can specify that you want to unload the partitions in parallel. This option is
ignored if you do not choose the HPU option. The JCL that is generated directly
invokes DB2 HPU to complete the unload, as well as to create the work statement
list. Because the work statement list does not contain an unload statement, no
prompt is offered that asks whether HPU is required at run time. When the work
statement list is run, the ADBTEP2 program automatically determines if the data
was unloaded by partition and completes the appropriate steps to reload the data
accordingly.
Restriction: Do not code HPU syntax directly in a work statement list. Use only
the DB2 utility format. When the ADBTEP2 program runs HPU on a
partitioned table space, it always unloads each partition into a
separate data set. For a work statement list that is not created using
ALTER or DB2 Object Comparison Tool, you must ensure that
subsequent handling of the output from the unload operation is
managed appropriately.
DB2 Admin does not specify the options that apply to non-externalized updates to
the catalog data in the DB2 buffer pools. You can provide this access by defining a
default in the HPU PARMLIB member using one of the following options:
v Quiesce the catalog using option QUIESCECAT=YES
v Provide direct access without flushing the DB2 buffers using QUIESCECAT=NO.
This can lead to failures.
v Specify that HPU uses DB2 to perform the catalog access using option
SQLACCES=YES.
Recommendation: Whenever possible, use the last option listed above. (This
option was provided in APAR PQ68392.)
A benefit to manually creating a WSL is that you can use the WSL infrastructure to
control related tasks. For example, if you want to run a heavy updating batch
program, schedule an image copy, and RUNSTATS immediately after it, you could
create a WSL containing these three tasks. The benefit is that the WSL is cloned
and during execution the restart capability of ADBTEP2 is available.
Related concepts
“Coding a WSL manually” on page 308
In addition, you can elect to run certain parts in parallel (where appropriate).
Running jobs in parallel refers to creating multiple jobs that you or a scheduling
To run statement pairs in parallel, use a statement type of ADM and use the
statements PARALLEL and ENDPARALLEL, and JOB and ENDJOB.
The PARALLEL and ENDPARALLEL statements signify the start and end points
for jobs to be run in parallel. The JOB and ENDJOB card statements signify the
start and end points of WSL statements for a particular job. You should have
multiple JOB/ENDJOB pairs within a PARALLEL/ENDPARALLEL pair. WSL
statements not included in a PARALLEL/ENDPARALLEL pair are placed in a
separate job.
If you specify PARALLEL name, the members generated by RUN are suffixed by
xxxxn, where xxxx is the user ID and n is the first character of name.
ADM PARALLEL UNLOAD
ADM JOB
tasks for job1
ADM ENDJOB
ADM JOB
tasks for job2
ADM ENDJOB
ADM ENDPARALLEL
serial tasks
This example results in three jobs. The first two jobs run concurrently and the third
one runs when the first two are complete.
For multiple tables unload all the tables in parallel. When finished, run DDL to
drop and redefine then run the loads in parallel.
The loads and unloads are run in parallel to increase performance. The DDL is
done in one job to avoid DB2 locking or serialization problems.
The process involves creating or updating a record in a checkpoint table each time
that a COMMIT statement is encountered in the input stream. By using this table,
execution can be resumed with the first statement following the last successful
commit point before the failure, bypassing all prior successfully executed
statements. Of course, before restarting after a failure, you must correct the
condition that caused the failure.
In addition to SQL statements, you can supply DB2 commands, DB2 utilities, DB2
Admin support commands, and DSN commands as input to ADBTEP2.
The Batch Restart program (ADBTEP2) enables you to restart or resume the
execution of an input stream at an intermediate point, in the event that any one of
the statements in that stream should fail. ADBTEPA allows user IDs that are not
authorized to certain objects to re-create those objects if they are implicitly
dropped.
Topics:
v “Introduction to ADBTEP2” on page 340
v “Parameters passed to ADBTEP2” on page 340
v “Using ADBTEP2” on page 343
v “Dialog support for batch job checkpoint table” on page 344
v “Restarting an ADBTEP2 job” on page 345
v “Using ADBTEP2 with LOBs” on page 348
v “Overview of ADBTEPA” on page 350
v “Using ADBTEPA” on page 351
v “Restarting ADBTEPA after a failure” on page 352
v “ADBOPT parameters” on page 352
Related concepts
“Overview of changing objects in DB2 Admin” on page 240
“Using authorization switching” on page 287
“Supplying input to the batch restart program (ADBTEP2)” on page 335
“Changing batch job utility parameters” on page 358
Related information
Chapter 13, “Migrating DB2 objects, data, and catalog statistics,” on page 291
The process involves creating or updating a record in a checkpoint table each time
that a COMMIT statement is encountered in the input stream. By using this table,
execution can be resumed with the first statement following the last successful
commit point before the failure, bypassing all prior successfully executed
statements. Of course, before restarting after a failure, you must correct the
condition that caused the failure.
Input types
ADBTEP2 can run the following elements from an input stream (SYSIN):
v SQL statements
v DB2 utilities
v DB2 commands
v DSN commands (including RUN)
v REXX EXECS or CLISTS
Checkpoint table
ADBTEP2 is generally used in jobs that are generated by DB2 Admin, but it can
also be used independently. The checkpoint table is a shared resource, and is
named ADBCHKPT. You can determine the qualifier of this table by using the
ADBTEP2 package associated with the plan that you are running (ADBTEP2 by
default). ADBTEP2 adds and maintains a row in the checkpoint table. This row in
the checkpoint table is referenced by a worklist name parameter that is supplied to
ADBTEP2. The worklist name parameter is used in conjunction with the user ID of
the submitter (to ensure uniqueness). The worklist name parameter is created
when the JCL is generated by DB2 Admin functions and uses the work statement
list name concatenated with an optional suffix.
The following parameters are generated automatically and are passed to ADBTEP2:
Any failing DSN command statements that are ignored are skipped and are
written to the ADBHOLD table. When the job ends, if any DSN commands
have failed, the restart action field in the checkpoint table contains an 'H' to
indicate that there are held records. When RESTART(YES) is specified, the held
records are reprocessed if the batch job ended with a return code of 0;
otherwise, the job is restarted from the last recorded commit point. When
RESTART(NO) is specified, the held records are purged and the job is restarted
from the beginning.
RESTART
RESTART(NO)
Indicates that ADBTEP2 does not perform a restart, and execution starts
with the first command. The WORKLIST() parameter must be used with
this option and ADBTEP2 updates the checkpoint table. A subsequent
restart can be performed by using RESTART(YES).
RESTART(YES)
Indicates that the job is to be restarted from the last recorded commit point
prior to a failure (this is the default). If RESTART(YES) is specified or used
as a default, you must also provide the WORKLIST() parameter. When
execution begins, ADBTEP2 searches for a checkpoint row in the
checkpoint table and repositions within the input, skipping over committed
commands.
Chapter 15. Using the Batch Restart programs: ADBTEP2 and ADBTEPA 341
RESTART(YES) causes a very basic check to be done. RESTART(YES)
checks that the last command type held in the checkpoint record matches
the command type to be attempted at restart. This is to prevent an
accidental reuse of a checkpoint against a completely different WSL.
| Restriction: DB2 Admin builds the CHECK DATA statement and all CHECK
| parameters used during auto-check processing. You cannot specify
| any other parameters.
WORKLIST(extended-name)
extended-name is a unique identifier that is used in conjunction with the user ID
of the submitter to provide the key for the checkpoint record. The full format
of extended-name is: name.suffix
where name includes between 1 and 8 alphanumeric characters, and suffix
includes between 1 and 8 alphanumeric characters. The separator must be a
period (.). The suffix is optional, but if omitted, the separator must also be
omitted.
For jobs that DB2 Admin generates, name is the same as the work statement
list.
Examples:
The following parameters are passed to ADBTEP2 and are used to control
non-restart functions:
ALIGN
ALIGN(MID)
Aligns output from the program to the center of the page. This is the
default.
ALIGN(LHS)
Aligns output from the program to the left-hand side of the page.
MIXED
MIXED
Indicates that the input stream can contain data in a combination of SBCS
and DBCS formats.
NOMIXED
Indicates that the input stream will contain data in SBCS format only. This
is the default.
| PCACT
| Specifies the action to take when the job is to recover a change made through
| Change Management and there are pending changes that affect the same
| objects or related objects as the change.
| PCACT(CANCEL)
| Indicates that the recover job will not be run.
| PCACT(SUPERSEDE)
| Indicates that the recover job will be run. The recover change supersedes
| the pending changes, and the pending changes are set to DEFINED status.
SQLTERM(c)
c defines the character that terminates an SQL statement. The default
termination character is the semicolon (;).
SSID(name)
A subsystem or group attachment name to be used for running non-SQL
commands or functions. This name should be the same as that used in the
DSN SYSTEM(xxxx), which is used ahead of the RUN command that invokes
ADBTEP2. This parameter is mandatory if any non-SQL DB2 function is
included in the input stream (for example, a DSN command).
Related concepts
“Changing batch job utility parameters” on page 358
Using ADBTEP2
SADBSAMP(ADBTEP2R) contains a sample job that you can use to run ADBTEP2,
the Batch Restart program.
Chapter 15. Using the Batch Restart programs: ADBTEP2 and ADBTEPA 343
You must modify this job to conform to the conventions established in your
installation and to provide the input data stream for execution (also referred to as
the batch statement list).
The batch statement list can be specified inline, as a sequential data set, or as a
member of a partitioned data set. It should contain all of the SQL statements, DB2
commands, utility control statements, and other valid statements that you want to
process in a single execution. Within this series of statements, be sure to separate
logical tasks or units of work with a COMMIT statement. These denote the points
at which a failed execution can be restarted. Non-SQL functions have implicit
commits, both before and after them.
Because all ADBTEP2 jobs are restartable, it is recommended that the worklist
parameter is specified and provides a unique name. The RESTART parameter can be
set to either YES or NO or used as default (YES), depending on whether the
submission of the job is required to restart. ADBTEP2 is restartable regardless of
the RESTART option. A job that is run with RESTART(NO), can be resubmitted with
RESTART(YES) in the event of a failure. When you have specified the parameters,
submit the JCL for execution.
If the execution is unsuccessful, examine the output to determine the reason for the
failure. Correct the error and resubmit the job.
Related concepts
“Step 1. Create the checkpoint table” on page 31
For each active batch job running ADBTEP2 and for jobs running ADBTEP2 that
have terminated because of an error in the input stream, a record of that execution
is present in the checkpoint table. Select option 1, Display Checkpoint Records,
from the Manage Batch Job Checkpoint Table panel to see those records, terminate
an active ADBTEP2 job, update or delete the record of an abnormally terminated
job, or insert a new checkpoint record.
Important: A new checkpoint record is only inserted to replace one that was
deleted accidentally.
In addition, you can instruct ADBTEP2 to skip to the next commit using the N line
command (skip-next).
Select option 2, Display Checkpoint Table Status, to obtain information about the
checkpoint table itself, and issue any requests against the table, such as GRANT or
REVOKE, that are supported by DB2 Admin.
If a record does not exist, ADBTEP2 creates it and starts with the first statement in
the batch statement list. If a record exists, ADBTEP2 proceeds based on the RESTART
parameter. When RESTART(NO) is specified, ADBTEP2 starts with the first statement
in the batch statement list. When either no RESTART parameter is provided or
RESTART(YES) is specified, ADBTEP2 repositions itself within the batch statement
list and resumes processing.
ADBTEP2 has a simple restart capability. When the failing statement is SQL, a
restart occurs at the last commit point prior to the failing SQL statement, which
can be either an SQL COMMIT statement or an implicit commit that is performed
while successfully completing a non-SQL function, such as a DB2 command.
If ADBTEP2 determines that a utility was running at the time of failure, ADBTEP2
obtains information from DB2 (if the utility is known to DB2) and restarts
accordingly.
The following figure illustrates the checkpoint for the job with worklist DOC1.
Because the Restart Command field is blank, we can determine that the last
instruction performed was either an SQL COMMIT or a non-SQL statement that
completed with an implicit commit. If we issue an N (skip-next) line command,
Figure 216 on page 346 is displayed. The checkpoint number has been increased by
one.
Chapter 15. Using the Batch Restart programs: ADBTEP2 and ADBTEPA 345
DB2 Admin ---------- DB2X Display Batch Job Checkpoint Table - Row 1 to 4 of 4
Command ===>
Line commands:
D - Delete/Terminate I - Insert U - UpdateN - Skip-Next
Commit Restart Restart
S Userid Worklist Suffix Time Number Command Action
* * * * * *
- -------- -------- -------- ---------------> ----------- ----------- ------
n ROYC DOC1 2002-07-18-16.06 4
VNDBRON RI03 2002-07-10-16.19 2
VNDOJFK OBJCMP 2002-06-26-16.54 1
VNDROTH AAA 2002-06-26-07.36 1 COPY C
******************************* END OF DB2 DATA *******************************
Figure 215. Display Batch Job Checkpoint Table panel (ADB2Z2B1) – using the Skip-Next
line command
DB2 Admin ---------- DB2X Display Batch Job Checkpoint Table - Row 1 to 4 of 4
Command ===>
Line commands:
D - Delete/Terminate I - Insert U - UpdateN - Skip-Next
Commit Restart Restart
S Userid Worklist Suffix Time Number Command Action
* * * * * *
- -------- -------- -------- ---------------- ----------- ----------- ------
ROYC DOC1 2002-07-18-16.06 5 UNKNOWN N
VNDBRON RI03 2002-07-10-16.19 2
VNDOJFK OBJCMP 2002-06-26-16.54 1
VNDROTH AAA 2002-06-26-07.36 1 COPY C
******************************* END OF DB2 DATA *******************************
Figure 216. Display Batch Job Checkpoint Table panel (ADB2Z2B1) – result of the Skip-Next
line command
In Figure 217 on page 347, DOC2 has a Restart Command value that indicates that a
COPY statement failed. The value in the Restart Action field determines the
action to occur when ADBTEP2 repositions. For utilities, the value can be:
C Restart current (ADBTEP2 default)
P Restart phase
R Restart from the beginning of the utility
S Skip running the utility
The value in the Restart Action field can also be 'H', which indicates that the
ADBHOLD table contains failed DSN commands. These failed DSN commands can
be reprocessed when the job is restarted with RESTART(YES).
The U line command (Update) on this panel can be used to change the restart
option for utilities. For example, you can change the C to an R. For non-SQL
statements, only the options S (skip) and R (rerun or reissue) are valid.
DB2 Admin ---------- DB2X Display Batch Job Checkpoint Table - Row 1 to 4 of 4
Command ===>
Line commands:
D - Delete/Terminate I - Insert U - UpdateN - Skip-Next
Commit Restart Restart
S Userid Worklist Suffix Time Number Command Action
* * * * * *
- -------- -------- -------- ---------------- ----------- ----------- ------
n ROYC DOC2 2002-07-18-16.16 5 COPY C
VNDBRON RI03 2002-07-10-16.19 2
VNDOJFK OBJCMP 2002-06-26-16.54 1
VNDROTH AAA 2002-06-26-07.36 1 COPY C
******************************* END OF DB2 DATA *******************************
Figure 217. Display Batch Job Checkpoint Table panel (ADB2Z2B1) – reissuing the Skip-Next
line command
DB2 Admin ---------- DB2X Display Batch Job Checkpoint Table - Row 1 to 4 of 4
Command ===>
Line commands:
D - Delete/Terminate I - Insert U - UpdateN - Skip-Next
Commit Restart Restart
S Userid Worklist Suffix Time Number Command Action
* * * * * *
- -------- -------- -------- ---------------- ----------- ----------- ------
ROYC DOC2 2002-07-18-16.16 5 COPY S
VNDBRON RI03 2002-07-10-16.19 2
VNDOJFK OBJCMP 2002-06-26-16.54 1
VNDROTH AAA 2002-06-26-07.36 1 COPY C
******************************* END OF DB2 DATA *******************************
Figure 218. Display Batch Job Checkpoint Table panel (ADB2Z2B1) – result of reissuing the
Skip-Next line command
Related concepts
“Using ADBTEPA” on page 351
“Dialog support for batch job checkpoint table” on page 344
| The report can be examined in SDSF, under the ADBRPTSM DD. A sample report
| is shown below.
|
Chapter 15. Using the Batch Restart programs: ADBTEP2 and ADBTEPA 347
| 13:13.31 DB2 Administration Tool - 2009-09-17 Summary Report for L655527D
| 13:13.31
| 13:13.31 Ret Code Action Object
| 13:13.31 ======== ======== ====================================================
| 13:13.32 0 UNLOAD TABLESPACE DBADKK01.TSADKK01 FROM TABLE "VNDDHG"."TB
| 89740"
| 13:13.34 0 DROP TABLESPACE "DBADKK01"."TSADKK01"
| 13:13.37 562 GRANT USE OF STOGROUP SYSDEFLT TO USRT001
| 13:13.37 562 GRANT USE OF STOGROUP SYSDEFLT TO "PUBLIC"
| 13:13.39 0 CREATE TABLESPACE TSADKK01
| 13:13.39 0 CREATE TABLE VNDDHG.RN89740
| 13:13.39 562 GRANT USE OF STOGROUP SYSDEFLT TO "PUBLIC"
| 13:13.39 0 CREATE TABLESPACE TSADKK01
| 13:13.39 0 CREATE TABLE VNDDHG.RN89740
| 13:13.42 0 CREATE UNIQUE INDEX "VNDDHG"."D7762_INDEX" ON "VNDDHG"."RN8
| 9740"
| 13:13.42 0 CREATE UNIQUE INDEX VNDDHG.D7762_INDEX1 ON VNDDHG.RN89740
| 13:13.42 0 CREATE VIEW VNDDHG.VW_TEACHER
| 13:13.42 -204 DROP TRIGGER VNDDHG.INSOF_VIEW_TRIG01
| 13:13.42 0 CREATE TRIGGER VNDDHG.INSOF_VIEW_TRIG01
| 13:13.44 4 UTILFROM VNDDHG.L655527D.CNC.T001
| 13:13.45 0 ALTER TABLE "VNDDHG". "RN89740" ALTER COLUMN "TEACHER_ID"
| SET GENERATED ALWAYS
| 13:13.45
| 13:13.45 End of Summary Report
|
|
| Figure 219. ADBTEP2 summary report
|
| These modifications might be obvious only by examining the job log (SDSF
| output). The following example is a sample job log that shows JCL that is modified
| by ADPTEP2.
|
Chapter 15. Using the Batch Restart programs: ADBTEP2 and ADBTEPA 349
| TSODELETE 'SMITHS.DB8A.CNTL.LOB2DB.KAV2TS';
| TEMPLATE UTLPUNCH DSN 'SMITHS.DB8A.CNTL.LOB2DB.KAV2TS'
| UNIT SYSDA;
| TSODELETE 'SMITHS.DB8A.UNLD.LOB2DB.KAV2TS';
| TEMPLATE UTLREC DSN 'SMITHS.DB8A.UNLD.LOB2DB.KAV2TS'
| UNIT SYSDA;
| TEMPLATE ADBL1 DSN 'SMITHS.&SSID..&DB..&SN..'
| UNIT SYSDA;
| TEMPLATE ADBL2 DSN 'SMITHS.&SSID..&DB..&SN..'
| UNIT SYSDA;
|
| UNLOAD TABLESPACE LOB2DB.KAV2TS
| FROM TABLE
| "SMITHS"."LOB2TB"
| (C2REGULAR,
| C3LOBCOL VARCHAR(255) CLOBF ADBL1,
| C4LOBCOL VARCHAR(255) CLOBF ADBL2)
| PUNCHDDN(UTLPUNCH)
| UNLDDN(UTLREC);
||
| Figure 221. ADBTEP changes to job
|
| Related concepts
| “Using the utility template to unload data from LOBs” on page 236
| “Running WSL with the utility template for LOBs” on page 329
Overview of ADBTEPA
ADBTEPA is used by DB2 Admin functions such as ALC (alter table columns).
ADBTEPA allows user IDs that are not authorized to certain objects to re-create
those objects if they are implicitly dropped.
For example, the owner of a table performs an alter to the table that requires
dropping and re-creating the table, any views on this table are also dropped. The
table owner might not have the authority to re-create some or all of the views.
ADBTEPA allows the owner to re-create these views.
The ADBTEPA program receives SQL as input from SYSIN (a batch statement list)
and executes it. In many respects, it is similar to ADBTEP2. For example, they both
use a checkpoint table to record progress through the batch statement list.
ADBTEPA and ADBTEP2 can share the same checkpoint table because the table
definition is identical.
The ADBTEPA program is intended for use with the DB2 Admin authorization
switching function.
Once enabled, ADBTEPA is used by some functions, even if you do not request the
function. ADBTEPA always allows you to perform the same tasks using SQL that
you can perform under your own authorization.
Using ADBTEPA is optional; however, ADBTEPA is required when you use DB2
Admin authorization switching.
Using ADBTEPA
DB2 Admin generates JCL for ADBTEPA when DB2 Admin authorization switching
is enabled.
The JCL can vary slightly. A user can request an authorization switch by specifying
a user ID in the authorization switch ID field on the Alter Parameters panel.
Specifying <NONE> indicates that no DB2 Admin authorization switching is
requested.
ADBTEPA, unlike ADBTEP2, is executed directly and not from within DSN under
IKJEFT01. Consequently, the SSID PARM is required to identify the DB2 subsystem
on which to run. Similarly, the plan that ADBTEPA uses must also be supplied
using the ADBOPT DDNAME. ADBTEPA uses the RRSAF attachment to access
DB2.
The following figure illustrates the case where an authorization switch ID has been
requested to ADBAUTHS.
Figure 223. DB2 Admin authorization switching example – authorization switch requested
In this example, the ID requested was specified using the ADBOPT DDNAME.
Chapter 15. Using the Batch Restart programs: ADBTEP2 and ADBTEPA 351
ADBTEPA requires that only APF-authorized libraries appear in the STEPLIB,
unless ADBTEPA is placed in the link list.
When DB2 Admin authorization switching is enabled, the batch statement list
includes system-generated comments near the start of input and after some SQL
statements. Do not remove or alter these comments.
Related concepts
“Restarting an ADBTEP2 job” on page 345
Related tasks
“Step 22. Tailor DB2 Admin Authorization Switching” on page 71
ADBOPT parameters
ADBOPT parameters are specified using the DDNAME ADBOPT.
ADBOPT parameters for ADBTEP2 and ADBTEPA are listed in the following table:
Table 19. ADBOPT parameters for ADBTEP2 and ADBTEPA
Parameter Default Usage ADBTEP2 ADBTEPA
AUTH_SWITCH_USERID= None User ID to N/A (Return Optional
provide authority Code 12 is
to perform SQL issued)
operations.
PLAN= None Plan that N/A Mandatory
ADBTEPA is to (Ignored)
use.
Related concepts
“Restarting ADBTEPA after a failure” on page 352
Chapter 15. Using the Batch Restart programs: ADBTEP2 and ADBTEPA 353
354 User's Guide and Reference
Chapter 16. Running DB2 utilities
You can use the U.x line command to run DB2 Administration Tool utilities.
You can use the U.x line command on several panels to quickly generate utility job
streams.
Topics:
v “Using table space utilities” on page 356
v “Using table utilities” on page 362
v “Using index utilities” on page 365
v “Running utilities on LISTDEFs” on page 368
v “Using offline utilities” on page 369
v “Running utilities on LISTDEFs” on page 368
Related reference
“DB2 Admin line commands” on page 617
To display the Table Space Utilities panel, use one of the following commands:
v UTL line command on the Tables Spaces panel (ADB21S). This command allows
you to generate utilities for a particular table space.
v UTIL primary command on the Tables Spaces panel (ADB21S). This command
allows you to generate utilities for all of the table spaces that are displayed.
v UTIL primary command on the Databases panel (ADB21D). This command
allows you to generate utilities for all of the table spaces in the databases that
are displayed.
If you want to have the utilities performed against a LISTDEF control statement
of all the tables spaces in the database, specify UTIL LISTDEF.
Use the Table Space Utilities panel to generate JCL for the utilities that can be run
against table spaces. When the JCL is generated, DB2 Admin invokes ISPF edit,
which lets you change the JCL, submit it, and copy it to another data set. The
following figure shows the Table Space Utilities pane after the UTL line command
has been issued.
The following options help you to control and vary the output JCL from the utility:
BP
Enables you to change the default JOB card statements and other system
parameters.
TU
Enables you to select templates to use for utility JCL and work statement list
output.
Generate template statements
Use this field to enable or disable the use of templates.
When you specify the CHECK utility, templates are used regardless of the
value of this field because the CHECK utility function requires the use of
templates. Either the default templates or the templates that you specify are
used.
| When you specify Yes to enable the use of templates, DB2 Admin does not
| generate any TSODELETE statements, which would ensure that any existing
| data sets for the template are deleted first. To ensure that any existing data sets
| are deleted, consider using one of the following techniques when you define
| the template:
| v Specify the data set name pattern as a GDG (generation data group) where
| the next data set in the sequence is generated (+1), and change the other
| common options so that the GDGLIMIT is 1. This setup will cause the data
| sets in the group to roll off so that only one data set exists at any one time.
| For example, a data set pattern name might be specified as
| &db..&ts..&name..ic(+1).
| v Change the other common options to specify a DISP option of NEW,
| DELETE, DELETE for the data set, if appropriate.
Generate work statement list
Specify Y to request that the utility control statements be added to a work
statement list. Specify N to request an executable utility jobstream.
When you specify the CHECK utility, a batch statement list, which is similar to
a work statement list, is generated regardless of the value of this field. The
batch statement list is required as an input file to the Batch Restart (ADBTEP2)
program, which manages the CHECK utility function.
Generate modify after copy
Specify Y to request that utility JCL be generated to run the MODIFY utility
after a full image copy is generated. Specify N to suppress the generation of a
job step to run the MODIFY utility after a full image copy.
When you specify the CHECK utility, a batch statement list, which is similar to
a work statement list, is generated regardless of the value of this field. The
batch statement list is required as an input file to the Batch Restart (ADBTEP2)
program, which manages the CHECK utility function.
Refer to the online help for detailed information about other options available in
this panel.
Tip: When you run the COPY utility, the default is that one copy is written to the
data set that is described by the SYSCOPY DD statement. If you want more
DB2 Admin supports unloading table (spaces) that produce a record length of less
than 32K. When a table (space) with LOB objects is unloaded, it is possible that the
required record length exceeds 32K. In this case, you must modify the unload job
or WSL to specify the utility statements and parameters that allow unloading the
table (space).
Related tasks
“TEMPLATE usage” on page 234
Related information
“Managing TEMPLATEs” on page 226
The following figure shows the type of output DB2 Admin returns when you
generate JCL from the Table Space Utilities panel. In the following figure, option C
on the Table Space Utilities panel was chosen (the COPY utility with the FULL
parameter specified).
-------------------------------------------------------------------------------
EDIT ISTJE.SPFTEMP2.CNTL Columns 00001 00072
Command ===> Scroll ===> PAGE
000007 //*
000008 //**********************************************************************
000009 //*
000010 //* DB2 ADMIN GENERATED JOB TO RUN COPY ON SELECTED TABLESPACES
000011 //*
000012 //************************************************************ADB2USC***
000013 //*
000014 //**********************************************************************
000015 //* STEP COPY: COPY TABLESPACE DSN8D81A.DSN8S81D
000016 //************************************************************ADB2USC1**
000017 //COPY EXEC DSNUPROC,SYSTEM=DB2X,
000018 // LIB='SYS1.DSNDB2X.SDSNLOAD',
000019 // UID='ISTJE'
000020 //DSNUPROC.SYSCOPY DD DSN=ISTJE.DB2X.IC.DSN8D81A.DSN8S81D(+1),
000021 // DISP=(NEW,CATLG),
000022 // SPACE=(8192,(7,5),RLSE),
000023 // UNIT=SYSDA
000024 //DSNUPROC.SYSIN DD *
000025 COPY TABLESPACE DSN8D81A.DSN8S81D DSNUM ALL FULL YES
000026 /*
000027 //**********************************************************************
000028 //* STEP MOD: MODIFY RECOVERY TABLESPACE DSN8D81A.DSN8S81D
000029 //**********************************************************************
000030 //MOD EXEC DSNUPROC,SYSTEM=DB2X,
000031 // LIB='SYS1.DSNDB2X.SDSNLOAD',
000032 // UID='ISTJE'
000033 //DSNUPROC.SYSIN DD *
000034 MODIFY RECOVERY TABLESPACE DSN8D81A.DSN8S81D DSNUM ALL
000035 DELETE AGE(35)
000036 /*
****** **************************** Bottom of Data ****************************
| DB2 Admin -------------- DB2X Batch Job Utility Parameters -------------- 11:48
| Command ===>
|
|
| Generate Job Card . ===> (Yes/No) DB2 System: DB2X
| Job cards: DB2 SQL ID: ISTJE
| ===> //J148286D JOB ,
| ===> // REGION=4096K,NOTIFY=J148286,USER=J148286,
| ===> // MSGCLASS=H,TIME=(,30)
| ===>
| ===>
| Generate Job CLASS ===> N (Yes/No) JOB CLASS . . . . . ===>
|
| JOBPARM:
| ===>
| ===>
| ===>
| ===>
|
| ADBTEP2: Restart . .===> (Yes/No)
| Maxerrors .===> 0 (-1 to 99)
| BindError .===> MAXE (MAXE, Save or Ignore)
|
| Space parameters:
| Unit name ===> SYSDA
| Space unit . . . ===> TRK (BLK, TRK, CYL, or 4096-32760)
| Max Primary . . . ===> 65535 (In above units, 99999999, or blank)
| In KB: 3145680
| Max DASD . . . . ===> 65535 (In above units. Allocations beyond this
| size are sent to tape) In KB: 3145680
| Tape Unit . . . . ===> TAPE (Unit for tape if size is greater
| than Max DASD)
|
| Default space allocation if unable to calculate:
| Primary alloc . . ===> 30 (In bove units)
| Secondary alloc . ===> 30 (In above units)
|
| Function-specific parameters:
| Unload pct . . . ===> 0 (0-99 - % increase for converted data set)
||
| Figure 226. Batch Job Utility Parameters panel (ADB2UPA)
|
On the DB2 Batch Job Utility Parameters panel, you can change the job cards, the
JES2 JCL control statement JOBPARM, the ADBTEP2 restart and maximum error
specification, and the space parameter values.
Any failing DSN commands that are ignored are skipped and are written to
the ADBHOLD table. When the job ends, if any DSN commands have failed,
the restart action field in the checkpoint table indicates that there are held
records. Depending on the restart option, the held records are reprocessed
when the job is restarted.
| ADBTEP2: AutoCheck
| Certain SQL or utility operations can place an object into check-pending state.
| If you set the Autocheck (AC) parameter value to YES, ADBTEP2 will track the
| statements and processes listed below that can place an object in
| check-pending. If one is encountered, ADBTEP2 will perform an automatic
| CHECK DATA to remove the check-pending state. The default value for AC is
| NO.
| The statements that ADBTEP2 tracks are:
| ALTER TABLE ... ADD FOREIGN KEY
| ALTER TABLE .... ADD CONSTRAINT
| LOAD REPLACE
| LOAD ENFORCE(NO)
| RECOVER PIT
| Restriction: DB2 Admin builds the CHECK DATA statement and all CHECK
| parameters used during auto-check processing. You cannot specify
| any other parameters.
Unit name
The default unit name for new data sets that are allocated.
Space unit
The unit in which space is to be allocated. You can specify that space be
allocated in blocks, tracks, cylinders, or a given number of kilobytes.
Max Primary
The maximum amount of primary space that can be allocated for a data set on
DASD, as measured in the specified space unit.
Max DASD
The maximum amount of space that can be allocated for a data set on DASD,
For example, you can display the Specify Utility Options panels by following any
of these steps:
v Use the UTL line command on a table space to display the Table Space Utilities
panel (ADB2US). Choose an option from the menu and specify a Y in the
Review/modify options field. Press Enter to display the Specify Utility Options
panel for that task. For example, if you select the P option (Report Recover), the
Specify Utility Options - REPORT RECOVERY panel (ADB2USP) is displayed.
You can modify any of the options listed.
v Use the UTL line command on a table to display the Table Utilities panel
(ADB2UT). Choose an option from the menu and specify a Y in the
Review/modify options field. Press Enter to display the Specify Utility Options
panel for that task. For example, if you select the UL option (Unload using
UNLOAD utility), the Specify Utility Options - UNLOAD panel (ADB2USU) is
displayed. You can modify any of the options listed.
v Use the UTL line command on an index to display the Index Utilities panel
(ADB2UX). Choose an option from the menu and specify a Y in the
Review/modify options field. Press Enter to display the Specify Utility Options
Use the UTL (utilities) line command or UTL primary command on the Tables,
Views, and Aliases panel to display the Table Utilities panel, as shown in the
following figure.
Use this panel to generate a batch job stream or work statement list to run one of
the displayed utilities against the selected table, view or alias. If you choose to
362 User's Guide and Reference
generate a job stream, DB2 Admin invokes an ISPF edit session from which you
may further change the contents of the generated job, copy the contents to another
data set, or submit it for processing.
The following options help you to control and vary the output JCL from the utility:
BP
Enables you to change the default JOB card statements and other system
parameters.
TU
Enables you to select templates to use for utility JCL and work statement list
output.
Generate template statements
Use this field to enable or disable the use of templates.
| When you specify Yes to enable the use of templates, DB2 Admin does not
| generate any TSODELETE statements, which would ensure that any existing
| data sets for the template are deleted first. To ensure that any existing data sets
| are deleted, consider using one of the following techniques when you define
| the template:
| v Specify the data set name pattern as a GDG (generation data group) where
| the next data set in the sequence is generated (+1), and change the other
| common options so that the GDGLIMIT is 1. This setup will cause the data
| sets in the group to roll off so that only one data set exists at any one time.
| For example, a data set pattern name might be specified as
| &db..&ts..&name..ic(+1).
| v Change the other common options to specify a DISP option of NEW,
| DELETE, DELETE for the data set, if appropriate.
Generate work statement list
Specify Y to request that the utility control statements be added to a work
statement list. Specify N to request an executable utility jobstream.
Using the LO option allows you to create your own LOAD utility job stream.
When you select the LO option and press Enter, the Specify Utility Options -
LOAD panel (ADB2UTC) is displayed, as shown in the following figure.
TABLE ALL ===> (Yes/No, info for all columns in table space)
SAMPLE ===> (Sample percentage, non-indexed column stats)
INDEX ALL ===> (Yes/No, info for all indexes in table space)
REPORT ===> (Yes/No, generate statistics report)
UPDATE ===> (Level of statistics to insert in catalog,
A-All, P-Accesspath, S-Space, N-None)
DB2 Admin supports unloading table (spaces) that produce a record length of less
than 32K. When a table (space) with LOB objects is unloaded, it is possible that the
required record length exceeds 32K. In this case, you must modify the unload job
or WSL to specify the utility statements and parameters that allow unloading the
table (space).
Related reading: For more information about the fields on the Specify Utility
Options - LOAD panel (ADB2UTC), see the Help panel.
Refer to the online help for detailed information about other options available in
this panel.
The following figure shows the output that DB2 Admin returns when you generate
JCL from the Table Utilities panel. In this example, option UX on the Table Utilities
panel was chosen (UNLOAD using REORG UNLOAD EXTERNAL).
-------------------------------------------------------------------------------
EDIT ISTJE.SPFTEMP2.CNTL Columns 00001 00072
Command ===> Scroll ===> PAGE
000016 //* STEP DELETE: DELETE OLD DATASETS
000017 //**********************************************************************
000018 //DELETE EXEC PGM=IEFBR14
000019 //SYSREC DD DSN=ISTJE.DB2X.UNLD.DEPT,
000020 // UNIT=SYSDA,DISP=(MOD,DELETE,DELETE),SPACE=(TRK,1)
000021 //SYSPUNCH DD DSN=ISTJE.DB2X.CNTL.DSN8D81A.DSN8S81D,
000022 // UNIT=SYSDA,DISP=(MOD,DELETE,DELETE),SPACE=(TRK,1)
000023 //*
000024 //**********************************************************************
000025 //* STEP UNLOAD: UNLOAD TABLES
000026 //**********************************************************************
000027 //UNLOAD EXEC DSNUPROC,SYSTEM=DB2X,
000028 // LIB='SYS1.DSNDB2X.SDSNLOAD',
000029 // UID='ISTJE'
000030 //SYSPUNCH DD DSN=ISTJE.DB2X.CNTL.DSN8D81A.DSN8S81D,
000031 // SPACE=(TRK,(5,5),RLSE),
000032 // UNIT=SYSDA,
000033 // DISP=(,CATLG,DELETE)
000034 //SYSREC DD DSN=ISTJE.DB2X.UNLD.DEPT,
000035 // DISP=(,CATLG,DELETE),
000036 // DCB=(BLKSIZE=8192),
000037 // SPACE=(8192,(5,5),RLSE),
000038 // UNIT=SYSDA
000039 //SYSIN DD *
000040 UNLOAD TABLESPACE DSN8D81A.DSN8S81D
000041 FROM TABLE
000042 "DSN8810"."DEPT"
****** **************************** Bottom of Data ****************************
To display the Index Utilities panel, as shown in the following figure, use one of
the following commands:
v UTL line command on the Indexes panel (ADB21X). This command allows you
to generate utilities for a particular index.
Use this panel to generate JCL for the utilities that can be run against indexes.
When the JCL is generated, DB2 Admin invokes ISPF edit, which enables you to
change the JCL, submit it, and copy it to another data set.
Refer to the online help for detailed information about other options available in
this panel.
Tip: When you run the COPY utility, the default is that one copy is written to the
data set that is described by the SYSCOPY DD statement. If you want more
than one copy of the output, you can create and use templates for the utility
data sets COPYDDN 1, COPYDDN2, RECOVERYDDN1, and
RECOVERYDDN2.
Related concepts
“Changing batch job utility parameters” on page 358
Related tasks
“TEMPLATE usage” on page 234
Related reference
“Option X. Indexes” on page 600
Related information
“Managing TEMPLATEs” on page 226
The following figure shows the type of output that DB2 Admin returns when you
generate JCL from the Index Utilities panel. In this example, option R on the Index
Utilities panel was chosen (the RUNSTATS utility).
-------------------------------------------------------------------------------
EDIT ISTJE.SPFTEMP2.CNTL Columns 00001 00072
Command ===> Scroll ===> PAGE
****** ***************************** Top of Data ******************************
==MSG>
==MSG> DB2 Admin: Edit generated JCL
==MSG>
000001 //ISTJED JOB (ADB,OM3),'DB2 UTILITY',
000002 //* RESTART=stepname, <== For restart remove * and enter step name
000003 // REGION=0M,NOTIFY=ISTJE,
000004 // MSGCLASS=H,
000005 // CLASS=9
000006 //*
000007 //**********************************************************************
000008 //*
000009 //* DB2 ADMIN GENERATED JOB TO RUN RUNSTATS ON INDEXES
000010 //*
000011 //************************************************************ADB2UXR***
000012 //*
000013 //**********************************************************************
000014 //* STEP RUNSTATS: RUNSTATS ON INDEXES
000015 //**********************************************************************
000016 //RUNSTATS EXEC DSNUPROC,SYSTEM=DB2X,
000017 // LIB='SYS1.DSNDB2X.SDSNLOAD',
000018 // UID='ISTJE'
000019 //DSNUPROC.SYSIN DD *
000020 RUNSTATS INDEX(
000021 "DSN8810"."XDEPT1"
000022 )
****** **************************** Bottom of Data ****************************
The following options help you to control and vary the output JCL from the
utility:
SM
Enables you to specify the base for a generate and establish a series of
utilities.
DG
Enables you to specify a GDG (generation data group) base.
BP
Enables you to change the default JOB card statements and other system
parameters.
TU
Enables you to select templates to use for utility JCL and work statement
list output.
| Restriction: Unload jobs generated for LISTDEFS, where the objects contain
| LOB columns, will fail.
Refer to the online help for detailed information about other options available
in this panel.
When the JCL is generated, DB2 Admin invokes ISPF edit, which enables you
to change the JCL, submit it, and copy it to another data set.
Related tasks
“Creating the LISTDEF control tables” on page 217
“Adding a LISTDEF” on page 219
You can use the DB2 Admin table space utility and index space utility panels to
invoke the following offline utilities:
v DSN1COMP
v DSN1COPY
v DSN1PRNT
Topics:
v “Using the main EXPLAIN panel” on page 372
v “Explaining SQL Statements” on page 372
v “Listing rows from a plan table” on page 373
v “Upgrading a plan table” on page 375
v “Creating a plan table” on page 375
v “Creating an index on a plan table” on page 376
v “Creating a statement table” on page 376
v “Creating a function table” on page 377
Related concepts
“DB2 Administration Menu panel” on page 97
Related information
IBM Publications Center
To invoke the DB2 Admin EXPLAIN utility, select option E on the Administration
Menu panel. The Explain panel is displayed, as shown in the following figure.
SET QUERYNO =
Query number==>
FOR
SQL stmt ==> SELECT * FROM SYSIBM.SYSTABLES WHERE NAME LIKE 'SYS
Press ENTER to execute explain, or enter EDIT on the command line to edit
the SQL statement.
2. Enter a query number and an SQL statement. If you leave the query number
blank, DB2 Admin generates a query number for you in the form
YYMMDDSSS, where YYMMDD is the year/month/day and SSS is a sequence
number.
3. Press Enter to run the EXPLAIN statement. The resulting row in the plan table
is shown on the next panel.
4. Use the I line command to display the EXPLAIN results.
You can use the EDIT primary command to edit your SQL statement. When you
are in ISPF edit, use the ISPF edit copy commands to copy SQL statements to or
from other data sets.
To display the contents of the Plan Table panel, select option L on the Explain
panel. The List Plan Table panel is displayed, as shown in the following figure.
You can view the information in this panel in three different formats. To switch
between formats, use the following primary commands:
v PLAN for plan mode, which shows Applname (PLAN) and Progname (DBRM)
v COL for package mode, which shows Collection (COLLID) and Progname
(PACKG)
v HINT for hint mode, which shows Hint ID and Hint Used
To upgrade a plan table to the current version of DB2, select option U on the
Explain Panel. DB2 Admin issues a series of ALTER TABLE PLAN_TABLE ADD
statements to upgrade the plan table so that it contains the maximum number of
columns supported by the current DB2 version.
There is no panel associated with this function. DB2 Admin responds with a
message that indicates whether the plan table was upgraded successfully.
IN
Database ===> (optional, default is DSNDB04. ? to lookup)
Table space ===> (optional, if blank DB2 implicitly creates a TS.
? to lookup.)
Refer to the online help for detailed information about the options available in this
panel.
Refer to the online help for detailed information about the options available in this
panel.
CREATE TABLE
IN
Database ===> ISTJEDB (optional, default is DSNDB04. ? to lookup)
Table space ===> ISTJESP (optional, if blank DB2 implicitly creates a TS.
? to lookup.)
CREATE TABLE
IN
Database ===> ISTJEDB (optional, default is DSNDB04. ? to lookup)
Table space ===> ISTJESP (optional, if blank DB2 implicitly creates a TS.
? to lookup.)
Note: For DB2 Version, specify a table space with
an 8K page size or greater.
Topics:
v “System Administration panel” on page 380
v “Displaying threads” on page 382
v “Displaying or terminating utilities” on page 383
v “Displaying or managing traces” on page 384
v “Displaying or updating the owner of Resource Limit (RLIMIT) Tables”
on page 386
v “Stopping DB2” on page 390
v “Displaying group information” on page 391
v “Displaying or managing batch checkpoint tables” on page 392
v “Managing system parameters” on page 394
v “Displaying buffer pool status” on page 399
v “Altering buffer pools” on page 399
v “Displaying buffer pool hit ratios” on page 401
v “Displaying archive log information” on page 402
v “Setting archive log parameters” on page 403
v “Archiving the current DB2 log” on page 404
v “Displaying log information” on page 404
v “Changing DB2 system checkpoint frequency” on page 405
v “Displaying or updating communications settings” on page 405
v “Displaying or cancelling distributed threads” on page 410
v “Displaying location details and threads” on page 412
v “Starting DDF” on page 413
v “Stopping DDF” on page 413
v “Managing stored procedures” on page 414
v “Managing functions” on page 425
v “Backing up and recovering a DB2 subsystem” on page 431
Related concepts
“DB2 Administration Menu panel” on page 97
The tasks that are supported by DB2 Admin are listed in the System
Administration panel, as shown in the following figure.
Each option is associated with one or more DB2 commands. For example, when
you use the 2D option, DB2 Admin issues the DB2 - DISPLAY THREAD command.
To display this panel, select option Z on the DB2 Administration Menu panel.
The following tasks are supported by DB2 Admin. They are listed with their
associated option numbers.
2D – Display threads
Select this option to display the current status of DB2 threads.
2U – Display/terminate utilities
Select this option to display the status of utility jobs or to terminate utilities.
2T – Display/manage traces
Select this option to display, start, or stop traces.
2R – Display/update resource limits (RLIMIT)
Select this option to display or stop the resource limit (RLIMIT) facility or to
update the RLIMIT tables that are created in the system.
2S – Stop DB2
Select this option to stop the DB2 subsystem.
2G – Display Group
Select this option to display information about the data sharing group to which
the DB2 subsystem belongs.
Displaying threads
You can display the current status of DB2 threads.
Restriction: You cannot cancel a thread that is running under the active user
ID. An asterisk in the A column indicates which thread is
associated with the active user ID.
Line commands:
CAN - Cancel thread
Related information
IBM Publications Center
Line commands:
TERM - Terminate utility DIS - Display utility
The following figure shows the type of information DB2 Admin returns when you
issue the DIS line command from the Display/Terminate Utilities panel.
DB2 Admin ------- DB2X Browse DB2 Command Output --- Line 00000000 Col 001 080
Command ===> Scroll ===> PAGE
-DIS UTIL(ISTJE)
Related information
IBM Publications Center
Line commands:
STA - Start trace STO - Stop trace DIS - Display trace details
T Trace
Sel No Type Trace Classes Dest Qual
* * * * *
--- -- ------ ------------------------------------------------ ----------- ----
01 STAT 01,03,04,05 SMF NO
02 ACCTG 01 SMF NO
******************************* END OF DB2 DATA *******************************
2. Enter the owner of the resource limit tables, and press Enter to display the
resource limit tables owned by that owner, as shown in the following figure.
| ADB2DB2O ------- DB2X Browse DB2 Command Output --- Line 00000000 Col 001 080
| Command ===> Scroll ===> PAGE
|
| -STA RLIMIT ID=01
|
|
| ********************************* Top of Data **********************************
| DSNT704I #DSN9- SYSIBM.DSNRLST01 HAS BEEN STARTED FOR THE RESOURCE
| LIMIT FACILITY
| DSNT704I #DSN9- SYSIBM.DSNRLMT01 HAS BEEN STARTED FOR THE RESOURCE
| LIMIT FACILITY
| DSN9022I #DSN9- DSNTCSTR 'START RLIMIT' NORMAL COMPLETION
| ******************************** Bottom of Data ********************************
||
| Figure 249. Display RLIMIT panel (ADB2DB2O)
|
v STO primary command. Use this command to stop the resource limit. This
command is equivalent to the -STOP RLIMIT DB2 command.
The following figure shows the information DB2 Admin returns when you
issue the STO primary command to stop the resource limit facility.
ADB2DB2O ------- DB2X Browse DB2 Command Output --- Line 00000000 Col 001 080
Command ===> Scroll ===> PAGE
v I line command. Use this command to insert a row into the resource limit
table.
The following figure shows the output when you enter the I line command
in front of a row from the RLIMIT table in Figure 251 on page 388. On the
Insert RLIMIT panel, as shown in the following figure, you can enter values
for a new row in the RLIMIT table.
Stopping DB2
You can stop the DB2 subsystem.
-STOP DB2
MODE(
Stop mode ===> (Quiesce or Force, default is quiesce)
)
Note: After using FORCE mode, exit from DB2 Admin without issuing any further
SQL statements.
To display information about the data sharing group to which a DB2 subsystem
belongs:
Select option 2G on the System Administration panel. The Display Group panel is
displayed, as shown in the following figure.
DB2 Admin generates this panel by issuing the DB2 -DISPLAY GROUP command.
DB2 Admin ------- DB2X Browse DB2 Command Output --- Line 00000000 Col 001 080
Command ===> Scroll ===> PAGE
-DIS GROUP
The information to monitor the execution of the input stream is stored in a DB2
table referred to as the checkpoint table.
The Display or Manage Batch Checkpoint Table panel allows you to display and
manage the checkpoint table for batch jobs running ADBTEP2. A row exists in the
checkpoint table for each active and abnormally terminated job running ADBTEP2.
To display and manage the checkpoint table for the batch jobs that running
ADBTEP2:
1. Select option 2B on the System Administration panel. The Manage Batch
Checkpoint Table panel is displayed, as shown in the following figure.
DB2 Admin ------------ DB2X Manage Batch Job Checkpoint Table ----------- 20:39
Option ===>
Line commands:
D - Delete/Terminate I - Insert U - UpdateN - Skip-Next
Commit Restart Restart
S Userid Worklist Suffix Time Number Command Action
* * * * * *
- -------- -------- -------- ---------------> ----------- ----------- ------
ISTJE MYMIGR 2002-07-18-16.06 4 COPY C
VNDBRON RI03 2002-07-10-16.19 2
VNDOJFK OBJCMP 2002-06-26-16.54 1
VNDROTH AAA 2002-06-26-07.36 1 COPY C
******************************* END OF DB2 DATA *******************************
When data is unloaded in one job and is then reloaded in another job, the
unload suffix has the following format: Uxxxx. The corresponding reload is
Rxxxx. An additional suffix might also exist, in the format @xxxx. Never attempt
to update or modify the @xxxx record. Delete this record only if you are
abandoning a current run of a work statement list. The @xxxx record is deleted
by the job using Rxxxx.
Use the following line commands to change the content of the table:
D To DELETE the row of an abnormally terminated job or to terminate an
active job.
I To INSERT a new row. Row values can be entered on the next panel
displayed.
U To UPDATE the row of an abnormally terminated job. If the job is
executing, the request is rejected. Row values can be changed on the next
panel.
N To instruct ADBTEP2 to skip to the next commit instruction.
| 3. If you use the I or U line commands, the insert or update a checkpoint record
| panel (ADB2Z2BU) displays. The schema and sqlid values will be used during
| a restart for setting the current sqlid and current schema special registers at the
| point of restart. When you update a checkpoint record that does not have a
| SCHEMA value (is null), the panel value displayed will be blank . If you do
| not enter a new value, the SCHEMA value remains null. When you insert a
| new checkpoint record using the panels, if you do not enter a non-blank value,
| a null value will be stored.
|
DB2 Admin displays the currently active parameters and allows you to customize
them for your environment. The changed parameters are stored as a new source
for assembling the DSNZPARM module. You can assemble and link-edit the new
source into a new DSNZPARM load module. The system parameter source and
load modules are referred to here by the name DSNZPARM, although you can
assign them your own names.
DB2 Admin provides the SET SYSPARM LOAD option to issue the command to
load and activate the module. With DB2, you can load a new subsystem parameter
module into storage while DB2 is active, which enables you to change certain
operational parameters without stopping and starting DB2.
To use DB2 Admin to manage system parameters, select option 2Z on the System
Administration panel. The System Parameters panel is displayed, as shown in the
following figure. Use the System Parameters panel to display the current
parameters, to create a new parameter source file, to assemble and link-edit it, and
to access the SET SYSPARM options.
| Note: This functionality requires that DB2 SDSNLOAD data sets be allocated in
| linklist or STEPLIB. If you do not allocate DB2 SDSNLOAD data sets , you
| must use the DSNTIJUZ batch job process to assemble and linkedit the
| DSNZPARM module.
Output datasets:
DSNZPARM Source ===> JCL.CNTL(TEST)
LinkEdit SYSLMOD ===> ADBV37.ISPLLIB(TEST)
Input datasets:
Assembly STEPLIB ===>
Assembly SYSLIB ===> JCL.CNTL
===> 'SYS1.MACLIB'
===>
The following list provides an overview of the options and fields on that panel.
See the online help for more extensive information.
1 – Display Parameters/Generate DSNZPARM source
Select this option if you want to view and optionally change the current
parameters. If you want to change parameter values, you must specify an
output data set and member. If no changes are made, the member is not
written.
2 – Assemble and Linkedit DSNZPARM module
Select this option to assemble and link-edit the parameters module. Be sure to
specify the output SYSLMOD data set name, because that is where the new
load module is stored.
SET SYSPARM options
Use these options to easily execute the SET SYSPARM commands.
3A – SET SYSPARM LOAD
Select this option to load a new system parameter load module into
storage.
3B – SET SYSPARM RELOAD
Select this option to reload the previous parameter load module into
storage.
3C – SET SYSPARM STARTUP
Select this option to reload into storage the parameter load module used at
subsystem startup.
Output data sets
Enter information pertaining to the output data sets that are used in creating
the systems parameter data set and in the subsequent assemble and link-edit
To view and change the current parameters, select option 1 on the System
Parameters panel. The System Parameters – System Parameters panel is displayed,
as shown in the following figure.
The selection fields are followed by the dynamic parameters in alphabetical order.
Enter new values for any parameters by overwriting the existing value. Only those
parameters identified by an asterisk (*) can be loaded dynamically using the SET
SYSPARM command.
Restriction: This message can also be issued for parameters not on this panel, but
whose value has changed as a result of the assembly. This situation
might occur if DB2 maintenance was applied to the macro data sets,
thereby changing the internal parameter values, and no interim
subsystem recycle was performed.
In this example, the category Archive Log was selected. The following figure
shows the System Parameters — Archive Log panel.
DB2 Admin ------------ DB2X System Parameters - Archive Log ------------- 08:18
Command ===>
Related concepts
“System Parameters — System Parameters panel” on page 396
Related concepts
“Managing system parameters” on page 394
To display the current status of one or more active or inactive buffer pools:
1. Select option BD on the System Administration panel. The Display Buffer Pools
panel is displayed, as shown in the following figure.
-DISPLAY BUFFERPOOL(
Buffer pool name ===> (Active, BP0-49, BP8K_, BP16K_, BP32K_, *)
) DETAIL(
Include details ===> (Interval or *)
) LIST(
Include page sets ===> (Active or *)
) LSTATS
Page set statistics ===> (Yes/No)
2. Enter the appropriate keywords and parameters on the panel. DB2 Admin
issues the DB2 -DISPLAY BUFFERPOOL command. The information that DB2
Admin returns to you from the command is in ISPF browse format.
Related information
IBM Publications Center
The hit ratio is calculated as the number of hits in the buffer pool divided by the
number of GETPAGES.
1. Select option BH on the System Administration panel. The Display Buffer Pool
Hit Ratios panel is displayed, as shown in the following figure.
DB2 Admin -------------- DB2X Display Buffer Pool Hit Ratios ------------ 23:45
Command ===>
-DISPLAY BUFFERPOOL(
Buffer pool name ===> (Active, BP0-49, BP8K_, BP16K_, BP32K_, *)
) DETAIL(
Include details ===> (Interval or *)
)
2. Enter the name of a buffer pool. The following values are valid:
Active All active buffer pools.
BP0–BP49, BP8K_, BP16K_, BP32K_
Select a specific buffer pool name from the valid values available.
* All buffer pools.
3. Specify the interval for which information should be displayed; the interval can
be either since the buffer pool was created (*) or since the last display
(interval).
4. Press Enter. DB2 Admin issues the DB2 DISPLAY BUFFERPOOL command to
generate the Buffer Pool Hit Rations panel, as shown in the following figure.
Select option LD on the System Administration panel. The Display Archive Log
Parameters panel is displayed, as shown in the following figure.
-DIS ARCHIVE
DB2 Admin generates this panel by issuing the -DISPLAY ARCHIVE command.
Related information
IBM Publications Center
To set the upper limit for the number of and the deallocation time of tape units for
the archive log:
1. Select option LS on the System Administration panel. The Set Archive Log
Parameters panel is displayed, as shown in the following figure.
DB2 Admin --------------- DB2X Set Archive Log Parameters --------------- 16:08
Command ===>
-SET ARCHIVE
COUNT(
Max tape units ===> 2 (1-99, DSNZPARM default is 2)
) TIME(
Tape retain minutes ===> 0 (0-1440, DSNZPARM default is 0)
Tape retain seconds ===> 00 (0-59)
)
2. Enter the appropriate keywords and parameters on the panel. Enter the
following values:
v Max tape units
v Tape retain minutes
v Tape retain seconds
3. Press Enter. DB2 Admin issues the DB2 -SET ARCHIVE command with the
parameter settings that you specified. The information DB2 Admin returns to
you from the command is in ISPF browse format.
-ARCHIVE LOG
MODE(QUIESCE)
Create system POC ===> (Yes/No)
TIME(
Max POC quiesce secs ===> (1-999)
) WAIT(
Wait for POC ===> (Yes/No)
)
2. Enter the appropriate keywords and parameters on the panel and press Enter.
DB2 Admin issues the DB2 -ARCHIVE LOG command. The information DB2
Admin returns to you from the command is in ISPF browse format.
Related information
IBM Publications Center
DB2 Admin ------- DB2X Browse DB2 Command Output --- Line 00000000 Col 001 080
Command ===> Scroll ===> PAGE
-DIS LOG
To change how frequently DB2 should perform a system checkpoint (in terms of
number of DB2 log records):
1. Select option LZ on the System Administration panel. The Change DB2 System
Checkpoint Frequency panel is displayed, as shown in the following figure.
DB2 Admin -------- DB2X Change DB2 System Checkpoint Frequency ---------- 00:08
Command ===>
-SET LOG
LOGLOAD
Checkpoint frequency ===> (200-16000000)
)
2. Enter the appropriate keywords and parameters on the panel and press Enter.
DB2 Admin issues the DB2 -SET LOG command. The information DB2 Admin
returns to you from the command is in ISPF browse format.
Related information
IBM Publications Center
Option xI can be used to insert rows into empty tables (x= option number)
Use this panel to select the table in the communications database (CDB) you want
to display or update.
If you want to insert rows into an empty table, you can do this by choosing option
xI, where x represents the table (for example, 3I tells DB2 Admin to insert rows
into the LUMODES table).
This panel displays the rows in the LOCATIONS table in the CDB. You can use the
following line commands to update the LOCATIONS table:
D Deletes the row.
I Inserts a new row. Row values can be entered on the next panel.
U Updates the row. Row values can be changed on the next panel.
This panel displays the rows in the LUNAMES table in the CDB. You can use the
following line commands to update the LUNAMES table:
D Deletes the row
I Inserts a new row. Row values can be entered on the next panel.
U Updates the row. Row values can be changed on the next panel.
The Display/Update LUMODES panel displays the rows in the LUMODES table in
the CDB. You can use the following line commands to update the LUMODES table:
D Deletes the row.
I Inserts a new row. Row values can be entered on the next panel.
U Updates the row. Row values can be changed on the next panel.
This panel displays the rows in the MODESELECT table in the CDB. You can use
the following line commands to update the MODESELECT table:
D Deletes the row.
I Inserts a new row. Row values can be entered on the next panel.
U Updates the row. Row values can be changed on the next panel.
This panel displays the rows in the USERNAMES table in the CDB. You can use
the following line commands to update the USERNAMES table:
D Deletes the row.
I Inserts a new row. Row values can be entered on the next panel.
U Updates the row. Row values can be changed on the next panel.
Related information
IBM Publications Center
This panel displays the rows in the LULIST table in the CDB. You can use the
following line commands to update the LULIST table:
D Deletes the row.
I Inserts a new row. Row values can be entered on the next panel.
U Updates the row. Row values can be changed on the next panel.
To cancel processing for distributed data facility (DDF) threads that originate
locally and access remote data, or that originate remotely and access local data:
Line commands:
CAN - Cancel thread DIS - Display thread details
The information DB2 Admin returns to you from the commands is in ISPF
browse format.
Related information
IBM Publications Center
Line commands:
DIS - Display location details DIST - Display threads
Starting DDF
You can start DDF.
To start DDF:
Select option DT on the System Administration panel, and press Enter. DB2 Admin
issues the DB2 -STA DDF command and displays the status of the command in an
ISPF browse session, as shown in the following figure.
DB2 Admin ------- DB2X Browse DB2 Command Output --- Line 00000000 Col 001 080
Command ===> Scroll ===> PAGE
-STA DDF
Related information
IBM Publications Center
Stopping DDF
You can stop the distributed data facility (DDF) if it has already been started.
To stop the distributed data facility (DDF) if it has already been started:
1. Select option DS on the System Administration panel. The Stop DDF panel is
displayed, as shown in the following figure.
-STOP DDF
MODE(
Stop mode ===> (Quiesce or Force, default is quiesce)
)
2. Select an option and press Enter. If you choose option 1, fill in the Owner and
Name fields. When you press Enter, another panel is displayed that
corresponds to the option that you chose.
| Note: The SRC line command is not supported for native SQL procedures. Press
| PF1 if you get an invalid line command message and look at the O column.
| If there is an N in that column, then the SRC command is not supported. An
| E in the O column indicates the SRC command is supported.
Restriction: When creating SQL stored procedures, the maximum length of the
procedure body is 2MB (32,767KB).
| You can create a native SQL procedure to help you with commonly performed
| tasks. For example, if you often need to create a test database, you can create a
| native SQL procedure to create a test database every time that you need to do so.
| You can also use other functions within DB2 Admin to generate the native SQL
| procedure's DDL and to reuse that DDL for a different database and its objects.
Select option 3 on the Manage Stored Procedures panel to display the Display
Stored Procedure Statistics panel, as shown in the following figure. This panel
shows statistics for stored procedures that are accessed by DB2 applications.
DB2 Admin ------- DB2X Browse DB2 Command Output --- Line 00000000 Col 001 080
Command ===> Scroll ===> PAGE
-DIS PROC(SYSPROC.DSNWZP)
Select option 4 on the Manage Stored Procedures panel. DB2 Admin issues the DB2
START STORED PROCEDURE(*.*) command, and displays the status of the
command in an ISPF edit session, as shown in the following figure.
DB2 Admin ------- DB2X Browse DB2 Command Output --- Line 00000000 Col 001 080
Command ===> Scroll ===> PAGE
-STA PROC(*.*)
DB2 Admin ------- DB2X Browse DB2 Command Output --- Line 00000000 Col 001 080
Command ===> Scroll ===> PAGE
-STO PROC(*.*)
CREATE VIEW
AS SELECT *
FROM SYSIBM.SYSROUTINES
WHERE SCHEMA LIKE '
Pattern ===> ADB% > '
2. Fill in the fields on this panel to create a view, for example, define view
ABC.PROCEDURES as a view on SYSIBM.SYSROUTINES WHERE SCHEMA
LIKE 'ABC. View ABC.PROCEDURES contains all stored procedures with the
schema starting with ABC. In addition, you can issue GRANT SELECT,
INSERT, UPDATE, or DELETE statements on the view to a list of authorization
IDs (grantees).
Select option 7 on the Manage Stored Procedures panel. The Tables, Views, and
Aliases panel is displayed, as shown in the following figure. This panel shows the
| DB2 Admin ----------- DB2X Tables, Views, and Aliases ------- ROW 1 TO 3 OF 3
| Command ===>
|
| Commands: GRANT MIG ALL
| Line commands:
| C - Columns A - Auth L - List X - Indexes S - Table space D - Database
| V - Views T - Tables P - Plans Y - Synonyms SEL - Select prototyping
| ? - Show all line commands
|
| Sel Name Schema T DB Name TS Name Cols Rows Checks
| * * * * * * * * *
| ----- ------------------ -------- - -------- -------- ------ ----------- ------
| PROCEDURES ISTJE V DSNDB06 SYSOBJ 79 -1 0
| FUNCTIONS ISTJE V DSNDB06 SYSOBJ 79 -1 0
| ******************************* END OF DB2 DATA *******************************
|
|
| Figure 308. Tables, Views, and Aliases panel showing views on SYSIBM.SUBROUTINES
| (ADB21T)
Related reference
“Option T. Tables, Views, and Aliases” on page 594
Managing functions
You can use DB2 Admin to manage functions.
To manage functions:
1. Select option FM on the System Administration panel. The Manage Functions
panel is displayed, as shown in the following figure. This panel lists the
Functions-related operations that are supported by DB2 Admin.
2. Select an option and press Enter. If you choose option 1, fill in the Owner and
Name fields. When you press Enter, another panel is displayed that
corresponds to the option that you chose.
Line commands:
AH - Schema auth A - Auth DROP - Drop AL - Alter K - Package PA - Parms
RT - Return type DIS - Display STO - Stop STA - Start GEN - Generate DDL
COM - Comment I - Interpret CRE - Create func GR - Grant JAR - JAVA detail
DDL - Object DDL
D S
F E E C P Q S P E External
S Schema Name Specific Name O T Parms T A F S F L R T S Name
* * * * * * * * * * * * * * * *
---- -------> -------> -----------------> - - ------ - - - - - - - - - --------
ISTJE + SQL990208100338896 U S 2 N
ISTJE - KR_MINUS U S 2 N
ISTJE BLOB SQL99020816075424# S S 1 Y
ISTJE CHAR SQL990208160600039 S S 1 Y
ISTJE CLOB SQL99020816074873# S S 1 Y
ISTJE D SQL99020817171170M S S 1 Y
ISTJE DATE SQL99020816083184# S S 1 Y
ISTJE DECIMAL SQL99011815223541B S S 1 Y
ISTJE DECIMAL SQL99021816281595J S S 1 Y
ISTJE DECIMAL SQL99020817171173M S S 1 Y
Creating functions
You can create new, user-defined functions.
CREATE FUNCTION
(
Number of parameters ===> (0-255)
)
2. Enter the required parameters and press Enter to continue with the create
operation, or press End to avoid creating a function. DB2 Admin issues the
SQL CREATE FUNCTION statement with the parameters you specify.
To create a new SQL scalar function:
Restriction: When creating SQL scalar functions, the maximum length of the
return statement is 2MB (32,767KB).
a.Write the SQL scalar function as part of the CREATE statement.
b.Pre-compile, compile, and link the program.
c.If the program has SQL statements, bind a package.
d.Create the function to register it to DB2 and grant execute to authorize all
appropriate users.
e. Use the function in application programs.
Related information
IBM Publications Center
Select option 3 on the Manage Functions panel. The Display Function Statistics
panel, as shown in the following figure, is displayed. This panel displays statistics
about external user-defined functions accessed by DB2 applications.
When you press Enter, DB2 Admin issues the -DIS FUNCTION SPEC(*.*)
command.
Related information
IBM Publications Center
Select option 4 on the Manage Functions panel. DB2 Admin issues the -STA
FUNCTION SPEC(*.*) command, and displays the status of the command in an
ISPF edit session, as shown in the following figure.
DB2 Admin ------- DB2X Browse DB2 Command Output --- Line 00000000 Col 001 080
Command ===> Scroll ===> PAGE
Related information
IBM Publications Center
Select option 5 on the Manage Functions panel. DB2 Admin issues the -STO
FUNCTION SPEC(*.*) command and displays the status of the command in an
ISPF edit session, as shown in the following figure.
Related information
IBM Publications Center
CREATE VIEW
AS SELECT *
FROM SYSIBM.SYSROUTINES
WHERE SCHEMA LIKE '
Pattern ===> > '
2. Fill in the fields on this panel to create a view, for example, Define view
ABC.FUNCTIONS as a view on SYSIBM.SYSROUTINES WHERE SCHEMA
LIKE 'ABC. View ABC.FUNCTIONS contain all user-defined functions in
schemas starting with ABC. In addition, you can issue GRANT SELECT,
INSERT, UPDATE, or DELETE statements on the view to a list of authorization
IDs (grantees).
Select option 7 on the Manage Functions panel. The Tables, Views, and Aliases
panel is displayed, as shown in the following figure. This panel displays the views
Figure 316. Tables, Views, and Aliases panel showing views on SYSIBM.SYSROUTINES
(ADB21T)
option Z.PM.7.
Subsystem-level backups and recovery are possible only with DB2 for z/OS
Version 8 or later, which supports the BACKUP SYSTEM and RESTORE SYSTEM
utilities. Both utilities invoke z/OS DFSMShsm (Version 1 Release 5 or above). The
BACKUP SYSTEM utility uses copy pools, which are new constructs in z/OS
DFSMShsm. The RESTORE SYSTEM utility uses data that is copied by the
BACKUP SYSTEM utility, and the data sets that are to be recovered must be
SMS-managed data sets.
You can submit the batch job that DB2 Admin creates for backing up the system
directly from DB2 Admin. You cannot directly submit the other batch jobs that DB2
Admin creates for specifying a particular time to which to recover the subsystem
or for recovering the subsystem. These batch jobs cannot be run from DB2 Admin.
Topics:
v “Backing up the DB2 subsystem”
v “Specifying a point in time to which to recover” on page 432
v “Recovering the DB2 subsystem” on page 433
Related information
IBM Publications Center
To set up a batch job that will specify a particular time to which to recover the
DB2 subsystem:
1. Select option PT on the System Administration panel. The Generate Backup
panel is displayed, as shown in the following figure.
RBA/LRSN . . . . . . . . . :
2. Enter the name of the data set and member in which the generated JCL is to be
stored and specify an RBA value as the point in time for recovery of a non-data
sharing member and an LSRN value as the point in time for recover of a data
sharing member.
3. Press Enter. DB2 Admin displays the generated JCL for the job, as shown in the
following figure.
Figure 319. Example of Generated JCL for System Point in Time Recovery
4. Edit the generated JCL to specify the appropriate BSDS data set names in
//SYSUT1 and //SYSUT2.
5. Save the JCL for the batch job. The batch job cannot be submitted directly after
being created. It cannot be run from DB2 Admin.
To set up a batch job that will recover the DB2 subsystem to a previous point in
time:
1. Select option SR on the System Administration panel. The System Restore panel
is displayed, as shown in the following figure.
Restriction: The batch job cannot be submitted directly after being created. It
cannot be run from DB2 Admin.
Topics:
v “Launching DB2 Admin Space Manager” on page 436
v “Displaying page set statistics” on page 437
v “Resizing page sets” on page 438
v “Moving between STOGROUP- and VCAT-related space” on page 439
v “Table Space Estimator panel” on page 441
v “Index Space Estimator panel” on page 441
Restriction: The following limitations apply to the DB2 Admin Space Manager:
v The resize function generates separate jobs for each page set that
exceeds the limits specified (primary command RESZ). This means
that an index is reorganized twice, first by reorganizing the table
space and then by reorganizing the index if the criteria for resizing
are met by both spaces. Only the specific job for the index will
update the allocations for the index.
v Resize calculations are based on the High Used RBA for the VSAM
data set that contains the table space or index. This means that if
activity on tables has left freespace in the pages, resize might
overallocate space. This can be verified by repeating the resize. DB2
Admin Space Manager displays the message “No changes” if all
selected spaces conform to the limitations given (number of extents,
% used).
Related concepts
“DB2 Administration Menu panel” on page 97
DB2 Admin ------------ DB2X Display Pageset Space by Database ----------- 16:47
Option ===>
Enter the partial name of the database you want to display space statistics
for:
DB2 Admin Space Manager enables you to resize all page sets for a database or to
select specific page sets to resize. The following instructions describe both
methods.
1. Complete steps 1 through 3 of “Displaying page set statistics” on page 437. The
Page Set Statistics for VSAM statistics panel is displayed.
2. Resize all page sets or a specific page set.
v If you want to resize all page sets, issue the RESZ primary command and
press Enter.
v If you want to resize a specific page set, tab to the page set that you want to
resize and issue the RESZ line command and press Enter.
The Resize Page Sets panel is displayed, as shown in the following figure. If the
page set cannot be resized (because it is not overallocated or in extents), DB2
Admin issues a messages that indicates that there is nothing to resize.
You can also move a page set that is currently in a VCAT-defined space to a
STOGROUP-defined space.
If you enter the MOVE line command, you are prompted for additional input. The
input asked for depends on whether you wish to move a STOGROUP-defined or a
VCAT-defined page set.
DB2 Admin --------------- DB2 Space Manager Move Page Set --------------- 20:50
Option ===>
Figure 325. Move Page Set input panel (ADB2M1M): STOGROUP-defined page sets
If you are moving a VCAT-defined page set, the Move Page Set Input panel
(ADB2M1M) is displayed, as shown in the following figure.
DB2 Admin --------------- DB2 Space Manager Move Page Set --------------- 20:50
Option ===>
Figure 326. Move Page Set input panel (ADB2M1M): VCAT-defined page set
Option 2
If you select Option 2, Move page set to another VCAT, you must enter the
name of the new VCAT, and optionally, the new volumes for the page set.
New VCAT
Specify the name of a VSAM catalog. The name of the current VCAT is
displayed for your information.
New VOLUMES
Specify the name of a new volume. For multiple volumes, separate the
volume names with a comma.
Option 3
If you select Option 3, Move page set to other volume(s), enter the name(s)
of one or more volumes.
New volumes
Specify the name of a new volume. For multiple volumes, separate the
volume names with a comma.
Option 5
If you select Option 5, Move page set from VCAT to STOGROUP, enter the
name of a new STOGROUP.
Input values:
No. of rows ===> 100000 (required)
Avg. row size ===> 100 (required, 1-32714)
Page size ===> 4 (4,8,16, or 32, optional, default smallest)
Max rows/page ===> 255 (1-255, optional, default 255)
Compression ===> 0 (0-99, optional, default 0)
Pctfree ===> 5 (0-99, optional, default 5)
Freepage ===> 0 (0-255, optional, default 0)
Segment size ===> 0 (0 or 4,8,..,64, optional, default 0)
Unit type ===> 3390 (3380 or 3390, default 3390)
Estimates: Suggested:
Usable page size : 3870 Primary quantity : 11520 (16 cylinders)
Rows per page : 35 Secondary qty : 1440 (2 cylinders)
Pages used : 2858 DASD estimates:
Total pages : 2860 Number of trks : 239
Number of KB : 11440 Number of cyls : 16
Input values:
No. of rows ===> ? (required)
Key length ===> ? (required, 1-255)
Unique ===> ? (required, Yes/No )
Distinct ===> (for non-unique: no. of distinct keys)
OR rows/key ===> (for non-unique: avg. rows per key)
Pctfree ===> (0-99, default 5)
Freepage ===> (0-255, default 0)
Large TSpace ===> (Yes/No, Default No)
Unit type ===> (3380 or 3390, default 3390)
No. of pieces ===> (1-32, 1-4096 with large table space)
OR piecesize ===> (nX, n=numeric value, see help,X=K/M/G)
Estimates: Suggested:
Usable page size : Primary quantity :
Keys per page : Secondary qty :
Leaf pages : Piecesize :
Index levels : DASD estimates:
Total pages : Number of trks :
Number of KB : Number of cyls :
S
2. Fill in the fields in the Input values section of the panel.
3. Press Enter. The Index Space Estimator panel is redisplayed. Based on the input
values you entered, the Index Space Estimator provides additional information
about the estimated space that the table will required and suggests the amount
of space that you should allocate for this table.
The following fields are available on the panel. The first three fields are
required.
No. of rows
The number of rows to be loaded into the table space.
Key length
The sum of the length of all the columns of the key, plus the number of the
columns that allow nulls.
Unique
Specify whether the key is unique. 'NO' means non-unique.
Distinct
For a non-unique index: number of distinct keys. If specified it will be used
to calculate the average number of rows per key. Can not be specified if
“Rows/key” is specified.
OR rows/key
For a non-unique index: average number of rows per distinct key. Cannot
be specified if “Distinct” is specified.
The remainder of the fields are optional.
Pctfree
The percentage of each page to leave as free space when the table is loaded
or reorganized. The default is 5 percent.
The following figure shows a second view of the Index Space Estimator panel.
Assuming that the values have been entered in the fields, the space estimator
generates the estimates shown in the lower portion of the panel. Both input and
output values are displayed on the panel.
Input values:
No. of rows ===> 100000 (required)
Key length ===> 10 (required, 1-255)
Unique ===> Y (required, Yes/No)
Distinct ===> (for non-unique: no. of distinct keys)
OR rows/key ===> (for non-unique: avg. rows per key)
Pctfree ===> 5 (0-99, default 5)
Freepage ===> (0-255, default 0)
Large TSpace ===> NO (Yes/No, Default No)
Unit type ===> 3390 (3380 or 3390, default 3390)
No. of pieces ===> (1-32, 1-4096 with large table space)
OR piecesize ===> 256K (nX, n=numeric value, see help,X=K/M/G)
Estimates: Suggested:
Usable page size : 3836 Primary quantity : 1824 (38 tracks)
Keys per page : 225 Secondary qty : 48 (1 track)
Leaf pages : 445 Piecesize : 256 K ( 8 pieces)
Index levels : 3 DASD estimates:
Total pages : 450 Number of trks : 38
Number of KB : 1808 Number of cyls : 3
Related tasks
“Launching DB2 Admin Space Manager” on page 436
Related information
IBM Publications Center
Topics:
v “Overview of Change Management” on page 446
v “Change Management scenarios” on page 454
v “Making changes through Change Management” on page 457
v “Recovering a change made through Change Management” on page 468
v “Modifying a change” on page 470
v “Promoting changes” on page 472
v “Importing changes” on page 473
v “Masks” on page 477
v “Ignores” on page 482
v “Versions” on page 489
v “Version scopes” on page 494
v “Tracking changes and changed objects” on page 498
Related concepts
“DB2 Administration Menu panel” on page 97
“Managing work statement lists” on page 310
You can use Change Management for changes that you make by using the
following DB2 Admin or DB2 Object Comparison Tool features:
| v SQL CREATE, ALTER, DROP, RENAME, GRANT, COMMENT, and LABEL
| statements that are executed from the input screen or from a data set and SQL
| REVOKE statements that are executed from the input screen or from a data set
| as immediate changes
v The AL line command to change or rename a database
| v The AL line command or AL RDEF command to change a table space or index
| space
v The AL line command or ALC line command to change a table
v Comparisons in which changes are made to synchronize the target system with
the source system
v Changes that are defined through the Change Management panels
DB2 Admin generates the base version that is merged with the delta
versions using one of the following methods:
Automatic (A)
The base version is generated from the DB2 catalog using the
objects that are referenced in the change.
User-defined (U)
The base version is generated from the DB2 catalog using the
objects that are specified in the version scope.
Existing (E)
An existing base version is used. DB2 Admin uses the current
contents of the existing version and the contents of the DB2 catalog
are not considered.
You can specify the method that DB2 Admin uses when there are no
prerequisite changes for the change. If prerequisite changes exist, DB2
Admin chooses the method based on the following criteria:
User-defined (U)
This method is forced if all the prerequisites have a status of
ANALYZED and use the same version scope. The same version
scope will be used for the change you are analyzing.
Existing (E)
This method is forced if all the prerequisites have a status of
ANALYZED and use the same base version. The same base version
will be used for the change you are analyzing.
Automatic (A)
This method is forced if neither of the above conditions are true.
| When you analyze a change, you can specify that a recover change be
| created automatically. Creating a recover change gives you the option of
| backing out the change. When you first choose to create a recover change,
| you are prompted to register the recover change. The recover change is
| automatically updated if the original change is reanalyzed.
You can also use Change Management to complete many other tasks. You can
recover changes; track changes and changed objects; manage masks, ignores,
versions, and version scopes; and promote changes from one system to another.
Related tasks
“Registering a change” on page 457
“Analyzing a change” on page 462
“Running a change” on page 465
The type is assigned when a change is registered. The following table describes the
types of changes:
The status of a change is updated when actions are taken on the change. The
following table describes the possible values for the status:
Table 21. Status of changes
Status Description
INITIAL The change has been created, but its registration in the Change
Management database is incomplete. You can try to get the change
registered by issuing the restart line command (RST) on the
Changes panel (ADB2C11).
Restriction: The value of the character input fields on the Change Management
panels cannot contain an apostrophe (or single quotation mark). For
example, do not specify an apostrophe in the name of any change,
version, mask, or ignore.
Requiring that all changes go through Change Management is easy when the
objects that should go through Change Management are handled by a few SQL IDs
and the SQL IDs are used only for these objects. If the SQL IDs are also being used
to change objects that should not go through Change Management, you should set
the Change Management level option to OPTIONAL, and the user will have to
decide whether the change should go though Change Management.
Topics:
v “Scenario: Making a simple change to a database” on page 455
v “Scenario: Promoting changes from one system to another” on page 456
Specifically, for the EMP table, you want to drop the COMMISSION column and
increase the length of the LASTNME column to 45 bytes.
The following steps show you how you might use Change Management to make
these changes and achieve your goals:
1. Generate operations to track the change in Change Management. Create a
version scope of the human resources database. You want to define a version
scope because you want to create a snapshot (or base version) of the database
structure after the changes are made. The version scope defines the objects that
should be in the base version.
2. Modify the length of the LASTNME column and drop the COMMISSION
column.
a. Find and select the EMP table.
b. Issue the ALC command to change the table. If there are any pending
changes to the table, specify whether to implement your changes based on
the assumption that the pending changes have been performed or that they
have not been made and your change should supersede them. In this
scenario, assume that there are no pending changes.
c. Type over the length of the LASTNME column to increase the length to 45.
d. Issue the D line command to delete the COMMISSION column.
3. Identify the impact that the changes have. To assess the impact of increasing
the length of the LASTNME column and dropping the COMMISSION column:
a. Type the REL primary command to see the related objects.
b. Select each related object individually and determine if any changes are
required because of the change in length to LASTNME or for
COMMISSION being dropped. In this example, assume that a view is
impacted by the dropped column.
4. Repair the side effects for the change. To fix the view:
a. Issue the A line command to change the view.
b. In the edit session that is displayed, remove the predicate from the view
and save the edit session. The new definition of the view will be included
as part of the change.
c. Issue the CONTINUE command to finalize the changes to the table and the
view.
5. Register the change in the Change Management database. Change registration
occurs in this scenario because Change Management is enabled and required.
To register the change, specify an owner and name for the change.
This task requires you to determine the differences between the development and
test system and apply the changes to the test system.
Assume that versions for the current state of the databases exist (Release 11C in
DEV and Release 11B in TEST). You will compare the two versions to generate a
delta changes data set that contains the SQL statements that represent the
differences, transfer the delta changes data set to the test system, import the delta
changes data set on the test system as a new change, and then apply the changes
to the test database.
In synchronizing the human resources database, you have the following goals:
v Ensure that there is a snapshot of the database structures for fallback purposes.
v Capture the changes that are made on the test system for auditing purposes.
The following steps show you how you might use Change Management to make
these changes and achieve your goals:
1. On the source system (the development system), use the current versions of the
development and test databases to identify the differences between the
databases and promote the differences to the target system (the test system). To
find and promote the differences in a delta changes data set:
a. Go to the Change Management main menu and display the Manage
Changes panel.
b. Select the option to create a delta changes file for the target system.
c. Identify the version of the test database as the starting version and the
version of the development database as the ending version. Provide a name
for the job that will generate the delta changes data set and a name for the
delta changes data set. The starting version is a snapshot of the objects
before changes are made, and the ending version is a snapshot of the objects
after changes are made. In this scenario, you want to bring the level of the
test system up to the level of the development system.
d. Register the change in the Change Management database. You will be
prompted to register the changes that are being promoted.
e. Submit the batch job that creates the delta changes data set.
Topics:
v “Registering a change”
v “Analyzing a change” on page 462
v “Running a change” on page 465
Related tasks
“Deleting a change” on page 471
“Importing changes” on page 473
“Modifying a change” on page 470
“Promoting changes” on page 472
“Recovering a change made through Change Management” on page 468
Registering a change
When you create a change and Change Management is required (or Change
Management is optional and you have specified to use Change Management), DB2
Admin prompts you to register the change in the Change Management database.
Tip: If Change Management is optional for your SQL ID, specify YES when you
are prompted whether to use Change Management.
2. Fill in the fields on the Register Options panel, and issue the CONTINUE
command.
3. Specify the following information:
v Specify an owner and a name for the change. The default owner is the
current SQL ID. If you specify the name of a existing change, the change
statements are included in the existing change, if possible.
| You can include the change statements in an existing change when the
| existing change has no prerequisite changes and the existing change is not a
| recover change, a fast change, or a promote change on the source side.
v Optionally, specify a comment for the change.
v Specify an owner and a name for the delta version. The default value is the
same as the owner and name of the change. If you leave these fields blank
and press Enter, the default value is filled in.
The following figure shows an example of the Register Options panel:
Specify the owner and name values to use for this change:
Owner Name
Ignore . . . . . . . > > (? to look up)
Mask . . . . . . . . > > (? to look up)
Delta Version . . . . > > (? to look up)
Exception: Depending on how the change was defined, you might first be
prompted about how to register the change on the Register Change
panel:
v If there are no pending changes, you can register the change as
an immediate change or as a normal change.
v If there are pending changes, you can register the change as an
emergency change or as a normal change. When you register it as
a normal change, you must specify whether the pending changes
should be prerequisite changes for the change or whether the
change should supersede the pending changes.
If you register the change as an immediate or emergency change,
you specify an owner and name for the change, and optionally, a
comment. When you press Enter, the change runs immediately. If
| Note: For DB2 V9 or later versions, Register might insert SET CURRENT
| SCHEMA statements. If the first statement of the change is not a SET
| SCHEMA statement and if the value of CURRENT SCHEMA is different
| from the value of CURRENT SQLID, register will insert a SET SCHEMA
| statement into ADBCHGS prior to processing other given statements.
| And the LASTSCHEMA column of change table ADBCHG will be
| updated with the current SCHEMA.
| Note: Also, when more statements are added to an existing change, the
| LASTSCHEMA will be checked against the current schema and, if they
| are different, another SET SCHEMA statement will be inserted by
| Resister.
DB2 Admin has registered your change in the Change Management database and
has automatically assigned a change ID to it. In addition, DB2 Admin has created a
delta version of the change.
Related concepts
“The Change Management process” on page 447
Commands: CONTINUE
Line commands:
CH - Change I - Interpret
When you apply the pending changes, you define your new changes based on
a virtual representation of the objects as if the pending changes were
performed.
When you supersede the pending changes, you define the new changes
without taking into account the effect of any pending changes; the new change
becomes a prerequisite change for the pending changes, and any pending
changes that are in ANALYZED status are set to DEFINED status.
4. Fill in the fields on the Register Options panel, and issue the CONTINUE
command.
The following figure shows an example of the Register Options panel:
Specify the owner and name values to use for this change:
Owner Name
Ignore . . . . . . . > > (? to look up)
Mask . . . . . . . . > > (? to look up)
Delta Version . . . . > > (? to look up)
C - Cancel
E - Register and run as an emergency change
N - Register as a normal change, pending changes become prereqs
S - Register as a normal change, supersede pending changes
D - Display pending changes to the same object(s)
+----------------------------------------------------------------------+
| There are pending changes related to the objects you are modifying. |
| Use the "Display pending changes" option to see the pending changes. |
+----------------------------------------------------------------------+
Figure 334. Example of Register Change panel (ADBCMRG) when there are pending
changes
Tip: Use option D to review the pending changes to help you make the
appropriate register decision for your change.
If you register the change as an emergency change or as a normal change that
should supersede the pending changes, any pending changes that are in
ANALYZED status are set to DEFINED status. They will need to be analyzed
again.
The following figure shows an example of the Register Change panel had there
been no pending changes for the affected objects:
C - Cancel
I - Register and run as an immediate change
N - Register as a normal change
Figure 335. Example of Register Change panel (ADBCMRG) when there are no pending
changes
Specify the owner and name values to use for this change:
Owner Name
Ignore . . . . . . . > > (? to look up)
Mask . . . . . . . . > > (? to look up)
Delta Version . . . . > > (? to look up)
Analyzing a change
| When you analyze a change, you run a job that creates a work statement list (WSL)
| that will be used in the run process to apply the changes.
To analyze a change:
1. Display the change to be analyzed by selecting option 1 on the Change
Management panel, and then select option 1 on the Manage Changes panel.
2. Issue the AN line command for the change that you want to analyze.
3. Fill in the fields on the Generate Analyze Job panel and press Enter. Specify the
following information:
| Tip: Keep the WSLs that are generated for changes made through change
| management separate from the other WSLs. Do not mix them in the
| same data set. Also, make the data set names for the WSLs and for the
| JCL unique enough so that members for different Change Management
| databases are not put in the same data set.
v Job options.
| If you choose to have DB2 Admin automatically generate a change that will
| recover the current change, you are prompted to register the recover change.
| When you choose to have a recover change generated, you must specify
| whether to have the original data or the existing data in the table recovered.
| Original data is the data that exists just before the original change is run.
| Existing data is the data that exists in the table just before the original
| change is recovered. Original data can be recovered only for objects that are
| dropped as part of the original change; referential integrity is not considered.
| Original data cannot be recovered for changes that are made using an SQL
| ALTER or RENAME statement.
v Optional utility job steps.
v Whether to use active templates.
| If you specify Yes, templates are generated for the non-utility data sets using
| the template definitions that are defined for Object Comparison Tool. If you
| specify No, the defaults for Prefix for data sets apply. If the Take an image
| copy or Run REORG options are Yes, the utility templates are used.
The following figure shows an example of the Generate Analyze Job panel:
| Tip: If you return to the Changes panel before the submitted job completes,
| you can enter the REF primary command after the job completes to see
| the refreshed status of the change.
| DB2 Admin can get this information from an existing version that was created
| earlier or extract the information from the DB2 catalog.
| When the information is extracted from the DB2 catalog, DB2 Admin either
| extracts it based on a user-defined scope or based on the objects that are being
| changed.
| The base version method that you choose depends on your installation's needs.
| Your shop might prefer to create a new snapshot (base version) after every change
| to use as a backup and also as the base version for new changes. When the next
| change needs to be analyzed, you can specify to have the existing version used
| and avoid extracting the object definitions from the DB2 catalog to get the current
| status. Processing time is saved when you do not have to extract the objects from
| the catalog.
| Other shops might want to work on one application at a time. A scope can be
| defined that includes all of the objects in the application (for example, one or more
| databases) and always use this scope as the base when analyzing a change.
| Some shops might not want to use existing base versions or user-defined scopes
| and choose to have the base automatically generated from the DB2 catalog when
| analyzing a change.
| Related tasks
| “Analyzing a change” on page 462
Running a change
When you run a change, the work statement list (WSL) that was created during the
analyze process is run.
To run a change:
1. Display the change to be run by selecting option 1 on the Change Management
panel, and then select option 1 on the Manage Changes panel.
2. Issue the RN line command for the change that you want to run. If the change
has prerequisite changes, DB2 Admin will issue a message that prompts you to
run the prerequisite changes first.
| Tip: If you return to the Changes panel before the submitted job completes,
| you can enter the REF primary command after the job completes to see
| the refreshed status of the change.
If the job fails (the status of the job does not change to COMPLETE), the action to
take depends upon the status in which the change is left:
| v If the status is ANALYZED, check the job output. If a message indicates that the
| run-time WSL did not match the WSL that was generated during the analyze
| process, return to the Changes panel and issue the AN line command to
| reanalyze the change. Then, run the change again.
| v If the status is RUNNING, check the job output. Determine the cause of the
| failure and make any necessary corrections. Then, return to the Changes panel,
| issue the ER line command to edit the run job, and resubmit it. When you
| submit the run job, the job is restarted at the appropriate step.
| When you issue the ER line command, the JCL for the run job is placed in edit
| mode. Before the job is displayed in edit mode, a RESTART parameter is
| automatically added to the job card to restart the job at the step that runs
| ADBTEP2 so that you do not have to determine the step name where the job
| should be restarted. In addition, if the RESTART parameter for ADBTEP2 was
| changed to RESTART(NO) by using the ER line command during an earlier edit
| session, the parameter is automatically changed to RESTART(YES) because
| ADBTEP2 must be restarted with the parameter RESTART(YES). If the parameter
| is missing, ADBTEP2 assumes a YES value.
| These automatic changes and any edit changes that you make are saved to the
| JCL data set so that you do not need to re-enter the changes for a subsequent ER
| line command for the job.
| When you submit the run job, the job is restarted at the appropriate step.
| Important: Any user can use the ER line command to edit and resubmit a
| change in RUNNING status. The user who originally ran the change
| is not required to resubmit the job. The restart record in the
| checkpoint table for the change retains the userid of the original
| submitter. DB2 Admin locates the record by using CHANGEID
| parameter. The RN and ER line commands automatically include the
| CHANGEID parameter when the run job is built so that you do not
| have to manage this process.
| To recover a change:
| 1. Display the change to be recovered by selecting option 1 on the Change
| Management panel and then option 1 on the Manage Changes panel.
| 2. Issue the RC line command for the change that you want to recover.
| Important: You always recover a change by issuing the recover line command
| (RC) for the change to recover. You cannot issue the run line
| command (RN) for the recover change itself.
| DB2 Admin will prompt you in the following situations:
| v If the change cannot be recovered because it has no recover change (or
| change that must be recovered first does not have a recover change), an error
| message is issued.
| v If the change cannot be recovered because other changes must be recovered
| first, a panel is displayed with the list of changes that must be recovered first
| and the order in which the changes must be recovered. Recover the list of
| changes in the order that is specified before you recover this change.
| The following figure shows an example of the panel that might be displayed
| when other changes need to be recovered first.
|
| Tip: If you return to the Changes panel before the submitted job completes,
| you can enter the REF primary command after the job completes to see
| the refreshed status of the change.
| If the job fails, check the job output to determine the cause of failure, make the
| necessary corrections, and restart the job.
| Modifying a change
| You can modify the change statements in an existing change if the change is in
| INITIAL, DEFINED, or ANALYZED status.
| Deleting a change
| You can delete certain types of changes if DB2 Admin has been configured to
| support the delete change line command and you have the appropriate privileges.
| To delete a change:
| 1. Display the change to be deleted by selecting option 1 on the Change
| Management panel, and then select option 1 on the Manage Changes panel.
| 2. Issue the DEL line command against the change that you want to delete. A
| pop-up window is displayed to confirm your intention to delete the change.
| 3. Select 2 to continue with deleting the change.
| After a change is deleted, it will no longer appear in the list of changes. The
| change is removed from the Change Management database, which removes any
| audit tracking for the change.
Promoting changes
| Promoting changes allows you to move changes from one system to another
| because a delta changes data set is generated, which you can then import into a
| change on another system.
To promote a change, two versions must exist. The starting version represents the
state of objects before any changes are made and the ending version represents the
state of objects after the promoted changes are made. During the promote process,
DB2 Admin compares the ending version with the starting version and generates a
delta changes data set the contains the SQL statements that are required to bring
the other system up to the same level as the system from which your promoting
the changes.
To promote a change:
1. Select option 1 on the Change Management panel, and then select option 3 on
the Manage Changes panel to display the Promote panel.
Alternatively, you can use either of the following methods to display the
Promote panel:
v If you know the ending version, specify the PR line command for the version
on the Versions panel. The Promote panel will be displayed with the
information for the ending version filled in.
v If you know the change and a new base version was created when the
change was run, specify the PR line command for the change on the Changes
panel. The Promote panel will be displayed with the information for the
ending version filled in.
2. Specify the following information on the Promote panel and press Enter.
v The starting version
v The ending version
v The data set name for the promote batch job
v The data set name for the delta changes statements
The following figure shows an example of the Promote panel:
3. Specify the following information on the register panel and issue the
CONTINUE command:
a. Specify an owner and a name for the change. The default owner is the
current SQL ID.
b. Optionally, specify a comment for the change, an ignore for the change, and
a mask for the change.
The change will be registered as a COMPARE change.
4. Edit and submit the generated job. When the job completes successfully, the
change is placed in COMPLETE status.
You can now import the delta changes data set into a new change on another
system, analyze the change, and run the change to bring the level of the other
system up to the level of the current system.
Related concepts
“Making changes through Change Management” on page 457
“Versions” on page 489
Related tasks
“Importing changes”
“Scenario: Promoting changes from one system to another” on page 456
Importing changes
You can create a change by importing SQL statements from a data set. When you
import the statements, a new change is created and registered. You can import
multiple delta changes as a group in one change.
If the imported SQL statements affect objects for which pending changes exist, you
determine whether the imported change becomes a prerequisite change for those
pending changes or not.
| You can create a single change by importing multiple files at the same time. Each
| file must be one of the types mentioned below. All types can be part of the same
| Import.
| The data sets from which you are importing the SQL statements must be either:
| v The delta changes data set that was generated when changes were promoted
| with Change Management from another system. Thus, you can import the
| changes that were promoted from another system that uses Change
| Management.
| v The delta changes data set that DB2 Object Comparison Tool generated when
| objects were compared. DB2 Object Comparison Tool uses the worklist name for
| this data set (qualifier1.worklist_name.CHG). The worklist name will be generated
| by specifying CHANGE in the "Generate apply jobs" field on panel GOC5. You
| can specify a data set name and optionally specify a member name if the data
| set is partitioned.
| v A data set that contains SQL statements that meets these requirements:
| – A fixed-block sequential data set (RECFM=Fx,LRECL=80)
| – A member of a partitioned data set with a logical record length of 80
| (RECFM=Fx,LRECL=80)
| If you are importing a delta changes data set, the data set must represent one
| generated delta changes file. Concatenating or merging multiple data sets into one
| can cause unpredictable results because statements are reordered during the import
| process.
When you import SQL statements into a change, the version of DB2 that is on the
system must support the SQL statements that you are importing.
To import a change:
1. Select option 1 on the Change Management panel to display the Manage
Changes panel.
| 2. Select option 4 to import changes.
| 3. Specify the name of the data set that contains the SQL statements. This panel is
| re-displayed after each entry so that you can enter more input data sets. Thus,
| you can generate a list of input dataset names that will be processed in the
| specified sequence. The following figure shows the Import Changes panel:
|
You can now display your imported change on the Changes panel, analyze the
change, and then run it.
Related concepts
“Making changes through Change Management” on page 457
Related tasks
“Promoting changes” on page 472
“Analyzing a change” on page 462
“Running a change” on page 465
“Scenario: Promoting changes from one system to another” on page 456
“Specifying a mask” on page 504
Masks
A mask (also called translation mask) provides the ability to cause context-sensitive
global changes to naming conventions and to overwrite the current values of
certain table space and index space attributes when you use various functions of
DB2 Admin and DB2 Object Comparison Tool.
You can define and manage masks by using the Change Management panels.
Masks that are specified when you import changes through Change Management
must be defined in the Change Management database, where the masks are stored
Tip: Consider managing all your masks through Change Management. The masks
are easy to track and recover because they are stored in the Change
Management database.
The Manage Masks panel, as shown in the following figure, is the main menu for
working with masks.
Enter display selection criteria (Using a LIKE operator, criteria not saved):
Name . . . . . . . > Created by . . >
Owner . . . . . . > Altered by . . >
Created within . . Mask ID . . .
Altered within . .
Related concepts
“Mask definitions” on page 505
Line commands:
U - Update DEL - Delete INS - Insert ML - Mask lines CH - Changes
E - Edit I - Details on mask
You can issue a variety of line commands for each mask that is displayed on the
Masks panel. Commands are available to do the following tasks:
v See the definition of the mask and modify it
v View details about who created the mask and when and who altered it last
v See which changes use the mask
v Insert, delete, or update a mask
| Masks that have been created in an explicitly named data set outside of Change
| Management are not displayed because they are not stored in the Change
| Management database. You might have created masks that you use when
| performing comparisons using DB2 Object Comparison Tool or other functions in
| DB2 Admin (such as reverse engineering, migrating DB2 data, or cloning work
| statement lists) in a data set. When you are prompted to specify the mask to use,
| you have the option of using masks that are either in data sets or in the Change
| Management database.
Creating a mask
You can create a mask that is stored in the Change Management database.
To create a mask:
1. Select option 2 on the Change Management (CM) panel to display the Manage
Masks panel.
2. Select option 2 on the Manage Masks panel to display the Insert Mask panel.
3. Specify an owner and a name for the mask, and optionally enter a comment for
the mask. Press Enter.
4. Press F3 to return to the Manage Masks panel.
5. Select option 1 to display the masks on the Masks Panel.
6. Issue the ML line command for the mask you just created to add the mask line
definitions for the mask. For each mask line that you add, specify:
v The type of object for the mask in the Type field. For example, TBNAME
specifies a mask for tables.
v The input mask (the pattern of the string that you want to translate) in the
From field.
v The output mask (the string to which you want to translate) in the To field.
The hierarchy of mask types is the same as it is when you define and edit a
mask data set outside of Change Management. See the online help to review
the hierarchy.
You can use the I, D, and R line commands to quickly insert, delete, and repeat
mask lines when you define a mask. You can also use the A and B line
commands with the M line command to quickly move the mask lines around in
the definition. The order of the mask lines in the definition is important
because the first mask that matches is used and the name is translated to the
second value. You should put the most specific translation masks at the
beginning and the more general ones at the end.
7. Issue the SAVE primary command to save the definition of the mask.
8. Press F3 to return to the Manage Masks panel.
Related concepts
“Mask definitions” on page 505
Related tasks
“Specifying a mask” on page 504
2. Verify the owner and name of the mask on the owner. Optionally, enter a
comment for the mask. Press Enter. A message is displayed that indicates that
the mask was inserted.
3. Press F3 to display the Mask Lines panel to define the entries in the mask. For
each mask line that you add, specify:
v The type of object for the mask in the Type field. For example, TBNAME
specifies a mask for tables.
v The input mask (the pattern of the string that you want to translate) in the
From field.
v The output mask (the string to which you want to translate) in the To field.
4. Issue the SAVE primary command to save the definition of the mask.
Editing a mask
You can change the definition of a mask.
Deleting a mask
You can delete a mask that is stored in the Change Management database.
To delete a mask:
1. Select option 2 on the Change Management (CM) panel to display the Manage
Masks panel.
2. Select option 1 on the Manage Masks panel to display the Masks panel.
3. Issue the DEL line command for the mask that you want to delete.
Ignores
An ignore provides the ability to specify that certain fields in the DB2 catalog
records are to be ignored when objects are compared.
Objects are compared when you analyze a change or you explicitly use DB2 Object
Comparison Tool to generate a compare job.
Overview of ignores
You can define and manage ignores by using the Change Management panels.
Ignores that are specified when analyzing a change must be defined in the Change
Management database, where the ignore is stored in a table. Ignores that you
specify when you explicitly use DB2 Object Comparison Tool to generate a
compare job can be either in the Change Management database or in a data set.
Some catalog fields are automatically ignored, such as statistics, dates, and internal
identifiers. As mentioned previously, these fields are called system ignores.
Because many fields in the DB2 catalog records are interdependent, when one field
is ignored, the value in another field might be invalid if that field is not ignored
also, for example, the TYPE fields for tables and table spaces. If TYPE is ignored
for table spaces, a table space could keep the LARGE (TYPE) attribute. If the
compare source is a segmented table space, the resulting set of attributes will be
invalid if the SEGSIZE field is not ignored also.
Tip: Consider managing all your ignores through Change Management. The
ignores are easy to track and recover because they are stored in the Change
Management database.
Ignore fields
The following table shows the DB2 catalog tables and the ignore fields that you
can specify.
Table 22. The DB2 catalog table ignore fields
DB2 catalog table Ignore fields
SYSCHECKS CREATOR, CHECKCONDITION
SYSCOLUMNS COLTYPE, LENGTH, SCALE, NULLS, REMARKS, DEFAULT,
KEYSEQ, FOREIGNKEY, FLDPROC, LABEL, DEFAULTVALUE,
LENGTH2, TYPESCHEMA, TYPENAME, STATS_FORMAT,
PARTKEY_COLSEQ, PARTKEY_ORDERING, ALTEREDTS
SYSDATABASE CREATOR, STGROUP, BPOOL, ROSHARE, TYPE, GROUP_MEMBER,
ENCODING_SCHEME, SBCS_CCSID, DBCS_CCSID, MIXED_CCSID,
INDEXBP
SYSDATATYPES OWNER, SOURCESCHEMA, SOURCETYPE, METATYPE, LENGTH,
SCALE, SUBTYPE, ENCODING_SCHEME, REMARKS
SYSFIELDS FLDPROC, WORKAREA, EXITPARML, PARMLIST, EXITPARM
SYSINDEXES UNIQUERULE, CLUSTERING, BPOOL, PGSIZE, ERASERULE,
DSETPASS, CLOSERULE, INDEXTYPE, PIECESIZE, COPY, SPACEF,
REMARKS, PADDED, VERSION, OLDEST_VERSION,
CURRENT_VERSION, RELCREATED, AVGKEYLEN
SYSINDEXPART PARTITION, PQTY, SQTY, STORTYPE, STORNAME, VCATNAME,
LIMITKEY, FREEPAGE, PCTFREE, INDEXTYPE, GBPCACHE,
SECQTYI, SPACEF, DSNUM, EXTENTS, PSEUDO_DEL_ENTRIES,
LEAFNEAR, LEAFFAR
SYSSYSKEYS COLSEQ, ORDERING
SYSPARMS OWNER, SPECIFICNAME, CAST_FUNCTION, PARMNAME,
ROWTYPE, ORDINAL, TYPESCHEMA, TYPENAME, LOCATOR,
TABLE, TABLE_COLNO, LENGTH, SCALE, SUBTYPE, CCSID,
ENCODING_SCHEME
When you specify ignore fields for SYSCOLUMNS, consider the following
information:
v The fields COLTYPE, LENGTH, SCALE, DEFAULT, and DEFAULTVALUE are all
part of the column type definition. The NULLS field is also related because in
some cases it is part of the default specification.
v The DEFAULT field can have a relationship to a SYSSEQUENCES row. Ignoring
the DEFAULT field can cause the SYSSEQUENCES row to be included or
excluded, depending on the value of the DEFAULT field in the target
SYSCOLUMNS row. However, to ignore fields in the SYSSEQUENCES row, you
must explicitly select them.
v The FOREIGNKEY field specifies the subtype of a character type column.
Ignoring the FOREIGNKEY field not only removes the check for SBCS and
MIXED data, but also the FOR BIT DATA specification (that is, CCSID
conversions will occur, if applicable).
v The FLDPROC field can have a relationship to a SYSFIELDS catalog row.
Ignoring the FLDPROC field can cause the SYSFIELDS row to be included or
excluded, depending on the value of FLDPROC in the target SYSCOLUMNS
row. However, to ignore fields in the SYSFIELDS row, you must explicitly select
them.
Important: Be careful when you choose to ignore some, but not all, of the fields
that are part of a column definition. Otherwise, it is possible that
inconsistent attributes and, subsequently, invalid DDL will result.
Generic ignore field specifications provide a shortcut for ignoring all buffer pools,
allocated space information, and information about how data is stored and
partitioned. The generic ignore specifications are:
v BUFFERPOOL
v SPACE
v STORAGE
v PARTITIONING
Specifying a generic ignore specification has the same effect as specifying the
ignore fields individually. The following table shows which catalog fields are
ignored when the generic ignore specification is selected.
Table 23. Generic ignore specifications
Generic ignore
specification DB2 catalog table Ignore fields
BUFFERPOOL SYSDATABASE BPOOL, INDEXBP
SYSINDEXES BPOOL
SYSTABLESPACE BPOOL
SPACE SYSINDEXPART PQTY, SQTY, FREEPAGE, PCTFREE,
SECQTYI
SYSTABLEPART PQTY, SQTY, FREEPAGE, PCTFREE,
SECQTYI
SYSTABLESPACE MAXROWS
STORAGE SYSDATABASE STGROUP
SYSINDEXPART STORTYPE, STORNAME, VCATNAME
SYSTABLEPART STORTYPE, STORNAME, VCATNAME
SYSSTOGROUP VCATNAME
PARTITIONING SYSINDEXPART PARTITION
SYSTABLEPART PARTITION
SYSTABLESPACE PARTITIONS
SYSINDEXPART LIMITKEY
| SYSTABLEPART LIMITKEY
| SYSTABLEPART LIMITKEY_INTERNAL
| SYSTABLEPART LOGICAL_PART
| SYSTABLES PARTKEYCOLNUM
| SYSCOLUMNS PARTKEY_COLSEQ
| SYSCOLUMNS PARTKEY_ORDERING
| SYSAUXRELS PARTITION
The Manage Ignores panel is the main menu for working with ignores.
Enter display selection criteria (Using a LIKE operator, criteria not saved):
Name . . . . . . . > Created by . . >
Owner . . . . . . > Altered by . . >
Created within . . Ignore ID . .
Altered within . .
From the Manage Ignores panel, you can display the existing ignores to work with
them or create a new ignore.
Related tasks
“Creating an ignore” on page 487
“Editing an ignore” on page 488
Line commands:
U - Update DEL - Delete INS - Insert IL - Ignore lines CH - Changes
I - Details on ignore
Ignores that have been created in an explicitly named data set outside of Change
Management on the Specify Ignore Fields panel (GOC4) in DB2 Object Comparison
Tool are not displayed because they are not stored in the Change Management
database.
Creating an ignore
You can create an ignore that is stored in the Change Management database.
To create an ignore:
1. Select option 3 on the Change Management (CM) panel to display the Manage
Ignores panel.
2. Select option 2 on the Manage Ignores panel to display the Insert Ignore panel.
3. Specify an owner and a name for the ignore, and optionally enter a comment
for the ignore.
4. Press F3 to return to the Manage Ignores panel.
5. Select option 1 to display the ignores on the Ignores panel.
6. Issue the IL line command for the ignore that you just created to define the
ignore fields. The Specify Ignore Fields: Objects panel is displayed, as shown in
the following figure. The panel shows the DB2 catalog tables for which you can
define ignore fields.
7. For each table, use the U line command to display the catalog field columns
that can be ignored.
3. For each table that is displayed on the Specify Ignore Fields: Objects panel, use
the U line command to display the catalog field columns that can be ignored.
4. On the Select Ignore Fields panel for the table, use the U and S line commands
to select or de-select a particular field to be ignored.
5. Press F3 to return to the list of DB2 catalog tables (the Specify Ignore Fields:
Objects panel). Pressing F3 again returns you to the DB2 Object Comparison
Tool Menu panel.
Editing an ignore
You can add and delete fields from an existing ignore.
4. Use the U line command to display the ignore fields for a particular DB2
catalog table.
5. On the Select Ignore Fields panel for the table, use the U and S line commands
to select or de-select a particular field to be ignored.
6. Press F3 to return to the list of DB2 catalog tables (the Specify Ignore Fields:
Objects panel). Pressing F3 repeatedly returns you through the panels to the
main menu.
Related concepts
“Overview of ignores” on page 482
Deleting an ignore
You can delete an ignore that is stored in the Change Management database.
To delete an ignore:
1. Select option 3 on the Change Management (CM) panel to display the Manage
Ignores panel.
2. Select option 1 on the Manage Ignores panel to display the Ignores panel.
3. Issue the DEL line command for the ignore that you want to delete.
Versions
| A version is a snapshot of the definitions of a set of objects at a point in time.
| Tip: Consider storing all of your versions in the Change Management database,
| which makes them easier to track, access, and recover.
| When you promote a set of changes from one system to another, you need two
| versions. The starting version represents the state of objects before any changes are
| made and the ending version represents the state of objects after the promoted
| changes are made. During the promote process, DB2 Admin compares the ending
| version with the starting version and generates a delta changes data set the
| contains the SQL statements that are required to bring the other system up to the
| same level as the system from which your promoting the changes. You can then
| import the delta changes data set into a new change on the system to which you
| are promoting the changes, analyze the change, and run them.
| When you implement them carefully, you can also use versions as the base version
| for subsequent changes to a set of objects. When you analyze a change, DB2
| Admin needs a base set of definitions for the change for the analyze process. DB2
| Admin either extracts the object definitions from the catalog to use as the base
| version, which can be time consuming, or uses an existing version as the base
| version. You can specify that DB2 Admin uses an existing version when there are
| no prerequisite changes for the objects.
The CM - Manage Versions panel, which is shown in the following figure, is the
main panel for managing versions:
Line commands:
CH - Changes PR - Promote VS - Version scope DEL - Delete U - Update
PT - Toggle protected status I - Details on version
You can issue a variety of line commands on the Versions panel for each version.
Commands are available to:
v See the changes that are associated with the version
v Promote the version
v See which scopes are associated with the version
v Set the protected status for the version
v Delete or update a version
v View details about the version
| Versions that have been generated in explicitly named data sets when you use DB2
| Object Comparison Tool are not displayed because they are not stored in the
| Change Management database. When you use DB2 Object Comparison Tool and
| Change Management is enabled, you have the option of storing versions in data
| sets or in the Change Management database.
Line commands:
VE - Versions SO - Version scope objects GV - Generate new version file
INS - Insert U - Update DEL - Delete I - Details on version scope
3. Specify the GV line command for the version scope for which you want to
generate a version.
4. Specify an owner and name for the new version on the pop-up panel that is
displayed. The JCL to create the version is displayed.
5. Review and submit the job to create the new version.
| This layout is not compatible with previous versions containing LOBs. Therefore,
| you must regenerate older versions that contain LOB columns. You can identify
| which change management base versions are affected by using this query:
| SELECT OWNER,NAME,TYPE
| FROM ADB.ADBCVERSION V
| WHERE TYPE='B'
| AND EXISTS(
| SELECT VERSIONID
| FROM ADB.ADBCVERLINES VL
| WHERE V.VERSIONID=VL.VERSIONID
| AND VL.PREFIXGROUP=52)
| You can identify the active CM changes that are affected by using this query:
Deleting a version
You cannot delete delta versions but you can delete base versions.
Version scopes
A version scope defines the set of objects to include in the processing of a version.
A version scope can be any set of objects, such as one or more databases, or a
group of table spaces. Typically, you want to define scopes that identify all of the
objects for an application or application area. For example, the scope for a human
resources application should contain all the human resource databases.
After you create a version scope, you can create a base version for that set of
objects.
A version scope must exist if you plan to create a new base version when you
apply changes. If you have a new base version created when you run a change to
reflect the object definitions after the changes, you must specify the version scope
for the version.
Maintaining a version scope is a manual process, and you should ensure that the
definition of the scope always includes all of the objects that you intend. For
example, assume that you defined version scope SCOPE1 to include databases
DB01 and DB02 and then created version BASE1. Later, you run CHANGE1, which
The Manage Versions panel, which is shown in the following figure, is the main
panel for working with version scopes:
Line commands:
VE - Versions SO - Version scope objects GV - Generate new version file
INS - Insert U - Update DEL - Delete I - Details on version scope
? ? ?
******************************* END OF DB2 DATA *******************************
7. Use the I line command to add each object that you want in the version scope,
and specify the type of object, a qualifier, and a name for the object. You can
also use the D line command to delete objects from the scope definition, and
you can use the R line command to repeat a line to make it faster to define the
objects in the scope.
| The values for the qualifier and name can contain zero or more of the following
| wildcard characters:
| v Minus sign (-) represents any single character.
| v Percent sign (%) or asterisk (*) represents one or more characters.
| v Any other character represents a single occurrence of itself.
| The rules for the wildcard characters follow the rules that are used for the LIKE
| predicate.
See the online help for the Version Scope Objects panel for a description of the
input fields, which includes a list of the types of objects that you can add.
| The following figure shows an example of a version scope definition.
DB DBADB001
TS DBADB002 TSAB%
8. Issue the SAVE primary command to save the definition of the scope.
Related information
IBM Publications Center
TB DBAUSER1 EMPLOYEE
TB DBAUSER1 TIMECARDS
FU VNDH01 FEDVALUES
4. Use the I and D line commands to insert or delete an object in the definition.
Ensure that a type, a qualifier, and a name are specified for each object. You
can also use the R line command to repeat a line to make it faster to define the
objects in the scope.
See the online help for the Version Scope Objects panel for a description of the
input fields, which includes a list of the types of objects that you can add.
5. Issue the SAVE primary command to save the definition of the scope.
You can use either the Changes panel or the Report Changes panel to display
changes. The Report Changes panel, as shown in the following figure, is the main
panel for displaying changed objects.
Enter display selection criteria (Using a LIKE operator, criteria not saved):
Name . . . . . . . > Created by . . . . >
Owner . . . . . . > Altered by . . . . >
Type . . . . . . . Status . . . . . .
Created before . . Altered before . .
Created after . . Altered after . .
Displaying changes
You can display the changes that are stored in the Change Management database.
Select which method you want to use to display the Changes panel.
v Select option 1 on the Change Management (CM) panel to display the Manage
Changes panel, and then select option 1.
v Select option 4 on the Change Management (CM) panel to display the Report
Changes panel, and then select option 1.
When you use either action, you can specify search criteria to filter or limit the
changes that are displayed, such as searching for changes by owner or status or
searching for changes that were created or altered before or after a certain date. For
example, to display all the changes that need to be analyzed, specify DEFINED in
the Status field. See the online help for a description of the search fields.
The following figure shows an example of the Changes panel:
Line commands:
U - Update AN - Analyze RN - Run VE - Versions ST - Statements
PQ - Prerequisites IG - Ignores MA - Masks
? - Show all line commands
You can issue a variety of line commands on the Changes panel for each change.
Enter the ? line command to see a list of the available line commands. For
example, commands are available to:
v See the statements for a change
v See the prerequisites for a change.
v Analyze a change.
v Run a change.
v See the recover change for a change
v Recover a change
Line commands:
ST - Statements CH - Change CHA - All Changes CHC - Completed Changes
CHN - Not Completed Changes
| You can also use masks to overwrite the value of certain table space attributes.
For example, in DB2 Admin, you can specify masks to change names and
qualifiers when you:
v Generate SQL to reverse engineer DB2 objects
v Clone a work statement list (WSL)
v Migrate DB2 object definitions, the data in those objects, or catalog statistics to
other DB2 systems
| v Import changes through Change Management.
| You can define a mask either in a data set, or if Change Management is enabled on
| your system, in a table in the Change Management database. Masks that are
| specified on panels for reverse engineering SQL from the DB2 catalog, cloning
| WSLs, or migrating objects can be defined in a data set or in a table in the Change
| Management database. Masks that are specified when you import changes through
| Change Management must be defined in the Change Management database.
| Tip: Consider managing all your masks through Change Management. The masks
| are easy to manage and recover because they are stored in a table in the
| Change Management database.
Topics:
v “Specifying a mask” on page 504
v “Mask definitions” on page 505
Related tasks
“Generating SQL to re-create a DB2 object” on page 172
“Step 1. Specify the objects to migrate information” on page 293
To specify a mask when you generate SQL to reverse engineer DB2 objects, clone a
work statement list (WSL), or migrate objects, data, or catalog statistics:
1. Specify Yes in the Use Masking field on the appropriate panel to display the
Specify Mask panel. The following panels have the Use Masking field:
v Generate SQL from DB2 catalog panel (ADB2GEN)
v Clone Work Statement List panel (ADB2W1Q)
v Migrate Parameters panel (ADB28M)
The following figure shows the Specify Mask panel:
Mask definitions
The mask definition describes how names are to be translated for objects.
| The mask definition describes how names are to be translated for objects. The
| mask definition also lets you overwrite the values of certain table space and index
| space attributes, including COMPRESS, DEFINE, DEFER, DSSIZE, PRIQTY,
| SECQTY, and SEGSIZE. The information in this topic about mask names, the mask
| hierarchy, how masks are applied, and performance is also applicable for masks
| that are defined in the Change Management database.
| When you specify masks, they are processed in the order that you list them.
Related concepts
“Masks” on page 477
Related tasks
“Cloning work statement lists” on page 312
“Creating a mask” on page 479
“Editing a mask” on page 481
“Specifying a REXX user exit for the overwrite value” on page 511
If you are using a mask data set, to view or edit mask definitions, specify Yes in
the Edit Mask field of the Specify Mask panel. When you press Enter, the mask
definitions are displayed in ISPF Edit. The following figure shows mask definitions
in the Edit Masks panel:
You can specify one or more masks. Masks can contain generic specifications,
which are expressed by using an asterisk.
| When you specify masks, they are processed in the order that you list them.
The syntax for specifying a mask to change naming conventions is shown in the
following figure:
maskname: inputmask,outputmask
| The maximum length allowed for input masks and output masks is 256 bytes each.
| You use a plus sign (+) in column 72 to indicate continuation onto the next line.
| The syntax for overwriting the value of a table space or index space attribute is
| shown in the following figure:
|
| maskname: inputmask, overwrite_value
| The inputmask identifies the table space name or index space, and overwrite_value
| identifies the new value to use for the attribute. The value that you can specify for
| overwrite_value depends on the attribute, as shown in Figure 2. The value can be a
| direct value such as the YES or NO, an integer value (n), or an integer percentage
| of the current value (n%). The value can also be a REXX user exit that calculates a
| value. The maximum length allowed for input masks and a direct overwrite value
| is 256 bytes each. The maximum length allowed for specifying a REXX user exit
| and its input variables is 256 bytes. You use a plus sign (+) to indicate the
| continuation of a REXX user exit onto the next line. For more information about
| using a REXX user exit, see “Specifying a REXX user exit for the overwrite value”
| on page 511.
Notice that message lines on the panel show that the mask names have a hierarchy.
For example, to change all DBNAMEs in the form of X* to Y*, specify the
following:
DBNAME: X*,Y*
or
NAME: X*,Y*
Example 1: BPNAME has three levels: TSBPNAME, BPNAME and NAME. So, to
translate a table space buffer pool name (TSBPNAME), you can use
Note: The DBROLE, TSROLE, TBROLE, and IXROLE masks are not currently
used.
The following mask names are used only when work statement lists (WSLs) are
cloned. If specified, they have no affect in GEN, migrate, or importing changes.
DBRMNAME
DBRM name. Used for BIND commands.
GBPNAME
Group buffer pool name.
SFNAME
Structure facility name.
SQLID
Needed by cloning for masking already generated SET CURRENT SQLID
statements.
Even if GEN and migrate generate SET CURRENT SQLID = <sqlid>
statements, the SQLID mask is not used to mask the <sqlid>. The <sqlid>
in these statements originates from field values in the DB2 Catalog and
these values are masked before the SET statement is generated.
| The following mask names have no affect when WSLs are cloned:
| v DBOWNER
| v TSOWNER
| v COMPRESS
| v SEGSIZE
| Using a REXX user exit to calculate the value enables you to define and write your
| own overwrite rules to provide for additional flexibility and customization.
| To specify a REXX user exit as the overwrite value in your mask definition:
| 1. Ensure that DB2 Admin was customized with the :uexelib. tag to define the
| data set names for the REXX user exit libraries.
| 2. Ensure that a REXX user exit to calculate and return a valid value for the
| overwrite value has been defined and stored in the appropriate REXX user exit
| library. An example of a REXX user exit is shipped in SAMP library
| ADBDSIZE. The name of the REXX user exit in this sample is defined as
| MYDSSIZE, and the user exit calculates and returns a value that is to be used
| as the overwrite value for DSSIZE.
| 3. Define the mask definition with the correct syntax for calling the REXX user
| exit, which includes specifying the name of the REXX user exit and the input
| variables to pass as arguments to the user exit:
| REXX(execname,val1,val2,...valn).Each input variable must be the name of a
| DB2 catalog column or a variable name with a numeric or string value, where
| the variable name is the name of a DB2 catalog column. The following list
| shows some examples of the syntax that can be used on the Edit Mask panel to
| define overwrite values that are calculated by a REXX user exit:
| DSSIZE: MYDB*. MYTS*, DSSIZE(MYDSSIZE, PARTITIONS, BPOOL)
| DSSIZE: MYDB*. MYTS*, DSSIZE(MYDSSIZE, PARTITIONS=30, BPOOL='BP1')
| PRIQTY: MYDB*. MYTS*, REXX(MYPQTY, DBNAME, TSNAME, PCT= 20%)
| DEFINE: MYDB*. MYTS*, REXX(MYDEFINE, DEFINE='YES')
| DEFER: MYDB*. MYTS*, REXX(MYDEFER, DEFER='NO')
| COMPRESS: MYDB*. MYTS*, REXX(MYCOMP,TSNAME,DBAME,COMPRESS)
| SEGSIZE: MYDB*. MYTS*, REXX(MYSEG, NAME,DBNAME,SEGSIZE)
| The input values are passed to the REXX user exit in an argument list where
| the REXX user exit uses the arguments to perform the calculations and return
| the value that is to be used as the overwrite value. If one of the input variables
| is not provided in the proper context, a minus sign (-) is passed to the REXX
| user exit as the argument.
| Restriction: When you specify the input values for a REXX user exit in the
| mask definition that is to be used for WSL cloning or the import
| function in Change Management, specify the input variables as
| DB2 catalog names that are set to numeric or string variables. If
| you specify a catalog name only, the variable is passed as a minus
| sign (-), and the REXX user exit will return a value of a minus sign
| (-), which indicates that masking was not applied.
| If the REXX user exit does not return a valid value for the overwrite value,
| masking is not applied, and DB2 Admin processes the next definition in the
| mask file.
Note that some of the examples contain generic specifications, which are expressed
| by using an asterisk. The first mask that matches is used. The name is translated to
| the second value, or in the case where an attribute value is overwritten, the value
| of the attribute is overwritten to the new value.
In this example, any name that starts with ABC is changed to a name that starts with
DEF in the generated SQL.
Example 2:
AUTHID: SYSIBM, COPY
In this example, all authids that have the value SYSIBM are translated to COPY.
Example 3:
TBNAME: *01*, *02*
Example 4:
COLNAME: COL*, NEWCOL*
In this example, any column name in any table that starts COL is changed to a column
name that starts with NEWCOL. The column names that are changed include column
names in triggers, views, and indexes. You cannot selectively change column names in
specific tables.tart with TESTHRTS will be compressed.
| Example 5:
| COMPRESS: TESTDB.TESTTS*, YES
| In this example, the table spaces in the TESTDB database that start with TESTTS will be
| compressed.
| Example 6:
| PRIQTY: TESTDB.*, 75%
| In this example, the PRIQTY for all of the table spaces and index spaces in TESTDB
| database will changed to 75% of the current value of PRIQTY.
| Example 7:
| DSSIZE: TESTDB.TESTTS*, REXX(PDDSSIZE,PARTITIONS,BPOOL)
| In this example, the table spaces that start with TESTTS in the TESTDB database are
| changed to use the value that the REXX user exit PDDSSIZE returns as the DSSIZE.
You can specify as many translation masks as you want. When a value is
translated (for example, a name), the masks are processed one by one until a match
is detected. A match means that the mask name is applicable to the value (for
example, for a table name, mask names TBNAME and NAME are applicable) and
the value conforms to the inputmask (for example, PRODTAB1 conforms to mask
| PROD*1). The value is translated based on the outputmask, or in the case where
| an attribute value is overwritten, the value of the attribute is overwritten to the
| new value. Only the first matching mask is used for a given value. If no matching
mask is found, the value is not translated. Generally, you should put the most
specific translation masks at the top of the mask file and the more general ones at
the end.
The tasks are the same for both creating and extending applications.
Topics:
v “The application development process” on page 526
v “Sample application” on page 526
v “Types of panels” on page 527
v “Controlling DB2 Admin processing” on page 527
v “DB2 Admin processing flow” on page 528
v “Panel naming conventions” on page 529
v “Using the DB2 Admin CLIST to invoke new applications” on page 530
v “Updating rows using SQL” on page 530
v “Using variables in your application” on page 531
Related concepts
“Finding the source code for panels” on page 87
“DB2 Administration Menu panel” on page 97
Specifically:
v You can add new DB2 Admin functions to a copy of one or more of the panels
supplied with the product.
Tip: Use the existing code in the panel that you are modifying as a template,
and make the necessary changes for the new function. When you complete
your modifications, change the DB2 Admin source by creating an SMP/E
usermod to ensure that changes are not lost if maintenance is applied to the
product.
v You can develop new, independent applications by using the sample application
panels included with DB2 Admin as templates.
Regardless of whether you are creating or extending DB2 Admin applications, the
process involves creating ISPF panels that specify how DB2 Admin should perform
SQL processing and dialog control.
Related concepts
“Sample application”
“Step 21. Define your own line commands” on page 70
Sample application
DB2 Admin includes a sample application that you can use to help you create your
own applications.
The sample application consists of three ISPF panel source members located in
library SADBPLIB. Their names are ADB2S, ADB2S1, and ADB2SU. Use these
sample panels as templates to create your own application.
The sample application shows how to maintain a small DB2 table called USER. The
columns in the USER table are:
USERID CHAR(08) NOT NULL
EMPNAME CHAR(30) NOT NULL
EMPLNO CHAR(05) NOT NULL
COMMENTS CHAR(30) NOT NULL
Access the sample application from the DB2 Administration Menu panel by
specifying option S (it is not included in the list of options). The DB2 Admin
Sample Update Application panel, as shown in the following figure, is displayed.
v Select option C on the Sample Update Application panel to create the sqlid.USER
table (in default database DSNDB04).
v Select option I to insert a dummy row into the table so it is possible to display
or update the table using option 1.
v Select option 1 to display the USER table. From this display, you can use line
commands I, U, and D to insert, update, and delete rows.
v Select option D to drop the table.
Related concepts
“The application development process” on page 526
Types of panels
You can create different types of panels with DB2 Admin.
For a new application, you typically create a menu panel and a number of data
entry and table display panels.
During processing, DB2 Admin looks at the variables and then processes the
related commands or statements accordingly. If no variables are set, DB2 Admin
redisplays the panel unchanged.
DB2 Admin examines the variables and processes the instructions according to the
following rules:
v If the user presses END, the previous panel is displayed.
v If variable ISPFSTMT is set, all ISPF statements are processed first.
v If variable SQLSTMT is set, the SQL statements are processed one by one. If DB2
returns rows, the result on the panel named in the variable PANEL is displayed.
If the variable PANEL is not set, the default panel is displayed.
v If the variable PANEL is set, the specified panel is displayed.
v If the variable DB2ACMD is set, the DB2 Admin commands are processed.
The process flow that DB2 Admin follows is shown in the following figure.
Display
current
PANEL
User Y Return
pressed to previous
END display
N Y
N N
N
Display rows
on default
PANEL
Y More SQL
statements?
Y Display
Any PANEL All displays cause DB2 Admin
specified? PANEL
specified to start from top
Any Y Execute
DB2ACMDS? command
End
DB2 Admin panels have the prefix ADB2. The suffix normally identifies the option
that you selected to display the panel. For example, ADB21T is the panel for
option 1 on the DB2 Administration Menu and option T on the following panel.
The corresponding help panels have the same name but use the prefix ADBH.
Example: To start a DB2 Admin with your own customized panel, invoke the
CLIST by issuing the following command:
%ADBL PANEL(yourpanel)
Updating rows on the same panel will result in a copy of the data on the table
display panel, but updated data in DB2. When you use a separate panel for
updates, DB2 Admin refreshes the data in the table display panel automatically
when DB2 data changes.
Also, DB2 Admin issues an SQL COMMIT before each display, so if you have
concurrent users of your application, you probably should have a time stamp for
the latest updates to rows.
If you are updating rows using SQL, consider using the structure shown in the
following figure for your DB2 Admin application.
PANEL=X1 PANEL=X2
Selection Selection
panel for panel for
application1 application 2
X1 X2
SQL=SELECT
PANEL=X11
Table display
of result Return to previous panel
X11 using, for example:
ISPF=CONTROL NONDISPL END
PANEL=X12
or
Entry panel
with selected Stay on current panel
row displayed
X12
SQL=UPDATE
Therefore, these variables are available to your application. When you select a row,
the content of the column variables have the values for that row.
The names of column variables are the same as DB2 column names except for the
following differences:
v ISPF variable names have a maximum of eight characters. If the DB2 column
name exceeds eight characters, it is truncated to eight characters. For example,
the DB2 column name CLUSTERTYPE has the ISPF name CLUSTERT.
v Special characters, such as underscores in DB2 column names, are replaced by
the at sign (@). For example, DB2 column name EMPL_NAME has the ISPF
name EMPL@NAM.
v If duplicate column names exist in the result, all but the first duplicate column
name are given ISPF name DUP0001, DUP0002, and so on. For example,
SELECT CREATEDBAAUTH,CREATEDBCAUTH FROM
SYSIBM.SYSUSERAUTH is given ISPF names CREATEDB and DUP0001.
v All DB2 SELECT expressions are given ISPF names COL0001, COL0002, and so
on. For example, SELECT CURRENT DATE is given ISPF name COL0001.
v Table search argument variables are named in the same way as ISPF names, but
they are truncated to seven characters and given the prefix @. Duplicates are
named @DUP0001, @DUP0002, and so on.
One entry is required for each copy of the catalog being used.
Topics:
v “Adding entries to the catalog copy version table” on page 534
v “Catalog copies at remote sites” on page 537
v “Using previously defined multiple copies of the DB2 catalog” on page
537
DB2 Admin enables you to use copies of the DB2 system catalog when selecting
any of the options on the System Catalog panel. In addition, you can use the
system catalog of a remote DB2 system.
For example, you can choose to use a different copy of the catalog for each
weekday, and create a backup associated with each weekday. This strategy allows
examination of previous definitions in the backup copies of the DB2 system
catalog. Or you can allow only the system administrator to examine the active DB2
system catalog, and allow developers access to a copy of the DB2 system catalog.
This strategy can result in decreased contention on the catalog caused by the
developers' queries, while still allowing the system administrator to maintain the
active DB2 system catalog.
DB2 Admin uses the catalog copy version table, ADBCATVT, to keep track of
which DB2 copies are available to its users.
After the table is created, create an entry for each catalog copy to be used.
Related concepts
“DB2 Administration Menu panel” on page 97
Related tasks
“Step 14. Create a catalog copy version table” on page 68
DB2 Admin ------------ DB2X Display Catalog Copy Versions --------- Row 1 of 6
Command ===> Scroll ===> CSR
Copy Planname
Select Owner Suffix Timestamp Type Location
* * * * *
------ -------- -------- ------------------------ ------ ----------------
V6ALI0 A6 ? A STPLEX4A_DSN6
V7COPY2 02 2001-07-16-13.57.16.2180 C
V7COPY3 03 2001-07-16-16.34.55.7003 C
V7COPY4 04 2002-04-04-16.56.19.5425 C
V7COPY7 07 2003-04-11-16.33.37.6884 C
V7NEW11 11 2003-04-14-17.21.05.2860 C
******************************* END OF DB2 DATA ****************************
| ADB2CCJ n ---------DB2X Create Catalog Copy and Bind Batch Jobs -------- 16:56
| Command ===>
|
|
| Specify the following for DB2 Admin CATALOG COPY: DB2 System: DSN9
| DB2 SQL ID: VNDMPM2
|
| Catalog Copy Owner . . : VNDMPMG Type . . : C (C=copy, A=Alias, V=View)
|
| Data set information:
| PDS for jobs . . . . . . . .'VNDMPM2.TEST.JCL1'
| Prefix for work data sets . . VNDMPM2
|
| Catalog Copy options (for type C only):
| Database Name . . . . . . . VNDMPM2 (? to look up existing database)
| Storage Group Name . . . . . VNDMPM2 > (? to look up existing stogroup)
| Run SQLID . . . . . . . . . . VNDMPM2 >
| Catalog Copy Method . . . . . L (L=LOAD from Cursor, U=UNLOAD/LOAD)
|
| Miscellaneous options:
| Batch job PDS unit type . . . SYSDA
| Work data set unit type . . . SYSDA
|
| Enter command BP to change batch job parameters
|
|
| Figure 376. Create Catalog Copy and Bind Batch Jobs panel (ADB2CCJ)
|
5. Specify the name of an existing PDS where the generated jobs are to be stored.
For type C (copies of a local DB2 system catalog), also specify:
v The database and the storage group name to be used for the table space that
will contain the like tables of the DB2 catalog tables. The name of the table
space created to contain the like tables is the same as the qualifier of the
copy.
v The method to be used to copy the DB2 catalog to the like tables. The default
is the LOAD from cursor method. The other method, UNLOAD/LOAD,
allows you to unload into data sets as one process and to load as a second
process. For the UNLOAD/LOAD method, the CPYRUNxx job will use
TEMPLATE statements to define output and work data sets. Modify those
TEMPLATE statements as necessary. (This function does not use any
user-specified templates.)
Recommendation: Use the LOAD from cursor method if the catalog data is
not needed outside of the process, for example, for the
movement or modification of data. The LOAD from
cursor method reduces the I/O load of the entire process
and requires no work data sets.
6. Press Enter to generate the jobs.
7. Run the appropriate job or jobs. The job only needs to be run once.
8. DB2 Admin renames any duplicate indexes that are created during CC
processing. For the new names of the duplicate indexes, see step ISPFBAT.
The GEN request is supported with the multiple copies method by using a catalog
alias (Catalog Copy type 'A') and the alias' location for routing to the remote site.
This functionality is called distributed support. By using this support, you can:
v Build utility jobs and submit them to run on remote systems.
v Perform alter and migrate functions for remote systems.
v Issue SQL statements against remote systems.
v Issue distributed GRANT and REVOKE commands.
v Issue other commands on remote systems.
Topics:
v “Enabling DB2 Admin distributed support” on page 540
v “Using DB2 Admin distributed support” on page 540
When you issue a RESET command, you are returned to the local subsystem.
Related concepts
“Step 8. Customize the ISPF environment” on page 44
“DB2 Administration Menu panel” on page 97
Related tasks
“Step 3. Run the batch jobs” on page 298
After connecting to a remote subsystem, you can use option Z on the DB2
Administration Menu to issue commands against the remote subsystem.
To use DB2 Admin distributed support, select option DD from the DB2
Administration Menu panel to display the Distributed DB2 Systems panel, as
shown in the following figure.
Select Location
*
------ -----------------
DENMARK_DB2M
DENMARK_DB2X
DENMARK_DB2D
DENMARK_DB2T
DENMARK_DB2W
DENMARK_DB2P
STOCKHLM_DB2B
BELGHOLL_DB2
OSLOMVSA_DB2T
STOCKHLM_DB2C
GER2_DSNS
FINLAND_DB2
LUBDB2
NORDIC_DB2T
On the Distributed DB2 Systems panel, you can issue the following line
commands:
DIS
Displays the active threads for the location or system you select.
S Selects the remote subsystem for which you want to access the remote system
catalog.
CO
Connects you directly to a remote subsystem for issuing remote requests.
You can also use the CONNECT location_name primary command to connect
to a remote subsystem.
Select Location
*
------ -----------------
DENMARK_DB2M
DENMARK_DB2X
DENMARK_DB2D
S DENMARK_DB2T
DENMARK_DB2W
DENMARK_DB2P
STOCKHLM_DB2B
BELGHOLL_DB2
OSLOMVSA_DB2T
STOCKHLM_DB2C
GER2_DSNS
FINLAND_DB2
LUBDB2
NORDIC_DB2T
2. Issue the CO line command. DB2 Admin displays the System Catalog panel, as
shown in the following figure, and indicates at the top of the panel which
location you are accessing. All generated batch utility jobs, ALTER commands,
and MIGRATE commands are sent to the remote subsystem (or the target
system for the migrate jobs) for execution after the jobs have been submitted on
the local subsystem.
Enter standard selection criteria (Using a LIKE operator, criteria not saved):
Name ===> > Grantor ===> >
Owner ===> > Grantee ===> >
In D/L/H ===> >
And/or other selection criteria (option xC shows you columns for option x)
Column ===> > Operator ===> Value ===>
Topics:
v “The System Catalog panel” on page 546
v “Option A. Aliases” on page 551
v “Option C. Columns” on page 552
v “Option D. Databases” on page 555
v “Option DS. Database Structures” on page 557
v “Option DSP. Database Structures with Plans and Packages” on page 559
v “Option E. User-Defined Data Types” on page 560
v “Option F. Functions” on page 562
v “Option G. Storage Groups” on page 564
v “Option H. Schemas” on page 565
v “Option J. Triggers” on page 566
v “Option K. Packages” on page 567
v “Option L. Collections” on page 576
v “Option M. DBRMs” on page 577
v “Option N. Constraints” on page 579
v “Option O. Stored Procedures” on page 580
v “Option P. Plans” on page 582
v “Option Q. Sequences” on page 590
v “Option S. Table Spaces” on page 591
v “Option T. Tables, Views, and Aliases” on page 594
v “Option V. Views” on page 600
v “Option X. Indexes” on page 600
v “Option Y. Synonyms” on page 603
v “Authorizations for objects” on page 605
Related concepts
“DB2 Administration Menu panel” on page 97
“Overview of reports” on page 134
“Selecting a copy of the DB2 catalog” on page 133
Related information
Chapter 7, “Querying the system catalog,” on page 131
Select option 1 on the DB2 Administration Menu to display the System Catalog
panel (see Figure 380).
Enter one of the object codes on the command line (for example, D for databases).
You can limit the information that is returned by entering one or more selection
criteria at the bottom of the panel. For example, specifying D402 in the Name field
limits the search to databases whose names begin with D402. In response to your
choices, DB2 Admin creates and executes an SQL statement that searches the DB2
catalog for the object or authorization you have requested.
When you specify selection criteria, you can change from a LIKE search (a "fuzzy"
search) to an exact search, by using an equal sign (=). You can use the LIKE ON
and LIKE OFF primary commands to toggle between a "fuzzy" search (LIKE ON)
and an exact search (LIKE OFF).
You can save (or not save) your search criteria between DB2 Admin sessions using
the SAVE ON and SAVE OFF primary commands. When the SAVE ON command
is active, the text "criteria saved" appears on the System Catalog panel. With
SAVE ON, the search criteria is restored when you re-enter a DB2 Admin session.
The following figure shows the object options on the System Catalog panel.
More: +
Object options: DB2 System: DB2X
AO - Authorization options DB2 SQL ID: ISTJE
G - Storage groups P - Plans
D - Databases L - Collections
S - Table spaces K - Packages
T - Tables, views, and aliases M - DBRMs
V - Views H - Schemas
A - Aliases E - User defined data types
Y - Synonyms F - Functions
X - Indexes O - Stored procedures
C - Columns J - Triggers
N - Constraints Q - Sequences
DS - Database structures DSP - DS with plans and packages
Enter standard selection criteria (Using a LIKE operator, criteria not saved):
Name ===> > Grantor ===> >
Owner ===> > Grantee ===> >
In D/L/H ===> > Switch Catalog Copy ===> N (N/S/C)
And/or other selection criteria (option xC shows you columns for option x)
Column ===> > Operator ===> Value ===>
For optimum performance, specify selection criteria for all authorization options
(xA) and enter a value for Grantor or Grantee.
The following figure shows authorization options for the System Catalog panel.
More: +
Authorization options: DB2 System: DB2X
OO - Object options DB2 SQL ID: ISTJE
GA - Storage group auths PA - Plan authorizations
DA - Database authorizations LA - Collection authorizations
SA - Table space authorizations KA - Package authorizations
TA - Table authorizations HA - Schema authorizations
VA - View authorizations EA - User defined data type authorizations
CA - Column authorizations FA - Function authorizations
ZA - System authorizations OA - Stored procedure authorizations
UA - User authorizations QA - Sequence authorizations
RA - Resource authorizations
Enter standard selection criteria (Using a LIKE operator, criteria not saved):
Name ===> > Grantor ===> >
Owner ===> > Grantee ===> >
In D/L/H ===> > Switch Catalog Copy ===> N (N/S/C)
And/or other selection criteria (option xC shows you columns for option x)
Column ===> > Operator ===> Value ===>
DB2 Admin will report authorizations based solely on the DB2 catalog except:
v Installation authorities specified using DSNZPARM.
v Any external security system, such as RACF.
v Any security product from any other software provider.
v Any impact of the security user exits, even those supplied by IBM.
| Note: The only selection criteria allowed for RO and TR options is Name and
| Column/Operator/Value.
|
| To create a trusted context, enter the CRE line command on panel ADB2AN. To
| alter a trusted context, enter the AL line command on panel ADB2AN. Fill in the
| required information in the series of panels that appear (shown below). An
| example is given for the CRE command.
|
Select option A on the System Catalog panel to display the Aliases panel, as shown
in the following figure.
On this panel, you can reverse engineer DB2 objects by using the GEN line
command.
Option C. Columns
The Columns panel displays the columns in the DB2 catalog.
Select option C on the System Catalog panel (see Figure 380 on page 546) to
display the Columns panel (see Figure 387 on page 553).
Option D. Databases
The Databases panel displays the databases in the DB2 catalog.
Select option D on the System Catalog panel to display the Databases panel, as
shown in the following figure.
If the size of the statements generated by the GRANT, DIS, STA, or STO primary
command exceeds 32K (an ISPF limit), you will be prompted to send the
statements to a batch job or a work statement list (WSL).
If the number of statements generated by the DIS, STA, or STO primary command
exceeds 10, you will be prompted to send the statements to a batch job or a WSL.
| Note: The DDL reader does not communicate with DB2. Therefore, the
| DDL reader is unable to acquire defaults established by the
Select option DS on the System Catalog panel to display the Database Structures
panel, as shown in the following figure. You must enter a value in the Name field
prior to selecting the DS option. Otherwise, you will receive the following
message: Invalid for this option.
The following object types are displayed on the Database Structures panel:
v Databases
v Table spaces
v Tables
v Materialized query tables
v Indexes
v Aliases
v Views on a table
v Synonyms on a table
v Triggers
v Check conditions
v Unique constraints
v Referential constraints (parents)
v Referential constraints (children)
The following figure shows the Database Structures panel without plans and
packages displayed.
Figure 389. Database Structures panel (ADB21DS) without plans and packages displayed
Select option DSP on the System Catalog panel to display the Database Structures
panel, as shown in the following figure, that includes showing the plans and
packages that are dependent on the table spaces, tables, views, indexes, aliases,
and synonyms.
In the Database Structures panel, plans (P) and packages (K) are indented under
the object upon which they are dependent. To eliminate repetitiveness in the
display, a dependency on a table is not shown if it is already reported under a
view, alias, synonym, or index for the table. Likewise, a dependency for a table
space is not shown if it is already reported under a table.
You must enter a value in the Name field prior to selecting the DSP option.
Otherwise, you will receive the message, Invalid for this option.
The following figure shows the Database Structures panel with plans and packages
displayed.
Figure 390. Database Structures panel (ADB21DS) with plans and packages displayed
Related reference
“Option DS. Database Structures” on page 557
“The System Catalog panel” on page 546
Select option E on the System Catalog panel to display the Data Types panel, as
shown in the following figure.
On the Data Types panel, you can reverse engineer DB2 objects.
Commands: GRANT
Line commands:
T - Tables A - Auth AH - Schema auth GR - Grant DROP - Drop COM - Comment
I - Interpret CRE - Create data type GEN - Generate DDL DDL - Object DDL
| REP - Report RO - Role
Source
S Schema Data Type Name Schema Source Data Type Length Scale
* * * * * *
---- -------> -----------------> -------- ------------------ ----------- ------
ISTJE250 KR SYSIBM DECIMAL 15 2
ISTJE T-INT2 SYSIBM INTEGER 4 0
ISTJE T-SMI SYSIBM SMALLINT 2 0
ISTJE T-INT SYSIBM INTEGER 4 0
ISTJE T-REAL SYSIBM REAL 4 0
ISTJE T-DOUBLE SYSIBM DOUBLE 8 0
ISTJE T-FLOAT7-OVERTESTM SYSIBM DOUBLE 8 0
ISTJE T-CHAR SYSIBM CHAR 100 0
ISTJE T-VARCHAR SYSIBM VARCHAR 100 0
ISTJE T-CLOB SYSIBM CLOB 1024 0
ISTJE T-BLOB SYSIBM BLOB 1024 0
Option F. Functions
Use the Functions panel to display information about the functions in the DB2
catalog.
Select option F on the System Catalog panel to display the Functions panel, as
shown in the following figure.
Select option G on the System Catalog panel to display the Storage Groups panel,
as shown in the following figure.
Option H. Schemas
Use the Schemas panel to display the schemas in the DB2 catalog.
Select option H on the System Catalog panel to display the Schemas panel, as
shown in the following figure.
Line commands:
E - Data type F - Function J - Trigger O - Stored procedure A - Auth
| GR - Grant GEN - Generate DDL REP - Report Q - Sequence
Option J. Triggers
Use the Triggers panel to display information about the triggers in the DB2 catalog.
Select option J on the System Catalog pane to display the Triggers panel, as shown
in the following figure.
Option K. Packages
The Packages panel displays the packages in the DB2 catalog.
You can also issue the SQ line command to show the SQL statements. These
functions are shown at the end of this subsection.
Use the B line command (bind package) on the Packages panel to display the Bind
Package panel, as shown in the following figure.
Use the RB line command (rebind package) on the Packages panel to display the
Rebind Package panel, as shown in the following figure.
Use the Rebind Package panel to rebind an application package when changes
have been made that affect the package, but the SQL statements in the program
have not changed.
Use the F line command (free package) on the Packages panel to display the Free
Package panel, as shown in the following figure.
574 User's Guide and Reference
Use the Free Package panel to delete a specific version of a package, all versions of
a package, or whole collections of packages.
Use the SQ line command (show SQL) on the Packages panel to display the
Extracted SQL panel, as shown in the following figure.
Option L. Collections
The Collections panel displays the collections in the DB2 catalog.
Displaying collections
Select option L on the System Catalog panel to display the Collections panel, as
shown in the following figure.
On the Collections panel, you can issue the SQ line command to show the SQL
statements. This function is shown in “Viewing extracted SQL for a package in a
collection” on page 577.
Line commands:
K - Packages in collection PL - Package lists P - Local plans
A - Authorizations GR - Grant SQ - SQL in packages in collection
Number of
S Collection Packages
* *
---- -----------------> -----------
ADBL 6
ADBL21 11
ADBL31 7
ADBV3 3
ADB21 1
DSNEDCL 1
DSNESPCS 1
DSNESPRR 1
DSNHYCRDRDRDABRAGG 1
DSNREXCS 1
DSNREXRR 1
DSNREXRS 1
DSNREXUR 1
DSNREXX 1
DSNTEP2 1
******************************* END OF DB2 DATA *******************************
The Extracted SQL panel, as shown in the following figure, is displayed when you
issue line command SQ (show SQL) on the Collections panel.
This panel displays the SQL statements in a package shown on the Collections
panel.
Related reference
“The System Catalog panel” on page 546
Option M. DBRMs
Use the DBRMs panel to display the DBRMs in the DB2 catalog.
Select option M on the System Catalog panel to display the DBRMs panel, as
shown in the following figure.
On the DBRMs panel, you can issue the S line command to show the SQL
statements. This function is shown at the end of this subsection.
Line commands:
P - Plans B - Browse DBRM S - SQL statements I - Interpretation
R - Role
S Name Owner PL Name Q C H P Date P Time PDS Name
* * * * * * * * *
- -------- -------> -------- - - - ------ -------- --------------------------->
DSNTIAD DSCGDB21 DSNTIA81 N N B 010524 02410439 DB2.DSN810.DBRMLIB.DATA
DSNTIAD DSCGDB2 DSNTIAD N N B 010524 02410439 DB2.DSN810.DBRMLIB.DATA
DSNHSPMN ISTJE DSNHSP81 N N B 000831 01445504 DB2.DSN810.SDSNDBRM
DSNTIAUL DSCGDB2 DSNTIB81 N N B 010525 03343066 DB2.DSN810.DBRMLIB.DATA
DSNTIAUL DSCGDB2 DSNTIAUL N N B 010525 03343066 DB2.DSN810.DBRMLIB.DATA
E61PLAN DPGROTH DB2E81 N N P 000706 09255886 DPGROTH.EEE.DBRM
E71TABS DPGROTH DB2E81 N N P 010615 15024195 DPGROTH.EEE.DBRM
E71MAIN DPGROTH DB2E81 N N P 010622 12563103 DPGROTH.EEE.DBRM
E61SERV DPGROTH DB2E81 N N P 000706 13303477 DPGROTH.EEE.DBRM
******************************* END OF DB2 DATA *******************************
Use the S line command (show SQL) on the DBRMs panel to display the Extracted
SQL panel, as shown in the following figure.
Use the Extracted SQL panel to display the SQL statements in a DBRM.
Related reference
“The System Catalog panel” on page 546
Option N. Constraints
The Constraints panel displays the constraints on a table in the DB2 catalog.
Select option N on the System Catalog panel to display the Constraints panel, as
shown in the following figure.
Table
Sel Schema Table Name Constraint Name Type
* * * *
---- -------- ------------------ ----------------------------------------> ----
SYSIBM SYSINDEXPART IXCREATOR U
SYSIBM SYSINDEXSTATS OWNER U
SYSIBM SYSJAROBJECTS JARSCHEMA P
SYSIBM SYSLOBSTATS DBNAME P
SYSIBM SYSTABCONST TBCREATOR P
SYSIBM SYSTABLEPART DBNAME U
SYSIBM SYSTABLESPACE DBNAME P
SYSIBM SYSTABSTATS OWNER U
VNDX01 EMP_PHOTO_RESUME EMPNO P
I2MADMIN ICMUT00302001 COMPKEY P
VNDOXL2 DEPT DEPTNO P
I2MADMIN ICMSTITEMSTODELETE ITEMID P
Select option O on the System Catalog panel to display the Stored Procedures
panel, as shown in the following figure.
Tip: The GRANT command operates on each row that is displayed in the
table. If you want to omit some of the rows before you issue the
command, you can use the minus (-) line command to remove rows from
the display. The GRANT command operates only on rows that are listed.
Option P. Plans
The Plans panel displays the application plans in the DB2 catalog.
Select option P on the System Catalog panel to display the Application Plans panel,
as shown in the following figure.
By using the Application Plans panel, you can issue line commands to bind,
rebind, and free an application plan. These functions are shown at the end of this
subsection. You can also issue the SQ line command to show the SQL statements.
Tip: The BIND, REBIND, FREE, and GRANT commands operate on each row that
is displayed in the table. If you want to omit some of the rows before you
Use the B line command (bind plan) on the Application Plans panel to display the
Bind Application Plan panel, as shown in the following figure.
Use the RB line command (rebind plan) on the Application Plans panel to display
the Rebind Application Plan panel, as shown in the following figure.
Use the F line command (free plan) on the Application Plans panel (see Figure 407
on page 583) to display the Free Application Plan panel, as shown in the following
figure.
Use the Free Application Plan panel to delete application plans from DB2.
FREE PLAN
Related reference
“The System Catalog panel” on page 546
Related information
IBM Publications Center
Option Q. Sequences
The Sequence Objects panel displays the sequences in the DB2 catalog.
Select option Q on the System Catalog panel to display the Sequence Objects panel,
as shown in the following figure.
On the Sequence Objects panel, you can issue the GEN primary command to
generate SQL from DB2 catalog for all displayed sequences. You can also issue the
GRANT primary command to change authorizations for all displayed sequences.
Select option S on the System Catalog panel to display the Table Spaces panel, as
shown in the following figure.
If the size of the statements generated by the GRANT, DIS, STA, or STO primary
command exceeds 32K (an ISPF limit), you will be prompted to send the
statements to a batch job or a work statement list (WSL).
If the number of statements generated by the DIS, STA, or STO primary command
exceeds 10, you will be prompted to send the statements to a batch job or a WSL.
| Restriction: The DROP line command does not allow LOB table spaces to be
| dropped. This restriction protects you from a leaving a definition
| incomplete.
Select option T on the System Catalog panel to display the Tables, Views, and
Aliases panel, as shown in the following figure.
On the Tables, Views, and Aliases panel, you can issue many line commands. Enter
a question mark (?) on a row to view all valid line commands. These line
commands include:
v The N line command lists constraints on tables.
v The GEN line command enables you to reverse engineer DB2 objects from this
panel.
v The MIG line command migrates tables and lists of tables.
v The UTL line command generates JCL that can be run against a table.
v The VS line command shows how a view was created (see “Viewing source
statements for views” on page 597).
| v The J (Triggers) line command works on views as well as tables.
| v The XML line command, when it is issued against a table that has XML
| columns, shows the XML tables (see “Viewing XML tables” on page 597).
| v The CLONE line command, when it is issued against a base table with a defined
| clone, displays the clone table (see “Viewing clone tables” on page 599.)
Use the VS line command (show view) against a table on the Tables, Views, and
Aliases panel to display the Create View Source Statements panel.
The Create View Source Statements panel shows how a view was created.
The following figure shows the Create View Source Statements panel
DB2 Admin -------------- DB2X View DDL Source Statements --------------- 01:09
Command ===>
-------------------------View_DDL_Source_Statement_----------------------------
CREATE VIEW "RDBI"."SYNONYM_VIEW" "CREATOR" , "NAME" , "TBCREATOR" ,
"TBNAME") AS SELECT A."CREATOR" , A."NAME" , A."TBCREATOR" , A."TBNAME" FROM
"SYSIBM"."SYSSYNONYMS" A
| The following panel shows the XML column information and the related XML base
| table.
|
| Use the CLONE line command against a table that has a defined clone to display
| the clone table. You issue the CLONE line command on the Tables, Views, and
| Aliases panel.
|
| ADB21T in ---------------DB2X Tables, Views, and Aliases ---- Row 1 to 9 of 9
| Command ===> Scroll ===> CSR
|
| Commands: GRANT MIG
| Line commands:
| C - Columns A - Auth L - List X - Indexes S - Table space D - Database
| V - Views T - Tables P - Plans Y - Synonyms SEL - Select prototyping
| ? - Show all line commands
|
| Sel Name Schema T DB Name TS Name Cols Rows Checks
| * * * * * * * *
| ----- -----------------> -------- - -------- -------- ------ ----------- ------
| clone PJCLNBS3 SMITHAJ T PJMDBCL PJTSCLN3 2 -1 0
| PJCLNBS4 SMITHAJ T PJMDBCL PJTSCLN4 2 -1 0
| PJCLNALIAS SMITHAJ C PJMDBCL PJTSCLN 2 -1 0
| ******************************* END OF DB2 DATA *******************************
|
|
| Figure 422. The Tables, Views, and Aliases panel (ADB21T) – viewing clone tables
|
| Other line commands that support clone tables include:
| BASE Shows the base table for a clone.
| DROP Drop clone tables.
| XCHG
| Exchange data between base and clone tables.
| Note: To see the complete set of line commands for clone tables, enter the "? -
| Show all line commands" line command on the ADB21T panel.
Option V. Views
Use option V to display the Tables, Views, and Aliases panel with a filter showing
only views in the catalog.
Select option V on the System Catalog panel to display the Tables, Views, and
Aliases panel with a filter showing only views in the catalog, as shown in the
following figure.
DB2 Admin ----------- DB2X Tables, Views, and Aliases ----- Row 1 to 11 of 686
Command ===> Scroll ===> PAGE
Figure 423. The Tables, Views, and Aliases panel (ADB21T) – displaying views
Related reference
“The System Catalog panel” on page 546
Option X. Indexes
The Indexes panel displays the indexes in the DB2 catalog.
Select option X on the System Catalog panel to display the Indexes panel, as
shown in the following figure.
If the size of the statements generated by the DIS, STA, or STO primary command
exceeds 32K (an ISPF limit) or the number of statements generated exceeds 10, you
will be prompted to send the statements to a batch job or a work statement list
(WSL).
| XML indexes
| XML indexes use the same DB2 catalog support structure as extended indexes
| (indexes on expressions.)
| v Panel ADB21X supports the extended indexes and columns in SYSINDEXES and
| SYSINDEXPART.
| v The KT line command on panel ADB21X displays the information from
| SYSKEYTARGETS on panel (ADB21Z).
| v Line commands are available to display statistics for catalog tables
| SYSKEYTARGET* and SYSKEYTGT* in the same way as SYSCOL* statistics
| tables.
| v The XC line command on panel ADB21T supports extended indexes.
| The following panels support extended indexes and columns in SYSINDEXES and
| SYSINDEXPART:
|
| ADB21Z in ------------------- DSN9 Key Targets --------------- Row 1 to 2 of 2
| Command ===> Scroll ===> PAGE
|
| Line commands:
| T - Table X - Indexes I - Interpret DI - Distribution stats
| PST - Partition stats RH - Runstats history KX - Key expression
| UR - Update runstats
|
| Index Key
| Sel Index Name Owner Seq O Type Name Derived From Length N
| * * * * * * * *
| --- ------------------ -------- ---- - --------- --------------------> ------ -
| PJMIX2 SMITHJR 1 A VARCHAR LEFT(CHARCOL3) ASC 10 N
| PJMIX3 SMITHJR 1 A VARCHAR RIGHT(CHARCOL,2) || C 21 Y
| ******************************* END OF DB2 DATA *******************************
||
| Figure 425. Key targets panel (ADB21Z)
|
| ADB21ZX - Key Targets for Index
| Lists the key targets that participate in an extended index definition for
| each of the extended indexes of a table. Display ADB21ZX by issuing the
| line command ‘KT – Key Targets” against an index on panel ADB21X.
|
| ADB21ZX -- DSN9 Key Targets for Index SMITHJR.KAVIX2 ------- Row 1 to 2 of 2
| Command ===> Scroll ===> PAGE
|
| Line commands:
| X - Index I - Interpret DI - Distribution stats PST - Partition stats
| RH - Runstats history KX - Key expression UR -Update runstats
|
| Key Col Distinct
| Sel Seq Num O Type Name Length N Derived From Values
| * * * * * * * *
| --- ---- ---- - --------- ------ - -------------------------------- -----------
| 1 0 A CHAR 3 N SUBSTR(CHARCOL,1,3) ASC 3
| ******************************* END OF DB2 DATA *******************************
||
| Figure 426. Key targets for index panel (ADB21ZX)
|
Related concepts
“Using index utilities” on page 365
Related tasks
“Creating an index on a table” on page 159
Related reference
“The System Catalog panel” on page 546
Option Y. Synonyms
The Synonyms panel displays the synonyms in the DB2 catalog.
Select option Y on the System Catalog panel to display the Synonyms panel, as
shown in the following figure.
From the DB2 Admin System Catalog panel, you can display information about the
authorizations that were granted for the following database objects:
v Collections
v Columns
v Databases
v Data types
v Functions
v Packages
v Plans
v Resources
v Schemas
v Sequences
v Storage groups
v Stored procedures
v System privileges
v Tables
v Table spaces
v Views
From the authorization-related panels, you can grant and revoke authorizations for
a particular object or for all the objects that are displayed.
Refer to the online help for detailed descriptions of the primary commands, line
commands and fields.
3. Issue the AU or AE command to display the authorizations that are held by the
grantees that you specified. AU shows the authorizations that the specified
grantees hold directly, and AE shows the authorizations that the specified
grantees were granted explicitly. The User Authorizations panel, as shown in
the following figure, is displayed.
4. Issue the REVOKE primary command to revoke all of the listed system and
user authorities from the listed grantees. The Revoke panel, as shown in the
following figure, is displayed to remind you of the significant impact that
executing the command can have and to have you confirm whether you really
want to execute it.
Select a choice
1. Execute the command
2. Return
5. Select option 1 to execute the REVOKE command. The SQL is generated and
executed if the total size of the generated SQL is less than 32K (approximately
60 REVOKE statements). Otherwise, the Statement Execution Prompt panel is
displayed, and you can choose to create a batch job with the statements or add
the statements to a work statement list (WSL).
To grant all the authorizations that are held by one user to another user:
1. On the DB2 Admin System Catalog panel, type the two-character AO object
option in the Option field and press Enter.
2. Type the two-character UA authorization option in the Option field and specify
the name of the user from whom to copy authorizations in the Grantee field at
the bottom of the panel. Press Enter. The User Authorizations Summary panel,
as shown in the following figure, is displayed.
4. Issue the GRANT primary command. The Grant Privileges panel, as shown in
the following figure, is displayed.
GRANT
TO
With GRANT option ===> YES - retains option for each GRANT statement
NO - removes option for all GRANT statements
5. Specify the users to whom you would like to grant authorizations in the
Grantees field. The SQL is generated and executed if the size of the generated
SQL is less than 32K. Otherwise, the Statement Execution Prompt panel is
displayed, and you can choose to create a batch job with the statements or add
the statements to a work statement list (WSL).
The following topics describe the two types of DB2 Admin commands.
Topics:
v “DB2 Admin primary commands” on page 612
v “DB2 Admin line commands” on page 617
Related concepts
“Using DB2 Admin commands” on page 88
“Line commands” on page 88
“Controlling DB2 Admin processing” on page 527
The primary commands are shown in the following table. Most primary
commands can be entered on all panels. To determine which commands are
available for a particular panel and the correct syntax for those commands, access
the help for that panel.
| Tip: When you enter a DB2 Admin primary command that has the same name as
| a TSO command, the TSO command is executed first. To bypass the TSO
| command processor, enter the primary command with a prefix of the greater
| than symbol (>), which is a TSO escape character.
Table 26. DB2 Admin primary commands
Command Alias Description
| ALL Lists all objects of a specified type for each object
in a list of objects. For example, for a list of
indexes on panel ADB21X, the ALL T command
will display all tables associated with those
indexes.
BIND Generates BIND commands for multiple
application packages or plans. The BIND
commands are created in a work statement list.
This command is valid only when packages or
plans are displayed.
BROWSE B, BR, Browse the current ISPF table.
BRO,
BROW
| CMM Displays the Change Management (CM) panel
| (ADB2C).
| COLUMNS Performs a column lookup when primary, unique,
| or foreign key constraints are being added.
DB2 db2 command Issues a DB2 command. For example: DB2 -DIS
THREAD (*).
Related concepts
“Primary commands” on page 88
Specify line commands in the line command area, called the Select field, in front of
each row.
You also can define your own line commands during installation procedure.
Special line commands that are available for a panel are listed in the line command
description area.
| A question mark (?) line command indicates that there is not enough room to show
| all of the line commands. Enter ? to display a list of all of the line commands
| available for that panel.
| Since the objects listed on a panel have varying attributes, not all of the line
| commands shown on the panel or its extension panel are applicable to each object.
| An attempt to issue a line command in such a case results in an error message.
Utility line commands, those commands that allow you to move directly to DB2
utility panels, are prefixed with "U."
For the System Administration panels, it can also mean insert the
row.
ICS Shows the status of image copies for the object.
| IG Shows the ignores for the object.
IH Inserts an optimizer hint.
| IL Shows the definition (or the ignore lines) for the ignore.
ILOC Inserts a location.
ILUM Inserts LU modes.
IMODE Inserts a mode.
INS Inserts a row into a table or inserts a change, mask, ignore, or
version scope.
IUSER Inserts an authorization ID for a user.
J Shows triggers.
JAR Shows JAVA or JAR detail.
K Shows the packages for the object.
KT Shows key targets.
L Shows the collection for the object.
For the SQL Statements panels, S shows the column in the result.
For the ADBDMT Launchpad panel, S starts the tool on that line.
SA Sorts in ascending order.
| SC Shows the version scopes.
SD Sorts in descending order.
SEL Builds the SQL SELECT statement for this object.
SEQ Identifies column information.
SM Displays space statistics for database.
| SO Shows the objects that are defined in the version scope.
SP Shows the table space's parts.
SQ, SQL Shows the SQL statements.
SR Shows explain statement table rows.
SRC Shows the source code for a stored procedure.
| ST Shows the specific table that is associated with the selected
| column. For changes, shows the statements in the change.
STA Starts the object.
STAFO Forces a start of the object.
STARO Starts the object for a read operation.
STARW Starts the object for a read/write operation.
STASP Starts all spaces for read/write.
STAUT Starts the object so a DB2 utility can access it (no SQL statements
can be issued against the object).
STO Stops the object.
STOQ Stops the stored procedure and queues requests.
STOR Stops the stored procedure and rejects requests.
STOSP Stops all spaces.
| SX Shows all of the indexes on the selected row's table that use the
| column name in a key.
T Shows the tables.
TC Shows the To column.
TERM Terminates the utility.
U Updates the row.
U.x Generates utility job streams by requesting a utility using one of
the codes in the following table.
UPD Updates the row in the ADBDMT Launchpad panel.
UR Updates the information provided by the RUNSTATS utility.
Three general line commands are available: minus (-), equal (=), and slash (/).
Related concepts
“Special line commands” on page 89
“Step 21. Define your own line commands” on page 70
“DB2 Admin restrictions on DB2 object names” on page 139
Related information
Chapter 16, “Running DB2 utilities,” on page 355
Chapter 4, “Using DB2 Admin panels,” on page 83
The following tables show the data type conversions that DB2 Admin supports.
Notes:
1. This conversion checks for truncation and number overflows. Displayed
during the ALC process and before job submission.
2. Indicates conversions from character, variable-length character, and long
variable-length character to date format. Examples of valid load formats
include:
v dd.mm.yyyy
v mm/dd/yyyy
v yyyy-mm-dd
3. Indicates conversions from character, variable-length character, and long
variable-length character to time format. Examples of valid load formats
include:
v hh.mm.ss
v hh:mm AM
v hh:mm PM
v hh:mm:ss
4. Indicates conversions from character, variable-length character, and long
variable-length character to time stamp format. Examples of valid load
formats include:
v yyyy-mm-dd-hh.mm.ss
v yyyy-mm-dd-hh.mm.ss.nnnnnn
| The following table shows further data type conversions that DB2 Admin supports.
| An A or a D indicates that DB2 Admin supports the data type conversion. The
| object action for A is ALTER, and the object action for D is DROP or DROP-SC.
| Table 30. DB2 Admin data type conversions, part 2
| New data type:
| dec dec
| Original data sm long float float var
| type: int int float dec char vchar vchar big int (16) (34) binary binary
| small integer A A A
| integer A A A
| float D A A
2
| decimal A A A
| character A1 A1
| varchar A1 A1
| long varchar A
| big integer D D D A D A
| dec float (16) D D D D D A
| dec float (34) D D D D D D
| binary A A
| var binary A A
|
| Notes:
| 1. The original column must be defined as FOR BIT DATA.
| 2. Due to a potential issue when converting from DECIMAL(19,0) to
| BIGINT using DB2 ALTER statement, the product instead will perform
| a DROP along with data conversion in order to detect the data issue.
| Consult the DB2 Version 9.1 for z/OS SQL Reference ALTER TABLE
| statement for further details.
| Attention:
| 1. If the truncation action chosen on ADB27CT is “Z” or “T”, the action will be
| DROP.
| 2. If the conditions in the Notes column above are not met, the action is a
| DROP-SC.
| 3. Changing NULL to NOT NULL requires a DROP operation.
Related concepts
“Changing tables” on page 252
“How the DB2 Admin Alter ALC function works” on page 272
Related information
IBM Publications Center
These ERP systems typically have a large number of objects, such as 1 000
databases, 10 000 to 30 000 table spaces, and 20 000 to 100 000 tables that have
one or more indexes. Administering such large DB2 systems is a challenge, and
when you use certain DB2 Admin functions, you must take into account the large
number of objects. In addition, the data sets that are allocated for DB2 Admin and
ISPF functions must be large enough to accommodate the large number of objects.
Topics:
v “ISPF work data sets” on page 630
v “Output data sets for GEN DDL” on page 630
v “Other recommendations for a large number of objects” on page 630
The ISPF work data sets are either allocated by the TSO logon procedure or
dynamically allocated based on ISPF customization parameters. When you
generate batch jobs for many objects, you might need to have the allocations
changed for the data sets with these ISPF DD names:
v ISPCTLn (where n=0, 1, 2, ...)
v ISPWRK1
v ISPWRK2
The recommended space allocation for these data sets is SPACE=(CYL,(1,5). This
space allocation allows for generating batch jobs with 115,000 lines of JCL, using
three extents. If you are experiencing space problems (x37 abends), contact your
storage administrator to have the space allocations changed for the above DD
names.
| When you use the DB2 Admin GEN function to generate DDL for objects in the
| DB2 catalog, you can choose to place the DDL in:
| v An existing or new data set
| v An existing or new work statement list (WSL) data set
| When you generate DDL for a large number of objects and specify that a new data
| set be used, either a regular data set or a WSL data set, the default space allocation
| that DB2 Admin uses might not be sufficient.
If you are experiencing x37 abends on the output data set (either regular or WSL)
for the generated DDL, use a preallocated data set instead of a new data set.
Define the DDL output data set with the following attributes:
RECFM=FB
LRECL=80
The generated DDL for all the objects in an ERP system can get very large, for
example, 3 million lines of statements. The GEN DDL output data set for that
number of statements would require 287 cylinders. You can use ISPF option 3.2 to
| preallocate a large data set. A WSL data set must be a partitioned data set.
The following recommendations will help you use DB2 Admin with a large
number of objects:
Topics:
v “Gathering diagnostic information” on page 636
v “DB2 Admin messages and codes” on page 637
If you receive DB2 Admin error messages that do not contain adequate information
regarding the actions you should take, use the following information to diagnose
common problems before contacting the IBM Support Center. The information that
you gather to diagnose the problem is required when you open an incident with
the DB2 Admin Support team.
v For general abends, obtain the following information:
– ABEND code
– Dump title
– Failing module/CSECT name
– A printout of the traceback from a Language Environment® (LE) dump
– Recent maintenance applied
– Recent changes to the system
– Frequency of abend, or prevailing conditions when the abend occurred. For
example, does the abend occur for only a single user ID?
– VTAM message
– MVS ABENDs
– Dumps, as appropriate
v Documentation that is required when contacting the support team:
– DB2 Admin version number, release number, and maintenance level.
– DB2 version number, release number, and maintenance level.
– Is DB2 data sharing used?
– Is a remote DB2 subsystem involved?
– A complete explanation of the problem encountered.
– Complete job output of failing jobs.
– If problems occur using the ONLINE mode, send screen shots of any error
messages and screen shots of all panels leading up to the error.
– Appropriate input parameters for re-creating the problem scenario.
– Complete DDL that fails, if appropriate.
– A screen shot of the DB2 Admin Options panel.
– Any work statement lists, mask data sets, or IGNORE data sets that apply.
Related reference
“DB2 Admin Reverse Engineering condition codes” on page 637
Topics:
v “DB2 Admin Reverse Engineering condition codes”
v “DB2 Admin messages”
| |
| ADB704E Column not allowed. Column | ADB709E Column not allowed. Column
| column_name cannot be specified as a | column_name cannot be provided as a
| column of a partitioning key because it | column in the constraint because it is a
| is a data_type data type. | DECFLOAT, XML or LOB data type, or
| it is a row-change- timestamp column.
| Explanation: DB2 does not allow a column of the
| indicated type to be included as one of the partitioning | Explanation: DB2 does not allow a column of the
| columns for the table. | indicated type to be included in the constraint
| System action: Processing stops. | System action: Processing stops.
| User response: Remove the column from the | User response: Remove the column from the
| specification. | specification.
| |
| ADB705E Operation not allowed. Column | ADB710E Operation not allowed. Column
| column_name cannot be changed to a | column_name cannot be converted from
| LOB column because a check constraint | NULL to NOT NULL.
| exists on this column.
| Explanation: The column cannot be converted from
| Explanation: DB2 does not allow a column of the | NULL to NOT NULL.
| indicated type to be included in a check constraint.
| System action: Processing stops.
| System action: Processing stops.
| User response: Retain the NULL specification.
| User response: Remove the column from the
| specification.
|
| ADB711E Operation not allowed. A hidden
| | column cannot be altered.
| ADB706E Operation not allowed. Column
| column_name cannot be changed to a
| Explanation: A hidden column cannot be altered.
| LOB column because a field procedure | System action: Processing stops.
| exists on this column.
| User response: Retain the column's original
| Explanation: A column with a field procedure cannot | specification.
| be changed to a LOB data type.
|
| System action: Processing stops. | ADB712E Improper length. A LOB column cannot
| User response: Remove the field procedure prior to
| be shortened in length.
| changing the column definition. | Explanation: A LOB column's length cannot be
| | reduced.
| ADB707E Operation not allowed. Column | System action: Processing stops.
| column_name cannot have a default
| value. Only NULL is allowed. | User response: Retain the original column's length.
| System action: This message is issued as a warning | System action: Processing stops.
| and an action prompt panel is displayed. | User response: Specify one operation at a time.
| User response: An ALTER TABLE ... DROP PRIMARY |
| KEY statement is needed to perform this change. Use | ADB735E An upgrade cannot be done. The table
| option 3 to create new referential constraints and any | table_name can only be upgraded from
| required new indexes. | the previous release to the current
| | release. Re-create the table.
| ADB728E Conversion from column_type to | Explanation: An upgrade cannot be done to the
| new_column_type data type, or changing | control table table_name because it is not at the proper
| the length of a column_type data type is | level.
| not allowed.
| System action: None.
| Explanation: Changing the data type to or from the
|
| User response: Drop and re-create the TEMPLATE
| ADB1457e The number of package dependencies
| control table.
| has exceeded the product limit of 32K.
|
| Explanation: A product limit has been reached. The
| ADB737E Incorrect table format. The table
| maximum number of package.dependencies for each
| table_name does not have the expected
| package is 32K.
| column names, data types, or both.
| Check the current definition of the | System action: Processing stops.
| TEMPLATE control table.
| User response: None.
| Explanation: The identified TEMPLATE control table
| cannot be upgraded because the table definition is
|
| incorrect.
| ADB1458e The number of packages has exceeded
| the product limit of 32K.
| System action: None.
| Explanation: A product limit has been reached. The
| User response: Check the table name and the table | maximum number of packages that can be generated is
| owner to see if it is a control table. LISTDEF and | 32K.
| TEMPLATE control tables are DB2 control tables. Thus,
| they could be created during DB2 installation by the
| System action: Processing stops.
| DSNTIJCC member. DB2 Administration Tool could | User response: None.
| also be used to create LISTDEF and TEMPLATE control
| tables. The default name for LISTDEF control tables is |
| DSNACC.UTLIST, and the default name for | ADB1660W The database was skipped because a
| TEMPLATE control tables is DSNACC.UTTEMPLATE. | temporary database is not supported in
| See LISTDEFs and TEMPLATEs in this User Guide for | DB2 V9 or later versions.
| further information. | Explanation: A temporary database is being generated
| | for DB2 V9 function mode, but the DB2 V9 function
| ADB900E Error condition. An unrecognized object | mode does not support temporary databases. The GEN
| type object_type was passed when virtual | function will not generate DDL for the temporary
| changes were applied. | database.
| Explanation: The object type is unrecognized. It is | System action: None. GEN processing continues.
| unlikely that this error will cause a problem. | User response: No action is required.
| System action: Processing continues. |
| User response: Contact IBM support to report the | ADB1661W Table space database table_space was
| message. | skipped because it was implicitly
| created.
|
| ADB1429W Clone table clone_schema clone_name | Explanation: The GEN functon does not generate
| required that base table base_table_schema | information for an implicit table space for XML
| base_table_name exist before the clone can | columns.
| be created. | System action: None. GEN processing continues.
| Explanation: The GEN function created DDL to add a | User response: No action is required.
| clone, but the base table is not part of the DDL.
|
| System action: None. | ADB1662W Table table_creator table_name was
| User response: No action is necessary if you do not | skipped because it is an implicit table
| want the base table included in the DDL. Otherwise, | that was created for XML columns.
| include the base table base_ table_schema base_ table_ | Explanation: GEN does not generate information for
| name and run GEN again. | an implicit table space that was created for XML
| | columns.
| ADB1456e The number of plan dependencies has | System action: None. GEN processing continues.
| exceeded the product limit of 32K.
| User response: No action is required.
| Explanation: A product limit has been reached. The
| maximum number of plan dependencies for each plan ||
| is 32K.
|
| System action: Processing stops.
| User response: None.
| |
| ADB1663W The owner of object_type | ADB1918E An unknown formatter error occurred.
| qualified_object_name is a role. | GEN cannot complete the request.
| Explanation: If the object owner should be a role | Explanation: Since the GEN request contained DDL
| when the object is created, a trusted context must be | changes (such as masking, change owner, change
| established when creating the object. | schema, or Run SQLID), processing stops.
| System action: None. GEN processing continues. | System action: Processing stops.
| User response: Establish a trusted context to create the | User response: Run GEN again with no DDL changes.
| object with a role as the object owner. You can ignore
| this message if you do not want a role as the object
|
| owner.
| ADB1919W Unformatted DDL will be generated for
| the following object because the
| | formatted DDL exceeded 2 MB. Verify
| ADB1915W The original DDL for the following | the DDL.
| object will be generated as it is stored
| in DB2. Verify the DDL.
| Explanation: The output formatter buffer size was
| exceeded. Since the GEN request did not contain any
| Explanation: The internal DDL buffer of the DDL | DDL changes (such as masking, change owner, change
| statement the GEN program attempted to create | schema, or Run SQLID), the unformatted DDL is
| exceeded 2 MB. Since the GEN request did not contain | generated.
| any DDL changes (such as masking, change owner,
| change schema, or Run SQLID) the original DDL that is
| System action: None.
| stored in DB2 is generated. | User response: Verify the DDL is correct.
| System action: None. |
| User response: Verify the DDL is correct. | ADB1920E The formatted DDL has exceeded 2 MB.
| GEN cannot complete the request
| | because DDL changes were specified.
| ADB1916E The DDL for the following object
| cannot be created within the 2 MB limit.
| Explanation: The output formatter buffer size was
| GEN cannot complete the request.
| exceeded. Since the GEN request contained DDL
| changes (such as masking, change owner, change
| Explanation: The DDL statement the GEN program | schema, or Run SQLID), processing stops. GEN cannot
| attempted to create exceeded the output buffer size. | complete the request.
| The GEN program will not attempt to generate the
| original DDL stored in DB2. This is probably because a
| System action: Processing stops.
| request was made to change the DDL (such as | User response: Run GEN again with no DDL changes.
| masking, change owner, change schema, or Run
| SQLID), or the object is a native stored procedure and |
| it has a table parameter. | ADB3000E An error occurred while processing
| object name object_name in statement
| System action: GEN processing stops. | type statement_type. The object already
| User response: Run GEN again, but with no DDL | exists.
| change requests. | Explanation: The syntax of the generated SQL
| | statements is being validated to ensure consistency. The
| ADB1917W Unformatted DDL will be generated for | object name obj_name in statement type statement_type is
| the following object because of an
| not correct in the identified SQL statement.
| unknown formatter error. Verify the | System action: Processing stops.
| DDL.
| User response: If you are validating a work statement
| Explanation: An unknown internal formatter error | list (WSL), correct the SQL statement in the WSL and
| occurred. Since the GEN request did not contain any | revalidate the WSL. If you are using DB2 Object
| DDL changes (such as masking, change owner, change | Comparison Tool to compare objects, correct the SQL
| schema, or Run SQLID), the unformatted DDL is | statement in the DDL source and regenerate the
| generated.. | compare job.
| System action: None.
||
| User response: Verify the DDL is correct.
|
|
|
| ADB3001E An error occurred while processing
| System action: Processing stops.
| object name object_name in statement | User response: If you are validating a work statement
| type statement_type. The object does not | list (WSL), correct the SQL statement in the WSL and
| exist. | revalidate the WSL. If you are using DB2 Object
| Explanation: The syntax of the generated SQL | Comparison Tool to compare objects, correct the SQL
| statements is being validated to check consistency. The | statement in the DDL source and regenerate the
| object name object_name does not exist. | compare job.
|
| statement in the DDL source and regenerate the
| ADB3011E An error occurred while processing
| compare job.
| object name object_name in statement
| | type statement_type. The table space is
| ADB3008E An error occurred while processing | partitioned but a partitioning index has
| object name object_name in statement | not been found.
| type statement_type. The referenced key
| Explanation: The syntax of the generated SQL
| has been dropped.
| statements is being validated to check consistency. The
| Explanation: The syntax of the generated SQL | table space is partitioned but a partitioning index has
| statements is being validated to check consistency. The | not been found.
| referenced key has been dropped.
| System action: Processing stops.
| System action: Processing stops.
| User response: If you are validating a work statement
| User response: If you are validating a work statement | list (WSL), correct the SQL statement in the WSL and
| list (WSL), correct the SQL statement in the WSL and | revalidate the WSL. If you are using DB2 Object
| revalidate the WSL. If you are using DB2 Object | Comparison Tool to compare objects, correct the SQL
| Comparison Tool to compare objects, correct the SQL | statement in the DDL source and regenerate the
| statement in the DDL source and regenerate the | compare job. Ensure that a partitioning index is defined
| compare job. | in the WSL or DDL source.
| |
| ADB3009E An error occurred while processing | ADB3012E An error occurred while processing
| object name object_name in statement | object name object_name in statement
| type statement_type. The number of index | type statement_type. The primary index
| partitions does not match the number of | or index enforcing unique constraint
| table space partitions. | does not have a matching primary or
| unique key.
| Explanation: The syntax of the generated SQL
| statements is being validated to check consistency. The | Explanation: The syntax of the generated SQL
| number of index partitions does not match the number | statements is being validated to check consistency. The
| of table space partitions. | primary index or index enforcing unique constraint
| does not have a matching primary or unique key.
| System action: Processing stops.
| System action: Processing stops.
| User response: f you are validating a work statement
| list (WSL), correct the SQL statement in the WSL and | User response: If you are validating a work statement
| revalidate the WSL. If you are using DB2 Object | list (WSL), correct the SQL statement in the WSL and
| Comparison Tool to compare objects, correct the SQL | revalidate the WSL. If you are using DB2 Object
| statement in the DDL source and regenerate the | Comparison Tool to compare objects, correct the SQL
| compare job. Ensure that the number of index | statement in the DDL source and regenerate the
| partitions specified in the SQL statement is same as the | compare job. Ensure that a primary key or unique key
| number of table space partitions. | that matches the index is defined in the WSL or DDL
| source.
|
| ADB3010E An error occurred while processing |
| object name object_name in statement | ADB3013E An error occurred while processing
| type statement_type. The referenced | object name object_name in statement
| column column_name does not exist in | type statement_type. The primary key or
| the parent table. | unique key does not have a matching
| primary index or index enforcing
| Explanation: The syntax of the generated SQL | unique constraint.
| statements is being validated to check consistency. The
| referenced column column_name does not exist in the | Explanation: The syntax of the generated SQL
| parent table. | statements is being validated to check consistency. The
| primary key or unique key does not have a matching
| System action: Processing stops. | primary index or index enforcing unique constraint.
| User response: If you are validating a work statement | System action: Processing stops.
| list (WSL), correct the SQL statement in the WSL and
| revalidate the WSL. If you are using DB2 Object | User response: If you are validating a work statement
| Comparison Tool to compare objects, correct the SQL | list (WSL), correct the SQL statement in the WSL and
| statement in the DDL source and regenerate the | revalidate the WSL. If you are using DB2 Object
| compare job. The SQL statement should not reference | Comparison Tool to compare objects, correct the SQL
| the identified column. | statement in the DDL source and regenerate the
| compare job. Ensure that a primary index or index
|
| enforcing unique constraint that matches the primary
| ADB3017E When obj_name stmt_typ is processed, a
| or unique key is defined in the WSL or DDL source.
| clone table does not exist.
|
| Explanation: A base table is attempting to drop a
| ADB3014E An error occurred while processing
| clone table, but that base table does not have a clone
| object name object_name in statement
| table.
| type statement_type. Either column
| column_name does not exist in the table | System action: After the Validate Report is generated,
| or the table does not exist. | a return code of 8 is set, and processing stops.
| Explanation: The syntax of the generated SQL | User response: If you are validating a WSL, correct
| statements is being validated to check consistency. | the SQL statement in the work statement list (WSL) and
| Either column column_name does not exist in the table | revalidate the WSL. If you are comparing objects with
| or the table does not exist. If the table is missing, the | DB2 Object Comparison Tool, correct the SQL statement
| first column from the table is reported as missing. | in the DDL source and regenerate the compare job.
| System action: Processing stops. |
| ADB3020W A warning occurred while processing
| User response: If you are validating a work statement
| object name object_name in statement
| list (WSL), correct the SQL statement in the WSL and
| type statement_type. Objects referred to
| revalidate the WSL. If you are using DB2 Object
| in Create/Alter/Comment/Drop/
| Comparison Tool to compare objects, correct the SQL
| Exchange/Label/ Rename might or might
| statement in the DDL source and regenerate the
| not exist during native stored
| compare job. Check the catalog or source to determine
| procedures runtime.
| whether the column does not exist or the table does not
| exist. Then, fix the SQL statement accordingly. | Explanation: The syntax of the generated SQL
| statements is being validated to check consistency.
|
| Objects referred to in Create/Alter/Comment/Drop/
| ADB3015E An error occurred while processing
| Exchange/Label/ Rename might or might not exist
| object name object_name in statement
| during native stored procedures runtime.
| type statement_type. Object name
| object_name in statement type | System action: Processing stops.
| statement_type does not exist; it has been
| renamed.
| User response: If you are validating a work statement
| list (WSL), correct the SQL statement in the WSL and
| Explanation: The syntax of the generated SQL | revalidate the WSL. If you are using DB2 Object
| statements is being validated to check consistency. | Comparison Tool to compare objects, correct the SQL
| Object name object_name in statement type | statement in the DDL source and regenerate the
| statement_type does not exist; it has been renamed. | compare job.
| System action: Processing stops. |
| ADB3201E After masks were applied, DBNAME
| User response: If you are validating a work statement
| obj_name1 results in an implicit or
| list (WSL), correct the SQL statement in the WSL and
| system-reserved database DSN00001.
| revalidate the WSL. If you are using DB2 Object
| Comparison Tool to compare objects, correct the SQL | Explanation: The specified DBNAME mask definition
| statement in the DDL source and regenerate the | results in an implicit or system-reserved database,
| compare job. Determine what the object that is reported | which is not valid because the database is not accepted
| as missing was renamed to, and correct the identified | by DB2.
| SQL statement to use that name.
| System action: A return code of 8 is set and
| | processing stops.
| ADB3016E When obj_name stmt_typ is processed,
| obj_name2 already exists.
| User response: Correct the definition of the DBNAME
| mask, and resubmit the job.
| Explanation: A base table already has a clone table
| and is trying to add another clone without dropping |
| the existing clone. | ADB5000E An invalid value specified for parameter
| insert1.
| System action: After the validate report is generated,
| a return code of 8 is set, and processing stops. | Explanation: An invalid value was specified for the
| parameter.
| User response: If you are validating a work statement
| list (WSL), correct the SQL statement in the WSL and
| System action: Processing stops.
| revalidate the WSL. If you are comparing objects with | User response: Specify a valid value for the
| DB2 Object Comparison Tool, correct the SQL statement | parameter.
| in the DDL source and regenerate the compare job.
|
| ADB5001E The PLAN= parameter was not found.
| User response: None.
| |
| ADB5034E Delete failed for ADBCHKPT control | ADB5056E There is an error in the CHANGEID()
| record for WORKLIST(WorkList ). | input parameter value.
| System action: Processing stops. | System action: Processing stops.
| User response: Resubmit the job to complete | User response: Provide the correct CHANGEID()
| processing. | parameter and value.
| |
| ADB5035E Invalid input parm term character. | ADB5057E The SET QUERYNO statement
| contained syntax errors.
| System action: Processing stops.
| System action: Processing continues.
| User response: Specify a valid term character.
| User response: Specify a valid SET QUERYNO
|
| statement.
| ADB5036E A trailing parenthesis has been omitted
| or no value was provided. |
| ADB5058E The RELEASE statement contained
| System action: Processing stops.
| syntax errors.
| User response: Specify a trailing parenthesis or
| System action: Processing continues.
| provide a value.
| User response: Specify a valid RELEASE statement.
|
| ADB5037E An error in the MAXE input parameter |
| parenthesis occurred. | ADB5063E The ADBCHKPT control record for
| WORKLIST(WorkList ) is missing.
| System action: Processing stops.
| System action: Processing stops.
| User response: Specify a trailing parenthesis or
| provide a value. | User response: Provide the WORKLIST(WorkList)
| parameter and value.
|
| ADB5043E Restart processing was halted due to a |
| command mismatch. | ADB5064E There is an SQL buffer overflow. The
| maximum size is Maxsize.
| Explanation: The command from the last run does not
| match the command from the restarted run. | System action: Processing stops.
| System action: Processing stops. | User response: Specify a larger region size.
| User response: Verify that the statement being |
| restarted has not been changed. | ADB5067E The command Command is not
| supported, or execs are not in
|
| SYSEXEC/SYSPROC.
| ADB5051E An error occurred in the CHANGEID()
| input parameter | System action: Processing stops.
| System action: Processing stops. | User response: Provide a SYSEXEC DD card.
| User response: Provide the correct CHANGEID() |
| parameter and value. | ADB5071E The ADBPART table does not exist.
| | System action: Processing stops.
| ADB5052E The CONNECT statement contained
| syntax errors.
| User response: Check the qualifier of package
| ADBTEP2.
| System action: Processing continues.
|
| User response: Specify a valid CONNECT statement. | ADB5073W Keys do not match for part PartNo .
| | Explanation: Limitkeys do not match between unload
| ADB5054E The SET CONNECTION statement | and load. Processing of data might proceed serially.
| contained syntax errors.
| System action: Processing continues.
| System action: Processing continues.
| User response: None.
| User response: Specify a valid SET CONNECTION
| statement. ||
|
| |
| ADB5080E A restart with a different unload | ADB9002W Comments are not allowed in the input
| method is not allowed. | parameter file.
| Explanation: It is not permitted to change the | Explanation: The input parameter file cannot contain
| UNLOAD method on restart. | comments. The job might not have run correctly.
| System action: Processing continues. | System action: A return code of 4 is set, and
| processing continues. The program continues on to the
| User response: Either resubmit the restart with DB2
| next request after reporting the error.
| (parm UNLOAD(HPU) or start the run from the
| beginning RESTART(NO). | User response: Delete the comments from the input
| parameter file, and resubmit the job.
|
| ADB5081E A restart with a different unload |
| method is not allowed. | ADB9003W Invalid input from the input parameter
| file is ignored.
| Explanation: It is not permitted to change the
| UNLOAD method on restart. | Explanation: The input parameter file contains invalid
| input, which is ignored. The job might not have run
| System action: Processing continues.
| correctly because of the invalid input.
| User response: Either resubmit the restart with DB2
| System action: A return code of 4 is set, and
| (parm UNLOAD(DB2) or start the run from the
| processing continues. The program continues on to the
| beginning RESTART(NO).
| next request after reporting the error.
|
| User response: Correct the invalid parameter, and
| ADB5094E The held DSN commands have been
| resubmit the job.
| queued on SYSIN and will be retried.
|
| System action: Processing continues.
| ADB9004W Processing continues.
| User response: None.
| Explanation: This message is issued in conjunction
| | with message ADB9001, ADB9002, or ADB9003 to
| ADB5100E No restart was requested and no | indicate that processing continues when the program
| checkpoint was found. This was an | encounters these errors.
| abnormal run, and cannot be restarted.
| System action: Processing continues.
| System action: Processing stops..
| User response: None.
| User response: None.
|
| | ADB9005W The following input was skipped:
| ADB5105E The command Command is not | error_text.
| supported or the execs are not in
| Explanation: The job might not have run correctly
| SYSEXEC/SYSPROC.
| because input was skipped. error_text identifies the
| System action: Processing stops.. | input that was skipped.
| User response: Provide a SYSEXEC DD containing the | System action: A return code of 4 is set, and
| product execs. | processing continues.
| | User response: Correct the input, and resubmit the
| ADB9001W A parameter name in the input | job.
| parameter file was not recognized.
|
| Explanation: The input parameter file contains a | ADB9006I The program program_name completed
| parameter name that is not valid. The job might not | abnormally.
| have run correctly because of the incorrect parameter
| Explanation: The accompanying messages indicate
| name.
| why the identified program did not complete normally.
| System action: A return code of 4 is set, and
| System action: None..
| processing continues. The program continues on to the
| next request after reporting the error. | User response: See the accompanying messages in the
| report.
| User response: Correct the invalid parameter, and
| resubmit the job.
||
| |
| |
| ADB9007E A version name was not specified. | ADB9012E The DD statement ddname is missing or
| is incorrect.
| Explanation: The request cannot be processed because
| a version name was not specified. | Explanation: The JCL for the job is missing the
| identified DD statement or the DD statement is
| System action: A return code of 12 is set, and
| incorrect.
| processing stops.
| System action: A return code of 12 is set, and
| User response: Specify a valid version name, and
| processing stops.
| resubmit the request.
| User response: Supply the missing DD statement, and
|
| resubmit the job.
| ADB9008E A version qualifier was not specified.
|
| Explanation: The request cannot be processed because
| ADB9013E The specified scope
| a version qualifier was not specified.
| scope_qualifier.scope_name was not found.
| System action: A return code of 12 is set, and
| Explanation: The request required the use of a version
| processing stops.
| scope and could not be processed because the scope
| User response: Specify a valid version qualifier and | that was specified does not exist.
| resubmit the request.
| System action: A return code of 8 is set, and
| | processing stops.
| ADB9009E Package module_name needs to be bound
| User response: Correct the scope qualifier, scope
| or rebound.
| name, or both to identify a scope that exists, and
| Explanation: An SQL statement has been issued, and | resubmit the request.
| DB2 has returned an SQLCODE of -805, which
|
| indicates that the program needs to be bound or
| ADB9014I The specified version
| rebound on that particular DB2 system.
| version_qualifier.version_name was found
| System action: A return code of 12 is set, and | in the database.
| processing stops.
| Explanation: The request was processed because the
| User response: Bind or rebind the named module, and | specified version exists.
| resubmit the job.
| System action: None.
|
| User response: None.
| ADB9010E A plan access error occurred for program
| program_name because you are not |
| authorized to run the plan. | ADB9015E The specified version
| version_qualifier.version_name was not
| Explanation: The identified program did not run
| found in the database.
| successfully because the program attempted to issue an
| SQL request, and DB2 issued an SQLCODE of -922. | Explanation: The request could not be processed
| because the specified version does not exist.
| System action: A return code of 12 is set, and
| processing stops. | System action: A return code of 8 is set, and
| processing stops.
| User response: Correct the authorization, and
| resubmit the job. | User response: Correct the version qualifier, the
| version name, or both to identify a version that exists,
|
| and resubmit the request.
| ADB9011E An unexpected sqlcode was found in
| error_function. |
| ADB9016W The specified version
| Explanation: This message is issued when the
| version_qualifier.version_name exists but its
| environment in which the program is running is not
| definition is empty or incomplete.
| correct or a possible user error exists.
| Explanation: The request might not have been
| System action: A return code of 12 is set, and
| processed accurately because the version is not defined
| processing stops.
| correctly.
| User response: Obtain a dump, and contact IBM
| System action: A return code of 4 is set, and
| Software Support.
| processing continues.
| | User response: Correct the version qualifier, the
| version name, or both and ensure that the version has | System action: A return code of 12 is set, and
| version records. | processing stops.
| | User response: Edit the input job to specify a valid
| ADB9017I ADBCVEX - Export Version Files | version type, and resubmit the job. Report this internal
| error to IBM Software Support.
| Explanation: This report message identifies the DB2
| Admin program that is being run to export version |
| files. | ADB9023E An invalid action for a version file
| import was specified. The valid values
| System action: None.
| are ADD and REPLACE.
| User response: None.
| Explanation: The input job that DB2 Admin generated
| | contains an invalid value for the action to take when
| ADB9018I ADBCVEX - Version Export Complete | importing a version file. The action for the import must
| be either ADD or REPLACE.
| Explanation: This report message indicates that the
| DB2 Admin program to export version files ran | System action: A return code of 12 is set, and
| successfully. | processing stops.
| System action: None. | User response: Edit the input job to specify a valid
| action, and resubmit the job. Report this internal error
| User response: None. | to IBM Software Support.
| |
| ADB9019I The number of version data records | ADB9024I The scope ID for version scope
| exported is integer. | scope_qualifier.scope_name is scope
| Explanation: After the DB2 Admin program to export | scope_identifier.
| version files completes, this report message is issued to | Explanation: This report message indicates that the
| indicate the number of version file records that were | version scope with the identified scope ID is being
| exported. | processed.
| System action: None. | System action: Processing continues.
| User response: None. | User response: None.
| |
| ADB9020I ADBCVIC or ADBCVIM - Import Version | ADB9025I The version will be replaced.
| Files
| Explanation: A version is being created. A version
| Explanation: This report message identifies the DB2 | with the specified name already exists and will be
| Admin program that is being run to import version | overwritten.
| files.
| System action: Processing continues.
| System action: Processing continues.
| User response: None.
| User response: None.
|
| | ADB9026E The version already exists. It cannot be
| ADB9021I - Version Import Complete. The import | added.
| for version ADBCVIC or ADBCVIM
| completed successfully. | Explanation: DB2 Admin is trying to process a request
| to add a new version. The version cannot be created
| Explanation: This report message indicates that the | because a version with the specified qualifier and name
| DB2 Admin program to import version files ran | already exists.
| successfully.
| System action: A return code of 8 is set, and
| System action: None. | processing stops.
| User response: None. | User response: Report this internal error to IBM
| | Software Support.
| ADB9022E An invalid version type was specified. |
| The valid values are BASE and DELTA. | ADB9027E The input file is empty. No records were
| Explanation: The input job that DB2 Admin generated | found.
| contains an invalid value for the version type. The type | Explanation: DB2 Admin is trying to process a request
| of version must be either BASE or DELTA. | but the input file that describes the action that should
| be taken is empty.
|
| System action: A return code of 12 is set, and
| ADB9302E Change "change_owner.change_name"
| processing stops.
| cannot be recovered because the
| User response: Report this internal error to IBM | following changes must be recovered
| Software Support. | first and either they do not have a
| recover change or they have a recover
| | change that is not in the ANALYZED
| ADB9028I A version file was created from | state. Owner.Name
| DB2_subsystem_id at extract_time by | -------------------------------------------------
| extract_sqlid.
| Explanation: An attempt is being made to recover a
| Explanation: This report message provides | change that cannot be recovered because other changes
| information about the version file that is being | must be recovered first and those changes either do not
| processed. It displays the ID of the DB2 subsystem, the | have a recover change or have a recover change that is
| time the version file was extracted, and the ID of the | not in the ANALYZED state. The accompanying
| user who ran the DB2 Admin program to extract the | messages provide a list of the changes that must be
| version information. | recovered first that either do not have a recover change
| System action: None. | or have a recover change that is not in the ANALYZED
| state.
| User response: None.
| System action: Processing stops.
|
| ADB9029I A version file was extracted from | User response: Create a new change to undo the
| location DB2_location at extract_time by | changes for the specified changes.
| extract_sqlid. |
| Explanation: This report message provides | ADB9032I The number of version data records
| information about the version file that is being | imported is integer.
| processed. It displays the location of the DB2 | Explanation: After the DB2 Admin program to import
| subsystem, the time the version file was extracted, and | version files completes, this report message is issued to
| the ID of the user who ran the DB2 Admin program to | indicate the number of version data records that were
| extract the version information. | exported.
| System action: None. | System action: None.
| User response: None. | User response: None.
| |
| ADB9030E The version file description is not | ADB9033I The SQLCA sqlcode is sqlca.sqlcode.
| available because the input file does not
| have a header record. | Explanation: This message displays the SQLCODE
| that was returned.
| Explanation: DB2 Admin is trying to process a version
| file but cannot because the input file does not have a | System action: None.
| header record.
| User response: None.
| System action: A return code of 12 is set, and
|
| processing stops.
| ADB9034I ADBCVOB - Object Extraction
| User response: Report this internal error to IBM | Complete
| Software Support.
| Explanation: This report message indicates that the
| | DB2 Admin program to extract objects completed
| ADB9031W The input file is empty. No records were | successfully.
| found.
| System action: None.
| Explanation: DB2 Admin is trying to process a request
| User response: None.
| but cannot because the input file is empty.
|
| System action: A return code of 4 is set, and
| ADB9035I he number of objects that were found is
| processing continues.
| integer.
| User response: Report this internal error to IBM
| Explanation: After the DB2 Admin program to extract
| Software Support.
| objects completes, this report message is issued to
| indicate the number of objects that were processed.
|
| System action: None.
|
| User response: None.
| ADB9042I The number of scope objects written is
| | integer.
| ADB9036I ADBCVOB - Extract Version Objects.
| Explanation: After the DB2 Admin program to process
| Explanation: This report message indicates that the | scope objects completes, this report message is issued
| DB2 Admin program that extracts the objects for a | to indicate the number of scope objects that were
| version has started. | processed.
| Explanation: This report message indicates that the | Explanation: A version scope with the identified scope
| DB2 Admin program that extracts version scopes has | identifier is being processed.
| started.
| System action: Processing continues.
| System action: Processing continues.
| User response: None.
| User response: None.
|
| | ADB9044I The version will be added.
| ADB9038I ADBCVSX - Scope Export Complete
| Explanation: The DB2 Admin program that processes
| Explanation: This report message indicates that the | versions will add a version.
| DB2 Admin program that extracts version scopes has
| System action: Processing continues.
| completed successfully.
| User response: None.
| System action: None.
|
| User response: None.
| ADB9045I It should be there.
|
| Explanation: DB2 Admin is attempting to replace an
| ADB9039E A scope name was not specified
| existing version file, but the version file being replaced
| Explanation: The DB2 Admin program to extract a | does not exist.
| version scope could not run because the input to the
| System action: Processing continues.
| program did not include the scope name.
| User response: Verify that having the version file
| System action: A return code of 12 is set, and
| replaced is the action that you want. Ensure that the
| processing stops.
| version qualifier and version name are correct if you
| User response: Report this internal error to IBM | want the version replaced. If you do want to replace an
| Software Support. | existing version file, change the action to ADD instead
| of REPLACE in the input parameters to the DB2
| | Admin program.
| ADB9040E A scope qualifier was not specified.
|
| Explanation: The DB2 Admin program to extract a | ADB9046E The specified version version_identifier
| version scope could not run because the input to the | was not found in the database.
| program did not include the qualifier for the scope.
| Explanation: DB2 is attempting to replace an existing
| System action: A return code of 12 is set, and | version file with a version file that is being imported,
| processing stops. | but the version file being replaced does not exist.
| User response: Report this internal error to IBM | System action: A return code of 12 is set, and
| Software Support. | processing stops.
| | User response: Verify that having the version file
| ADB9041I The scope scope_qualifier.scope_name was | replaced is the action that you want. Ensure that the
| found in the database. Its scope ID is | version qualifier and version name are correct if you
| scope_identifier. | want the version replaced. If you do want to replace an
| Explanation: The scope that was being processed was | existing version file, change the action to ADD instead
| found, and it has the identified scope ID. | of REPLACE in the input parameters to the DB2
| Admin program.
| System action: Processing continues.
| User response: None. ||
|
652 User's Guide and Reference
ADB9047I • ADB9064E
|
| ADB9047I The version ID is version_identifier.
| the scope that was specified for the version.
| User response: Report this internal error to IBM | User response: None.
| Software Support.
|
| | ADB9071I Mask mask_owner.mask_name was inserted
| ADB9065E type_parameter_value is not a valid value | to database.
| for the Type parameter.
| Explanation: The request to add a mask in the Change
| Explanation: The ignore or mask could not be | Management database was successful.
| processed because the input to the DB2 Admin
| program that processes ignores and masks did not
| System action: None.
| contain a valid value for the Type parameter. This is an | User response: None.
| internal error.
|
| System action: A return code of 12 is set, and | ADB9072E Mask mask_owner.mask_name does not
| processing stops. | exist.
| User response: Report this internal error to IBM | Explanation: The request required the use of a mask
| Software Support. | and could not be processed because the specified mask
| | does not exist.
| ADB9067I Ignore ignore_owner.ignore_name was | System action: A return code of 12 is set, and
| inserted to database. | processing stops.
| Explanation: The request to add an ignore in the | User response: Ensure that the correct mask owner,
| Change Management database was successful. | mask name, or both was specified. Or, create an mask
| System action: None.
| with the owner and name that were specified. Then,
| resubmit the request.
| User response: None.
|
| | ADB9073W The definition of mask
| ADB9068E The definition of ignore | mask_owner.mask_name is incomplete (no
| ignore_owner.ignore_name is incomplete | mask lines exist).
| (no ignore lines exist).
| Explanation: The mask cannot be used because its
| Explanation: The ignore cannot be used because its | definition is empty.
| definition is empty.
| System action: A return code of 4 is set, processing
| System action: A return code of 12 is set, and | continues, and no system action taken.
| processing stops.
| User response: If you do not intend to use the empty
| User response: Complete the definition of the ignore | mask, complete the definition of the mask by editing
| by editing the ignore and specifying ignore fields, and | the mask and specifying mask lines. Then, resubmit the
| resubmit the request. | request.
| |
| ADB9069E Ignore ignore_owner.ignore_name does not | ADB9074IE Mask mask_owner.mask_name was
| exist. | retrieved from the database.
| Explanation: The request required the use of an ignore | Explanation: The request was processed because the
| and could not be processed because the specified | required mask exists.
| ignore does not exist.
| System action: None.
| System action: A return code of 12 is set, and
| processing stops.
| User response: None.
|
| ADB9076E The DD statement for dd_name is
| User response: See message ADB9110.
| missing. |
| Explanation: The JCL for the job is missing the | ADB9300E Change change_owner.change_name cannot
| identified DD statement. | be recovered until the following
| changes are recovered in the order that
| System action: A return code of 12 is set, and | they are specified. The list contains
| processing stops. | those changes that completed after the
| change to recover completed and have
| User response: Supply the missing DD statement, and
| not been recovered. They modify the
| resubmit the job.
| same or related objects as those in the
| | change to recover and, hence, the
| ADB9110I The status of the following changes will | recover change itself. Rcvr Order
| be set to DEFINED: | Owner.Name -----
| -------------------------------------------
| Explanation: When a recover change is being run, any
| pending changes to the objects within the recover | Explanation: An attempt is being made to recover a
| change are set to DEFINED status. The original change | change that cannot be recovered because other changes
| of the recover change is also set to DEFINED status. | must be recovered first. The accompanying messages
| The original change supersedes any pending changes | provide a list of the changes that must be recovered
| for the objects within the original change. The pending | first.
| changes that were superseded are set to DEFINED
| System action: Processing stops.
| status. This message introduces the list of the changes
| that are set to DEFINED status. Message ADB9113 is | User response: Recover the list of changes in the order
| issued after this message to list each change that is set | that is specified.
| to DEFINED status.
|
| System action: Processing continues. | ADB9304E This change cannot be recovered
| because it does not have a recover
| User response: Review the list of changes that is
| change or its recover change is not in
| displayed after this message to understand which
| the ANALYZED state.
| changes are set to DEFINED status when the change is
| recovered. | Explanation: An attempt is being made to recover a
| change that cannot be recovered because it does not
|
| have a recover change or its recover change is not in
| ADB9111I Owner.Name
| ANALYZED status.
| Explanation: Messages ADB9110, ADB9111, ADB9112,
| System action: Processing stops.
| and ADB9113 are issued in conjunction with each other.
| This message provides a heading to identify the owner | User response: Ensure that each change currently
| and the name of the changes that are listed by message | being recovered that is, the change is in RUNNING
| ADB9113. | status) completes. Otherwise, create a new change to
| undo the changes made by this change.
| System action: Processing continues.
|
| User response: See message ADB9110.
| ADB9305I The following pending changes will be
| | set to DEFINED status. These changes
| ADB9112I ----–------------------------------------------- | modify the same or related objects as
| those in the change to recover and,
| Explanation: Messages ADB9110, ADB9111, ADB9112, | hence, the recover change itself.
| and ADB9113 are issued in conjunction with each other. | Owner.Name
| This message provides a heading for message ADB9113. | –-----------------------------------------------
| System action: Processing continues. | Explanation: A change is being recovered, and there
| User response: See message ADB9110. | are pending changes for the objects that are affected by
| the change to recover. The pending changes will be set
| | to DEFINED status. The accompanying messages
| ADB9113I change_owner.change_name | provide a list the changes that will be set to DEFINED
| Explanation: Messages ADB9110, ADB9111, ADB9112, | status.
| and ADB9113 are issued in conjunction with each other. | System action: Processing continues.
| This message lists the owner and name of each change
| that is set to DEFINED status when you recover the | User response: None.
| change.
||
| System action: Processing continues.
|
Chapter 29. Troubleshooting 655
ADB9306I • ADBC102E
| |
| ADB9306I This change can be recovered. No other | ADB9352E The specified change change_ID does not
| changes that modify the same or related | exist.
| objects completed after the change
| completed, and there are no pending
| Explanation: A request was made to update the
| changes that modify the same or related
| change status for a change ID that does not exist.
| objects. | System action: No system action is taken.
| Explanation: A change is being recovered, and this | User response: Try generating a new run job or
| informational message indicates that there are no other | re-analyze the change.
| changes that need to be recovered first and that there
| are no pending changes for the affected objects. |
| ADB9353E SQL error SQL_error_code occurred while
| System action: Processing continues. | the Change Management database was
| User response: None. | being accessed.
| User response: Create a new change to undo the | System action: Processing ends.
| changes made by this change. | User response: Refresh the panel to retrieve the
| | current list of changes.
| ADB9308E The JCL file for the recover change does |
| not exist. An error occurred while a | ADBC101E You do not have the privilege to delete
| temporary JCL file for the recover WSL | the owner.name change according to the
| was being created. | definition of the delete change view
| Explanation: An attempt was made to recover a | (ADBCHGV1).
| change, and the JCL file for the recover job that is | Explanation: The delete change view (ADBCHGV1)
| required to recover the change does not exist. | has been defined in a way that prevents you from
| System action: Processing stops. | deleting the change.
| User response: Create a new change to undo the | System action: Processing ends.
| changes made by this change. | User response: Check with the system administrator
| | who installed DB2 Admin and enabled Change
| ADB9351E An error occurred when the change | Management.
| status was updated. Neither the old or |
| new change status values match the | ADBC102E The owner.name change cannot be
| current change status: | deleted because the change does not
| current_change_status. | satisfy the delete criteria.
| Explanation: The request to update the change status | Explanation: The change cannot be deleted because
| was invalid. | the change does not meet the criteria for being
| System action: Processing stops. | dropped. To be dropped, a change must meet one of
| the following criteria:
| User response: If you submitted a run job, ensure that | v The status of the change is CANCELED
| you analyze the change before running it. If you | v The status of the change is FAILED and the type is
| submitted an analyze job, ensure that the change is in | FAST
| DEFINED or ANALYZED status before submitting the | v The type of the change is COMPARE
| analyze job.
| System action: Processing ends.
| | User response: Put the change into a status such that
| the criteria to delete a change is met, and then try the
| DEL line command to delete the change again.
|
| ADBC103E You do not have the privilege to run the
| character 'G', for example, 8G. If a REXX user exit is
| delete change command.
| specified for DSSIZE, ensure that the REXX user exit is
| coded so that it returns an integer value followed with
| Explanation: You have not been given the privilege to | character 'G'. After the corrections are made, resubmit
| delete changes. This error usually means that an | the job.
| SQLCODE -922 was received while an attempt was
| made to run the ADBCDCH plan.
|
| ADBM027E The overwrite value for
| System action: Processing ends. | space_allocation_quantity_attribute must be
| a numeric value.
| User response: Check with the system administrator
| who sets up the DB2 Admin plans and packages to | Explanation: The use of masking was specified, and
| request access to the ADBCDCH plan. | the value that is specified for
| space_allocation_quantity_attribute (PRIQTY, TSPRIQTY,
|
| IXPRIQTY) is not valid.
| ADBC104E The delete change command is not
| enabled. | System action: A return code of 1012 is set, and
| processing stops.
| Explanation: DB2 Admin has not been configured to
| enable the delete change command. This error usually | User response: Correct the definition of the mask. If a
| means that an SQLCODE -805 was received while an | specific value is specified for
| attempt was made to run the ADBCDCH package. | space_allocation_quantity_attribute, ensure that the value
| is an integer value. If a REXX user exit is specified for
| System action: Processing ends.
| space_allocation_quantity_attribute, ensure that the REXX
| User response: Check with the system administrator | user exit is coded so that it returns an integer value.
| who sets up the DB2 Admin plans and packages to | After the corrections are made, resubmit the job.
| request the appropriate set up of the ADBCDCH
|
| package and plan.
| ADBM028E The overwrite value for
| | space_allocation_quantity_attribute must be
| ADBM024E The overwrite value that is specified for | a numeric value.
| the SEGSIZE must be an integer that is
| Explanation: The use of masking was specified, and
| a multiple of 4.
| the value that is specified for
| Explanation: The mask contains a value for SEGSIZE | space_allocation_quantity_attribute (SECQTY, TSSECQTY,
| that is not valid. | or IXSECQTY)) is not valid.
| System action: A return code of 1012 is set, and | System action: A return code of 1012 is set, and
| processing stops. | processing stops.
| | User response: Correct the definition of the mask. If a
| ADBM025E The overwrite value that is specified for | specific value is specified for
| COMPRESS must be YES or NO. | space_allocation_quantity_attribute, ensure that the value
| is an integer value. If a REXX user exit is specified for
| Explanation: The mask contains a value for | space_allocation_quantity_attribute, ensure that the REXX
| COMPRESS that is not valid. | user exit is coded so that it returns an integer value.
| System action: A return code of 1012 is set, and | After the corrections are made, resubmit the job.
| processing stops. |
| User response: Change the mask definition to specify | ADBM029E The overwrite value for DEFER must be
| a value for SEGSIZE that is a multiple of 4, and then | YES or NO.
| resubmit the job. | Explanation: The use of masking was specified, and
| | the value that is specified for DEFER is not valid.
| ADBM026E The overwrite value for DSSIZE must | System action: A return code of 1012 is set, and
| be a numeric value that is followed by | processing stops.
| the character 'G'.
| User response: Correct the definition of the mask. If a
| Explanation: The use of masking was specified, and | specific value is specified for DEFER, ensure that the
| the value that is specified for DSSIZE is not valid. | value is YES or NO. If a REXX user exit is specified for
| System action: A return code of 1012 is set, and | DEFER, ensure that the REXX user exit is coded so that
| processing stops. | it returns the value YES or NO. After the corrections
| are made, resubmit the job.
| User response: Correct the definition of the mask. If a
| specific value is specified for DSSIZE, ensure that the ||
| value is an integer value that is followed by the
|
Chapter 29. Troubleshooting 657
ADBM030E
|
| User response: Correct the definition of the mask. If a
| ADBM030E The overwrite value for define_attribute
| specific value is specified for define_attribute, ensure
| must be YES or NO.
| that the value is YES or NO. If a REXX user exit is
| Explanation: The use of masking was specified, and | specified for define_attribute, ensure that the REXX user
| the value that is specified for define_attribute (DEFINE, | exit is coded so that it returns the value YES or NO.
| TSDEFINE, or IXDEFINE) is not valid. | After the corrections are made, resubmit the job.
| System action: A return code of 1012 is set, and
| processing stops.
|
IBM may not offer the products, services, or features discussed in this document in
other countries. Consult your local IBM representative for information on the
products and services currently available in your area. Any reference to an IBM
product, program, or service is not intended to state or imply that only that IBM
product, program or service may be used. Any functionally equivalent product,
program or service that does not infringe any IBM intellectual property right may
be used instead. However, it is the user’s responsibility to evaluate and verify the
operation of any non-IBM product, program or service.
IBM may have patents or pending patent applications covering subject matter
described in this document. The furnishing of this document does not give you
any license to these patents. You can send license inquiries, in writing, to:
IBM Director of Licensing
IBM Corporation
North Castle Drive
Armonk, NY 10504-1785
U.S.A.
For license inquiries regarding double-byte (DBCS) information, contact the IBM
Intellectual Property Department in your country or send inquiries, in writing, to:
Intellectual Property Licensing
Legal and Intellectual Property Law
IBM Japan, Ltd.
1623-14, Shimotsuruma, Yamato-shi Kanagawa 242-8502
Japan
The following paragraph does not apply to the United Kingdom or any other
country where such provisions are inconsistent with local law:
INTERNATIONAL BUSINESS MACHINES CORPORATION PROVIDES THIS
PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND EITHER EXPRESS
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS
FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer of express or
implied warranties in certain transactions, therefore, this statement may not apply
to you.
IBM may use or distribute any of the information you supply in any way it
believes appropriate without incurring any obligation to you.
Licensees of this program who wish to have information about it for the purpose
of enabling: (i) the exchange of information between independently created
The licensed program described in this information and all licensed material
available for it are provided by IBM under terms of the IBM Customer Agreement,
IBM International Program License Agreement, or any equivalent agreement
between us.
This information contains examples of data and reports used in daily business
operations. To illustrate them as completely as possible, the examples include the
names of individuals, companies, brands, and products. All of these names are
fictitious and any similarity to the names and addresses used by an actual business
enterprise is entirely coincidental.
COPYRIGHT LICENSE:
Trademarks
IBM, the IBM logo, and ibm.com are trademarks or registered trademarks of
International Business Machines Corporation in the United States, other countries,
or both. These and other IBM trademarked terms are marked on their first
occurrence in this information with the appropriate symbol (® or ™), indicating US
registered or common law trademarks owned by IBM at the time this information
was published. Such trademarks may also be registered or common law
trademarks in other countries. A complete and current list of IBM trademarks is
available on the Web at http://www.ibm.com/legal/copytrade.shtml.
Java™ and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in
the United States, other countries, or both.
Microsoft, Windows, Windows NT, and the Windows logo are trademarks of
Microsoft Corporation in the Unites States, other countries, or both.
Other company, product, and service names may be trademarks or service marks
of others.
Notices 661
662 User's Guide and Reference
Bibliography
This section lists the documentation that supports DB2 Admin Tool. Use the appropriate library for the
version of DB2 that you are using.
Tip: To quickly locate a specific book, use the IBM Publications Center, which is located at
www.elink.ibmlink.ibm.com/public/applications/publications/cgibin/pbi.cgi. After you enter your
country information, click the Search for publications link, and enter the publication number (xxxx-xxxx)
of the book that you want.
DB2 Version 9.1 for z/OS product information
v DB2 Version 9.1 for z/OS Administration Guide, SC18-9840
v DB2 Version 9.1 for z/OS Application Programming and SQL Guide, SC18-9841
v DB2 Version 9.1 for z/OS Application Programming Guide and Reference for Java, SC18-9842
v DB2 Version 9.1 for z/OS Codes, GC18-9843
v DB2 Version 9.1 for z/OS Command Reference, SC18-9844
v DB2 Version 9.1 for z/OS Data Sharing: Planning and Administration, SC18-9845
v DB2 Version 9.1 for z/OS Diagnosis Guide and Reference, LY37-3218
v DB2 Version 9.1 for z/OS Diagnostic Quick Reference Card, LY37-3219
v DB2 Version 9.1 for z/OS Installation Guide, GC18-9846
v DB2 Version 9.1 for z/OS Introduction to DB2, SC18-9847
v DB2 Version 9.1 for z/OS Licensed Program Specifications, GC18-9848
v DB2 Version 9.1 for z/OS Messages, GC18-9849
v DB2 Version 9.1 for z/OS ODBC Guide and Reference, SC18-9850
v DB2 Version 9.1 Performance Monitoring and Tuning Guide, SC18-9851
v DB2 Version 9.1 for z/OS Program Directory, GI10-8737
v DB2 Version 9.1 for z/OS RACF Access Control Module Guide, SC18-9852
v DB2 Version 9.1 for z/OS Reference for Remote DRDA Requesters and Servers, SC18-9853
v DB2 Version 9.1 for z/OS Reference Summary, SX26-3854
v DB2 Version 9.1 for z/OS SQL Reference, SC18-9854
v DB2 Version 9.1 for z/OS Utility Guide and Reference, SC18-9855
v DB2 Version 9.1 for z/OS What's New?, GC18-9856
v DB2 Version 9.1 for z/OS XML Extender for z/OS Administration and Programming, SC18-9857
v DB2 Version 9.1 for z/OS XML Guide, SC18-9858
DB2 Universal Database for z/OS, Version 8 product information
v DB2 Administration Guide, SC18-7413
v DB2 Application Programming and SQL Guide, SC18-7415
v DB2 Application Programming Guide and Reference for Java, SC18-7414
v DB2 Command Reference, SC18-7416
v DB2 Data Sharing: Planning and Administration, SC18-7417
v DB2 Diagnosis Guide and Reference, LY37-3201
v DB2 Diagnostic Quick Reference Card, LY37-3202
v DB2 Installation Guide, GC18-7418
v DB2 Licensed Program Specifications, GC18-7420
v DB2 Messages and Codes, GC18-7422
v DB2 ODBC Guide and Reference, SC18-7423
v DB2 Reference Summary, SX26-3853
v DB2 Release Planning Guide, SC18-7425
v DB2 SQL Reference, SC18-7426
v DB2 Utility Guide and Reference, SC18-7427
v DB2 What's New?, GC18-7428
v DB2 XML Extender for z/OS Administration and Programming, SC18-7431
v Program Directory for IBM DB2 Universal Database for z/OS, GI10-8566
Index 667
batch reports change management (continued)
creating 136 main menu panel 452
generating 136 making a change to a database 455
overview 135 masks 477
Batch Restart program modifying changes 470
See also ADBTEP2 339 moving changes from one system to another 456, 472
See also ADBTEPA 339 overview 446
batch statement lists 309, 340 pending changes 447
Bind Application Plan panel 585 prerequisites 453
Bind Batch Jobs panel 534 process 447
Bind Package panel 571 promoting changes 456, 472
BIND, DB2 34 recovering changes 468
BINDERROR parameter 340 regenerating versions containing LOBs 493
BLOB (binary large object) 85, 291 registering changes 448, 457
browse panels 85 run-time WSL 450
Buffer Pool Hit Ratios panel 401 running changes 450, 465
buffer pools runtime analyze 465
altering 399 scenarios 454
displaying 399 setting the level of use 453
hit ratios 401 status of changes 450
Build SQL SELECT Prototype panel 147 strategy 454
terminology 446
types of changes 450
C version scopes 494
versions 489
CAN line command 382
Change Management
Cancel Distributed Threads panel 410
database 33, 34
catalog
enabling to use 33, 34
creating additional indexes 69
Change Management (CM) panel 452
displaying 7
Change Management ID table 453
multiple copies 7, 68, 133, 533
Change Parameters panel 122
panels 101
Change Statements panel 470
previously defined 537
Changed Objects panel 500
querying 131
changes
retrieving interpretive information from 115
analyzing 449, 462
selecting copy of 134
auditing 498
system catalog panels 545
Change Management process 447
catalog copy version table
Change Management scenarios 454
ADBCATVT table, creating catalog copy version 68
Change Management strategy 454
maintaining 534
defining for change management 447
catalog copy versions
deleting 471
bind jobs 534
displaying 499
create copy 534
enabling Change Management 33, 34
delete 534
importing SQL statements into 473
insert 534
making through Change Management 457
catalog records
managing 445
containing default masks 512
modifying 470
catalog statistics
moving changes from one system to another 456, 472
migrating 291
pending 447
reverse engineering 171
recovering 468
CDB (communications database) panel 405
registering 448, 457
Change Current SQL ID panel 129
running 450, 465
Change DB2 Admin Defaults panel (ADB2P2) 162
status of 450
Change DB2 System Checkpoint Frequency panel 405
types of 450
Change defaults panel 123
virtual 447
change management
Changes panel 499
analyze WSL 462
characters
analyzing changes 449, 462
mixed-case support 93, 123
auditing changes 498
CHECKBEGIN
base version method 449
supplying as input to ADBTEP2 335
choosing a base version method 465
CHECKEND
comprehensive solutions 6
supplying as input to ADBTEP2 335
defining changes 447
checkpoint table, creating 31
deleting changes 471
CLIST, ADB
displaying changed objects 500
TSO LOGON PROC, linking DB2 Admin to 42
displaying changes 499
CLIST, ADBL 42
ignores 482
CLIST, ADBL, preparing 36
importing changes from a data set 473
Index 669
DB2 Admin (continued) diagnostic information
parameters (continued) gathering 636
prompt options 127 Display Active Locations panel 412
processing logic 528 Display Archive Log Parameters panel 402
product highlights 4 Display Batch Checkpoint Table panel 392
Rename database function 240 Display Batch Job Checkpoint Table panel 345
running multiple versions 31, 35, 67 Display Buffer Pool Hit Ratios panel 401
Smart Alter function 269 Display Buffer Pools panel 399
status of 96 Display Catalog Copy Versions panel 534
tailoring summary 29 Display Function Statistics panel 428
uses of 12 Display Group panel 391
DB2 Admin Main Menu panel 73 Display Log Information panel 404
DB2 Admin Menu panel 97 Display or Alter Functions panel 425
DB2 Admin restrictions on DB2 object names 139 Display or Cancel Distributed Threads panel 410
DB2 Admin Sample Update Application panel 526 Display or Manage Traces panel 384
DB2 authorizations, granting 108 Display or Terminate Utilities panel 383
DB2 BIND 34 Display or Update CDB panel 405
DB2 data type conversions 627 Display or Update IPNAMES panel 408
DB2 High Performance Unload (HPU) Display or Update LOCATIONS panel 406
reading the DB2 catalog 334 Display or Update LULIST panel 410
DB2 Object Comparison Tool 29, 323 Display or Update LUMODES panel 408
DB2 object names restrictions 139 Display or Update LUNAMES panel 407
DB2 objects Display or Update MODESELECT panel 409
changing 239 Display or Update Resource Limit (RLIMIT) Tables Owner
creating reports 136 panel 386
generating reports 136 Display or Update Resource Limit (RLIMIT) Tables panel 386
large number of 629 Display or Update USERNAMES panel 409
migrating 11, 291 display panels 86
reports 134 Display Stored Procedure Statistics panel 423
reverse engineering 171, 503, 630 Display Threads panel 382
DB2 Performance Queries panels 187 Display Utilities panel 383
DB2 subsystem Display Views on SYSIBM.SYSROUTINES panel 424, 430
administering 379 Display/Alter Stored Procedures panel 414
Archive Log panel 398 Display/Update Resource Limits panel 386
backing up 431 distributed data facility
choosing active system to use 42 See DDF 413
data sharing groups 391 Distributed DB2 Systems panel 539
recovery 431, 433 distributed systems, running DB2 Admin across 539
stopping 390 distributed threads, displaying or canceling 410
system parameters 394 DLEVEL variable 531
System Parameters panel 396 DMT parameter of ADBL CLIST 79
DB2 Subsystem Customization Parameters panel 44 documentation
DB2 system catalog accessing 15
See catalog 68 documentation changes 17
DB2 System Catalog panel 132, 546 Drop Impact Reports, using 162
DB2 Table Spaces with Locking Size=S panel 195 Drop Objects panel 152
DB2 tools, invoking 12, 14, 77 DSN line command 591
DB2 utilities DSN1COMP offline utility 369
running 355 DSN1COPY offline utility 369
DB2 utility templates, upgrading 75 DSN1PRNT offline utility 369
DB2, upgrading to a new release of 75 DSNTIAD program 34
DB2ACMD variable 527 DSNWZP, optimizing 70
DB2AUTH variable 531 dynamic SQL statements 8
DB2SYS variable 531
DBCLOB (double-byte character large object) 85, 291
DBRM 577
DDF (distributed data facility)
E
Edit Alter Job panel 262
starting 413
Edit Generated JCL panel
stopping 413
for a table 365
DDL command 172
for a table space 358
DDLBNDxx job 534
for an index 367
ddnames, associating with templates 234
Edit LISTDEF Clause panel 224
declared temporary tables 32
Edit LISTDEF panel 221
defaults, changing DB2 Admin parameters 123
Edit Template panel 228
delete LISTDEF clause panel 221
enabling-new-function mode 4
DELETE prototyping 147
end-of-data marker 84
demo panels 101
environment variables 44
Index 671
J LookAt xvi
lowercase character support 93, 123
JCL for COPY utility, editing 358 LULIST panel 410
LUMODES panel 408
LUNAMES panel 407
L
Label Objects panel 152
labels 160 M
Launchpad main menu panel 42, 61, 62, 97
launching tools 82 Manage Batch Checkpoint Table panel 392
running 77 Manage Functions panels 425
tailoring 66 Manage Ignores panel 485
Launchpad Entry panel 80 Manage Masks panel 477
Launchpad table Manage Stored Procedures panels 414
adding tools to 80 Manage Traces panel 384
creating 78 Manage Versions panel 489, 494
deleting tools from 82 Manage Work Statement Lists panel 310
displaying 78 mask lines 479
modifying 79 masks 503
updating tools in 81 creating 479
Launchpad Table panel 78 deleting 482
legal notices displaying 478
trademarks 660 editing 481, 504, 505
libraries, copying fixed to variable block 36 examples 519
LIKE ON/OFF command 132 hierarchy 479, 507
line command area 84 managing with Change Management 477
line command description area 84 specifying 504
line command table syntax 507
DB2 line command table, contents of 70 valid names 507
line commands Masks Lines panel 479
equal (=) 89 Masks panel 478
general 89 materialized query tables 157, 594
installation defined 70 MAXE parameter 340
list of 617 MAXROWS variable 531
minus (-) 89 menu panels 527
slash (/) 89 message retrieval tool
special 89 LookAt xvi
using 88 messages
LISTDEF methods for accessing xvi
adding 219 MIG
adding a clause to 221 line command 293
changing a single clause 224 primary command 295
changing the clauses of 221 migrate
control tables for 217 placing primary commands on 293
deleting 226 migrate batch jobs, running 298
deleting a clause from 221 Migrate function
managing 217 Batch Restart program 339
running utilities 368 overview 11, 291
upgrading control tables for 218 restrictions 291
LISTDEF panels 215 specifying input 293
LISTDEFs panel 219 using 293
LO option 362 work data sets 300
load jobs, migrating 299 migrate options, changing 129
load summary report 321 Migrate panels, displaying the 293
LOAD utility job stream, creating your own 362 migrate parameters
LOBs generating batch jobs with 295
running WSLs 329 Migrate Parameters panel 295
utility options 362 minus (-) line command 89
LOCATIONS panel 406 MIXED parameter 340
log mixed-case character support 93, 123
archive current 404 MODESELECT panel 409
display parameters 402 Move STOGROUP-defined Page Set Input panel 439
set parameters 403, 404 Move VCAT-defined Page Set Input panel 439
logic, DB2 Admin 528 multilevel security 253
Look Up function multiple copies of system catalog
examples of 91 panel appearance 133
using 91 using 7, 68, 533
Index 673
prompt options, changing 127 RI (referential integrity) 278
prototyping 147 RLIMIT
PUNCHDDN substitution variables 233 displaying 386
updating 386
rows
Q setting maximum length to fetch 123
setting message when none are returned 123
queries
table display panels 84
performance and space utilization 187
updating using SQL 530
running 102
Run a Change panel 465
system catalog 131
Run or Explain SQL Statements panel 144
question mark (?), in Look Up function 91
run-time WSL 450
running DB2 Admin across distributed systems 539
running performance queries 187
R running work statement lists 309
RDEF command RUNSTATS information
indexes 280, 282 creating views for updating 69
table spaces 245, 247 RUNSTATS utility
real-time statistics panel 209, 211 performance panels 189, 190
rebind and reverse engineering output 186 runtime analyze 465
Rebind Application Plan panel 587
Rebind Package panel 573
recover change 468
recover changes 450
S
SADBSAMP library jobs 34, 44, 47
Recover Strategy panel 468
sample
recovery of changes 468
application 526
recovery, subsystem 431
application structure 530
referential integrity (RI) 278
library jobs 44, 47
Register Change panel 460
SAVE ON/OFF command 132
Register Options panel 457, 459, 460
saving search criteria 132
REL primary command 260
schemas 565
related table objects 276
Schemas panel 565
REN line command
screen readers and magnifiers 16
indexes 281
scrollable fields 95
Rename Database panel 241
search arguments 84, 93
REPAIR LEVELID statement 356
search criteria, saving 132
Report Changes panel 498
secondary space allocation
report drop impacts 123
estimating 441
report revoke impacts 123
security 4
reports
security label columns 253
creating 136
SELECT access, granting 69
generating 136
Select Copy of DB2 Catalog panel 134
overview 135
SELECT prototyping 147
requirements
selection menu, tailoring 60
hardware 29
Sequence Objects panel 590
software 29
sequences 590
Resize Page Sets input panel 438
Set Archive Log Parameters panel 403
Resource Limit Tables Owner panel 386
Show Work Statement List panel 314
resource limit, displaying or updating 386
Skip-Next line command 345
RESTART parameter 340
slash (/) line command 89
restarting jobs 339
Smart Alter 269
restarting Migrate jobs 291
software requirements 29
restarting work statement lists 309
SORT primary command, issuing a 103
reverse engineering
source code
example 172
for panel ADB2DB2X 62
large number of objects 630
panel names in source code 87
objects 172
source members
overview 10
ADB2S 526
panels 171
ADB2S1 526
performance improvements 171
ADB2SU 526
sample output 115, 182
sample application 526
sample rebind output 186
SP line command 369, 591
sample Rebind output 115
space information collection utilities 202, 204
stored procedure ADB2RE 69
space management 435
wildcard characters 179
estimating for indexes 441
Revoke Privileges On Objects panel 167
estimating for tables 441
revoking system authority from an SQLID 168
using Space Manager 436
Index 675
Table Spaces panel 591 tools, invoking 12, 14, 77
Table Spaces With More Than n Percent Dropped Space traces, displaying or managing 384
panel 194 trademarks 660
Table Spaces With More Than n Percent Relocated Rows translation masks 503
panel 192 applying 505
Table Spaces Without RUNSTATS Information panel 189 creating 479
Table Spaces Without SPACE Information panel 202 deleting 482
Table Utilities panel 362 displaying 478
tables editing 481, 504, 505
adding a partition 252, 255 examples 519
adding a partitioning key 252, 255 explained 505
adding a primary key 255 hierarchy 479, 507
AL line command 253 managing with Change Management 477
ALC command 257 specifying 504
ALC line command 253 syntax 507
altering 253, 254 valid names 507
altering a partition 255 triggers 566
altering definitions 11 Triggers panel 566
backing out changes 270 trusted contexts
changing 252 adding an attribute 548
changing multiple 278 adding an ID 548
changing partition boundaries 252 altering 548
clustered 252 creating 548
comments 161 displaying 548
copying 13 line commands 548
creating 156 panel 548
DB2 Admin Alter ALC function 272 TSODELETE
DB2 Admin Smart Alter 269 supplying as input to ADBTEP2 335
Drop Impact Reports 162 TST1CR
dropping 161 creates objects on target system 299
estimating space requirements 441 TST2RLn
labels 160 reloads data; multiple jobs can be created 299
large number of 629 TST3Ck
migrating 291 performs CHECK DATA (optional) 299
recovering 270 TST4RS
redefining 253, 257 runs Runstats (optional) 299
related objects 276 TST51C
restoring changes 270 performs an Image copy (optional) 299
rotating partitions 252, 255 TST6RB
security label columns 253 Rebinds (optional) 299
VOLATILE/NOT VOLATILE clause 252 TST7DE
Tables, Views, and Aliases panel deletes data sets on target system 299
displaying 594 tutorial, navigating 101
tailoring main menu 60 types of panels 527
tailoring summary, DB2 Admin 29
target system
transferring the jobs/work statement and data to 299
target system jobs
U
Unrecognized Macro Parameters panel 398
submitting in order 299
Update CDB panel 405
technotes 15
Update IPNAMES panel 408
TEMP database 32
Update LOCATIONS panel 406
TEMPLATE
Update LULIST panel 410
creating and maintaining 226
Update LUMODES panel 408
supplying as input to ADBTEP2 335
Update LUNAMES panel 407
upgrading control tables for 227
Update MODESELECT panel 409
Template Common Options panel 228
UPDATE prototyping 147
template data set, constructing 231
Update Resource Limit (RLIMIT) Tables Owner panel 386
Template Disk Options panel 228
Update USERNAMES panel 409
TEMPLATE panels 215
upgrading control tables, LISTDEF 218
Template Tape Options panel 228
upgrading control tables, TEMPLATE 227
template, associating with ddname 234
User-defined (U) base version method 449
TEMPLATEs Panel 226
user-defined data types 560
Terminate Utilities panel 383
USERNAMES panel 409
terminology, change management 446
uses of DB2 Admin 12
threads
using alternate forms of syntax 10
cancelling 382
using Space Manager 435
displaying 382, 412
UT line command 356
Index 677
678 User's Guide and Reference
Printed in USA
SC18-9552-14