oracle冷备份脚本实例

set feedback off heading off verify off trimspool off

set pagesize 0 linesize 200

define dir='/tmp/wb'

define ws='/tmp/ws.sql'

spool &ws

select '! cp ' || name || '&dir' from v$datafile order by 1;

select '! cp ' || member || '&dir' from v$logfile order by 1;

select '! cp ' || name || '&dir' from v$controlfile order by 1;

select '! cp ' || name || '&dir' from v$tempfile order by 1;

spool off

shutdown immediate

@&ws

startup

你可能感兴趣的:(oracle,脚本)