sponsored links

Collapse

Announcement

Collapse
No announcement yet.

RSTLIB - requirements Object locks and ensuring the RSTLIB complsted successfully

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • RSTLIB - requirements Object locks and ensuring the RSTLIB complsted successfully

    Ok, So I was given a task to spruce up this clients Development environment Refresh process. This is not the first time I have been tasked with a clients Refresh process, but this is a little different as to how they are setup here. Simply, they have multiple testing environments (Library lists) on their Development box and use the PROD tape backup to restore from.

    1. Their initial issue was that just prior to the RSTLIB command they are clearing the target library of objects they want restored. Well, there was a job that was not accounted for in the job scheduler that kicked off and was locking some files in the target library, so that the CLRLIB command was waiting for the system value to allocate the object before moving on, currently there is a MONMSG on the CLRLIB command, to have as little interaction with the third party operators, thus not throwing an object lock escape message. Then after the CLRLIB would finish a check was done via DSPOBJD to an outfile to ensure the target library was empty of those objects which are to be restored.

    1Q. Is there any TAATOOLS or other RTVOBJLCK type commands which work on the Library to see if any of those objects within that library are locked? I looked and could not find anything of the sort. When I tried the RTVOBJLCK on the Library , it only seemed to be using the library itself and not all of the objects within the library.

    2. The Admin would like the ability to ensure that the RSTLIB completed successfully and if there were any issues to be able to retry the RSTLIB command from within the Refresh process or even to have this automated. Again, currently the RSTLIB has a MONMSG on the command as to limit the third party operators. I have seen all kinds of RCVMSG options to read through the joblog for errors and also the OUTPUT option the RSTLIB to a spool file or an outfile which can be read through. So my real question to the Admin was, how would I know which objects were not restored properly that should have been, and his response was that the DEV environments are ours(Developers & Users) and we should know which objects need to be included. In a previous REFRESH joblog for the RSTLIB command it shows some errors (CPF3756) like. "library xxxxxxxxxx not correct for restore of SQL Package xxxxxxxxxx" errors????? and apparently these are not true errors as they will reconnect correctly somehow.

    2Q. How could I compare what was supposed to be restored from the tape to the target library? OR How am I to know which errors are true errors, OR is there some better way to accomplish this task?

  • #2
    We have the full TAATOOLs package and always use the RTVOBJCNT within a CL program to see if the library is empty...or not...before attempting a RSTLIB.

    RTVOBJCNT OBJ(&LIBRARY/*ALL) OBJCNT(&COUNT)

    Comment


    • #3
      Aidan,

      Where I work we have similar processes. We had similar issues. On any particular weekend, two or three training/testing/qa environments were needed up be updated with current production data and yes, because these are highly used systems with the full production-like system jobs, at times the clear libraries would fail because of locking.

      I wrote a CLP program which used only native IBM i to make sure that the libraries are fully cleared. If you look at the IBM Technology update for DB2 for i - Services, you will see OBJECT_LOCK_INFO view. The problem is this is for every object on your system. (This could take a very long time!!!) If you use ACS you can see the View definition is made of. OBJECT_LOCK_INFO view is from object_statistics table function data and a likewise described table function OBJECT_LOCK_INFO with 4 input parameters. It would be much faster to feed in the data need to this table function for just the libraries you need cleared.

      For problem number two, you need to evaluate the joblogs for the clear library jobs.

      Jim

      Comment

      sponsored links

      Collapse

      Working...
      X