Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> shutdown normal vs. immediate
Regarding this guy:
>>
>>> Tomas Tenzer <t.tenzer_at_MAIL.DPC.UMASSP.EDU>
12/19/95 10:30am >>>
Hi
We have automated our nitely backups via the
following scripts. Our problem is that sometimes
the database does not come down completely.
The message I get the next morning when I logon is
"shutdown in progress".
No one is accessing Oracle at the time the backups
are run. Other nites everything runs fine. Any
ideas what the problem may be & solutions?
snip
<<
I think you might think about doing hot backups???? Then you would not have to shut down at all. If you are running version 6 then I under stand. If you are afraid to migrate to running in archive log mode I think you should reconsider. To help you on your decision here is the process I went through in getting a site running OS/2 up and running from noarchivelog mode to archivelog mode. Before this upgrade they were simply backing up their database with sytos brand backup while the database was up, which I explained to them was probably not a very good idea (later we learned that this backup was responsible for system failures). Note that this user had a requirement to be up 24/7:
ARCHIVE MODE: Implementation Details and Corresponding Backup Procedures for TFC Systems OS/2 instructions
When you are done backing up all the datafiles, backup the control file as well.
alter database backup controlfile to \backup-directory\ctlback.ora reuse;
host <backup drive:\backup-directory\ctlback.ora to tape using a file backup utility> exit
Notes:
For added security it is very wise to mirror your control files and
redo logs so if one file is corrupted it is recoverable. The Oracle 7
Server Database Administration manual explains how to accomplish these
mirrored se
tups.
With archiving of redo logs complete recovery is often possible when
media failure occurs. Note that there are a variety of types and
severities of media failure, and each combination has a different
method of recovery.
Fortunately Oracle has documented these procedures well.
If you find one day that your disk is filled almost completely you may
get an oracle error like " archiver is stuck " To fix this simply back
up to tape (or floppy in OS/2 use ocopy if necessary) and delete all
but the l
atest-numbered archived redo log in the arch directory.
The following are instructions on for Mike Bauers and Sgt. Johnson regarding backups required:
The following is a listing of a command file and a SQL script which,
when run by typing "databack" at the OS/2 prompt, backs up whatever
datafiles are currently associated with a particular instance. Note
that databack.c
md must be customized by changing the system password to that of your
instance, changing the directory location of databack.sql and changing
the location of the drive and directory where the backed up files
should go. Th
ese scripts assume that you will be backing up your database to a
network drive. It also assumes that this script is run on a machine
that can get into sqlplus, get into sqldba, and connect internal; that
would usually b
e the machine that is the database server itself. This procedure
produces a file called databack.dba; be sure to keep an accurate hard
copy of this file on hand as it shows the name and directory of the
database datafile
s. Having this listing might make life much easier in the event of a
hard drive failure:
File: DATABACK.CMD
/*
Purpose: to kick off databack.sql
Date: 12/19/95
Programmer: Michael A. Fons, T-NETIX, Inc.
*/ /**************************************************/ /* NOTE: TO CUSTOMIZE THIS PROGRAM CHANGE THE */ /* LOCATION THAT THE DATABACK.SQL PROGRAM RESIDES */ /* IN AND CHANGE THE PARAMETER TO BE THE DRIVE AND */ /* DIRECTORY WHERE DATA AND CONTROL FILES ARE TO */ /* TO BE WRITTEN. */ /***************************************************/
"sqlplus system/manager @c:\fons\databack.sql c:\backup"
File: DATABACK.SQL
/*
Purpose: to backup all datafiles and the control file to some
destination
directory while remaining up and running.
Date: 12/17/95
Programmer: Michael A. Fons, T-Netix, Inc.
*/
define BACKUP_DRIVE_AND_DIRECTORY="&&1."
set pagesize 0
set feedback off
set verify off
column x format a132
set linesize 132
spool databack.dba
prompt spool databack.lis
prompt connect internal
select
'alter tablespace '||tablespace_name||' begin backup;' x, 'host ocopy '||file_name||' &&BACKUP_DRIVE_AND_DIRECTORY.' x, 'alter tablespace '||tablespace_name||' end backup;' xfrom sys.dba_data_files
prompt alter database backup controlfile to
'&&BACKUP_DRIVE_AND_DIRECTORY.\ctlback.ora'
prompt reuse
prompt /
prompt spool off
spool off
host sqldba lmode=yes < databack.dba
prompt ***********************************************prompt Check out databack.dba and databack.lis for any errors prompt that might have occured.
prompt ***********************************************
exit
4. Archive logs are located in a directory that you can find the location of in this manner:
sqldba connect internal show parameter log_archive_dest exit The file names of these archived redo logs follows the formatarc#####.arc. So for example a sample name might be arc00123.arc. Oracle creates these files automatically, and the numbers on the files increase sequ
arc00123.arc arc00124.arc arc00125.arc
except the latest one (because that one may be currently being
created).
Author: Michael A. Fons, T-NETIX, Inc.
Date: 12/7/95
*/ /************************************************/ /* BELOW ARE THE ONLY STRINGS YOU SHOULD HAVE */ /* TO CHANGE IN THIS FILE: THE RIGHT HAND */ /* SIDE OF THE FIRST ASSIGNMENT BELOW SHOULD BE */ /* THE DIRECTORY TO WHICH THE ARCHIVED REDO */ /* LOGS SHOULD BE BACKED UP. THE RIGHT HAND */ /* SIDE OF THE SECOND ASSIGNMENT BELOW SHOULD */ /* BE THE DIRECTORY WHERE THE ARCHIVED LOGS */ /* CURRENTLY RESIDE. */ /************************************************/backspec = "c:\backup"
/************MAIN PROGRAM************************/call RxFuncAdd 'SysFileSearch', 'RexxUtil', 'SysFileSearch'
ftmp = "tempfile.lis"
archspec = insert(archdir, "\arc*.arc")
del ftmp
dir "/f/o" archspec ">" ftmp
rc = SysFileSearch('.ARC', ftmp, 'file')
do i=1 to (file.0 - 1)
say "Moving" file.i "to" backspec "..." copy "/v" file.i backspec if rc = 0 then do del file.i end else do say "Error copying file" file.i "." end
![]() |
![]() |