Move required_backup_scn? [message #405255] |
Wed, 27 May 2009 03:44 |
hristo
Messages: 258 Registered: May 2007
|
Senior Member |
|
|
Hi!
We take hot backups during the nigth and delete the archivelogs using RMAN with Veritas Netbackup. But for some reason (see below), RMAN dont deletes the archivelogs. Below is part of the script that should do that:
@set SCNFILE=e:\dump\%ORACLE_SID%.scn
@(
@echo connect %TARGET_CONNECT_STR% as sysdba;
@echo set echo off feed off serveroutput on pages 0
@echo spool %SCNFILE%
@echo whenever sqlerror exit sql.sqlcode
@echo exec strmadmin.streams_admin.required_backup_scn;
@echo spool off
@echo exit;
) | %SQLPLUS_EXE% -s /nolog > NUL:
if {%ERRORLEVEL%} == {0} (
@echo Database : %ORACLE_SID% is available >> %RMAN_LOG_FILE%
@SET STREAMS_CONNECT=TRUE
) else (
@echo Database : %ORACLE_SID% is NOT available >> %RMAN_LOG_FILE%
@SET STREAMS_CONNECT=FALSE
)
@if exist %SCNFILE% (
@if %STREAMS_CONNECT%==TRUE (
@for /F "tokens=1 " %%a in ('type %SCNFILE%') do set REQUIRED_SCN=%%a
) else (
@set /a REQUIRED_SCN=0)
)
The problem is that when I run
exec strmadmin.streams_admin.required_backup_scn
it returns 0. Thats why the logs are not being deleted.
How do I move the required_backup_scn?
Regards
H
|
|
|
|