Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Database Recovery on Windows NT
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;'
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
![]() |
![]() |