[ windows 서버에서 cold 백업과 export 백업 설정 및 스케쥴링 ]
1. begin.sql 작성
2. end.sql 작성
3. 백업 스크립트 작성(backup.bat)
4. windows 스케쥴러에 등록
1. begin.sql : dba_tablespaces에 있는 테이블스페이스명으로 설정
connect / as sysdba
alter tablespace SYSTEM begin backup;
alter tablespace SYSAUX begin backup;
alter tablespace UNDOTBS1 begin backup;
alter tablespace USERS begin backup;
alter tablespace ERP_DATA begin backup;
alter tablespace ERP_INDEX begin backup;
exit
2. end.sql
connect / as sysdba
alter tablespace SYSTEM end backup;
alter tablespace SYSAUX end backup;
alter tablespace UNDOTBS1 end backup;
alter tablespace USERS end backup;
alter tablespace ERP_DATA end backup;
alter tablespace ERP_INDEX end backup;
alter database backup controlfile to 'E:\backup\control_bak.ctl' reuse;
exit
3. 백업 스크립트 작성(backup.bat)
date /t > e:\backup\backup.log
time /t >> e:\backup\backup.log
call D:\app\Administrator\product\11.2.0\dbhome_1\BIN\sqlplus.exe /nolog @c:\backup\begin.sql
xcopy D:\oradata\ERPDB\* E:\backup /s /e /y
xcopy D:\archive\* E:\backup\arch /s /e /y
call D:\app\Administrator\product\11.2.0\dbhome_1\BIN\sqlplus.exe /nolog @c:\backup\end.sql
del D:\backup_exp\exp_full_oradata.*
call D:\app\Administrator\product\11.2.0\dbhome_1\BIN\exp.exe system/password
file=E:\backup_exp\exp_full_oradata.dmp log=E:\backup_exp\exp_full_oradata.log full=y
date /t >> e:\backup\backup.log
time /t >> e:\backup\backup.log
4. windows 스케쥴러에 등록