Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> How to automate process to get out of backup mode if a server crashes?

How to automate process to get out of backup mode if a server crashes?

From: JAW <jwilliam_at_aglresources.com>
Date: 12 Jul 2005 08:29:39 -0700
Message-ID: <1121182179.292490.247590@g43g2000cwa.googlegroups.com>


I have inherited some 8.1.7.4 databases on Windows from a new company acquired. We have had the servers crash recently during the hot backup processing. This means doing the ALTER DATABASE END BACKUP after getting back to the command prompt before opening the database.

My Question: Has anyone been successfully at using a DATABASE event trigger to fix this sort of thing without DBA intervention?

Basically, I would add code similar to the below to resolve.

SQL*Plus: Release 8.1.7.0.0 - Production on Tue Jul 12 11:16:24 2005

(c) Copyright 2000 Oracle Corporation. All rights reserved.

ERROR:
ORA-01033: ORACLE initialization or shutdown in progress

REM -   --------------------------------------------------------- -
REM -   Find hot backup datafiles that are active after crash     -
REM -   Also, create script to resolve issue after database mount -
REM -   JAW - 03-03-2003                                          -
REM -   --------------------------------------------------------- -

SELECT V1.FILE#, NAME
 FROM V$BACKUP V1, V$DATAFILE V2
      WHERE V1.STATUS = 'ACTIVE' AND V1.FILE# = V2.FILE# ; set heading off
set feedback off
set linesize 150

SPOOL c:\temp\end_backup.sql

prompt set heading on
prompt set feedback on

SELECT 'ALTER DATABASE DATAFILE ''' || NAME || ''' END BACKUP;'  FROM V$BACKUP V1, V$DATAFILE V2
      WHERE V1.STATUS = 'ACTIVE' AND V1.FILE# = V2.FILE# ; spool off

@c:\temp\end_backup.sql

alter database open; Received on Tue Jul 12 2005 - 10:29:39 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US