ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

Save while active

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

  • Save while active

    Hi all

    I have within the last couple of month talked to a lot of people not knowing of the â??Save while activeâ?? method when saving objects (including libraries). Iâ??ll like to start a small discussion here because Iâ??m sure that this can help many out there when backing up. I have used â??Save while activeâ?? for many years now and I have never notice any problems.

    It is vary easy to use; simply add SAVACT(*LIB) to your normal SAVLIB, SAVOBJâ?¦ command and you can let all users continue working 24/7.


    Check the following IBM link "Save your server while it is active"


    Regards,

    Bent

  • #2
    Re: Save while active

    Thanks Bent.....I have also used save while active for many years - with out problem(s).

    some IBM talk.


    SAVACT
    Specifies whether an object can be updated while it is being saved.
    Note: If your system is in a restricted state, this parameter is ignored and the save operation is performed as if SAVACT(*NO) was specified.

    *NO: Objects that are in use are not saved. Objects cannot be updated while being saved.

    *LIB: Objects in a library can be saved while they are in use by another job.
    All of the objects in a library reach a checkpoint together and are saved
    in a consistent state in relationship to each other.

    Note: Libraries with thousands of objects may be too large for this option.

    *SYNCLIB: Objects in a library can be saved while they are in use by another job.
    All of the objects and all of the libraries in the save operation reach a
    checkpoint together and are saved in a consistent state in relationship
    to each other.

    *SYSDFN: Objects in a library can be saved while they are in use by another job.
    Objects in a library may reach checkpoints at different times and may
    not be in a consistent state in relationship to each other.

    Note: Specifying this value eliminates some size restrictions and may enable a
    library to be saved that could not be saved with SAVACT(*LIB).

    SAVACTWAIT
    Specifies the amount of time to wait for a commit boundary or an object that is
    in use before continuing the save. If a lock is not obtained in the specified time,
    the object is not saved. If a commit boundary is not reached in the specified time,
    the save operation is ended.

    120: The system waits up to 120 seconds for a commit boundary or an
    object lock before continuing the save operation.

    *NOMAX: No maximum wait time exists.

    wait-time: Specify the time (in seconds) to wait for a commit boundary
    or an object lock before continuing the save operation. Valid
    values range from 0 through 99,999.
    SAVACTMSGQ
    Specifies the message queue that the save operation uses to notify the
    user that the checkpoint processing for a library is complete.
    A separate message is sent for each library to be saved when
    SAVACT(*SYSDFN) or SAVACT(*LIB) is specified. When SAVACT(*SYNCLIB) is specified,
    one message is sent for all libraries in the save operation.

    This parameter can be used to save the objects at a known, consistent boundary to
    avoid additional recovery procedures following a restore operation. Applications can
    be stopped until the checkpoint processing complete message is received.

    *NONE: No notification message is sent.
    *WRKSTN: The notification message is sent to the work station message queue.
    The name of the message queue can be qualified by one of the following
    library values:

    *LIBL: All libraries in the job's library list are searched until the first match is found.

    *CURLIB: The current library for the job is searched. If no library is specified
    as the current library for the job, the QGPL library is used.

    library-name: Specify the name of the library to be searched.

    message-queue-name: Specify the name of the message queue.


    All my answers were extracted from the "Big Dummy's Guide to the As400"
    and I take no responsibility for any of them.

    www.code400.com

    Comment


    • #3
      Re: Save while active

      Note that if you are saving large libraries with SAVACT(*LIB) and the library has a large number of open commits then the save can fail to achieve the SaveWhileActive checkpoint (SWA) and will have to be resubmitted.

      We are using MIMIX to replicate our key production libraries and have had to write a program that ends MIMIX apply routes on the target (recovery) box, then does a SWA on the remote system, and starts MIMIX again after the SWA is attained.

      Otherwise we cannot obtain a SWA check on the production lib (not possible 24x7)

      There were also issues with SWA on V5R2 and earlier, IBM responded to our PMR's with (The entire SWA architecture has been reviewed and sweeping improvements will be available with V5R3, so we will not develop a PTF for V5R2 for SWA issues)

      So anyone on V5R2 with SWA probs may need to upgrade to V5R3.

      GC
      Greg Craill: "Life's hard - Get a helmet !!"

      Comment


      • #4
        Re: Save while active

        Jamief, Maybe you can answer a couple questions for me. Is the SAVACTWAIT tied to the SAVACT parameter? I'm thinking not but wanted to ask someone else's opinion. My second question... I'm doing a SAVLIB *ALLUSR. If an application is doing a read only on an object, that won't lock the object from being backed up will it? It's not being updated, just read. I'm thinking that a read won't lock it and if it did the default 120 second SAVACTWAIT will handle it. The SAVACT is set to NO.

        Comment


        • #5
          Re: Save while active

          They are tied to one another.

          I run this:
          PHP Code:
           SAVLIB     LIB(BLAHBLAHBLAH...
          DEV(TAP01ENDOPT(*LEAVE) +       
          SAVACT(*SYNCLIBSAVACTWAIT(5) +  
          SAVACTMSGQ(LBIFIL2/SAVACTMSG1
          The enitire system is saved in about 15 minutes..
          All my answers were extracted from the "Big Dummy's Guide to the As400"
          and I take no responsibility for any of them.

          www.code400.com

          Comment


          • #6
            Re: Save while active

            Will a read on an object lock it where it won't back up?

            Comment


            • #7
              Re: Save while active

              A read will not cause a record lock...

              PHP Code:
              SAVLIB LIB(JAMIELIBDEV(*SAVFSAVF(JAMIELIB/SAVFSAVACT(*LIB
              This is an easy test...
              just use your library and dbu (display) a file then do a savlib/savact on it...
              then try the same save in edit mode.. It will save both times.
              then do an allocate object on an object
              PHP Code:
              ALCOBJ OBJ((JAMIELIB/@SQLTEST *FILE *EXCL)) 
              after allocation:
              PHP Code:
              614 objects saved from JAMIELIB1 not saved
              but the save does complete.
              All my answers were extracted from the "Big Dummy's Guide to the As400"
              and I take no responsibility for any of them.

              www.code400.com

              Comment


              • #8
                Re: Save while active

                Thanks!

                Comment

                Working...
                X