Forum Discussion

Rahul_Mekkalki's avatar
6 years ago

Oracle RMAN restore is failing with error "ORA-19507: failed to retrieve sequential file, ...."

Hi,

RMAN restore giving me below error.

############

RMAN> run
2> {
3> ALLOCATE CHANNEL aux1 DEVICE TYPE SBT_TAPE PARMS="SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so64.1, ENV=(NB_ORA_CLIENT=edwdrac1,NB_ORA_SERV=HPLIB)";
4> restore controlfile from tag 'COLDBACKUP02122018';
5> }

allocated channel: aux1
channel aux1: SID=98 device type=SBT_TAPE
channel aux1: Veritas NetBackup for Oracle - Release 8.1 (2017091017)

Starting restore at 04-DEC-18

channel aux1: starting datafile backup set restore
channel aux1: restoring control file
channel aux1: reading from backup piece EDBTEST_CTRL_20181202_l0tjonb2_12960_1_993811810
channel aux1: ORA-19870: error while restoring backup piece EDBTEST_CTRL_20181202_l0tjonb2_12960_1_993811810
ORA-19507: failed to retrieve sequential file, handle="EDBTEST_CTRL_20181202_l0tjonb2_12960_1_993811810", parms=""
ORA-27029: skgfrtrv: sbtrestore returned error
ORA-19511: Error received from media manager layer, error text:
Backup file <EDBTEST_CTRL_20181202_l0tjonb2_12960_1_993811810> not found in NetBackup catalo
failover to previous backup

channel aux1: starting datafile backup set restore
channel aux1: restoring control file
channel aux1: reading from backup piece EDBTEST_DB_20181202_kvtjon8b_12959_1_993811723
channel aux1: ORA-19870: error while restoring backup piece EDBTEST_DB_20181202_kvtjon8b_12959_1_993811723
ORA-19507: failed to retrieve sequential file, handle="EDBTEST_DB_20181202_kvtjon8b_12959_1_993811723", parms=""
ORA-27029: skgfrtrv: sbtrestore returned error
ORA-19511: Error received from media manager layer, error text:
Backup file <EDBTEST_DB_20181202_kvtjon8b_12959_1_993811723> not found in NetBackup catalog

failover to previous backup

released channel: aux1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 12/04/2018 16:25:00
RMAN-06026: some targets not found - aborting restore
RMAN-06024: no backup or copy of the control file found to restore

RMAN>

################

 

Client name is same. bplist listing backups with root user but not with oracle user.

I have taken backup with "oratest" user & trying to restore as "oracle"

How we can restore with different user?

Please advice.

Regards.

3 Replies


  • Rahul_Mekkalki wrote:

    I have taken backup with "oratest" user & trying to restore as "oracle"

    How we can restore with different user?


    Try adding the "oratest" GID to the "oracle" user.

    Most of my experiences with lack of permissions in Oracle restores were solved by giving the restore user permissions similar to the backup user. Adding the restore user to the same group the backup user uses in the Oracle directories worked for me.

  • Hello,

     

    Run the below command on client server. This command will list all control, archive and databasse files.

     

    #/usr/openv/netbackup/bin/bplist -C (source client name) -t 4 -R -l /

    The default control file name e.g /cntrl_624_1_77000xxxx

    Run the below command with correct control file. /cntrl_624_1_770006541

    RMAN> run
    2> {
    3> ALLOCATE CHANNEL aux1 DEVICE TYPE SBT_TAPE PARMS="SBT_LIBRARY=/usr/openv/netbackup/bin/libobk.so64.1, ENV=(NB_ORA_CLIENT=edwdrac1,NB_ORA_SERV=HPLIB)";
    4> restore controlfile from cntrl_624_1_xxxxxx.;
    5> }

    The mount the database and the perform backup and recovery.

     

    Regards,

  • Rahul_Mekkalki 

    User permissions to backup images are set at time of backup.
    It cannot be changed afterwards. 
    If not explicitly set, then the default permissions are 660.
    This means that same user and anyone belonging to same group can read the backups.

    This is covered in NBU for Oracle manual: 

    Options for the SEND command
    BKUP_IMAGE_PERM
    Lets you set the permissions on a backup image at backup
    time. Possible values are the following:
    USER - set the permissions to 600. Only the original user
    who backed up the data has access to the backup images.
    GROUP - set the permissions to 660. Anyone from the
    same group as the original user who backed up the data
    has access to the backup images.
    ANY - set the permissions to 664. Anyone has access to
    the backup images.

    So, as per Alexis_Jeldrez you need to add oracle user to same group as oratest. (A user can belong to more than one group.)
    bplist  with -l option will show user and group.