Links
Home
Oracle DBA Forum
Frequent Oracle Errors
TNS:could not resolve the connect identifier specified
Backtrace message unwound by exceptions
invalid identifier
PL/SQL compilation error
internal error
missing expression
table or view does not exist
end-of-file on communication channel
TNS:listener unknown in connect descriptor
insufficient privileges
PL/SQL: numeric or value error string
TNS:protocol adapter error
ORACLE not available
target host or object does not exist
invalid number
unable to allocate string bytes of shared memory
resource busy and acquire with NOWAIT specified
error occurred at recursive SQL level string
ORACLE initialization or shutdown in progress
archiver error. Connect internal only, until freed
snapshot too old
unable to extend temp segment by string in tablespace
Credential retrieval failed
missing or invalid option
invalid username/password; logon denied
unable to create INITIAL extent for segment
out of process memory when trying to allocate string bytes
shared memory realm does not exist
cannot insert NULL
TNS:unable to connect to destination
remote database not found'>ora-02019
exception encountered: core dump
inconsistent datatypes
no data found
TNS:operation timed out
PL/SQL: could not find program
existing state of packages has been discarded
maximum number of processes exceeded
error signaled in parallel query server
ORACLE instance terminated. Disconnection forced
TNS:packet writer failure
see ORA-12699
missing right parenthesis
name is already used by an existing object
cannot identify/lock data file
invalid file operation
quoted string not properly terminated
Saving Backup Errros inside the db

Saving Backup Errros inside the db

2005-12-29       - By BN

Reply:     1     2     3     4     5  

Greetings,

Thank you all for your reply...

We have a mix of Oracle version starting from 8.1.7

Right now I have a few lines in the RMAN Hotbackup script that extracts the
info (success or error) from the RMAN log and write into on my tables with
the following info:

hostname, instance_name, start_time, end_time, status (varchar2(4000))

# Start of Code
HOST=$(hostname)
PROGRAM=${0##*/}
START_TIME=$(date '+%m/%d/%y %X')
BACKUP_LOGFILE="..../.../rman_backup.log"

exec 2>&1 >> $BACKUP_LOGFILE

RMAN  Backup commands {}

END_TIME=$(date '+%m/%d/%y %X')

STATUS=$(awk '/ERROR MESSAGE STACK FOLLOWS/,/RMAN>/ {print $0}'
<${BACKUP_LOGFILE}|sed '/^$/d')

if [[ -z "$STATUS" ]]
then
  STATUS="Backup Successful"
fi


$ORACLE_HOME/bin/sqlplus -S <<EOF
/ as sysdba

prompt Inserting Backup timing info into system.XXX_backup_status
prompt START_TIME=$START_TIME   END_TIME=$END_TIME  STATUS=$STATUS

insert into system.XXXX_backup_status
       (INSTANCE_NAME,HOST_NAME,SCRIPT_NAME,START_TIME,END_TIME,STATUS)
  values
     ('$ORACLE_SID','$HOST','$PROGRAM',to_date('$START_TIME','MM/DD/YY
HH24:MI:SS'),
      to_date('$END_TIME','MM/DD/YY HH24:MI:SS'),'$STATUS');

EOF

# End of Code

The SED is to remove the blank lines, other wise INSERT complains.

IF there are no errors then STATUS string will be zero, so I assume Backup
is successful.

I am only hoping that VARCAHR2(4000) should be good enough to hold any  type
of RMAN Error message. Please note, I am collecting all the error messages
lines, not just the last error message line.

Regards & Thanks
BN


On 12/28/05, Johnson, George <GJohnson@(protected)> wrote:
>
>
>        I was under the impression that this was already stored or is that
> only under 10g and with central catalog? I just remember reading something
> about this in a tech doc somewhere.
>
>        Rgds
>
> -- --Original Message-- --
> From: oracle-l-bounce@(protected) [mailto:oracle-l-bounce@(protected)]
> On Behalf Of Grant Allen
> Sent: 28 Dec 2005 7:34
> To: bnsarma@(protected)
> Cc: lazydba
> Subject: Re: Saving Backup Errros inside the db
>
>
> BN wrote:
>
> > Greetings,
> >
> > I would like to save the following RMAN error messages inside a table
> > along with the timestamp
> >
> > RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS
> >
> [snip]
>
> > Can somebody suggest me how I can do this. I want to save the new
> > lines, as they appear in the error message.
> >
> > Am I looking at a CLOB or do I have other options.
>
>
> BN - others are already suggesting the post-backup shell script, but you
> do have options other than CLOB.  You can save the new lines with some
> easy regex work and the ever-useful chr(10) or chr(13)||chr(10) trick
> (depending on your OS).  This means you can opt for char or varchar2,
> which you might find *much* easier to use in the long run.
>
> Ciao
> Fuzzy
> :-)
> --
> http://www.freelists.org/webpage/oracle-l
>
>
>
>
> ****************************************************************************
> This message contains confidential information and is intended only
> for the individual or entity named.  If you are not the named addressee
> you should not disseminate, distribute or copy this e-mail.
> Please notify the sender immediately by e-mail if you have received
> this e-mail by mistake and delete this e-mail from your system.
> E-mail transmission cannot be guaranteed to be secure or error-free
> as information could be intercepted, corrupted, lost, destroyed, arrive
> late or incomplete, or contain viruses.  The sender therefore does not
> accept liability for any errors or omissions in the contents of this
> message which arise as a result of e-mail transmission.
> If verification is required please request a hard-copy version.
> This message is provided for informational purposes and should not
> be construed as an invitation or offer to buy or sell any securities or
> related financial instruments.
> GAM operates in many jurisdictions and is
> regulated or licensed in those jurisdictions as required.
>
> ****************************************************************************
>
>


--
Regards & Thanks
BN

<div>Greetings,</div>
<div>&nbsp;</div>
<div>Thank you all for your reply...</div>
<div>&nbsp;</div>
<div>We have a mix of Oracle version starting from 8.1.7</div>
<div>&nbsp;</div>
<div>Right now I have a few lines in the RMAN Hotbackup script that extracts
the info (success or error) from the RMAN log and write into on my tables with
the following info:</div>
<div>&nbsp;</div>
<div>hostname, instance_name,&nbsp;start_time, end_time, status (varchar2(4000)
)</div>
<div>&nbsp;</div>
<div># Start of Code</div>
<div>HOST=$(hostname)</div>
<div>PROGRAM=${0##*/}</div>
<div>START_TIME=$(date '+%m/%d/%y %X')</div>
<div>BACKUP_LOGFILE=&quot;..../.../rman_backup.log&quot;</div>
<div>&nbsp;</div>
<div>exec 2&gt;&amp;1 &gt;&gt; $BACKUP_LOGFILE</div>
<div>&nbsp;</div>
<div>RMAN&nbsp; Backup commands {}</div>
<div>&nbsp;</div>
<div>END_TIME=$(date '+%m/%d/%y %X')</div>
<div>&nbsp;</div>
<div>STATUS=$(awk '/ERROR MESSAGE STACK FOLLOWS/,/RMAN&gt;/ {print $0}' &lt;$
{BACKUP_LOGFILE}|sed '/^$/d')</div>
<div>&nbsp;</div>
<div>if [[ -z &quot;$STATUS&quot; ]]<br>then<br>&nbsp;&nbsp; STATUS=&quot
;Backup Successful&quot;<br>fi<br>&nbsp;</div>
<div>
<p>$ORACLE_HOME/bin/sqlplus -S &lt;&lt;EOF<br>/ as sysdba</p>
<p>prompt Inserting Backup timing info into system.XXX_backup_status<br>prompt
START_TIME=$START_TIME&nbsp;&nbsp; END_TIME=$END_TIME&nbsp; STATUS=$STATUS</p>
<p>insert into system.XXXX_backup_status<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp
;&nbsp; (INSTANCE_NAME,HOST_NAME,SCRIPT_NAME,START_TIME,END_TIME,STATUS)<br>
&nbsp;&nbsp; values<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ('$ORACLE_SID','$HOST','
$PROGRAM',to_date('$START_TIME','MM/DD/YY HH24:MI:SS'),<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; to_date('$END_TIME','MM/DD/YY HH24:MI:SS')
,'$STATUS');</p>
<p>EOF<br></p>
<p># End of Code</p>
<p>The SED is to remove the blank lines, other wise INSERT complains.</p></div>
<div>&nbsp;</div>
<div>IF there are no errors then STATUS string will be zero, so I assume Backup
is successful.</div>
<div>&nbsp;</div>
<div>I am only hoping that VARCAHR2(4000) should be good enough to hold any
&nbsp; type of RMAN Error message. Please note, I am collecting all the error
messages lines, not just the last error message line.</div>
<div>&nbsp;</div>
<div>Regards &amp; Thanks</div>
<div>BN<br><br>&nbsp;</div>
<div><span class="gmail_quote">On 12/28/05, <b class="gmail_sendername">Johnson
, George</b> &lt;<a href="mailto:GJohnson@(protected)">GJohnson@(protected)</a>&gt;
wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0
.8ex; BORDER-LEFT: #ccc 1px solid"><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I
was under the impression that this was already stored or is that only under 10g
and with central catalog? I just remember reading something about this in a
tech doc somewhere.
<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Rgds<br><br>-- --Original Message-
----<br>From: <a href="mailto:oracle-l-bounce@(protected)">oracle-l-bounce
@(protected)</a> [mailto:<a href="mailto:oracle-l-bounce@(protected)">oracle
-l-bounce@(protected)
</a>] On Behalf Of Grant Allen<br>Sent: 28 Dec 2005 7:34<br>To: <a href="mailto
:bnsarma@(protected)">bnsarma@(protected)</a><br>Cc: lazydba<br>Subject: Re: Saving
Backup Errros inside the db<br><br><br>BN wrote:<br><br>&gt; Greetings,
<br>&gt;<br>&gt; I would like to save the following RMAN error messages inside
a table<br>&gt; along with the timestamp<br>&gt;<br>&gt; RMAN-00569: ==========
===== ERROR MESSAGE STACK FOLLOWS<br>&gt;<br>[snip]<br><br>&gt; Can somebody
suggest me how I can do this. I want to save the new
<br>&gt; lines, as they appear in the error message.<br>&gt;<br>&gt; Am I
looking at a CLOB or do I have other options.<br><br><br>BN - others are
already suggesting the post-backup shell script, but you<br>do have options
other than CLOB.&nbsp;&nbsp;You can save the new lines with some
<br>easy regex work and the ever-useful chr(10) or chr(13)||chr(10) trick<br>
(depending on your OS).&nbsp;&nbsp;This means you can opt for char or varchar2,
<br>which you might find *much* easier to use in the long run.<br><br>Ciao<br>
Fuzzy<br>:-)<br>--<br><a href="http://www.freelists.org/webpage/oracle-l">http:
//www.freelists.org/webpage/oracle-l</a><br><br><br><br>************************
****************************************************<br>This message contains
confidential information and is intended only
<br>for the individual or entity named.&nbsp;&nbsp;If you are not the named
addressee<br>you should not disseminate, distribute or copy this e-mail.<br
>Please notify the sender immediately by e-mail if you have received<br>this e
-mail by mistake and delete this e-mail from your system.
<br>E-mail transmission cannot be guaranteed to be secure or error-free<br>as
information could be intercepted, corrupted, lost, destroyed, arrive<br>late or
incomplete, or contain viruses.&nbsp;&nbsp;The sender therefore does not<br>
accept liability for any errors or omissions in the contents of this<br>message
which arise as a result of e-mail transmission.<br>If verification is required
please request a hard-copy version.<br>This message is provided for
informational purposes and should not
<br>be construed as an invitation or offer to buy or sell any securities or<br
>related financial instruments.<br>GAM operates in many jurisdictions and is<br
>regulated or licensed in those jurisdictions as required.<br>******************
**********************************************************
<br><br></blockquote></div><br><br clear="all"><br>-- <br>Regards &amp; Thanks
<br>BN