Think Foward Logo Tested on Oracle 8.0 Tested on Oracle 8i Tested on Oracle 9i Tested on Oracle 10g

SQL Script

End Backup Script

Updated: 10-Jan-2003
Version: 1.0

Description

IF a hot backup script fails for some reason, the tablespaces will still be in hot backup mode until an ALTER TABLESACE  END BACKUP command is issued.

This script generates and runs an END BACKUP scritp based upon those database which are currently flagged as ACTIVE in the v$backup table.

Parameters

None

SQL Source

REM Copyright (C) Think Forward.com 1998- 2005. All rights reserved. 
set pages 0 set heading off set feed off spool endbackup.lst select distinct 'alter tablespace ' || tablespace_name || ' end backup;' from v$backup, dba_data_files where v$backup.status='ACTIVE' and v$backup.file#=file_id / spool off set feed on start endbackup.lst PROMPT PROMPT Checking for any datafiles inhot backup mode select count(*) from v$backup where status = 'ACTIVE';

Return to Index of SQL Scripts


Site Map

General Information : Home | Company Profile | Contact Us | Legal
Database Support : Proactive Support | Pay Per Incident Support
Expert Services : High Availability | Creative Solutions | Training
Build Services : Oracle Installations | Revive your Oracle Setup | Low Cost Development
Free Oracle Resources: DBA Scripts | Oracle Links