1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
| spool D:\DATABASE\SAUVEGARDE\CHAUD\PROD\RapportPROD.log
set serveroutput on
set echo off
set linesize 255
set feedback off
set verify off
prompt **********************************************************************
prompt * Fichier : D:\DATABASE\SAUVEGARDE\CHAUD\PROD\ouvertePROD.sql *
prompt * *
prompt * sauvegarde a chaud de la base PROD *
prompt * Auteur : wattman *
prompt * Derniere Modif : 21/07/2005 *
prompt **********************************************************************
connect sys/***@PROD as sysdba
prompt ***** DEBUT DE SAUVEGARDE A CHAUD *****
select SUBSTR(GLOBAL_NAME, 0, 50) INSTANCE, to_char(sysdate,'DD/MM/YYYY HH24:MI:SS') DEBUT from global_name;
archive log list;
alter system switch logfile;
alter tablespace SYSTEM begin backup;
host xcopy D:\DATABASE\PROD\SYSTEM.DBF D:\DATABASE\SAUVEGARDE\CHAUD\PROD\ /s /h /r /D /Y
alter tablespace SYSTEM end backup;
alter tablespace RBS begin backup;
host xcopy D:\DATABASE\PROD\RBS.DBF D:\DATABASE\SAUVEGARDE\CHAUD\PROD\ /s /h /r /D /Y
alter tablespace RBS end backup;
alter tablespace SYSAUX begin backup;
host xcopy D:\DATABASE\PROD\SYSAUX.DBF D:\DATABASE\SAUVEGARDE\CHAUD\PROD\ /s /h /r /D /Y
alter tablespace SYSAUX end backup;
alter tablespace TOOLS begin backup;
host xcopy D:\DATABASE\PROD\TOOLS.DBF D:\DATABASE\SAUVEGARDE\CHAUD\PROD\ /s /h /r /D /Y
alter tablespace TOOLS end backup;
alter tablespace DATA begin backup;
host xcopy D:\DATABASE\PROD\DATA.DBF D:\DATABASE\SAUVEGARDE\CHAUD\PROD\ /s /h /r /D /Y
alter tablespace DATA end backup;
alter tablespace INDX begin backup;
host xcopy D:\DATABASE\PROD\INDX.DBF D:\DATABASE\SAUVEGARDE\CHAUD\PROD\ /s /h /r /D /Y
alter tablespace INDX end backup;
alter tablespace HISTO begin backup;
host xcopy D:\DATABASE\PROD\HISTO.DBF D:\DATABASE\SAUVEGARDE\CHAUD\PROD\ /s /h /r /D /Y
alter tablespace HISTO end backup;
alter database backup controlfile to 'D:\DATABASE\SAUVEGARDE\CHAUD\PROD\CTRL\control.ctl' REUSE;
alter system switch logfile;
archive log list;
prompt ***** FICHIERS DE PARAMETRES*****
prompt xcopy "D:\DATABASE\PROD\PFILE\*.*" "D:\DATABASE\SAUVEGARDE\CHAUD\PROD\PFILE\" /s /h /r /D /Y
host xcopy "D:\DATABASE\PROD\PFILE\*.*" "D:\DATABASE\SAUVEGARDE\CHAUD\PROD\PFILE\" /s /h /r /D /Y
prompt xcopy "D:\DATABASE\PROD\SPFILEPROD.ora" "D:\DATABASE\SAUVEGARDE\CHAUD\PROD\SPFILE\" /s /h /r /D /Y
host xcopy "D:\DATABASE\PROD\SPFILEPROD.ora" "D:\DATABASE\SAUVEGARDE\CHAUD\PROD\SPFILE\" /s /h /r /D /Y
prompt ***** FIN DE SAUVEGARDE A CHAUD *****
select SUBSTR(GLOBAL_NAME, 0, 50) INSTANCE, to_char(sysdate,'DD/MM/YYYY HH24:MI:SS') FIN from global_name;
spool off
exit |
Partager