冷備腳本
set feedback off
set heading off
set verify off
set trimspool off
set echo off
set time off
set timing off
set pagesize
set linesize
define dir=
define diroutmike=
spool &diroutmike
select
select
spool off;
shutdown immediate;
@&diroutmike
startup;
以上腳本放在/u
在數據庫運行時可以運行此腳本來冷備
熱備腳本
set feedback off
set pagesize
set heading off
set verify off
set linesize
set trimspool on
set echo off
set time off
set timing off
undefine mikedir
undefine mikescp
define mikedir=
define mikescp=
declare
cursor cur_tablespace is select tablespace_name from dba_tablespaces where status <>
nd contents not like
cursor cur_datafile(tn varchar
begin
for ct in cur_tablespace loop
dbms_output
for cd in cur_datafile(ct
dbms_output
end loop;
dbms_output
end loop;
end;
/
以上腳本放在/u
在數據庫運行時可以運行此腳本來熱備
From:http://tw.wingwit.com/Article/program/Oracle/201311/18069.html