SHRLEVEL


The SHRLEVEL option specifies the level of access to the target table space or index space to allow concurrently operating Db2 applications and utilities. You can specify no access, read-only access, or read-write access. If you do not specify this option,

Some content is unavailable due to permissions.

allows read-only access to the target table space during the copy process.

Related topic

SHRLEVEL syntax diagram

GUID-9D181EC0-BE3E-4E38-B495-35833E96C367-low.png

If more than one copy job is running concurrently on the same space, all copies must have the same value for the SHRLEVEL option.

For more information, see Using-the-SHRLEVEL-option. Also, Db2-commands-issued-by-BMC-AMI-Copy-for-read-and-write-databases describes space status changes made by

Some content is unavailable due to permissions.

for various scenarios that use the SHRLEVEL option.

Important

Use SHRLEVEL CHANGE to back up the BMC table spaces that contain the BMCSYNC, BMCUTIL, HISTORY (BMCHIST), and BMCXCOPY tables.

SHRLEVEL REFERENCE

SHRLEVEL REFERENCE is the default and allows read-only access by other programs to the target space during the copy process. Db2 applications and utilities can read the space, but they cannot update it.

Important

If you specify RESETMOD NO with SHRLEVEL REFERENCE in a data sharing system, you need to have

Some content is unavailable due to permissions.

agents started.

SHRLEVEL NONE

Use SHRLEVEL NONE to tell

Some content is unavailable due to permissions.

to stop all access by Db2 applications and utilities to the space during the copy process.

Warning

Do not specify SHRLEVEL NONE when creating copies of any of the Db2 catalog and directory table spaces or indexes.

When you specify SHRLEVEL NONE,

Some content is unavailable due to permissions.

can make copies of spaces in REORP status. 

SHRLEVEL CHANGE

Use SHRLEVEL CHANGE to tell

Some content is unavailable due to permissions.

to maintain the initial status of the space. When you specify SHRLEVEL CHANGE, you might also want to specify QUIESCE AFTER to establish a good recovery point.

When you specify SHRLEVEL CHANGE,

Some content is unavailable due to permissions.

can make copies of spaces in REORP status.

Normally, you would specify the RESETMOD NO option or set the RESETMOD installation option to NO for a TABLESPACE specification when you specify SHRLEVEL CHANGE. If you specify RESETMOD YES with SHRLEVEL CHANGE, 

Some content is unavailable due to permissions.

passes the COPY command to the IBM Db2 COPY utility for processing if the SLCHGRESET option is NO. If SLCHGRESET is YES,

Some content is unavailable due to permissions.

will make the copy and reset the modification indicators natively. SLCHGRESET YES requires XBM. For more information about the RESETMOD installation option, see Resetting-modified-page-indicators-RESETMOD.

SHRLEVEL CHANGE is not allowed for a table space that is defined as NOT LOGGED.

Important: For additional job requirements, see Copy-registration-in-a-data-sharing-environment-for-SHRLEVEL-CHANGE.

Important

Some content is unavailable due to permissions.

uses a data sharing agent to communicate information about the Db2 subsystems on a particular MVS system for the SHRLEVEL CHANGE copy jobs. There must be one agent per MVS with an active Db2 data sharing member.

SHRLEVEL CHANGE CONSISTENT

The SHRLEVEL CHANGE CONSISTENT YES option provides an efficient way to make consistent copies of Db2 table spaces and indexes without having to quiesce or cause any other outage to the spaces being copied.

Important

SHRLEVEL CHANGE CONSISTENT YES provides the same functionality as Online Consistent Copy, but consistent copies might be created with the standard

Some content is unavailable due to permissions.

JCL. For an overview of Online Consistent Copy, see the Recovery Management for Db2 documentation.

To enable CONSISTENT YES, copy the SYSIN of your Online Consistent Copy JCL into an

Some content is unavailable due to permissions.

job. Then alter the SHRLEVEL statement to read SHRLEVEL CHANGE CONSISTENT YES. You might have multiple COPY commands in the SYSIN that use the CONSISTENT YES keywords. It is permitted that some of the COPY commands might not use CONSISTENT YES.

The OUTPUT descriptor must designate an Instant Snapshot.

Value

Description

YES

If you specify YES,

Some content is unavailable due to permissions.

makes a consistent copy.

You might include a WORKID with SHRLEVEL CHANGE CONSISTENT YES. BMC AMI Log Master uses the WORKID as a unique identifier for a unit of work. Use a WORKID if you plan to run the BMC AMI Log Master LOGSCAN statement to capture the changes after the consistent copy is made.

NO

If you specify NO,

Some content is unavailable due to permissions.

does not make a consistent copy. CONSISTENT NO is the default.

SHRLEVEL ANY

Use SHRLEVEL ANY to tell

Some content is unavailable due to permissions.

to attempt to use SHRLEVEL CHANGE unless it encounters conditions that require more restrictive access. When a more restrictive access than SHRLEVEL CHANGE is required,

Some content is unavailable due to permissions.

uses SHRLEVEL REFERENCE.

Important

A SHRLEVEL ANY specification converts to SHRLEVEL REFERENCE or SHRLEVEL CHANGE when you create copies of the following Db2 catalog and directory table spaces:

  • DSNDB06.SYSCOPY
  • DSNDB01.SYSUTILX
  • DSNDB01.DBD01
  • DSNDB01.SYSDBDXA

See Copying-the-Db2-catalog-and-directory.

SHRLEVEL CONCURRENT

Use SHRLEVEL CONCURRENT to utilize the

Some content is unavailable due to permissions.

Snapshot Feature. SHRLEVEL CONCURRENT allows

Some content is unavailable due to permissions.

to make consistent copies of the specified spaces while updates are in progress. SHRLEVEL CONCURRENT copies that are complete without error are registered as SHRLEVEL REFERENCE.

Important

To use the Snapshot feature in a non-data-sharing environment you must have BMC SNAPSHOT UPGRADE FEATURE (SUF) or EXTENDED BUFFER MANAGER (XBM) installed and the appropriate Snapshot management set and configuration created and activated. To use the Snapshot feature in a data sharing environment, you must have SUF or XBM installed. For more information, see the SNAPSHOT UPGRADE FEATURE for DB2 documentation.

For the description of an OPTIONS command keyword that you might want to specify when making Snapshot Copies, see XBMRSTRT.

When you specify SHRLEVEL CONCURRENT, you can also specify:

  • What action

    Some content is unavailable due to permissions.

    should take in the event a consistent point cannot be obtained or maintained during the copy process

    Use the keyword REQUIRED or PREFERRED following SHRLEVEL CONCURRENT to indicate the action required. Note that if you specify ON ERROR ... SKIP with SHRLEVEL CONCURRENT PREFERRED or with SHRLEVEL CONCURRENT REQUIRED and a skippable error occurs, skip processing takes precedence.

  • An XBM subsystem ID to be used by

    Some content is unavailable due to permissions.

    when you want to override the setting of the XBMID installation option

    Use the XBMID keyword after REQUIRED or PREFERRED to specify a new XBM subsystem ID.

    Important

    The following restrictions apply to SHRLEVEL CONCURRENT:

    • You must specify RESETMOD NO or set the RESETMOD installation option to NO for a TABLESPACE specification when you specify SHRLEVEL CONCURRENT.
    • You cannot use SHRLEVEL CONCURRENT to make copies of special case spaces. See Copying-special-case-catalog-and-directory-table-spaces.
    • You cannot run the IBM utilities LOAD or REORG simultaneously with a SHRLEVEL CONCURRENT copy.

SHRLEVEL CONCURRENT REQUIRED

Specify REQUIRED to tell

Some content is unavailable due to permissions.

to terminate the copy with an RC=12 if a consistent point cannot be obtained or maintained. One of the reasons an RC=12 is returned is if the initialization of the SNAPSHOT UPGRADE FEATURE or XBM fails.

Option

Description

INIT

The INIT option allows you to continue

Some content is unavailable due to permissions.

processing or to halt it after completing XBM registration of SHRLEVEL CONCURRENT REQUIRED copies.

Important

Some content is unavailable due to permissions.

assumes GROUP YES even if it is not specified when you use the INIT keyword.

Values of INIT 

Value

Description

INIT CONTINUE

INIT CONTINUE is the default value and causes

Some content is unavailable due to permissions.

to continue processing without halting.

INIT PAUSE

INIT PAUSE applies to one SHRLEVEL CONCURRENT REQUIRED group. Only one occurrence of INIT PAUSE can appear in an

Some content is unavailable due to permissions.

step. Other

Some content is unavailable due to permissions.

statements can appear before and after the statement in which you specify INIT PAUSE.

INIT PAUSE causes

Some content is unavailable due to permissions.

to end after completing XBM registration of SHRLEVEL CONCURRENT REQUIRED copies. The job halts after all INIT processing for a group of table spaces completes. At that time, all of the affected table spaces are under the control of XBM. INIT PAUSE has the following limitations:

  • Specifying INIT PAUSE forces XBMRSTRT YES.
  • Specifying INIT PAUSE forces grouping.

You must restart

Some content is unavailable due to permissions.

with NEW/RESTART or RESTART after the interruption in processing caused by INIT PAUSE. For more information, see Restart parameter (restartParm).

Important

The ending of the job or job step can be used by a job scheduler to resume update activity that was interrupted to quiesce and initialize for XBM processing. The job scheduler can be set up to immediately resubmit the

Some content is unavailable due to permissions.

job to restart and complete the interrupted job.

SHRLEVEL CONCURRENT PREFERRED

PREFERRED is the default value and tells

Some content is unavailable due to permissions.

to continue the copy as a SHRLEVEL CHANGE copy if:

  • A consistent point cannot be obtained or maintained, or
  • Initialization of the SNAPSHOT UPGRADE FEATURE or XBM fails.

Also, consider the following information when you use this option:

  • If you specify SHRLEVEL CONCURRENT PREFERRED and DSSNAP YES and the Instant Snapshot fails, the copy fails and does not continue as a SHRLEVEL CHANGE copy. (Also note that the specification of SHRLEVEL CONCURRENT PREFERRED and DSSNAP YES prevents the use of multitasking.)

    However, when you specify DSSNAP AUTO with SHRLEVEL CONCURRENT PREFERRED, if the Instant Snapshot fails,

    Some content is unavailable due to permissions.

    attempts a Snapshot Copy (SHRLEVEL CONCURRENT). Then, if the Snapshot Copy fails,

    Some content is unavailable due to permissions.

    continues the copy as a SHRLEVEL CHANGE copy. For more information, see Making-Instant-Snapshot-copies.

  • If CHECKTSLEVEL 2 is specified with SHRLEVEL CONCURRENT PREFERRED and a consistent point cannot be obtained or maintained, the level of checking falls back to CHECKTSLEVEL 1.

If the

Some content is unavailable due to permissions.

connection to XBM fails before or during the copy, SHRLEVEL CONCURRENT PREFERRED usage causes

Some content is unavailable due to permissions.

to continue processing as if SHRLEVEL CHANGE QUIESCE BEFORE were specified. But if it finds no updates after the quiesce,

Some content is unavailable due to permissions.

will register a SHRLEVEL REFERENCE copy.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*