Forum Discussion

dskwan's avatar
dskwan
Level 3
10 years ago

RMAN backup not trigger

Hi,

 

I have created an RMAN script and using Netbackup to call the script, RMAN command not triggered but job completed succesfully in Netbackup. Please help if I missed out any steps.

Here is the RMAN log file.

==== started on Tue 10/14/2014  02:22 ====
Script name: "C:\Program Files\Veritas\NetBackup\scripts\hcmstag_hot_db_backup.cmd"
#                                       
  RMAN  :  C:\app\oracle\product\11.2.0\dbhome_1\bin\rman.exe                       
  NLS_LANG  :  american               
  ORACLE_HOME  :  C:\app\oracle\product\11.2.0\dbhome_1         
  ORACLE_SID  :  SUNWAYSTAG           
  NLS_DATE_FORMAT  :  YYYY-MM-DD:hh24:mi:ss
  RMAN_LOG_FILE  :  "C:\Program Files\Veritas\NetBackup\scripts\hcmstag_hot_db_backup.out"     
  NB_ORA_SERV  :  mymswbkp01-bkp                     
  NB_ORA_FULL  :  1                     
  NB_ORA_INCR  :  0                     
  NB_ORA_CINC  :  0                     

Recovery Manager: Release 11.2.0.1.0 - Production on Tue Oct 14 14:22:29 2014

Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.

connected to target database: ORCL (DBID=1375408049)
connected to recovery catalog database

RMAN>

Recovery Manager complete.
#   
==== ended successfully on Tue 10/14/2014  02:22 ====

 

 

Thanks and regards,

kwan

  • Someone has added 'echo' at the beginning of most lines.
    So, instead of executing commands, everything will simply be 'echoed'.
    Speak to the person who modified this script.

    echo RUN {
    echo ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
    @REM echo ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE';
    echo SEND 'NB_ORA_CLIENT=mymswhcmstag01,NB_ORA_SERV=mymswbkp01,NB_ORA_POLICY=MYMSWHCMSTAG01-DB-Daily';
    echo BACKUP
    echo       %BACKUP_TYPE%
    echo       FORMAT 'bk_u%%u_s%%s_p%%p_t%%t'
    echo       DATABASE;
    echo sql 'alter system archive log current';
    echo RELEASE CHANNEL ch00;
    @REM echo RELEASE CHANNEL ch01;
    
    echo # Backup all archive logs
    echo ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
    echo SEND 'NB_ORA_CLIENT=mymswhcmstag01,NB_ORA_SERV=mymswbkp01,NB_ORA_POLICY=MYMSWHCMSTAG01-DB-Daily';
    echo BACKUP
    echo       FILESPERSET 20
    echo       FORMAT 'arch-s%%s-p%%p-t%%t'
    echo       ARCHIVELOG ALL;
    echo RELEASE CHANNEL ch00;
    

8 Replies

  • are you using your own script or you had modify the sample script that netbackup provides?

    if you are using your own script, try to use netbackup's script at ..\Veritas\NetBackup\DbExt\Oracle\Samples\rman   and modify the hot_database_backup.cmd script.

     

    Your script/rman exits with 0, that's why netbackup finish successfully. If you want to use it, post it here so we can check it.

     

  • I would try to run the cmd script by hand to see if there was any errors not caught by the log.

    I would also create the bphdb and dbclient folders under netbackup/logs to troubleshoot an error like this

    From the original post it seems that rman get called but does not do anything, hav you tried to run the rman commands by hand ?

  • Someone has added 'echo' at the beginning of most lines.
    So, instead of executing commands, everything will simply be 'echoed'.
    Speak to the person who modified this script.

    echo RUN {
    echo ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
    @REM echo ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE';
    echo SEND 'NB_ORA_CLIENT=mymswhcmstag01,NB_ORA_SERV=mymswbkp01,NB_ORA_POLICY=MYMSWHCMSTAG01-DB-Daily';
    echo BACKUP
    echo       %BACKUP_TYPE%
    echo       FORMAT 'bk_u%%u_s%%s_p%%p_t%%t'
    echo       DATABASE;
    echo sql 'alter system archive log current';
    echo RELEASE CHANNEL ch00;
    @REM echo RELEASE CHANNEL ch01;
    
    echo # Backup all archive logs
    echo ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
    echo SEND 'NB_ORA_CLIENT=mymswhcmstag01,NB_ORA_SERV=mymswbkp01,NB_ORA_POLICY=MYMSWHCMSTAG01-DB-Daily';
    echo BACKUP
    echo       FILESPERSET 20
    echo       FORMAT 'arch-s%%s-p%%p-t%%t'
    echo       ARCHIVELOG ALL;
    echo RELEASE CHANNEL ch00;
    
  • Marianne,

    if it is a windows system,  has to have the echo.

    this is from the netbackup sample script

    @(
    echo RUN {
    echo ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
    echo ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE';
    echo BACKUP
    echo       %BACKUP_TYPE%
    echo       FORMAT 'bk_u%%u_s%%s_p%%p_t%%t'
    echo       DATABASE;
    echo sql 'alter system archive log current';
    echo RELEASE CHANNEL ch00;
    echo RELEASE CHANNEL ch01;
    echo # Backup all archive logs
    echo ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
    echo BACKUP
    echo       FILESPERSET 20
    echo       FORMAT 'arch-s%%s-p%%p-t%%t'
    echo       ARCHIVELOG ALL;
    echo RELEASE CHANNEL ch00;
    @REM ----------------------------------------------------------------------------
    @REM Note: During the process of backing up the database, RMAN also backs up the
    @REM control file.  This version of the control file does not contain the
    @REM information about the current backup because "nocatalog" has been specified.
    @REM To include the information about the current backup, the control file should
    @REM be backed up as the last step of the RMAN section.  This step would not be
    @REM necessary if we were using a recovery catalog or auto control file backups.
    @REM ----------------------------------------------------------------------------
    echo ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
    echo BACKUP
    @REM recommended format
    echo       FORMAT 'cntrl_%s_%p_%t'
    echo       CURRENT CONTROLFILE;
    echo RELEASE CHANNEL ch00;
    echo }
    ) | %RMAN% target %TARGET_CONNECT_STR% nocatalog msglog '%RMAN_LOG_FILE%' append

     

  • There are two questions, can you clarify?

    1. The entry "NB_ORA_SERV" in your script and the output of your execution is inconsistent, as follows:

    echo SEND 'NB_ORA_CLIENT=mymswhcmstag01,NB_ORA_SERV=mymswbkp01,NB_ORA_POLICY=MYMSWHCMSTAG01-DB-Daily';

     NB_ORA_SERV  :  mymswbkp01-bkp

    2. Your ORACLE_SID  is SUNWAYSTAG, but the DB you connected is ORCL, they are inconsistent.

  • Apologies - Stefanos is correct - everything from 

    @(
    echo RUN { 

    up to 

    echo }
    )

    must be piped to the %RMAN% target .... command.

    It may be best to put this section in a separate 'cmdfile' as per this Notes section in the sample script:

    @REM If you are getting an error that the input line is too long, you will need
    @REM to put the RMAN run block in a separate file.  Then use the "cmdfile"
    @REM option of RMAN.  For more information on the "cmdfile" options please
    @REM refer to the RMAN documentation.

     

    As per Michael's suggestion - run the script manually from client to see what the result is.
    Ensure dbclient log folder exists on Oracle client before you run backup again.

    Post dbclient and rman output file (C:\Program Files\Veritas\NetBackup\scripts\hcmstag_hot_db_backup.out) as File attachments.

  • Hi All,

     

    Thanks for your replies. I managed to resolve it using cmdfile. But just wondering why the pipe was not piping?

     

    Thanks and regards,

    Kwan