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;
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/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/29227735/viewspace-1064112/