oracle的冷備指令碼
#!/bin/sh
#
# 該指令碼可以在linux下測試通過
#
sqlplus '/as sysdba' <Remark SQL *Plus variables.
Set feedback off
set heading off
set trimspool off
set verify off
Set pagesize 0 linesize 200
Remark set the directory and the script file name.
Define dir=/backup/cold_wholebackup
Define temp=/home/oracle/niyl/temp.sql
Define fil=/home/oracle/niyl/cold_wholebackup.sql
Remark spool the backup command to the file defind above.
Spool &temp
Select 'host cp '||name||' &dir' from v$datafile order by 1 ;
Select 'host cp '||member||' &dir' from v$logfile order by 1;
Select 'host cp '||name||' &dir' from v$controlfile order by 1;
Select 'host cp '||name||' &dir' from v$tempfile order by 1;
Spool off
Remark deal with the temp sql. remove select statement from the sql.
host grep ^host &temp > &fil
Remark shutdown database cleanly.
Shutdown immediate ;
Remark run the copy command from the backup script.
@&fil
Remark bakcup ended and startup the database.
Startup
exit
!
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/10867315/viewspace-963991/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- oracle冷備指令碼薦Oracle指令碼
- Oracle物理冷備份指令碼Oracle指令碼
- windows 下的Oracle 冷備份指令碼WindowsOracle指令碼
- 冷備指令碼指令碼
- oracle自動冷備份指令碼Oracle指令碼
- oracle 自動冷備份指令碼(轉)Oracle指令碼
- Oracle冷備份(一致備份)指令碼Oracle指令碼
- 生成冷備份指令碼指令碼
- windows和unix平臺下Oracle冷備份指令碼WindowsOracle指令碼
- oracle的熱備指令碼Oracle指令碼
- Oracle 冷備份Oracle
- ORACLE備份指令碼Oracle指令碼
- oracle 熱備指令碼 .Oracle指令碼
- oracle 備份指令碼Oracle指令碼
- 備份&恢復系列之一:怎樣在linux中寫對oracle的冷備份指令碼!LinuxOracle指令碼
- Oracle冷備份級冷備份的不完全恢復Oracle
- oracle的熱備份和冷備份Oracle
- oracle冷備恢復Oracle
- ORACLE日常備份指令碼Oracle指令碼
- Oracle 集中備份指令碼Oracle指令碼
- oracle RMAN備份指令碼Oracle指令碼
- oracle_備份指令碼Oracle指令碼
- 分享Oracle Rman的備份指令碼Oracle指令碼
- [Oracle] rman備份的指令碼(1)Oracle指令碼
- ORACLE RMAN備份的指令碼配置Oracle指令碼
- Oracle OCP(60):冷備份Oracle
- oracle 冷備及恢復Oracle
- Oracle冷備份練習Oracle
- Oracle冷備份的通常步驟Oracle
- Oracle冷備份和熱備份的處理Oracle
- Oracle 熱備份和冷備份的區別Oracle
- [Oracle] rman備份指令碼(2)Oracle指令碼
- oracle for linux 備份指令碼OracleLinux指令碼
- Oracle邏輯備份指令碼Oracle指令碼
- oracle rman備份指令碼收集Oracle指令碼
- Oracle資料庫的冷備份及冷備份異地恢復方法Oracle資料庫
- 【RMAN】RMAN備份恢復1 RMAN冷備指令碼與crontab計劃任務指令碼
- Oracle DG搭建2(冷備方式)Oracle