Administrator's Reference

DSMSERV UNLOADDB (Unload the Database)

Use this command to recover the contents of the database when the server is offline. This command unloads the database in key order so when the database is reloaded the space required for the database is minimized. A database audit could be required after the database is reloaded.

After DSMSERV UNLOADDB processing is complete, perform the following steps:

  1. Issue the DSMSERV FORMAT command to reinitialize the database and recovery log.

  2. Issue the DSMSERV LOADDB command to reload the database.

  3. Issue the DSMSERV AUDITDB command to locate and correct any database inconsistencies.

You must have a device configuration file that includes the definition for this device class. You must also specify the name of that device configuration file by using the DEVCONFIG option in your server options file. The device configuration file should be available if you had previously included a DEVCONFIG option in the server options file and then started the server. If the device configuration file has been lost or was never created, create the device configuration file manually with an editor. For information on how to create a device configuration file manually, see Administrator's Guide.

Consider the following before unloading the database:

Syntax

>>-DSMSERV UNLOADDB----+-DEVclass--=--device_class_name--+------>
                       '-dump_name-----------------------'
 
>-----+----------------------------------------+---------------->
      |                    .-,------------.    |
      |                    V              |    |
      '-VOLumenames--=------volnameslist--+----'
 
      .-Scratch--=--Yes-----.   .-CONSISTENT--=--Yes-----.
>-----+---------------------+---+------------------------+-----><
      '-Scratch--=--+-Yes-+-'   '-CONSISTENT--=--+-Yes-+-'
                    '-No--'                      '-No--'
 

Parameters

DEVclass
Specifies the device class to which the database information will be written. Specify either this parameter or dump_name.

dump_name
Specifies the name of the storage location for the unloaded database. Specify either this parameter or the DEVCLASS parameter. Use the following format:

DD:ddname
Specifies the output file where the database is to be stored. A ddname is the 1-6 character data definition name created by the JCL DD statement.

VOLumenames
Specifies the volumes to use to unload the database. This parameter is optional, but must be specified if SCRATCH=NO. If you do not specify this parameter and SCRATCH=YES is specified or assumed, scratch volumes are used.

TSM does not record the use of volumes by the DSMSERV UNLOADDB command in the volume history file. Therefore, you must record the volume names used and specify them in the exact same order on a future DSMSERV LOADDB command.

Possible values are:

volnameslist
The names of one or more volumes to use to unload the database. Specify multiple volumes by separating volume names with commas and no intervening spaces. You must list the volumes in the order in which you want the volumes to be used.

Scratch
Specifies whether or not scratch volumes can be used for unloading the database. You cannot specify this parameter and the dump_name parameter. The default value is YES.

Yes
Scratch volumes can be used. If you include a list of volumes on the VOLUMENAMES parameter, scratch volumes are used only if there is not enough space to unload the database on the volumes specified. If the device type associated with the specified device class is FILE, file names for the scratch volumes are generated based on a time stamp.

No
Scratch volumes cannot be used. You must include a list of volumes on the VOLUMENAMES parameter to contain all of the database data.

Consistent
Specifies whether server transaction processing should be suspended so that the unloaded database is a transactionally-consistent image. The default is YES.

Yes
Specifies that a database audit will not be required when you reload the database; because during unloading, you preserved a trasactionally-consistent database.

No
Specifies that when reloading the database, a database audit will be required because during unloading a transactionally-consistent database image was not maintained. CONSISTENT=NO should only be used when the CONSISTENT=YES fails.

Examples

Task 1

Unload the database to a tape named DB0001.

  1. Halt the server, if it is not already offline. This command can only be used when the server is offline.

  2. Ensure that the DEVCONFIG option has been specified in the server options file. The device configuration file must contain the device class definition needed for the unload operation.

  3. Issue DSMSERV UNLOADDB.

    Sample JCL:

    //DUMPDB  JOB  ,REGION=128M,TIME=1440,CLASS=A,MSGCLASS=H
    //ADSMDB  EXEC PGM=ANRSERV,PARM='/UNLOADDB DEV=CART VOL=DB0001',
    //            DYNAMNBR=300,
    //            TIME=NOLIMIT
    //STEPLIB  DD DSN=EDC.V2R1M0.SEDCLINK,DISP=SHR
    //         DD DSN=SYS1.LINKLIB,DISP=SHR
    //         DD DSN=PLI.SIBMLINK,DISP=SHR
    //         DD DSN=ADSM.LINKLIB,DISP=SHR
    //OPT      DD DSN=ADSM.OPTIONS,DISP=SHR,FREE=CLOSE
    //DSMAMENG DD DSN=ADSM.ANRMSG(ANRMENU),DISP=SHR
    //HLPAMENG DD DSN=ADSM.ANRHLP(ANRHENU),DISP=SHR
    //DSK      DD DSN=ADSM.DISKLOG,DISP=SHR
    

Task 2

Unload the database to a file in the device class named FLAT, which has a device type of FILE.

  1. Halt the server, if it is not already offline. This command can only be used when the server is offline.

  2. Ensure that the DEVCONFIG option has been specified in the server options file. The device configuration file must contain the device class definition needed for the unload operation.

  3. Issue DSMSERV UNLOADDB.

    Sample JCL:

    //ADSMSRV0 JOB ,
    //          REGION=128M,TIME=1440,CLASS=A,MSGCLASS=H
    //ADSMSRV0 EXEC PGM=ANRSERV,DYNAMNBR=300,TIME=NOLIMIT,
    //  PARM='/UNLOADDB DEVCLASS=FLAT'
    //STEPLIB  DD DSN=EDC.V2R1M0.SEDCLINK,DISP=SHR
    //         DD DSN=PLI.MINI.SIBMLINK,DISP=SHR
    //         DD DSN=SYS1.LINKLIB,DISP=SHR
    //         DD DSN=ADSM.LINKLIB,DISP=SHR
    //OPT      DD DSN=ADSM.OPTIONS,DISP=SHR,FREE=CLOSE
    //DSMAMENG DD DSN=ADSM.ANRMSG(ANRMENU),DISP=SHR
    //HLPAMENG DD DSN=ADSM.ANRHLP(ANRHENU),DISP=SHR
    //DSK      DD DSN=ADSM.DISKLOG,DISP=SHR
    //SYSPRINT DD SYSOUT=*
    //SYSTERM  DD SYSOUT=*
    

Task 3

Unload the database to tape dataset DBDATA.

  1. Halt the server, if it is not already offline. This command can only be used when the server is offline.

  2. Issue DSMSERV UNLOADDB.

    Sample JCL:

    //UNLOAD  JOB  ,REGION=128M,TIME=1440,CLASS=A,MSGCLASS=H
    //ADSMDB  EXEC PGM=ANRSERV,PARM='/UNLOADDB VOL=FILE:DD:DBDATA',
    //            DYNAMNBR=300,
    //            TIME=NOLIMIT
    //STEPLIB  DD DSN=EDC.V2R1M0.SEDCLINK,DISP=SHR
    //         DD DSN=SYS1.LINKLIB,DISP=SHR
    //         DD DSN=PLI.SIBMLINK,DISP=SHR
    //         DD DSN=ADSM.LINKLIB,DISP=SHR
    //OPT      DD DSN=ADSM.OPTIONS,DISP=SHR,FREE=CLOSE
    //DSMAMENG DD DSN=ADSM.ANRMSG(ANRMENU),DISP=SHR
    //HLPAMENG DD DSN=ADSM.ANRHLP(ANRHENU),DISP=SHR
    //DSK      DD DSN=ADSM.DISKLOG,DISP=SHR
    //* -------------------------------------------------------
    //* Unload To Scratch Tapes
    //* -------------------------------------------------------
    //DBDATA   DD UNIT=B38,DISP=OLD,LABEL=(,SL),VOL=SER=SCRTCH,
    //         DSN=ADSM.UNLOADDB.DATA,DCB=(RECFM=U,LRECL=32760)
    


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