Wednesday, November 11, 2009

How to take a hot backup ?

set head off;


spool beginbackup.sql;

select 'alter tablespace ' || tablespace_name || ' begin backup;' from DBA_TABLESPACES where tablespace_name <> 'TEMP';

spool off;


@beginbackup.sql


set head off;

spool endbackup.sql;

select 'alter tablespace ' || tablespace_name || ' end backup;' from DBA_TABLESPACES where tablespace_name <> 'TEMP';

spool off;

@endbackup.sql

No comments:

Post a Comment