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 -> Re: backup oracle database

Re: backup oracle database

From: Matthias Gresz <GreMa_at_t-online.de>
Date: 15 Apr 1998 08:53:13 GMT
Message-ID: <6h1shp$u1o$3@news02.btx.dtag.de>


No, it isn't enough to stop the services, which result will be the same as if you cut off power supply. To have a good cold backup you've got to insure that the db is shut down in a consistent state. To insure consistency you've got to shut down your db, then start up it in restricted mode to let it do some instance recovery if necessary and then shut down again.

To give you a hint how this could be done take a look at our scripts and batches:

we use NT4 with Arcserve 6.
'before backup job' will be a command file named 'BACKDOWN.CMD'. 'After Backup job' will be 'STARTUP.CMD'.

REM BACKDown.CMD

REM Making full export
call c:\...\cmd\exp_full.cmd

REM Copying export out of RAID
copy D:\dbf\dump f:\dump

REM Shutting down
call c:\cmd\down_bac.cmd

REM Copying control-dump out of RAID
copy c:\...\orant\rdbms73\trace\control f:\control

REM Copying archived redo-logs out of RAID call c:\...\cmd\cop_arch.cmd

REM EXP_FILL.CMD c:\...\orant\bin\exp73.exe <dba>/<pwd> file=d:\dbf\dump\exp.dmp full=y log=d:\dbf\dump\log.txt >> d:\dbf\dump\exp.log REM Must say nobody is connected at this time since shop closes 20:00h.

REM DOWN_BAC.CMD
c:\...\orant\bin\SVRMGR23.EXE @c:\....\down_bac.sql

REM DOWN_BAC.SQL CONNECT <dba>/<pwd>
SHUTDOWN IMMEDIATE;
STARTUP RESTRICT;

ALTER SYSTEM SWITCH LOGFILE;		'archiving all 'current' redo logs
ALTER SYSTEM SWITCH LOGFILE;
ALTER SYSTEM SWITCH LOGFILE;
ALTER SYSTEM SWITCH LOGFILE;

ALTER DATABASE BACKUP CONTROLFILE TO TRACE; SHUTDOWN; REM STARTUP.CMD
c:\...\orant\bin\SVRMGR23.EXE @c:\....\down_bac.sql

REM STARTUP.SQL
connect <dba>/<pwd>
startup
set termout off
--filling data buffers
select * from <BlahBlah>;
--keeping some packages in cache

EXECUTE SYS.DBMS_SHARED_POOL.KEEP('SYS.STANDARD');	'pinning all packages you're using into SGA
EXECUTE SYS.DBMS_SHARED_POOL.KEEP('SYS.DBMS_STANDARD');
EXECUTE SYS.DBMS_SHARED_POOL.KEEP('SYS.DBMS_UTILITY');
EXECUTE SYS.DBMS_SHARED_POOL.KEEP('SYS.DBMS_DESCRIBE');
EXECUTE SYS.DBMS_SHARED_POOL.KEEP('SYS.PIDL');
EXECUTE SYS.DBMS_SHARED_POOL.KEEP('SYS.DIANA');
EXECUTE SYS.DBMS_SHARED_POOL.KEEP('SYS.DIUTIL');
EXECUTE SYS.DBMS_SHARED_POOL.KEEP('<BlahBlah');





On Tue, 14 Apr 1998 20:08:44 +0200, "ronny de munter" <ronny.de.munter_at_simac.be> wrote:

>we will use backup exec 7.x from seagate on NT4.0 server
>we will stop the database then take a backup , restart the database
>is it enough to stop the services with the command
>net stop oracleservice
>and also
>net start oracleservice
>
>i have a little bit knowledge about oracle, with NT4.0 i have no problem
>
>

--

Regards

Matthias Gresz :-)

GreMa_at_T-online.de Received on Wed Apr 15 1998 - 03:53:13 CDT

Original text of this message

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