08-10-2014 08:25 AM
Solved! Go to Solution.
08-10-2014 11:04 AM
It all depends on what is in the Oracle RMAN script.
Work with your Oracle dba to create own scripts or edit the sample scripts in
/usr/openv/netbackup/ext/db_ext/oracle/samples/rman
The hot_database_backup.sh sample script will backup databases and archive logs.
08-11-2014 12:46 AM
You need to have a discussion with your Oracle dba.
The database backup script will/should include archive logs.
Based on the environment, there may be a need to run additional archive log backups throughout the day.
We have customers doing database and archive log backups once a day as well as archive log backups every xx hours.
These additional archive log backups will be in a separate policy.
08-12-2014 07:50 AM
hi, Govarthanagiri
Based on your requriement, I suggest that you configure two policies like this:
one policy "DB backup" with full/diff/cum schedule, backing up data files, controlfiles/parameter file, archived logs. backup scripts spcifies to back up the above data.
regarding schedule,
Sunday: full backup
Monday~Saterday incremental backup(each day one incremenatal backup)
full backup of every day and incremental backup of every four hour might impact oracle performance. If you need to back your DB up every hours, i think you could backup archived logs every hours instead of backing up database, less performance impact.
it means that create another policy "DB archived logs backup", e.g. every couples of hours, of course, frequent backup might impact oracle performance. Depend on your actual business.
Having DB full/incremental backup, plus archived logs, you can restore your DB successfully in case of unexpected. restore DB full/incremental backup ,and apply your archive logs to redo your DB to most recent time point.
Thanks
08-14-2014 03:44 AM
Hello,
The reason should be that your archived logs don't exist on server, but the corresponding records for these archivelogs still exsit in control file. when backup database, it will read related info from control file. So if it can't locate these archived logs on server, the issue occurs.
So you could execute the following comand to resolve this issue.
RMAN> crosscheck archivelog all; (it updates archived logs' records in the controle file to expired status)
RMAN>delete expired archivelog all; (remove records of expired backups and copies from control file)
And then run again.
Thanks
08-10-2014 11:04 AM
It all depends on what is in the Oracle RMAN script.
Work with your Oracle dba to create own scripts or edit the sample scripts in
/usr/openv/netbackup/ext/db_ext/oracle/samples/rman
The hot_database_backup.sh sample script will backup databases and archive logs.
08-10-2014 09:46 PM
I strong recommend backing up archive applied to the database while the backup was run, else you can get problem performing media recovery of the database after restore.
If you can, upgrade to 7.6 and use Netbackup Intelligent Policies. It so easy to use
08-10-2014 09:56 PM
Thanks Marianne and Nicolai for your reply
Hi Marianne,
so there is no need for a seprate policy for archive logs, am i correct ?
Hi Nicolai,
from your reply , "I strong recommend backing up archive applied to the database while the backup was run" that means i should have single policy for the full DBs with archive logs. am i corret?
Thanks and Regards,
Giri
08-11-2014 12:46 AM
You need to have a discussion with your Oracle dba.
The database backup script will/should include archive logs.
Based on the environment, there may be a need to run additional archive log backups throughout the day.
We have customers doing database and archive log backups once a day as well as archive log backups every xx hours.
These additional archive log backups will be in a separate policy.
08-11-2014 01:14 AM
Intelligent Policies will take care of both online backup and archive. You can also configure normal offline redo not part of a database backup in the same policy using Intelligent Policies
Intelligent Policies enables you to schedule a group of databases (aka instance group") as if they where normal file systems backups.
Hope that answers the question.
08-11-2014 02:07 AM
Thanks to all
here is my plan to confiure the polices and provide the below justification to my team...i hope the diff-incremental will take the new archive logs as well since the previos bakcup.. kindly let me know if anything wrong
Oracle DB Full Backup
Scheduled: Daily basis
Oracle backup policy runs a backup of the entire oracle DB while it’s online using RMAN
Oracle DB Differential- Incremental Backup
Scheduled: Every Four Hours
Oracle differential- Incremental backup runs a backup of the DB files that have changed since the previous backup (full, differential - incremental)
thanks,
Giri
08-11-2014 02:38 AM
Again - it all depends on what is in your script(s).
Have you had a look at the sample scripts yet?
If you don't want to rely on scripts, upgrade to 7.6.0.x and make use of Oracle Intelligent Policies.
08-12-2014 04:19 AM
+1 for OIP. Works a treat and removes the need for scripts and their maintenance. Althogether a much more thought out solution. And I've spent years doing it the old way. You owe it to yourself to upgrade and use OIP.
Jim
08-12-2014 07:50 AM
hi, Govarthanagiri
Based on your requriement, I suggest that you configure two policies like this:
one policy "DB backup" with full/diff/cum schedule, backing up data files, controlfiles/parameter file, archived logs. backup scripts spcifies to back up the above data.
regarding schedule,
Sunday: full backup
Monday~Saterday incremental backup(each day one incremenatal backup)
full backup of every day and incremental backup of every four hour might impact oracle performance. If you need to back your DB up every hours, i think you could backup archived logs every hours instead of backing up database, less performance impact.
it means that create another policy "DB archived logs backup", e.g. every couples of hours, of course, frequent backup might impact oracle performance. Depend on your actual business.
Having DB full/incremental backup, plus archived logs, you can restore your DB successfully in case of unexpected. restore DB full/incremental backup ,and apply your archive logs to redo your DB to most recent time point.
Thanks
08-13-2014 09:45 AM
Thanks Marianne,,jim dalton & walker
Hi Walker,
i noted your valuable informtion and wil check with my team
Hi Marrianne,
yes i looked the scripts and i am chosing the policy hot_database_backup.sh to take database , control files & archive logs as you recommanded . so i am putting my DB values where the replacesment are recomanded in this script.
I hope I need not to change anything apart from the below four values . am i correct ?
08-13-2014 09:55 PM
Hello,
Please see the following link:
https://www-secure.symantec.com/connect/forums/netbackup-policy-configuration-oracle-11gr2-rac
The following is an extract from above link, and I made corresponsding change for your requrirement(assume yours is not about oracle rac)
2) Prepare backup scripts on rac node, modify some items based on default backup script, which is located at: C:\Program Files\Veritas\NetBackup\DbExt\Oracle\Samples\rman\hot_database_backup.cmd, as following,
@set ORACLE_HOME=C:\app\Administrator\product\11.2.0\dbhome_1
@set ORACLE_SID=orcl
@set TARGET_CONNECT_STR=sys/oracle@XXX
the following section, I just added one channel for archivelog and controlfile backup.
@(
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 ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE';
echo BACKUP
echo FILESPERSET 20
echo FORMAT 'arch-s%%s-p%%p-t%%t'
echo ARCHIVELOG ALL;
echo RELEASE CHANNEL ch00;
echo RELEASE CHANNEL ch01;
echo ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
echo ALLOCATE CHANNEL ch01 TYPE 'SBT_TAPE';
echo BACKUP
echo FORMAT 'cntrl_%s_%p_%t'
echo CURRENT CONTROLFILE;
echo RELEASE CHANNEL ch00;
echo RELEASE CHANNEL ch01;
echo }
NOTES: here you may notice the Net Service Name "XXX", yes you should configure this in tnsnames.ora file, located on your oracle installation directory: C:\app\Administrator\product\11.2.0\dbhome_1\NETWORK\ADMIN\tnsnames.ora, add the following parts.
You could replace "XXX" with any one of the following, e.g. PHY. As we could access oracle instance through physical name.
PHY =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = rac1)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = orcl)
)
Thanks
08-13-2014 11:27 PM
Thanks Walker
After configuring Oracle policy and setup RMAN scripts in COM09 server, I am getting the below error in Netbackup while trying to backup the Oracle DB
---------------------------------------------------------------------------------------------
08/14/2014 01:38:26 - Info nbjm (pid=12650) starting backup job (jobid=3054) for client com09, policy vzw-Oracle, schedule Full
08/14/2014 01:38:26 - Info nbjm (pid=12650) requesting MEDIA_SERVER_WITH_ATTRIBUTES resources from RB for backup job (jobid=3054, request id:{96125B8C-2325-11E4-A1AC-3066A226079C})
08/14/2014 01:38:26 - requesting resource backupsVTC-disk
08/14/2014 01:38:26 - requesting resource vtcnb01.NBU_CLIENT.MAXJOBS.com09
08/14/2014 01:38:26 - requesting resource vtcnb01.NBU_POLICY.MAXJOBS.vzw-Oracle
08/14/2014 01:38:26 - granted resource vtcnb01.NBU_CLIENT.MAXJOBS.com09
08/14/2014 01:38:26 - granted resource vtcnb01.NBU_POLICY.MAXJOBS.vzw-Oracle
08/14/2014 01:38:26 - granted resource backupsVTC-disk
08/14/2014 01:38:26 - estimated 0 kbytes needed
08/14/2014 01:38:26 - Info nbjm (pid=12650) started backup (backupid=com09_1407960506) job for client com09, policy vzw-Oracle, schedule Full on storage unit backupsVTC-disk
08/14/2014 01:38:27 - Info bpbrm (pid=17940) com09 is the host to backup data from
08/14/2014 01:38:27 - Info bpbrm (pid=17940) reading file list from client
08/14/2014 01:38:27 - Info bpbrm (pid=17940) starting bphdb on client
08/14/2014 01:38:27 - Info bphdb (pid=28496) Backup started
08/14/2014 01:38:27 - Info bphdb (pid=28496) Processing /usr/openv/netbackup/ext/db_ext/oracle/samples/rman/hot_database_backup.sh
08/14/2014 01:38:27 - Info bphdb (pid=28496) Waiting for the child status
08/14/2014 01:38:27 - started process bpbrm (pid=17940)
08/14/2014 01:38:27 - connecting
08/14/2014 01:38:27 - connected; connect time: 0:00:00
08/14/2014 01:39:29 - Error bpbrm (pid=17940) from client com09: ERR - Script exited with status = 1 <the requested operation was partially successful>
08/14/2014 01:39:29 - Error bpbrm (pid=17940) from client com09: ERR - bphdb exit status = 6: the backup failed to back up the requested files
08/14/2014 01:39:30 - Info bphdb (pid=28496) done. status: 6: the backup failed to back up the requested files
08/14/2014 01:39:30 - end writing
the backup failed to back up the requested files (6)
-------------------------------------------------------------------------------------------------
i have attached my RMAN scripts (hot_database_backup.sh) in the attchachment so can you help me to resolve the issue
regards,
Giri
08-13-2014 11:59 PM
The rman message log $RMAN_LOG_FILE probably contains an indication of what the problem is. The bphdb & dbclient(need 777 permission) logs on the database server is also places to look.
As always when troubleshooting database backups running the script by hand can give error information not captured by the logs.
Hope this helps
08-14-2014 12:10 AM
Thanks Michael
this is my output file, please look this error and suggest
com09:oracle # cat hot_database_backup.sh.out
Script /usr/openv/netbackup/ext/db_ext/oracle/samples/rman/hot_database_backup.sh
==== started on Thu Aug 14 06:09:04 UTC 2014 ====
RMAN: /opt/PlexView/Oracle/ora01/app/oracle/product/11.2.0/bin/rman
ORACLE_SID: plxdb
ORACLE_USER: oracle
ORACLE_HOME: /opt/PlexView/Oracle/ora01/app/oracle/product/11.2.0
NB_ORA_FULL: 1
NB_ORA_INCR: 0
NB_ORA_CINC: 0
NB_ORA_SERV: vtcnb01
NB_ORA_POLICY: vzw-Oracle
Full backup requested
Last login: Thu Aug 14 06:08:05 UTC 2014
Recovery Manager: Release 11.2.0.1.0 - Production on Thu Aug 14 06:09:04 2014
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00554: initialization of internal recovery manager package failed
RMAN-04005: error from target database:
ORA-01031: insufficient privileges
Last login: Thu Aug 14 06:08:05 UTC 2014
Script /usr/openv/netbackup/ext/db_ext/oracle/samples/rman/hot_database_backup.sh
==== ended in error on Thu Aug 14 06:09:04 UTC 2014 ====
com09:oracle #
08-14-2014 12:17 AM
RMAN-00554: initialization of internal recovery manager package failed
RMAN-04005: error from target database:
ORA-01031: insufficient privileges
Is the problem, you need the Oracle DBA to grant the needed permissions to rman/oracle user
08-14-2014 02:01 AM
Hello,
Miachael is right.
Your password "manager" for user "system" should be not correct. after fix this,
You can test your connect string like this.
# rman target system/manager@Net_service_name
if it can connect to rman, please modify the following entry
TARGET_CONNECT_STR=system/manager@Net_service_name
Thanks
08-14-2014 03:13 AM
Thanks Micheal and walker,
that "insufficient privileges" error is fxied after gave the admin permission to the user .... But now i am getting diffremt error in the output file as mentioned below so can you please help me to fix the issue...
--------------------------------------------
channel ch00: backup set complete, elapsed time: 00:00:15
Finished backup at 14-AUG-14
sql statement: alter system archive log current
released channel: ch00
released channel: ch01
allocated channel: ch00
channel ch00: SID=104 device type=SBT_TAPE
channel ch00: Veritas NetBackup for Oracle - Release 7.5 (2013061020)
allocated channel: ch01
channel ch01: SID=129 device type=SBT_TAPE
channel ch01: Veritas NetBackup for Oracle - Release 7.5 (2013061020)
Starting backup at 14-AUG-14
current log archived
released channel: ch00
released channel: ch01
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 08/14/2014 09:51:29
RMAN-06059: expected archived log not found, loss of archived log compromises recoverability
ORA-19625: error identifying file /opt/PlexView/Oracle/ora02/oradata/plxdb/arch/1_6355_850415048.arc
ORA-27037: unable to obtain file status
Linux-x86_64 Error: 2: No such file or directory
Additional information: 3
RMAN> RMAN>
Recovery Manager complete.
Last login: Thu Aug 14 09:50:17 UTC 2014
Script /usr/openv/netbackup/ext/db_ext/oracle/samples/rman/hot_database_backup.sh
==== ended in error on Thu Aug 14 09:51:29 UTC 2014 ====
------------------------------------------------------------------------------
08-14-2014 03:44 AM
Hello,
The reason should be that your archived logs don't exist on server, but the corresponding records for these archivelogs still exsit in control file. when backup database, it will read related info from control file. So if it can't locate these archived logs on server, the issue occurs.
So you could execute the following comand to resolve this issue.
RMAN> crosscheck archivelog all; (it updates archived logs' records in the controle file to expired status)
RMAN>delete expired archivelog all; (remove records of expired backups and copies from control file)
And then run again.
Thanks
08-14-2014 08:41 AM
You need to speak to dba's.
Once Oracle instance is in Archive Log mode, nobody should manually touch, move or delete any archive logs.
It must only be deleted as part of Rman backup.