ITPub博客

windows 下的Oracle 冷备份脚本

原创 Linux操作系统 作者:foxmile 时间:2007-12-12 11:55:54 0 删除 编辑
sqlplus /nolog
conn / as sysdba
Rem 冷备份脚本
Rem 2007
set feedback off heading off verify off trimspool off
set pagesize 0 linesize 200
define dir='C:arc_zerobackup'
define cmdfile='C:arc_zerobackupcold_backup_command.sql'
prompt *** spooling to &cmdfile
spool &cmdfile
select 'host copy ' || name || ' &dir' from v$datafile order by 1;
select 'host copy ' || member || ' &dir' from v$logfile order by 1;
select 'host copy ' || name || ' &dir' from v$controlfile order by 1;
select 'host copy ' || name || ' &dir' from v$tempfile order by 1;
spool off;
shutdown immediate;
@&cmdfile
startup;
set feedback on heading on verify on trimspool on pagesize 14
exit

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/79499/viewspace-432/,如需转载,请注明出处,否则将追究法律责任。

下一篇: Oracle logminer(转)
请登录后发表评论 登录
全部评论

注册时间:2007-12-10

  • 博文量
    107
  • 访问量
    196357