Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Database Recovery on Windows NT

Database Recovery on Windows NT

From: Victor Zwimpfer <vzwimpfer_at_scope.ch>
Date: Tue, 3 Nov 1998 11:02:49 +0100
Message-ID: <71mk94$ohd$1@news.imp.ch>


I try to automate my backup procedure. That for I would like to spool a dynamic SQL to set the tablespaces in the hot backup mode. That for I start the srvrmgr in a CMD-File.

rem Tablespaces in hot backup Modus versetzen d:\orant\bin\svrmgr30 @e:\backup\backup_start_tbsp.sql;

The Script backup_start_tbsp.sql is listed below:

connect sys/******@tDB;
spool e:\backup\begin_backup.SQL;

SELECT 'alter tablespace ' || tablespace_name || ' begin backup;' FROM dba_tablespaces
WHERE status != 'INVALID'
 /
spool off;
spool e:\backup\start_tbsp.log;
@e:\backup\begin_backup.sql;
spool off;

My problem now is the output of the spool-file begin_backup.sql, because I don't know how to eliminate the leading and ending line. The output of spool-file begin_backup looks like this:

'ALTERTABLESPACE'||TABLESPACE_NAME||'ENDBACKUP;'



alter tablespace SYSTEM end backup;
alter tablespace RBS end backup;
alter tablespace USR end backup;
alter tablespace TEMPORARY end backup;
alter tablespace INDX end backup;
alter tablespace PRISMA end backup;
alter tablespace SLKTN end backup;
7 rows selected.

 How can I eliminate the first two and the last line ?

Can anybody help me?

Thank You
Victor
vzwimpfer_at_scope.ch Received on Tue Nov 03 1998 - 04:02:49 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US