---------------------------------------------------------------------- 
     [Contents]
     
     Attached you will find an [Overview] which defines the savepnpc 
     problem we were trying to resolve.  
     
     We also included a brief explanation on [What is savepnpc] with links 
     to a savepnpc man pages.
     
     The obligatory [Thank You] section which acknowledges the people who 
     responded to or who showed interest in our [Q] query.
     
     A [Summary] section written in a narrative email style. 
     
     A description of a [Common savepnpc hang-up] and how to get unhung. 
     
     Plus we including two (2) bonus sections on configuring NSR to 
     automatically shutdown and restart Oracle databases.  We got it to 
     work in the [How to for Digital UNIX] and [How to for Windows NT] 
     sections.  
     
     Plus you will find our original [Q] AND [Q continued] sections at the 
     bottom of this [Summary].    
     
     
     --------------------------------------------------------------------- 
     [Overview]  
     
     Networker savepnpc will execute client-scripts at the beginning of a 
     backup group and then execute client-scripts at the completion of a 
     backup group.  We were having problems making NSR's savepnpc facility 
     work us.  Specifically we could not get savepnpc to shutdown or 
     restart our Oracle8 databases.  This problem was resolved.
     
     Our thanks go out to those who helped us or showed interest in our [Q] 
     query for assistance.  We feel the problem we experienced was on the 
     cutting edge because not many people from the mailing list responded 
     with suggestions, but lucky for us, we were able to resolve this 
     problem through our support agreement with Compaq.  See the file on 
     ticket #C990329-2340.
     
     The real resolution for this bug lies either with Legato 5.2 and/or 
     Oracle 8.0.4 because it is really their bug, however you can apply a 
     patch locally to fix this problem at your site it you choose to. Jump 
     down to the [Summary] section to find out about this patch.
     
     Oracle users take note!  My DBAs assure me if your not doing one of 
     the following three scenarios, NSR is not giving you a good backup of 
     your  database.  To successfully backup your Oracle database with NSR, 
     you must be doing one of the following:
     
     1) Invest in the Oracle Business Suite so you can do "HOT ON THE
        FLY" backups and other good things.
     
     2) Use the "savepnpc" feature to automate database shutdowns and
        restarts before/after NSR performs its "COLD" off-line backup of 
        your database.  
     
     3) If you choose not to use the Business Suite, or "COLD" automation
        through savepnpc you must manually shutdown your database instance 
        before your backup process begins and then manually restart that 
        instance upon completion of the backup.  Suppose your backup group 
        contains (10) ten clients and each client has a database, you must 
        manually shut down each client's database instance before the 
        backup group runs.  If you aren't off-line-ing these databases you 
        aren't getting a good backup of them.  That's how I understand it 
        and that's the main assumption for this [Q] and [Summary] review. 
     
     To resolve our savepnpc problems, I think we logged three separate 
     calls on the subject because we had several problems to resolve, 
     however once you learn the tips, tricks, and trade-secrets of 
     savepnpc, getting it to work is really quite easy.
     
     
     ---------------------------------------------------------------------- 
     [What is savepnpc]
     
     savepnpc is a feature of Legato's NSR beginning with release 5.2.  
     This feature provides Legato customers a mechanism for executing 
     scripts prior to backing up a client group and for executing scripts 
     at the completion of the backup for that client group.  You create 
     your backup groups, giving them names, and deciding which clients 
     belong to that group.  It is very easy to add or remove one or more 
     clients from a given backup group using the nwadmin GUI.
     
     You need savepnpc to shut down processes that are running because we 
     believe NSR skips over resources attached to running processes, and if 
     you shut a process down you'll probably want to restart it after your 
     backup completes.  Savepnpc does this for you.  :)
     
     (********* savepnpc in a nutshell **********) 
     
http://www.adcomp.ch/cluhelp/appb37.htm#50217
     
     
     ---------------------------------------------------------------------- 
     [Thank You]
     
     John Speno             speno_at_isc.upenn.edu 
     Partin.Kevin           KPartin_at_hou.mdc.com 
     Russ Fish              Russ_Fish_at_idx.com 
     Harish Arora           arisharora_at_hotmail.com 
     Gene Zurik             zurik_at_alf.dec.com 
     Lannie Loh             loh_at_decatl.alf.dec.com 
     Sakellaris Alexander   asakelaris_at_cosmote.gr
     Mike Gaunnac           MGaunnac_at_DWD.State.IN.US
     
     
     ---------------------------------------------------------------------- 
     [Summary] [Q] NSR savepnpc - what am I doing wrong 02/26/1999
     
     ---
     Kevin,
     
     If you find reasonable answer to this problem then please forward it 
     to me also.  I am also looking for this functionality.  TIA!
     
     -Harish Arora 02/26/1999
     ---
     
     
     ---
     Harish,
     
     I will but I am not having any luck with this thing yet, and its 
     really starting to bug me.  Savepnpc looks so easy to use too! I don't 
     know what I'm doing wrong either.  Cause I followed the directions. :(
     
     -Kevin
     ---
     
     
     --- 
     Kevin,
     
     Are these commands working by hand?  If yes, then use full path 
     instead of changing directory by cd command ie sh /sbin/init.d/oracle 
     stop
     
     -Alexander Sakellaris 02/26/1999     ---
     
     
     ---
     Alex,
     
     You are probably on to something with this "full path" suggestion of 
     yours.  I am just not ready to hear what you are saying.  Sorry, I am 
     just kind of dense and stupid, maybe next time I will listen to you 
     sooner.  :)  
     
     -Kevin  02/26/1999
     ---
     
     
     ---
     I give up.  I'm posting another query to the mailing list and logging 
     another service call to Compaq on this.  
     
     -Kevin 03/29/1999
     ---
     
     
     ---
     Compaq Resolution #C990329-2340 03/29/1999
     
     Hi Kevin,
     
     I took a short lunch and looked at your [Q]continued web page.
     
     This is what I think has happened...
     Since it couldn't find "su", "data", and "touch" command, your pre 
     command failed.  When it failed, it wouldn't create 
     a /nsr/tmp/<groupname>.tmp file.  When the second saveset started, 
     savepnpc though the pre command hasn't been run yet, so it ran again.  
     Then it failed again...  This repeated for all savesets.  I think 
     this is why you see savepnpc tried to run your script multiple times.
     
     Please try to use full path for those commands to see if it works.  
     Please let me know the result.
     
      Thanks,
     -Lannie
     ---
     
     
     ---
     Lannie,
     
     So what you are saving is, all the commands in the script 
     /sbin/int.d/oracle need to be fully qualified in order to make 
     Networker's savepnpc facility function correctly.
     
     Is this due to some deficiency in the way Legato's coded their 
     savepnpc facilities or could it be some environmental setting in our 
     .dtprofile or .profile as it relating to my PATH variables?  I don't 
     think the paths /usr/opt/networker/bin or /usr/var/nsr/res are set in 
     my PATH statements for the NSR administrators.
     
     Reference: NSR: savepnpc what am I doing wrong now? 
     
http://www.ornl.gov/its/archives/mailing-lists/alpha-osf-managers/1999 
     /03/msg00611.html
     
     -Kevin
     ---
     
     
     ---
     Hi Kevin,
     
     If you don't use full path, you need to define your PATH environment 
     variable correctly in your script.  
     
     Savepnpc runs your script as root, but I don't think it should inherit 
     PATH from root login since it didn't run root's login file, .profile 
     or whatever it's using, and it shouldn't run. This is just like you 
     run a script thru cron.  The default PATH for root is very minimum.  
     If you print the value of the PATH in your script, you'll see what you 
     get.
     
      Thanks,
     -Lannie
     ---
     
     
     ---
     Lannie,
     
     Your suggestion appears to be working.  I am not sure who wrote the 
     /sbin/init.d/oracle script.  I assume it was the vendor any way one of 
     our DBA's, Ramesh, made the changes you suggested and it appears to 
     have resolved our savepnpc problems.
     
     Lannie, you may close out the problem ticket.  Thank you for working 
     our problem.  We really appreciate it.
     
     -Kevin
     ---
     
     
     ---
     Hi Kevin,
     
     I am glad that the problem was solved, and thanks for letting me know. 
     Have a nice day!
     
     -Lannie
     ---
     
     
     ---
     We believe the root of the problem lies somewhere between the Legato's 
     5.2 and Oracle's 8.0.4 release.  We hope somebody will read this 
     summary and address the problem in future releases.  Until they do 
     this, you need to address it locally.  Edit your /sbin/init.d/oracle 
     script and fully qualify the paths to the commands: "date", "touch", 
     and "su" to path locations appropriate for your shop..
     
     -Kevin
     ---
     
     ---------------------------------------------------------------------- 
     [common savepnpc hangups]
     
     On 02/24/1999 we noticed savepnpc quit working for us.  We could tell 
     it was hung by looking at date and time stamp information in the 
     /nsr/logs/messages and /nsr/logs/savepnpc.log files.  They stopped 
     accruing new messages.  If this happens to you it means your savepnpc 
     pre and post command scripts are not getting executed.  Your hung up.  
     These hang-ups can occur to one or more clients of a given group while 
     other groups work correctly without a glitch.  If this happens you 
     need to check locally at each client for the presence of 
     /nsr/tmp/your-NSRgroup-name.tmp and remove those files.    
     
     ---
     Dear Compaq,
     
     Savepnpc quit working on 02/24/1999.  I have the command savepnpc 
     entered in the client's Backup Command attribute, I believe this use 
     to work but recently it quit working.  We are just now ramping 
     Networker into a production environment after a couple of months 
     experimentation.  I believe savepnpc quit working for us on 
     02/24/1999.  Can you help?
     
     - Kevin
     ---
     
     
     ---
     Kevin,
     
     Here is a suggestion that Lannie had.  Check for the presence of the 
     following files.
     
     /nsr/tmp/group.tmp        where group is your group name
     
     If it exists, remove it and delete the group.res files from /nsr/res 
     and let nsr create the default files. Then 
     wait and see what happens.
     
     - Gene Zurik problem resolution #C990305-1359 ---
     
     
     ---
     Gene,
     
     Yes that fixes my problem.  I guess I hosed NSR somehow, and those 
     temporary files got stuck.  I checked all my clients for stray 
     /nsr/tmp/*.tmp files and removed all tmp files I could find.  Savepnpc 
     is working again.
     
     -Kevin
     ---
     
     
     ---------------------------------------------------------------------- 
     [How to for Digital Unix]
     
     1) Using the nwadmin GUI create a group and add your clients to that 
        group.  This is a fairly easy thing to do, you just play with it.  
        You can't hurt anything playing with this.
     
     2) Using the nwadmin GUI, for each client you want to use savpnc with
        go to {client} {client setup} pulldown menu and highlight the 
        desired client.  Then type the following word in that client's 
        backup command field >> savepnpc <<.  Don't type in these >> << 
        characters though. 
     
     3) What was the name of the group you created in step 1?  lets call 
        it your-group-name.
     
        On each client in that group with a database create this file 
        /nsr/res/your-group-name.res
     
        Then edit this file /nsr/res/your-group-name.res and type in the 
        following commands.
     
        ---
        type: savepnpc;
        precmd: "/usr/bin/sh /sbin/init.d/oracle stop", "/bin/sleep 60"; 
        pstcmd: "/usr/bin/sh /sbin/init.d/oracle start", "/bin/sleep 60"; 
        timeout: "12:00pm";
        ---
     
        That's it end of step 3, don't keyin the --- characters.
     
      4) There is a bug somewhere between Legato 5.2 and Oracle 8.0.4 you
         can correct it though.  Apply this local patch.  Edit the 
         following file /sbin/init.d/oracle.  Fully qualify the paths to 
         the "su", "date", and "touch" commands.  Fix-qualify all 
         references to these commands.
     
         Ours commands use to look like this:   Now they look like this: 
            su                                     /usr/bin/su 
            date                                   /usr/bin/date 
            touch                                  /usr/bin/touch
     
         That's it end of step 4.
     
       5) You are ready to go, don't experiment during business hours
          because you will bring down your database.  Using the nwadmin GUI 
          touch on the group button, highlight the your-group-name group 
          and press the start button.  Watch out your database is going 
          down, its going to get backed up and restarted too!  
     
     ---------------------------------------------------------------------- 
     [How to for Windows NT]
     
     
     ---
     From Mike Gaunnac
     3/2/99  11:40:15 AM  (rev. 3/19/99  11:24:41 AM)
     
     If you want to use the NET START and NET STOP commands of Windows NT 
     to control your Oracle Database:
     
     1.  Set service OracleService<SID> to start manually
     
     2.  Set service OracleStart<SID> to start automatically
     
     3.  Set registry entry HKLM/SOFTWARE/ORACLE/ORA_SHUTDOWN = TRUE
     
     4.  Shutdown and restart the instance
     
     5.  In command mode :
     NET STOP OracleTNSListener80
     NET STOP OracleStart<SID>
     NET STOP OracleService<SID>
     
     NET START OracleStart<SID>
     NET START OracleTNSListener80
     
     These commands may be used to bracket a cold-backup session.
     
     6.  For Networker set up the file C:\WIN32APP\NSR\RES\<group_name>.RES 
         as follows:
     
     type: savepnpc;
     precmd: "NET STOP OracleTNSListener80","NET STOP 
     OracleStart<SID>","NET STOP OracleService<SID>";
     pstcmd: "NET START OracleStart<SID>","NET START OracleTNSListener80"; 
     timeout: "12:00pm";
     
     See "Oracle8 Enterprise Edition Getting Started" Chapter 10 if you 
     need further instructions.
     
     - Mike Gaunnac
     ---
     
     ---
     Thanks Mike, I can see your script is working.  Thanks a million,  I 
     appreciate your help.
     
     - Kevin
     ---
     
     ---------------------------------------------------------------------- 
     [Q] NSR: savepnpc - Continued, what am I doing wrong now? 03/29/1999
     
     Below you will find our group resource file.  The goal is to shutdown 
     the Oracle8 databases before the backup job begins.  Below you will 
     find the savepnpc group resource file that we experiment with.
     
     /nsr/res/Alpha123-backup.res
     type: savepnpc;
     precmd: "/usr/bin/sh /sbin/init.d/oracle stop", "/bin/sleep 60"; 
     pstcmd: "/usr/bin/sh /sbin/init.d/oracle start", "/bin/sleep 60"; 
     timeout: "12:00pm";
     
     Diagnostics produced after running this group would indicate the 
     pre-command is executing once for each save set instead of "AS 
     ADVERTISED" once for each client in the backup group.
     
     There are (3) clients in the backup group.  He are sample diagnostics 
     of what we are getting.
     
     --- Unsuccessful Save Sets ---
     * alpha1.dwd.state.in.us:/  1 retry attempted
     * alpha1.dwd.state.in.us:/  past first iffi set * 
     alpha1.dwd.state.in.us:/  LOG config       
     * alpha1.dwd.state.in.us:/  /sbin/init.d/oracle: touch: not found * 
     alpha1.dwd.state.in.us:/  Test of stop begins here 
     * alpha1.dwd.state.in.us:/  /sbin/init.d/oracle: date:  not found * 
     alpha1.dwd.state.in.us:/  stopping V2 listner 
     * alpha1.dwd.state.in.us:/  stopping Oracle database 
     * alpha1.dwd.state.in.us:/  /sbin/init.d/oracle: su: not found 
     * alpha1.dwd.state.in.us:/usr  /sbin/init.d/oracle: touch: not found * 
     alpha1.dwd.state.in.us:/usr  Test of stop begins here 
     * alpha1.dwd.state.in.us:/usr  /sbin/init.d/oracle: date:  not found * 
     alpha1.dwd.state.in.us:/usr  stopping V2 listner 
     * alpha1.dwd.state.in.us:/usr  stopping Oracle database 
     * alpha1.dwd.state.in.us:/usr  /sbin/init.d/oracle: su: not found 
     * alpha1.dwd.state.in.us:/a1u00  /sbin/init.d/oracle: touch: not found 
     * alpha1.dwd.state.in.us:/a1u00  Test of stop begins here 
     * alpha1.dwd.state.in.us:/a1u00  /sbin/init.d/oracle: date:  not found 
     * alpha1.dwd.state.in.us:/a1u00  stopping V2 listner 
     * alpha1.dwd.state.in.us:/a1u00  stopping Oracle database 
     * alpha1.dwd.state.in.us:/a1u00  /sbin/init.d/oracle: su: not found . 
     .
     .
     etc. etc. etc. for each save set of all (3) clients
     
     ---
     Additional Info follows:
     
     All thre clients run NSR 5.2, under Digitial UNIX 4.0E with no patch 
     kits applied.  Plus each client has two network interface cards 
     configured with the host names for these containing either mixed case 
     letters and/or hyphens.  I.E. alpha1, alpha1-nsr, alpha2, alpha2-nsr, 
     alpha3, alpha3-nsr.
     
     Also we are not using the Business Suite module for Oracle8 even 
     though the licenses packs were purchased, enabled and authorized 
     through NSR.  We don't because our DBA's figure why do hot on the fly 
     backups when we have the time at night for cold offline backups.
     ---
     
     - Thanks
     Kevin Criss
     
     ---------------------------------------------------------------------- 
     [Q] NSR: savepnpc what am I doing wrong? 02/26/1999
     
     
http://www.ornl.gov/its/archives/mailing-lists/alpha-osf-managers/1999 
     /02/msg00615.html
Received on Tue Apr 06 1999 - 22:44:07 NZST