Oracle 10g on Windows Server off-line database backup - a few questions
819158Jun 13 2012 — edited Jun 26 2012I'd like to do an Oracle off-line backup every night. Please tell me what you think about my plan.
First, run this batch file.
set oracle_sid=PLDG
C:\oracle\product\10.2.0\bin\sqlplusw.exe /nolog @c:\oracle\product\oradata\pldg\shutdb.sql
C:\oracle\product\10.2.0\bin\oradim -shutdown -sid PLDG -shuttype srvc
net stop OracleORADB10GTNSListenerPLDG
This is the shutdb.sql script that the above batch file calls.
set echo on
spool C:\oracle\product\oradata\pldg\shutdb.log
connect /@pledgemaker as sysdba
shutdown immediate
spool off
exit
....that should shut down the database.
Now I will copy the files that the following three queries pulls up to another server.
SQL> select name from sys.v_$datafile;
NAME
-----------------------------------------------------
C:\ORACLE\PRODUCT\ORADATA\PLDG\SYSTEM01.DBF
C:\ORACLE\PRODUCT\ORADATA\PLDG\UNDOTBS01.DBF
C:\ORACLE\PRODUCT\ORADATA\PLDG\SYSAUX01.DBF
C:\ORACLE\PRODUCT\ORADATA\PLDG\DRSYS01.DBF
C:\ORACLE\PRODUCT\ORADATA\PLDG\ODM01.DBF
C:\ORACLE\PRODUCT\ORADATA\PLDG\PLEDGEMAKER_DATA01.DBF
C:\ORACLE\PRODUCT\ORADATA\PLDG\PLEDGEMAKER_INDX01.DBF
C:\ORACLE\PRODUCT\ORADATA\PLDG\TOOLS01.DBF
C:\ORACLE\PRODUCT\ORADATA\PLDG\USERS01.DBF
C:\ORACLE\PRODUCT\ORADATA\PLDG\XDB01.DBF
C:\ORACLE\PRODUCT\ORADATA\PLDG\MAILING01.DBF
C:\ORACLE\PRODUCT\ORADATA\PLDG\BO516_REP01.DBF
C:\ORACLE\PRODUCT\ORADATA\PLDG\PLEDGEMAKER_DATA02.DBF
C:\ORACLE\PRODUCT\ORADATA\PLDG\PLEDGEMAKER_DATA03.DBF
C:\ORACLE\PRODUCT\ORADATA\PLDG\PLEDGEMAKER_INDX02.DBF
C:\ORACLE\PRODUCT\ORADATA\PLDG\PLEDGEMAKER_INDX03.DBF
SQL> select member from sys.v_$logfile;
MEMBER
-------------------------------------------
C:\ORACLE\PRODUCT\ORADATA\PLDG\REDO01A.LOG
C:\ORACLE\PRODUCT\ORADATA\PLDG\REDO01B.LOG
C:\ORACLE\PRODUCT\ORADATA\PLDG\REDO02A.LOG
C:\ORACLE\PRODUCT\ORADATA\PLDG\REDO02B.LOG
C:\ORACLE\PRODUCT\ORADATA\PLDG\REDO03A.LOG
C:\ORACLE\PRODUCT\ORADATA\PLDG\REDO03B.LOG
SQL> select name from sys.v_$controlfile;
NAME
---------------------------------------------
C:\ORACLE\PRODUCT\ORADATA\PLDG\CONTROL01.CTL
C:\ORACLE\PRODUCT\ORADATA\PLDG\CONTROL02.CTL
C:\ORACLE\PRODUCT\ORADATA\PLDG\CONTROL03.CTL
After copying the above files, I want to start the database back up. First I run this batch file
set oracle_sid=PLDG
net start OracleORADB10GTNSListenerPLDG
C:\oracle\product\10.2.0\bin\oradim -startup -sid PLDG -starttype srvc,inst
Then run this script.
set echo on
spool C:\oracle\product\oradata\pldg\startdb.log
connect /@pledgemaker as sysdba
startup
spool off
exit
- Is this plan complete?
- Will the filenames that the above three queries retrieve ever change in the future? Or do they remain the same?
- There are other files in the C:\ORACLE\PRODUCT\ORADATA\PLDG\ directory, such as TEMP01.DBF. I am assuming that I do not need to back these files up. Is this correct?
Thanks so much for your help!
Edited by: DataHandle on Jun 13, 2012 3:49 PM