Video Screencast Help

NetBackup 7.0 can't backup Oracle 11g R2 on Solaris x64

Created: 02 May 2010 • Updated: 05 Nov 2010 | 6 comments
Apitha's picture

I had NetBackup Master Server as Windows 2003 Standard x86
to backup Oracle database (Oracle 11g R2 - ver 11.2.0) on Solaris x64.

my rman setting:

RMAN> show all;

using target database control file instead of recovery catalog
RMAN configuration parameters for database with db_unique_name ORCL are:
CONFIGURE RETENTION POLICY TO REDUNDANCY 1; # default
CONFIGURE BACKUP OPTIMIZATION OFF; # default
CONFIGURE DEFAULT DEVICE TYPE TO DISK; # default
CONFIGURE CONTROLFILE AUTOBACKUP ON;
CONFIGURE CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO '%F'; # default
CONFIGURE DEVICE TYPE DISK PARALLELISM 1 BACKUP TYPE TO BACKUPSET; # default
CONFIGURE DATAFILE BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE ARCHIVELOG BACKUP COPIES FOR DEVICE TYPE DISK TO 1; # default
CONFIGURE MAXSETSIZE TO UNLIMITED; # default
CONFIGURE ENCRYPTION FOR DATABASE OFF; # default
CONFIGURE ENCRYPTION ALGORITHM 'AES128'; # default
CONFIGURE COMPRESSION ALGORITHM 'BASIC' AS OF RELEASE 'DEFAULT' OPTIMIZE FOR LOAD TRUE ; # default
CONFIGURE ARCHIVELOG DELETION POLICY TO NONE; # default
CONFIGURE SNAPSHOT CONTROLFILE NAME TO '/oracle/app/oracle/product/11.2.0/db_1/dbs/snapcf_orcl.f'; # default

my archive setting:

SQL> archive log list;
Database log mode              Archive Mode
Automatic archival               Enabled
Archive destination                /oracle/oraarch/orcl
Oldest online log sequence     2
Next log sequence to archive   4
Current log sequence               4
SQL> alter system archive log current;
System altered.

SQL> show parameter recovery

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
db_recovery_file_dest                string      /oracle/orafra
db_recovery_file_dest_size           big integer 10G

recovery_parallelism                 integer     0

SQL> show parameter control

NAME                                 TYPE        VALUE
------------------------------------ ----------- ------------------------------
control_file_record_keep_time        integer     7
control_files                        string      /oracle/oradata/orcl/control01
                                                 .ctl, /oracle/oradata/orcl/con
                                                 trol02.ctl, /oracle/oradata/or
                                                 cl/control03.ctl
control_management_pack_access       string      DIAGNOSTIC+TUNING

I had setting script to backup database as

---------------------------------------------- BACKUP SCRIPT ---------------------------------------------------------------------
CMD_STR="
ORACLE_HOME=$ORACLE_HOME
export ORACLE_HOME
ORACLE_SID=$ORACLE_SID
export ORACLE_SID
$RMAN target $TARGET_CONNECT_STR nocatalog msglog $RMAN_LOG_FILE append << EOF
RUN {
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE';
SEND 'NB_ORA_CLIENT=orasol-vip,NB_ORA_POLICY=ORASOL-VIP-ORACLE-DAILY';
# check currently
CROSSCHECK BACKUP;
CROSSCHECK BACKUPSET;
CROSSCHECK COPY;
CROSSCHECK BACKUP OF DATABASE;
CROSSCHECK BACKUP OF CONTROLFILE;
CROSSCHECK ARCHIVELOG ALL;
# backup all datafiles
BACKUP
    $BACKUP_TYPE
    SKIP INACCESSIBLE
    TAG orcl_hot_db_bk_level0
    FILESPERSET 5
    # recommended format
    FORMAT 'bk_%s_%p_%t'
    DATABASE;
    sql 'alter system archive log current';
# backup all archive logs
BACKUP
   TAG orcl_hot_al_bk_level0
   filesperset 20
   FORMAT 'al_%s_%p_%t'
   ARCHIVELOG ALL;
BACKUP
    TAG orcl_hot_cntrl_bk_level0
    # recommended format
    FORMAT 'cntrl_%s_%p_%t'
    CURRENT CONTROLFILE;

RELEASE CHANNEL ch00;
RELEASE CHANNEL ch01;
}
EOF
--------------------------------------------------------------------------------------------------------------------------------------------

It can finished datafiles and then return error as .out file

Script /oracle/orascripts/nbu/hot_database_backup_daily.sh
==== started on Sunday, May 2, 2010 7:49:30 PM ICT ====

RMAN: /oracle/app/oracle/product/11.2.0/db_1/bin/rman
ORACLE_SID: orcl
ORACLE_USER: oracle
ORACLE_HOME: /oracle/app/oracle/product/11.2.0/db_1

NB_ORA_FULL: 1
NB_ORA_INCR: 0
NB_ORA_CINC: 0
NB_ORA_SERV: nbu70
NB_ORA_POLICY: ORASOL-VIP-ORACLE-DAILY

Full backup requested
Sun Microsystems Inc.    SunOS 5.10    Generic    January 2005
RMAN> 2> 3> 4> 5> 6> 7> 8> 9> 10> 11> 12> 13> 14> 15> 16> 17> 18> 19> 20> 21> 22> 23> 24> 25> 26> 27> 28> 29> 30> 31> 32> 33> 34> 35> RMAN> rights reserved.

connected to target database: ORCL (DBID=1245745356)
using target database control file instead of recovery catalog

RMAN> 2> 3> 4> 5> 6> 7> 8> 9> 10> 11> 12> 13> 14> 15> 16> 17> 18> 19> 20> 21> 22> 23> 24> 25> 26> 27> 28> 29> 30> 31> 32> 33> 34> 35>
allocated channel: ch0
channel ch0: SID=48 device type=SBT_TAPE
channel ch0: Veritas NetBackup for Oracle - Release 7.0 (2010010419)

allocated channel: ch1
channel ch1: SID=37 device type=SBT_TAPE
channel ch1: Veritas NetBackup for Oracle - Release 7.0 (2010010419)

sent command to channel: ch0
sent command to channel: ch1

crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=bk_1_1_717965718 RECID=1 STAMP=717965719
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=bk_2_1_717965718 RECID=2 STAMP=717965719
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=bk_5_1_717966494 RECID=3 STAMP=717966495
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=bk_4_1_717966494 RECID=4 STAMP=717966495
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=bk_7_1_717966883 RECID=5 STAMP=717966885
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=bk_8_1_717966884 RECID=6 STAMP=717966885
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=bk_10_1_717967916 RECID=7 STAMP=717967916
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=bk_11_1_717967916 RECID=8 STAMP=717967916
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=bk_13_1_717968380 RECID=9 STAMP=717968380
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=bk_14_1_717968380 RECID=10 STAMP=717968380
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=bk_16_1_717968616 RECID=11 STAMP=717968616
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=bk_17_1_717968616 RECID=12 STAMP=717968617
Crosschecked 12 objects

crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=bk_1_1_717965718 RECID=1 STAMP=717965719
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=bk_2_1_717965718 RECID=2 STAMP=717965719
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=bk_5_1_717966494 RECID=3 STAMP=717966495
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=bk_4_1_717966494 RECID=4 STAMP=717966495
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=bk_7_1_717966883 RECID=5 STAMP=717966885
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=bk_8_1_717966884 RECID=6 STAMP=717966885
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=bk_10_1_717967916 RECID=7 STAMP=717967916
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=bk_11_1_717967916 RECID=8 STAMP=717967916
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=bk_13_1_717968380 RECID=9 STAMP=717968380
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=bk_14_1_717968380 RECID=10 STAMP=717968380
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=bk_16_1_717968616 RECID=11 STAMP=717968616
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=bk_17_1_717968616 RECID=12 STAMP=717968617
Crosschecked 12 objects

specification does not match any datafile copy in the repository
specification does not match any control file copy in the repository
specification does not match any archived log in the repository

crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=bk_1_1_717965718 RECID=1 STAMP=717965719
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=bk_2_1_717965718 RECID=2 STAMP=717965719
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=bk_5_1_717966494 RECID=3 STAMP=717966495
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=bk_4_1_717966494 RECID=4 STAMP=717966495
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=bk_7_1_717966883 RECID=5 STAMP=717966885
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=bk_8_1_717966884 RECID=6 STAMP=717966885
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=bk_10_1_717967916 RECID=7 STAMP=717967916
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=bk_11_1_717967916 RECID=8 STAMP=717967916
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=bk_13_1_717968380 RECID=9 STAMP=717968380
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=bk_14_1_717968380 RECID=10 STAMP=717968380
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=bk_16_1_717968616 RECID=11 STAMP=717968616
crosschecked backup piece: found to be 'AVAILABLE'
backup piece handle=bk_17_1_717968616 RECID=12 STAMP=717968617
Crosschecked 12 objects

specification does not match any backup in the repository

specification does not match any archived log in the repository

Starting backup at 02-MAY-10
channel ch0: starting incremental level 0 datafile backup set
channel ch0: specifying datafile(s) in backup set
input datafile file number=00001 name=/oracle/oradata/orcl/system01.dbf
input datafile file number=00005 name=/oracle/oradata/orcl/example01.dbf
channel ch0: starting piece 1 at 02-MAY-10
channel ch1: starting incremental level 0 datafile backup set
channel ch1: specifying datafile(s) in backup set
input datafile file number=00002 name=/oracle/oradata/orcl/sysaux01.dbf
input datafile file number=00003 name=/oracle/oradata/orcl/undotbs01.dbf
input datafile file number=00004 name=/oracle/oradata/orcl/users01.dbf
channel ch1: starting piece 1 at 02-MAY-10
channel ch0: finished piece 1 at 02-MAY-10
piece handle=bk_19_1_717968995 tag=ORCL_HOT_DB_BK_LEVEL0 comment=API Version 2.0,MMS Version 5.0.0.0
channel ch0: backup set complete, elapsed time: 00:01:16
channel ch1: finished piece 1 at 02-MAY-10
piece handle=bk_20_1_717968995 tag=ORCL_HOT_DB_BK_LEVEL0 comment=API Version 2.0,MMS Version 5.0.0.0
channel ch1: backup set complete, elapsed time: 00:02:16
Finished backup at 02-MAY-10

Starting Control File and SPFILE Autobackup at 02-MAY-10
released channel: ch0
released channel: ch1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of Control File and SPFILE Autobackup command on ch0 channel at 05/02/2010 19:52:14
ORA-19506: failed to create sequential file, name="c-1245745356-20100502-06", parms=""
ORA-27027: sbtremove2 returned error
ORA-19511: Error received from media manager layer, error text:
   Failed to remove, c-1245745356-20100502-06, from image catalog.

RMAN>

Recovery Manager complete.

Script /oracle/orascripts/nbu/hot_database_backup_daily.sh
==== ended in error on Sunday, May 2, 2010 7:52:14 PM ICT ====

How can I solve this problem?

Please help me.

Comments 6 CommentsJump to latest comment

rj_nbu's picture

Hi,

it appears that the hostname set in the policy / script 'orasol-vip' is different than the one returned by a reverse lookup or by a gethostbyname() OS call.  On your master server, create this touch file with no extension

C:\Program Files\Veritas\netbackup\db\altnames\orasol-vip

Edit this file, and type in the hostname of the client . eg. orasol

Make sure to run bprdreq -rereadconfig on the master server (from the .netbackup\bin\admincmd directory) after creating this file

Hope this helps

-Rajeev
"Unix IS user friendly... It's just selective about who its friends are"

Apitha's picture

My Oracle on cluster environment.

I use virtual name to connecting NetBackup master server.

It wrong concept?

Marianne's picture

Absolutely correct concept - just ensure that the master can resolve the virtual IP address to virtual hostname.
You should be able to see in master server's bprd log file how the incoming IP address is resolved and interpreted.
The altnames file is a good suggestion - have you tried it yet?

Supporting Storage Foundation and VCS on Unix and Windows as well as NetBackup on Unix and Windows
Handy NBU Links

rj_nbu's picture

Hi Apitha,

The concept is not wrong, this is how you backup, but you need to do little configuration for this to work  ;)

Check out page 3 onwards

Best Practices for protecting Oracle RAC with NetBackup

http://seer.entsupport.symantec.com/docs/334850.htm

Excerpt:

The NBU master should be configured to know about the relationship between the physical and virtual names. This is required for backups, such as this one, where the user-directed request originates from a hostname that does not match the virtual name used for NB_ORA_CLIENT. This configuration also makes it possible to perform alternate client/instance restores from either node in the cluster.

cd /usr/openv/netbackup/db/altnames

echo "hostname1" >> hostname1
echo "vip_name1" >> hostname1
echo "hostname2" >> hostname1
echo "vip_name2" >> hostname1
echo "vip_name" >> hostname1

cp hostname1 hostname2

-Rajeev
"Unix IS user friendly... It's just selective about who its friends are"

Apitha's picture

My Cluster is HP Service Guard with Oracle package.

My backup server can ping Virtual IP on oracle and oracle can ping NetBackup Master server.

And In NetBackup Activity, it can backup datafiles and then found error as .out file above.

Apitha's picture

In real environment I use HP-UX with Service Gurad, but now I create virtual environment on Solaris, because I can't virtual HP-UX on virtual environment and Solaris is Unix as HP-UX. Use VIP on Listener and oracle can start collevtive all oracle service (listener, database and EM).