Link to home
Start Free TrialLog in
Avatar of Santiago videla
Santiago videla

asked on

How to delete a single tsm tape volume from volhistory.

Hi, i have 2 tapes unused checked in on the library  but when i run a query on eache volume this is what i got:

tsm:  ARCOSSTSM01>q vol DP0291L5 F=D
ANR2034E QUERY VOLUME: No match found using this criteria.
ANS8001I Return code 11.

tsm:  ARCOSSTSM01>q vol CKD057L5 F=D
ANR2034E QUERY VOLUME: No match found using this criteria.
ANS8001I Return code 11.



But if i run a select this is what i got:

tsm:  ARCOSSTSM01>select * from volhistory where volume_name='DP0291L5 '

                     DATE_TIME: 2018-04-27 15:24:17.000000
                        UNIQUE: 0
                          TYPE: STGNEW
                 BACKUP_SERIES:
              BACKUP_OPERATION:
                    VOLUME_SEQ:
                      DEVCLASS: LTO_V5_HP
                   VOLUME_NAME: DP0291L5
                      LOCATION:
                       COMMAND:
                     DB2_OBJID:
                   DB2_HOMEPOS:
                       DB2_HLA:
                       DB2_LLA:
            DB2_TOTALDATABYTES:
             DB2_TOTALLOGBYTES:
               DB2_LOGBLOCKNUM:
           DB_BACKUP_STREAM_ID:
VOLUME_SEQ_IN_DB_BACKUP_STREAM:

                     DATE_TIME: 2018-06-11 11:43:12.000000
                        UNIQUE: 0
                          TYPE: STGDELETE
                 BACKUP_SERIES:
              BACKUP_OPERATION:
                    VOLUME_SEQ:
                      DEVCLASS: LTO_V5_HP
                   VOLUME_NAME: DP0291L5
                      LOCATION:
                       COMMAND:
                     DB2_OBJID:
                   DB2_HOMEPOS:
                       DB2_HLA:
                       DB2_LLA:
            DB2_TOTALDATABYTES:
             DB2_TOTALLOGBYTES:
               DB2_LOGBLOCKNUM:
           DB_BACKUP_STREAM_ID:
VOLUME_SEQ_IN_DB_BACKUP_STREAM:


tsm: VWARCOSSTSM01>select * from volhistory where volume_name='CKD057L5 '

                     DATE_TIME: 2018-06-11 11:40:49.000000
                        UNIQUE: 0
                          TYPE: STGNEW
                 BACKUP_SERIES:
              BACKUP_OPERATION:
                    VOLUME_SEQ:
                      DEVCLASS: LTO_V5_HP
                   VOLUME_NAME: CKD057L5
                      LOCATION:
                       COMMAND:
                     DB2_OBJID:
                   DB2_HOMEPOS:
                       DB2_HLA:
                       DB2_LLA:
            DB2_TOTALDATABYTES:
             DB2_TOTALLOGBYTES:
               DB2_LOGBLOCKNUM:
           DB_BACKUP_STREAM_ID:
VOLUME_SEQ_IN_DB_BACKUP_STREAM:

                     DATE_TIME: 2018-06-11 11:48:49.000000
                        UNIQUE: 0
                          TYPE: STGDELETE
                 BACKUP_SERIES:
              BACKUP_OPERATION:
                    VOLUME_SEQ:
                      DEVCLASS: LTO_V5_HP
                   VOLUME_NAME: CKD057L5
                      LOCATION:
                       COMMAND:
                     DB2_OBJID:
                   DB2_HOMEPOS:
                       DB2_HLA:
                       DB2_LLA:
            DB2_TOTALDATABYTES:
             DB2_TOTALLOGBYTES:
               DB2_LOGBLOCKNUM:
           DB_BACKUP_STREAM_ID:
VOLUME_SEQ_IN_DB_BACKUP_STREAM:


My question is: How to delete this 2 tapes from volhistory avoiding delete something else?

Thanks in advance.
Avatar of Carlos Ijalba
Carlos Ijalba
Flag of Spain image

You can check out the volhist entry in the dsmserv.opt, points to a file.

Do a volhist backup, and then try editing the volhist directly, If something breaks you can always restore it from the previous backup. It may need a dsmserv restart.

I remember doing it quite a while ago, but don't know it this procedure still works in our days.
ASKER CERTIFIED SOLUTION
Avatar of Juan Gramajo
Juan Gramajo

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Santiago videla
Santiago videla

ASKER

Thanks juan  it worked great.