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

Home -> Community -> Mailing Lists -> Oracle-L -> NT - Re: online oracle backup on windows2000

NT - Re: online oracle backup on windows2000

From: Paul Drake <paled_at_home.com>
Date: Sat, 02 Jun 2001 16:37:23 -0700
Message-ID: <F001.003195E5.20010602162522@fatcity.com>

Arslan Bahar wrote:
>
> i wanna to take online backup on w2000 and i will write a batch
> file to perform
> ALTER TABLE SPACE ... BEGIN BACKUP and END BACKUP commands.
> but i dont know how can i sent files to tape on command prompt.
>

you don't need to execute it in a batch file - run it from sqlplus:

alter tablespace SYSTEM begin backup;
host ocopy D:\ORACLE\ORADATA\TEST\SYSTEM01.DBF G:\backup\TEST\hot\ host dbv FILE=G:\backup\TEST\hot\SYSTEM01.DBF BLOCKSIZE=8192 LOGFILE=G:\backup\TEST\HOT\SYSTEM01.LOG
host pacomp -a -c1 E:\zipfiles\TEST\hot\SYSTEM01.zip G:\backup\TEST\HOT\SYSTEM01.*;
host del /Q G:\backup\TEST\hot\SYSTEM01.*; alter tablespace SYSTEM end backup;

The bonus lines in this backup job run the DBVerify utility and then compress the datafile.
You will need a batch file to call this file with sqlplus (which will be executed as a scheduled job in the OS).
as far as NT Backup - here's the man page

ntbackup backup [systemstate] "bks file name" /J {"job name"} [/P {"pool name"}] [/G {"guid name"}] [/T { "tape name"}] [/N {"media name"}] [/F

{"file name"}] [/D {"set description"}] [/DS {"server name"}] [/IS
{"server name"}] [/A] [/V:{yes|no}] [/R:{yes|no}] [/L:{f|s|n}] [/M
{backup type}] [/RS:{yes|no}] [/HC:{on|off}] [/UM] 

and here is an example job - use the GUI to schedule it at a future time, and examine the properties of the scheduled job in he control panel - scheduled tasks (the job won't show in an AT command - Windows 2000 only).

C:\WINNT\system32\ntbackup.exe backup "@C:\Documents and Settings\pldrake\Local Settings\Application Data\Microsoft\Windows NT\NTBackup\data\test_system.bks" /n "Media created 6/2/2001 at 6:58 PM" /d "test_system" /v:yes /r:no /rs:no /hc:on /m copy /j "test_system" /l:f /p "Travan"

hth,

Paul

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Paul Drake
  INET: paled_at_home.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Sat Jun 02 2001 - 18:37:23 CDT

Original text of this message

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