基於資料庫的熱備指令碼

RAYSUNNNY發表於2013-12-24
set feedback off
set heading off
set verify off
set trimspool off
set pagesize 0
set linesize 200
define dir='/home/oracle/hotbackup'
define script='/home/oracle/backupdatabase.sql'
spool &script
select 'ho cp '||name||' &dir' from v$datafile;
spool off
alter database begin backup;
start &script
alter database end backup;
alter database backup controlfile to '&dir/controlbak.crl';
create pfile='&dir/initceltic.ora' from spfile;

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/29227735/viewspace-1064112/,如需轉載,請註明出處,否則將追究法律責任。

相關文章