Veritas-bu

[Veritas-bu] netbackup Oracle scripts and return values

2003-11-13 11:16:47
Subject: [Veritas-bu] netbackup Oracle scripts and return values
From: ssesar AT mitre DOT org (Steven L. Sesar)
Date: Thu, 13 Nov 2003 16:16:47 +0000
This is a multi-part message in MIME format.
--------------000309070907020308010402
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Actually, I pass 6, since 1 is considered a partial success. This is 
mainly to allow anyone who looks at the activity report using the GUI to 
see accurate information. I actually log pretty verbosely in my script, 
and pull out/email failures each morning when backups complete.

Markham, Richard wrote:

>So did you go as far as passing exit values > 1 ?  Status 1 (particially
>successful) doesn't 
>seem to spark much emergency in night operators and management...  Status 1
>seems to be all
>I've ever seen when using RMAN scripts.  
>
>Thanks for confirming the issue, I resolved it by simply using variable
>command files within
>the parent script.
>
>-----Original Message-----
>From: Steven L. Sesar [mailto:ssesar AT mitre DOT org]
>Sent: Thursday, November 13, 2003 10:45 AM
>To: Markham, Richard
>Cc: veritas-bu AT mailman.eng.auburn DOT edu
>Subject: Re: [Veritas-bu] netbackup Oracle scripts and return values
>
>
>Yeah, it's a pain. My solution was to artificially set exit values 
>within my RMAN code generation script (I use one script which will build 
>the RMAN scripts according to the policy, SID, type of backup, etc.) in 
>situations where the backup failed but the script returned an exit value 
>of 0. This forces NBU to accurately report back failures/successes.
>
>
>
>Markham, Richard wrote:
>
>  
>
>>Has anyone dealt with the return values not carrying back to the parent
>>shell script within "$?"
>>Basically, I have a parent script which calls another script (given a
>>certain condition) and 
>>this child script runs RMAN and afterwards does a RETURN_STATUS=$?.  The
>>child script sees that RMAN
>>failed (RETURN_STATUS > 0) so I then do a "exit $RETURN_STATUS".  At this
>>point the parent script
>>picks up where it left off and I do a RETURN_STATUS2=$? and exit
>>$RETURN_STATUS2.  I'm using
>>$RETURN_STATUS2 for now for troubleshooting purposes.  When I echo
>>$RETURN_STATUS2 within the
>>parent script, is shows "0", which explains why Netbackup thinks the backup
>>was a success......
>>_______________________________________________
>>Veritas-bu maillist  -  Veritas-bu AT mailman.eng.auburn DOT edu
>>http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu
>> 
>>
>>    
>>
>
>
>  
>


-- 
===================================

  Steven L. Sesar
  Senior Operating System Programmer/Analyst
  UNIX Application Services R101
  The MITRE Corporation
  202 Burlington Road - KS101
  Bedford, MA 01730
  tel: (781) 271-7702
  fax: (781) 271-2600
  mobile: (617) 893-9635
  email: ssesar AT mitre DOT org
 
===================================



--------------000309070907020308010402
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1">
  <title></title>
</head>
<body text="#000000" bgcolor="#ffffff">
Actually, I pass 6, since 1 is considered a partial success. This is
mainly to allow anyone who looks at the activity report using the GUI
to see accurate information. I actually log pretty verbosely in my
script, and pull out/email failures each morning when backups complete.<br>
<br>
Markham, Richard wrote:<br>
<blockquote type="cite"
 cite="mid1354F0101F81D3118C3B009027AF53CD03183D65 AT hafele17.hafele DOT org">
  <pre wrap="">So did you go as far as passing exit values &gt; 1 ?  Status 1 
(particially
successful) doesn't 
seem to spark much emergency in night operators and management...  Status 1
seems to be all
I've ever seen when using RMAN scripts.  

Thanks for confirming the issue, I resolved it by simply using variable
command files within
the parent script.

-----Original Message-----
From: Steven L. Sesar [<a class="moz-txt-link-freetext" href="mailto:ssesar AT 
mitre DOT org">mailto:ssesar AT mitre DOT org</a>]
Sent: Thursday, November 13, 2003 10:45 AM
To: Markham, Richard
Cc: <a class="moz-txt-link-abbreviated" href="mailto:veritas-bu AT 
mailman.eng.auburn DOT edu">veritas-bu AT mailman.eng.auburn DOT edu</a>
Subject: Re: [Veritas-bu] netbackup Oracle scripts and return values


Yeah, it's a pain. My solution was to artificially set exit values 
within my RMAN code generation script (I use one script which will build 
the RMAN scripts according to the policy, SID, type of backup, etc.) in 
situations where the backup failed but the script returned an exit value 
of 0. This forces NBU to accurately report back failures/successes.



Markham, Richard wrote:

  </pre>
  <blockquote type="cite">
    <pre wrap="">Has anyone dealt with the return values not carrying back to 
the parent
shell script within "$?"
Basically, I have a parent script which calls another script (given a
certain condition) and 
this child script runs RMAN and afterwards does a RETURN_STATUS=$?.  The
child script sees that RMAN
failed (RETURN_STATUS &gt; 0) so I then do a "exit $RETURN_STATUS".  At this
point the parent script
picks up where it left off and I do a RETURN_STATUS2=$? and exit
$RETURN_STATUS2.  I'm using
$RETURN_STATUS2 for now for troubleshooting purposes.  When I echo
$RETURN_STATUS2 within the
parent script, is shows "0", which explains why Netbackup thinks the backup
was a success......
_______________________________________________
Veritas-bu maillist  -  <a class="moz-txt-link-abbreviated" 
href="mailto:Veritas-bu AT mailman.eng.auburn DOT edu">Veritas-bu AT 
mailman.eng.auburn DOT edu</a>
<a class="moz-txt-link-freetext" 
href="http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu";>http://mailman.eng.auburn.edu/mailman/listinfo/veritas-bu</a>
 

    </pre>
  </blockquote>
  <pre wrap=""><!---->

  </pre>
</blockquote>
<br>
<br>
<pre cols="72" class="moz-signature">-- 
===================================

&nbsp; Steven L. Sesar
&nbsp; Senior Operating System Programmer/Analyst
&nbsp; UNIX Application Services R101
&nbsp; The MITRE Corporation
&nbsp; 202 Burlington Road - KS101
&nbsp; Bedford, MA 01730
&nbsp; tel: (781) 271-7702
&nbsp; fax: (781) 271-2600
&nbsp; mobile: (617) 893-9635
&nbsp; email: <a class="moz-txt-link-abbreviated" href="mailto:ssesar AT mitre 
DOT org">ssesar AT mitre DOT org</a>
&nbsp;
===================================

</pre>
</body>
</html>

--------------000309070907020308010402--



<Prev in Thread] Current Thread [Next in Thread>