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 -> Off-line backup in Windows NT/2K

Off-line backup in Windows NT/2K

From: Dino Hsu <dino1_nospam_at_ms1.hinet.net>
Date: Thu, 02 Aug 2001 09:45:06 +0800
Message-ID: <cs8hmtk62kkbqkh7d6cva033ltfk7v211r@4ax.com>

Dear all,

I have written scripts to do off-line backup of a database as follows:

<backup_twdm.bat begin>

@ECHO OFF
IF "%1"=="" GOTO ERROR
SET ORACLE_SID=TWDM
svrmgrl @shutdown_twdm.sql
"c:\program files\winzip\wzzip" -rP d:\twdm.bak\twdm_%1 d:\twdm svrmgrl @startup_twdm.sql
GOTO END
:ERROR
ECHO Usage backup_twdm.bat yyyymmdd
GOTO END
:END
<backup_twdm.bat end>

<startup_twdm.sql begin>

connect internal;
startup pfile=d:\twdm\ctlfile\inittwdm.ora;
<startup_twdm.sql end>

<shutdown_twdm.sql begin>

connect internal;
shutdown immediate;
<shutdown_twdm.sql end>

Among which wzzip.exe is the command-line add-on of WINZIP 8.0. With the help from a compression program such as WINZIP, the size of the backup can be dramatically decreased to about only 1/20 and makes backup process much easier.

There are some issues here, however, to be discussed about: 1.I used to see a script in AIX like this: svrmgrl <<EOF

cmd-1...
cmd-2...
cmd-3...

EOF
which embeds SQL or SQL*Plus commands in the shell program. If I can do this in a DOS/Windows batch program, the startup_twdm.sql and shutdwon_twdm.sql can be suppressed; but I don't know how. 2.This batch program (backup_twdm.bat) has one parameter, date with format yyyymmdd, to be used as part of the archive file name. I wish this batch program can get the current date automatically, but I don't know how. Maybe some outside programming is necessary. 3.WINZIP 8.0 cannot compress files bigger than 8G, so make sure the datafiles are not too big. (but I don't know the exact limitation, I cannot find it)
4.WINZIP 8.0 doesn't seem to generate a log, either.

I don't think this problem exists in any Unix platforms because the shell program is so powerful. It is a problem, however, in Windows NT/2K environments. Any comments are highly appreciated.

Dino Received on Wed Aug 01 2001 - 20:45:06 CDT

Original text of this message

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