oracle cold backup scripts

netwant發表於2012-07-02
oracle cold backup[@more@]coldbak.sql
-----------
set pagesize 0 linesize 3000 feedback off verify off trimspool on termout off trimout on serveroutput on
define fil=/home/oracle/cdbk.sql
define log=/home/oracle/cdbk.log
spool &fil
prompt connect sys/oracle as sysdba;
prompt shutdown immediate;
select 'host cp '||file_name||' /manualbak/clonedb'||substr(file_name,instr(file_name,'/',-1,1)) from dba_data_files;
prompt startup;
spool off
spool &log
@&fil;
spool off
------------

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

相關文章