IBM Books

Administration Guide


ADSTAR Distributed Storage Manager

When calling the BACKUP and RESTORE commands, you can specify that you want to use the ADSTAR Distributed Storage Manager (ADSM) product to manage the database or table space backup. You can use ADSM Client Version 3.1.x.3 and later with DB2. The following topics provide additional information:

Setting up an ADSTAR Distributed Storage Manager Client for UNIX-Based Platforms

Before the database manager can use the ADSM option, the following set-up activities must be performed:

  1. On SunOS and Solaris environments, perform the following steps. (For other UNIX-based platforms, begin at step 2.)
    1. Ensure that the required level of operating system is installed: SunOS 5.5.1 or Solaris 2.5.1.
    2. Install the ADSM Client Version 3.1.x.3 or later. Ensure that you remove all previous ADSM packages before installing this version of the client.
    3. Verify that ADSM is installed in the directories /opt/IBMDSMap5, /opt/IBMDSMba5, and /opt/IBMDSMsa5.
    4. Create the following symbolic links in the directory /usr/lib, if they do not already exist:
         libApiDS.so -> libApiDS.so.1
         libApiDS.so.1 -> /opt/IBMDSMap5/api/libApiDS.so.2
      
  2. Create or modify the ADSM user configuration options file /usr/sbin/dsm.opt, and the ADSM system configuration options file /usr/sbin/dsm.sys to suit your environment.
  3. On SunOS and Solaris environments, perform the following steps. (For other UNIX-based platforms, continue at step 4.)

    1. Copy /usr/sbin/dsm.opt and /usr/sbin/dsm.sys to the directory /opt/IBMDSMap5.

    2. Copy /opt/IBMDSMap5/solaris/dsmaptica to the directory /opt/IBMDSMap5.
  4. Set the environment variables used by ADSM:

    DSMI_DIR
    identifies the user-defined directory path where the API trusted agent file (dsmapicta or dsmtca) are located.
    Note:For the SunOS and Solaris environments, this should be set to /opt/IBMDSMap5.

    DSMI_CONFIG
    identifies the user-defined directory path to the dsm.opt file, which contains the ADSM user options.
    Note:For the SunOS and Solaris environments, this should be set to /opt/IBMDSMap5/dsm.opt.

    DSMI_LOG
    identifies the user-defined directory path where the error log (dsierror.log) will be created.
  5. Establish the ADSM password.

    For an ADSM client to be able to interface with an ADSM server, it must have a password for the server. The executable file dsmapipw is installed in the INSTHOME/sqllib/adsm directory of the instance owner. This executable allows you to establish and reset the ADSM password.

    To execute the dsmapipw command, you must be logged in as the "root" user. When this command is executed, you will be prompted for the following information:

    Note:The user executing the BACKUP or RESTORE commands does not need to know this password. The only times you need to run this command are to establish a password for the initial connection and if the password has been reset on the ADSM server.
  6. If the database manager is running, you should:

Setting up an ADSTAR Distributed Storage Manager Client for Other Platforms

Before the database manager can use the ADSM option, the following set-up activities must be performed:

  1. Set the environment variables used by ADSM:

    DSMI_DIR
    identifies the user-defined directory path where the API trusted agent file (dsmapicta or dsmtca) are located.

    DSMI_CONFIG
    identifies the user-defined directory path to the dsm.opt file, which contains the ADSM user options.

    DSMI_LOG
    identifies the user-defined directory path where the error log (dsierror.log) will be created.
  2. If applicable to your operating system, create (or modify) the ADSM system configuration options file (dsm.sys).
  3. Create (or modify) the dsm.opt ADSM user configuration options file. The environment variable DSMI_CONFIG points to this file.
  4. Establish the ADSM password.

    For an ADSM client to be able to interface with an ADSM server, it must have a password for the server. The executable file dsmapipw is installed in the \sqllib\adsm directory of the instance owner. This executable allows you to establish and reset the ADSM password.

    To execute the dsmapipw command, you must be logged in as the local administrator. When this command is executed, you will be prompted for the following information:

    Note:The user executing the BACKUP or RESTORE commands does not need to know this password. The only times you need to run this command are to establish a password for the initial connection and if the password has been reset on the ADSM server.
  5. If the database manager is running, you should:

Considerations for Using ADSTAR Distributed Storage Manager

To use specific features within ADSM, you may be required to give the fully-qualified path name of the object using the feature. (Remember that on OS/2 and Windows NT platforms the \ will be used instead of /.) The fully-qualified path name of:

where <database> is the database alias name, and NODEnnnn is the node number.
Note:The names shown in upper case must be entered as shown.

The current ADSM client on the Windows operating system and OS/2 is non-reentrant, and so multiple sessions cannot be created with the backup, restore, or load utilities from a single machine.

In a single node configuration, if a user attempts to issue a backup command such as:

   db2 backup db sample use adsm open 3 sessions

DB2 will detect that multiple sessions are not supported by ADSM, and will return SQL2032N. The equivalent scenario also applies to load copies using ADSM.

However, in a multiple logical node (MLN) configuration on Windows NT, DB2 may not be able to detect the use of multiple sessions on a single machine if each logical node attempts to create only one session. If multiple logical nodes are being backed up, restored, or loaded in parallel using ADSM, DB2 will allow the operation to proceed if each node attempts to use a single session, even though the logical nodes actually reside on the same physical hardware. This can lead to failed backup attempts, and hung load processes, and should not be attempted.

Managing Backups and Log Archives on ADSM

The db2adutl utility allows you to query, extract, and delete backups, logs, and load copy images saved using ADSM. The utility is installed in the INSTHOME/sqllib/misc directory on UNIX platforms and in the \sqllib\misc directory on Intel platforms.

All of the options available through the db2adutl utility are shown:

Figure 44. Syntax for db2adutl

SQLD0ADU


Where:

QUERY
Queries the ADSM server for DB2 objects.

EXTRACT
Copies DB2 objects from the ADSM server to the local machine and directory.

DELETE
Either deactivates backup objects or deletes log archives on the ADSM server.

VERIFY
Performs consistency checking on the backup copy that is on the server. (Note that this parameter causes the entire backup image to be transferred over the network.)

TABLESPACE
Includes only table space backup images.

FULL
Includes only full database backup images.

LOADCOPY
Includes only load copy images.

LOGS
Includes only log archive images.

BETWEEN sn1 AND sn2
Specifies to use the logs between log sequence number 1 and log sequence number 2.

SHOW INACTIVE
Includes backup objects that have been deactivated.

TAKEN AT timestamp
Specifies a backup image by its timestamp.

KEEP n
Deactivates all objects of the specified type except for the most recent n by timestamp.

OLDER THAN timestamp or n_days
Specifies that objects with a timestamp earlier than timestamp or n days will be deactivated.

DATABASE database_name
Specifies to work with objects associated with database_name only.

NODE node_number
Specifies to work with objects created by node node_number only.

PASSWORD password
Specifies the ADSM client password for this node (if required). If a specific database is specified and the password is not provided, the value specified for the adsm_password database configuration parameter is passed to ADSM; otherwise, no password is used.

NODENAME node_name
Specifies to work with images associated with a specific ADSM node name only.

WITHOUT PROMPTING
You are not prompted for verification before objects are deleted.

You can choose which database you wish to work with when you use each command through the use of the DATABASE parameter. For the EXTRACT and DELETE commands, you can request not to see the prompts to confirm your choices through use of the WITHOUT PROMPTING parameter.

The QUERY command of this utility allows you to list backups. logs, and load copy images. The backups can be full database, table spaces, or both. When using this command, the default is to list both types of backups, any load copy images, and any logs. You can select a range of logs to be listed instead of seeing all of the logs. You can also request to see the inactive backups.

The EXTRACT command of this utility allows you to copy from ADSM to your current directory backups, logs, or both at the ADSM server. The backups can be full database, table spaces, or both. When using this command, the default without qualifiers is to list the active backups and each log. You can then select which backups and/or logs to extract. You can also select a range of logs to be listed instead of seeing all of the logs. You can also request to see the inactive backups. A specific backup for extraction can be selected by using the TAKEN AT <timestamp> parameter.

The DELETE command of this utility allows you to delete logs or deactivate backups from ADSM. When using this command, the default without qualifiers is to list the active backups and each log. You can then select which backups and/or logs to delete/deactivate. You can qualify the command with KEEP n to keep the most recent n backups. You can also qualify the command with OLDER [THAN] <timestamp> or n DAYS. This will delete backups older than the given date (timestamp) or older than the days specified. You can also select a range of logs to be listed instead of seeing all of the logs. A specific backup for deletion can be selected by using the TAKEN AT <timestamp> parameter.

For DB2, we recommend that the ADSM default policy be used. With the changes to the backup naming conventions, each backup is now unique. In order to delete old backups, the policy must be set up so that no active copies are kept.

For examples of using this utility, see Examples of Using db2adutl.

Examples of Using db2adutl 

db2 backup database rawsampl use adsm
Backup successful. The timestamp for this backup is : 19970929130942

db2adutl query
 
Query for database RAWSAMPL
 
Retrieving full database backup information.
   full database backup image: 1, Time: 19970929130942, 
                                  Oldest log: S0000053.LOG, Sessions used: 1
   full database backup image: 2, Time: 19970929142241, 
                                  Oldest log: S0000054.LOG, Sessions used: 1
 
Retrieving table space backup information.
   table space backup image: 1, Time: 19970929094003, 
                                  Oldest log: S0000051.LOG, Sessions used: 1
   table space backup image: 2, Time: 19970929093043, 
                                  Oldest log: S0000050.LOG, Sessions used: 1
   table space backup image: 3, Time: 19970929105905, 
                                  Oldest log: S0000052.LOG, Sessions used: 1
 
Retrieving log archive information.
   Log file: S0000050.LOG
   Log file: S0000051.LOG
   Log file: S0000052.LOG
   Log file: S0000053.LOG
   Log file: S0000054.LOG
   Log file: S0000055.LOG

db2adutl delete full taken at 19950929130942 db rawsampl
 
Query for database RAWSAMPL
 
Retrieving full database backup information.  Please wait.
 
   full database backup image: RAWSAMPL.0.db26000.0.19970929130942.001
 
   Do you want to deactivate this backup image (Y/N)? y
 
     Are you sure (Y/N)? y

db2adutl query
 
Query for database RAWSAMPL
 
Retrieving full database backup information.
   full database backup image: 2, Time: 19950929142241, 
                            Oldest log: S0000054.LOG, Sessions used: 1
 
Retrieving table space backup information.
   table space backup image: 1, Time: 19950929094003, 
                            Oldest log: S0000051.LOG, Sessions used: 1
   table space backup image: 2, Time: 19950929093043, 
                            Oldest log: S0000050.LOG, Sessions used: 1
   table space backup image: 3, Time: 19950929105905, 
                            Oldest log: S0000052.LOG, Sessions used: 1
 
Retrieving log archive information.
   Log file: S0000050.LOG
   Log file: S0000051.LOG
   Log file: S0000052.LOG
   Log file: S0000053.LOG
   Log file: S0000054.LOG
   Log file: S0000055.LOG


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]