Backup on Physical Standby
Hi All,
I have recently setup Dataguard Configuration on 11gR2 Grid Infrastructure. Now i have off load the Primary and run the backup jobs from physical standby. Can any one provide me a Doc and steps to through this task.
Help would be appreciated.
Thanks
Hi,
If you know how to backup a database with RMAN you know how to backup a physical standby database : you can use the same type of scripts and you can use the backups to restore the primary if you want.
http://download.oracle.com/docs/cd/E11882_01/backup.112/e10642/toc.htm
Just read the classic guide to choose the good strategy according to your needs (recovery window etc.).
A few details :
- I would turn on controlfile autobackup on the primary to have backups of the controfile/spfile (those files are different on the standby) and I would make regular backups of those files. You also have to find an adequate strategy to delete the archivelog files on the primary and the standby (I backup/delete them periodically based a recovery window AND their application on the standby)
- I would turn flashback on for the standby, it can solve many issues
Best regards
Phil
Similar Messages
-
Rman backup on physical standby database without cancelling MRP
Hi all,
Could anyone share, is this possible to take RMAN backup on physical standby database without cancelling MRP process.
regarrds,Hi,
On Standby Side:
SQL> alter database mount;
Database altered.
SQL> alter database recover managed standby database using current logfile disconnect from session;
Database altered.
SQL> select max(Sequence#) from v$archived_log;
MAX(SEQUENCE#)
405
SQL> select max(Sequence#) from v$archived_log where applied='YES';
MAX(SEQUENCE#)
404
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@oel62-x64 Desktop]$ rman target /
Recovery Manager: Release 11.2.0.3.0 - Production on Tue May 21 15:31:43 2013
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: ADMDB (DBID=4063877183, not open)
RMAN> backup database plus archivelog delete all input;
Starting backup at 21-MAY-13
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=32 device type=DISK
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=390 RECID=391 STAMP=815416638
input archived log thread=1 sequence=391 RECID=392 STAMP=815421952
input archived log thread=1 sequence=392 RECID=393 STAMP=815422343
input archived log thread=1 sequence=393 RECID=394 STAMP=815422434
input archived log thread=1 sequence=394 RECID=395 STAMP=815422570
input archived log thread=1 sequence=395 RECID=396 STAMP=815476598
input archived log thread=1 sequence=396 RECID=397 STAMP=815476615
input archived log thread=1 sequence=397 RECID=398 STAMP=815476645
input archived log thread=1 sequence=398 RECID=399 STAMP=815477471
input archived log thread=1 sequence=399 RECID=400 STAMP=815477475
input archived log thread=1 sequence=400 RECID=401 STAMP=815477628
input archived log thread=1 sequence=401 RECID=403 STAMP=815584146
input archived log thread=1 sequence=402 RECID=402 STAMP=815584137
input archived log thread=1 sequence=403 RECID=405 STAMP=816017446
*input archived log thread=1 sequence=404 RECID=404 STAMP=816017444*
*input archived log thread=1 sequence=405 RECID=406 STAMP=816017455*
channel ORA_DISK_1: starting piece 1 at 21-MAY-13
channel ORA_DISK_1: finished piece 1 at 21-MAY-13
piece handle=/u01/app/oracle/fast_recovery_area/stldb/STLDB/backupset/2013_05_21/o1_mf_annnn_TAG20130521T153202_8spm937d_.bkp tag=TAG20130521T153202 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:07
channel ORA_DISK_1: deleting archived log(s)
archived log file name=/u01/app/oracle/fast_recovery_area/stldb/STLDB/archivelog/2013_05_14/o1_mf_1_390_8s48hfrp_.arc RECID=391 STAMP=815416638
archived log file name=/u01/app/oracle/fast_recovery_area/stldb/STLDB/archivelog/2013_05_14/o1_mf_1_391_8s4fohwb_.arc RECID=392 STAMP=815421952
archived log file name=/u01/app/oracle/fast_recovery_area/stldb/STLDB/archivelog/2013_05_14/o1_mf_1_392_8s4g1q0v_.arc RECID=393 STAMP=815422343
archived log file name=/u01/app/oracle/fast_recovery_area/stldb/STLDB/archivelog/2013_05_14/o1_mf_1_393_8s4g4l8z_.arc RECID=394 STAMP=815422434
archived log file name=/u01/app/oracle/fast_recovery_area/stldb/STLDB/archivelog/2013_05_14/o1_mf_1_394_8s4g8t9h_.arc RECID=395 STAMP=815422570
archived log file name=/u01/app/oracle/fast_recovery_area/stldb/STLDB/archivelog/2013_05_15/o1_mf_1_395_8s631622_.arc RECID=396 STAMP=815476598
archived log file name=/u01/app/oracle/fast_recovery_area/stldb/STLDB/archivelog/2013_05_15/o1_mf_1_396_8s631qjj_.arc RECID=397 STAMP=815476615
archived log file name=/u01/app/oracle/fast_recovery_area/stldb/STLDB/archivelog/2013_05_15/o1_mf_1_397_8s632od8_.arc RECID=398 STAMP=815476645
archived log file name=/u01/app/oracle/fast_recovery_area/stldb/STLDB/archivelog/2013_05_15/o1_mf_1_398_8s63whqc_.arc RECID=399 STAMP=815477471
archived log file name=/u01/app/oracle/fast_recovery_area/stldb/STLDB/archivelog/2013_05_15/o1_mf_1_399_8s63wly4_.arc RECID=400 STAMP=815477475
archived log file name=/u01/app/oracle/fast_recovery_area/stldb/STLDB/archivelog/2013_05_15/o1_mf_1_400_8s641d8j_.arc RECID=401 STAMP=815477628
archived log file name=/u01/app/oracle/fast_recovery_area/stldb/STLDB/archivelog/2013_05_16/o1_mf_1_401_8s9d21jk_.arc RECID=403 STAMP=815584146
archived log file name=/u01/app/oracle/fast_recovery_area/stldb/STLDB/archivelog/2013_05_16/o1_mf_1_402_8s9d1skv_.arc RECID=402 STAMP=815584137
archived log file name=/u01/app/oracle/fast_recovery_area/stldb/STLDB/archivelog/2013_05_21/o1_mf_1_403_8spm6p4h_.arc RECID=405 STAMP=816017446
archived log file name=/u01/app/oracle/fast_recovery_area/stldb/STLDB/archivelog/2013_05_21/o1_mf_1_404_8spm6mqj_.arc RECID=404 STAMP=816017444
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/u01/app/oracle/fast_recovery_area/stldb/STLDB/archivelog/2013_05_21/o1_mf_1_405_8spm6yg0_.arc thread=1 sequence=405
Finished backup at 21-MAY-13
Starting backup at 21-MAY-13
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/u01/app/oracle/oradata/stldb/system01.dbf
input datafile file number=00002 name=/u01/app/oracle/oradata/stldb/sysaux01.dbf
input datafile file number=00005 name=/u01/app/oracle/oradata/stldb/example01.dbf
input datafile file number=00003 name=/u01/app/oracle/oradata/stldb/undotbs01.dbf
input datafile file number=00006 name=/u01/app/oracle/oradata/stldb/appdata01.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/stldb/users01.dbf
channel ORA_DISK_1: starting piece 1 at 21-MAY-13
channel ORA_DISK_1: finished piece 1 at 21-MAY-13
piece handle=/u01/app/oracle/fast_recovery_area/stldb/STLDB/backupset/2013_05_21/o1_mf_nnndf_TAG20130521T153213_8spm9fnc_.bkp tag=TAG20130521T153213 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:02:15
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 21-MAY-13
channel ORA_DISK_1: finished piece 1 at 21-MAY-13
piece handle=/u01/app/oracle/fast_recovery_area/stldb/STLDB/backupset/2013_05_21/o1_mf_ncsnf_TAG20130521T153213_8spmfqxf_.bkp tag=TAG20130521T153213 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
Finished backup at 21-MAY-13
Starting backup at 21-MAY-13
using channel ORA_DISK_1
specification does not match any archived log in the repository
backup cancelled because there are no files to backup
Finished backup at 21-MAY-13
RMAN> exit
Recovery Manager complete.
[oracle@oel62-x64 Desktop]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.3.0 Production on Tue May 21 15:34:42 2013
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> select max(Sequence#) from v$archived_log;
MAX(SEQUENCE#)
405
SQL> select max(Sequence#) from v$archived_log where applied='YES';
MAX(SEQUENCE#)
404
SQL> There have no problem, backup database when MRP is running. But if you want delete, then you are getting RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process.
And will not delete this archived log, because it is needed for standby or upstream capture process.
Updated
When MRP stoped
SQL> alter database recover managed standby database cancel;
Database altered.
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@oel62-x64 Desktop]$ rman target /
Recovery Manager: Release 11.2.0.3.0 - Production on Tue May 21 15:46:07 2013
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: ADMDB (DBID=4063877183, not open)
RMAN> backup database plus archivelog delete all input;
Starting backup at 21-MAY-13
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=24 device type=DISK
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=405 RECID=406 STAMP=816017455
channel ORA_DISK_1: starting piece 1 at 21-MAY-13
channel ORA_DISK_1: finished piece 1 at 21-MAY-13
piece handle=/u01/app/oracle/fast_recovery_area/stldb/STLDB/backupset/2013_05_21/o1_mf_annnn_TAG20130521T154617_8spn3s9w_.bkp tag=TAG20130521T154617 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
channel ORA_DISK_1: deleting archived log(s)
archived log file name=/u01/app/oracle/fast_recovery_area/stldb/STLDB/archivelog/2013_05_21/o1_mf_1_405_8spm6yg0_.arc RECID=406 STAMP=816017455
Finished backup at 21-MAY-13
Starting backup at 21-MAY-13
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/u01/app/oracle/oradata/stldb/system01.dbf
input datafile file number=00002 name=/u01/app/oracle/oradata/stldb/sysaux01.dbf
input datafile file number=00005 name=/u01/app/oracle/oradata/stldb/example01.dbf
input datafile file number=00003 name=/u01/app/oracle/oradata/stldb/undotbs01.dbf
input datafile file number=00006 name=/u01/app/oracle/oradata/stldb/appdata01.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/stldb/users01.dbf
channel ORA_DISK_1: starting piece 1 at 21-MAY-13
channel ORA_DISK_1: finished piece 1 at 21-MAY-13
piece handle=/u01/app/oracle/fast_recovery_area/stldb/STLDB/backupset/2013_05_21/o1_mf_nnndf_TAG20130521T154618_8spn3v4f_.bkp tag=TAG20130521T154618 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:16
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 21-MAY-13
channel ORA_DISK_1: finished piece 1 at 21-MAY-13
piece handle=/u01/app/oracle/fast_recovery_area/stldb/STLDB/backupset/2013_05_21/o1_mf_ncsnf_TAG20130521T154618_8spn6779_.bkp tag=TAG20130521T154618 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
Finished backup at 21-MAY-13
Starting backup at 21-MAY-13
using channel ORA_DISK_1
specification does not match any archived log in the repository
backup cancelled because there are no files to backup
Finished backup at 21-MAY-13
RMAN> Apply process is stopped and new redo received from primary.
SQL> select max(Sequence#) from v$archived_log;
MAX(SEQUENCE#)
407
SQL> select max(Sequence#) from v$archived_log where applied='YES';
MAX(SEQUENCE#)
405
SQL> exit
Disconnected from Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
[oracle@oel62-x64 Desktop]$ rman target /
Recovery Manager: Release 11.2.0.3.0 - Production on Tue May 21 15:49:28 2013
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: ADMDB (DBID=4063877183, not open)
RMAN> backup database plus archivelog delete all input;
Starting backup at 21-MAY-13
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=32 device type=DISK
channel ORA_DISK_1: starting archived log backup set
channel ORA_DISK_1: specifying archived log(s) in backup set
input archived log thread=1 sequence=406 RECID=407 STAMP=816018527
input archived log thread=1 sequence=407 RECID=408 STAMP=816018530
channel ORA_DISK_1: starting piece 1 at 21-MAY-13
channel ORA_DISK_1: finished piece 1 at 21-MAY-13
piece handle=/u01/app/oracle/fast_recovery_area/stldb/STLDB/backupset/2013_05_21/o1_mf_annnn_TAG20130521T154937_8spnb1y3_.bkp tag=TAG20130521T154937 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:01
channel ORA_DISK_1: deleting archived log(s)
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/u01/app/oracle/fast_recovery_area/stldb/STLDB/archivelog/2013_05_21/o1_mf_1_406_8spn8hkn_.arc thread=1 sequence=406
RMAN-08137: WARNING: archived log not deleted, needed for standby or upstream capture process
archived log file name=/u01/app/oracle/fast_recovery_area/stldb/STLDB/archivelog/2013_05_21/o1_mf_1_407_8spn8l69_.arc thread=1 sequence=407
Finished backup at 21-MAY-13
Starting backup at 21-MAY-13
using channel ORA_DISK_1
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
input datafile file number=00001 name=/u01/app/oracle/oradata/stldb/system01.dbf
input datafile file number=00002 name=/u01/app/oracle/oradata/stldb/sysaux01.dbf
input datafile file number=00005 name=/u01/app/oracle/oradata/stldb/example01.dbf
input datafile file number=00003 name=/u01/app/oracle/oradata/stldb/undotbs01.dbf
input datafile file number=00006 name=/u01/app/oracle/oradata/stldb/appdata01.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/stldb/users01.dbf
channel ORA_DISK_1: starting piece 1 at 21-MAY-13
channel ORA_DISK_1: finished piece 1 at 21-MAY-13
piece handle=/u01/app/oracle/fast_recovery_area/stldb/STLDB/backupset/2013_05_21/o1_mf_nnndf_TAG20130521T154939_8spnb3f5_.bkp tag=TAG20130521T154939 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:01:15
channel ORA_DISK_1: starting full datafile backup set
channel ORA_DISK_1: specifying datafile(s) in backup set
including current control file in backup set
including current SPFILE in backup set
channel ORA_DISK_1: starting piece 1 at 21-MAY-13
channel ORA_DISK_1: finished piece 1 at 21-MAY-13
piece handle=/u01/app/oracle/fast_recovery_area/stldb/STLDB/backupset/2013_05_21/o1_mf_ncsnf_TAG20130521T154939_8spndhly_.bkp tag=TAG20130521T154939 comment=NONE
channel ORA_DISK_1: backup set complete, elapsed time: 00:00:03
Finished backup at 21-MAY-13
Starting backup at 21-MAY-13
using channel ORA_DISK_1
specification does not match any archived log in the repository
backup cancelled because there are no files to backup
Finished backup at 21-MAY-13
RMAN> I think, codes is understandable.
Regard
Mahir M. Quluzade
Edited by: Mahir M. Quluzade on May 21, 2013 3:36 PM -
Backups on Physical standby database?
I am using dataguard and a physical standby database.How to assign backups on physical standby database to reduce the load on Primary database.
environment: windows
Database version:11.2.0.1.0
What are the pro and cons on assigning RMAN backups jobs to physical standby database?Is it better to assign the RMAN backups on standby?i am using the RMAN catalog.Yes, Already mentioned to reduce contention on primary. You can register even standby.
Do i need to change the setting to backup archive logs from standby database? If i won't backup the archive logs on Primary the FRA will be full and i can't access it ?You can include even archive logs with your database backup.
How to assign the archive logs backups,full backup on standby database?Same script will work, Before that cancel MRP and after backup start MRP. That should be fine.
Recently i tested backup from standby and restore, Please see below log.
=================================================================================================
Backup Scrpts:-
=================================================================================================
RMAN> run
2> 3> ALLOCATE CHANNEL dev11 type disk;
4> backup as compressed backupset
5> format '/home/oracle/backup/DBF_FULLCOLD_BKP_%s'
6> filesperset 30
7> (database);
backup current controlfile format
8> 9> '/home/oracle/backup/CTL_FULLCOLD_BKP_%s';
RELEASE CHANNEL dev1;
RELEASE CHANNEL dev2;
10> 11> 12> }
using target database control file instead of recovery catalog
allocated channel: dev11
channel dev11: SID=1 device type=DISK
Starting backup at 03-FEB-13
Starting implicit crosscheck backup at 03-FEB-13
Finished implicit crosscheck backup at 03-FEB-13
Starting implicit crosscheck copy at 03-FEB-13
Crosschecked 4 objects
Finished implicit crosscheck copy at 03-FEB-13
searching for all files in the recovery area
channel dev11: starting compressed full datafile backup set
channel dev11: specifying datafile(s) in backup set
input datafile file number=00001 name=/u01/app/oracle/oradata/orcl/system01.dbf
input datafile file number=00002 name=/u01/app/oracle/oradata/orcl/sysaux01.dbf
input datafile file number=00003 name=/u01/app/oracle/oradata/orcl/undotbs01.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/orcl/users01.dbf
channel dev11: starting piece 1 at 03-FEB-13
channel dev11: starting compressed full datafile backup set
channel dev11: specifying datafile(s) in backup set
input datafile file number=00001 name=/u01/app/oracle/oradata/orcl/system01.dbf
input datafile file number=00002 name=/u01/app/oracle/oradata/orcl/sysaux01.dbf
input datafile file number=00003 name=/u01/app/oracle/oradata/orcl/undotbs01.dbf
input datafile file number=00004 name=/u01/app/oracle/oradata/orcl/users01.dbf
channel dev11: starting piece 1 at 03-FEB-13
channel dev11: finished piece 1 at 03-FEB-13
piece handle=/home/oracle/backup/DBF_FULLCOLD_BKP_23 tag=TAG20130203T192535 comment=NONE
channel dev11: backup set complete, elapsed time: 00:03:57
channel dev11: starting compressed full datafile backup set
channel dev11: specifying datafile(s) in backup set
including current control file in backup set
channel dev11: starting piece 1 at 03-FEB-13
channel dev11: finished piece 1 at 03-FEB-13
piece handle=/home/oracle/backup/DBF_FULLCOLD_BKP_24 tag=TAG20130203T192535 comment=NONE
channel dev11: backup set complete, elapsed time: 00:00:02
Finished backup at 03-FEB-13
Starting backup at 03-FEB-13
channel dev11: starting full datafile backup set
channel dev11: specifying datafile(s) in backup set
including current control file in backup set
channel dev11: starting piece 1 at 03-FEB-13
channel dev11: finished piece 1 at 03-FEB-13
piece handle=/home/oracle/backup/CTL_FULLCOLD_BKP_25 tag=TAG20130203T192939 comment=NONE
channel dev11: backup set complete, elapsed time: 00:00:03
Finished backup at 03-FEB-13
released channel: dev11
=================================================================================================
Backup Files:-
=================================================================================================
[oracle@oracle-stby backup]$ ls -ltr
total 364572
-rw-r----- 1 oracle oinstall 361684992 Feb 3 19:29 DBF_FULLCOLD_BKP_23
-rw-r----- 1 oracle oinstall 1163264 Feb 3 19:29 DBF_FULLCOLD_BKP_24
-rw-r----- 1 oracle oinstall 10092544 Feb 3 19:29 CTL_FULLCOLD_BKP_25
[oracle@oracle-stby backup]$
=================================================================================================
Restore CONTROL FILE:-
=================================================================================================
RMAN> restore controlfile from '/home/oracle/backup/CTL_FULLCOLD_BKP_25';
Starting restore at 03-FEB-13
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=19 device type=DISK
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: restore complete, elapsed time: 00:00:03
output file name=/u02/app/oracle/oradata/orcl/control01.ctl
output file name=/u02/app/oracle/flash_recovery_area/orcl/control02.ctl
Finished restore at 03-FEB-13
RMAN> sql 'alter database mount';
sql statement: alter database mount
released channel: ORA_DISK_1
RMAN>
=================================================================================================
Restore Database:-
=================================================================================================
RMAN> restore database;
Starting restore at 03-FEB-13
Starting implicit crosscheck backup at 03-FEB-13
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=19 device type=DISK
Crosschecked 2 objects
using channel ORA_DISK_1
channel ORA_DISK_1: starting datafile backup set restore
channel ORA_DISK_1: specifying datafile(s) to restore from backup set
channel ORA_DISK_1: restoring datafile 00001 to /u01/app/oracle/oradata/orcl/system01.dbf
channel ORA_DISK_1: restoring datafile 00002 to /u01/app/oracle/oradata/orcl/sysaux01.dbf
channel ORA_DISK_1: restoring datafile 00003 to /u01/app/oracle/oradata/orcl/undotbs01.dbf
Sun Feb 03 19:37:47 2013
Checker run found 4 new persistent data failures
Sun Feb 03 19:38:40 2013
Full restore complete of datafile 3 /u01/app/oracle/oradata/orcl/undotbs01.dbf. Elapsed time: 0:00:56
checkpoint is 1595132
last deallocation scn is 1519218
channel ORA_DISK_1: piece handle=/home/oracle/backup/DBF_FULLCOLD_BKP_23 tag=TAG20130203T192535
channel ORA_DISK_1: restored backup piece 1
channel ORA_DISK_1: restore complete, elapsed time: 00:02:07
Finished restore at 03-FEB-13
RMAN>
=================================================================================================
Open Database:-
=================================================================================================
SQL> alter database open resetlogs;
Database altered.
SQL> select open_mode,database_role from v$database;
OPEN_MODE DATABASE_ROLE
READ WRITE PRIMARY
SQL>Edited by: CKPT on Feb 21, 2013 11:24 PM -
Rman backup of physical standby
Hi:
I am on 10.2.0.3.
Trying to run rman backup on physical standby while it's in managed recovery mode. Whould it be useable for recovery being that it will be inconsistent?
I went through this: http://youngcow.net/doc/oracle10g/server.102/b14239/rman.htm and some other sites
but they don't tell how to register the standby first. By the way, do I have to change DBID as well? Am I missing some step?
Below are the errors I'm getting.
TIA.
RMAN> register database;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of register command at 12/04/2008 11:42:02
RMAN-08040: full resync skipped, control file is not current or backup
RMAN> show all;
RMAN configuration parameters are:
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of show command at 12/04/2008 11:42:09
RMAN-06004: ORACLE error from recovery catalog database: RMAN-20001: target database not found in recovery catalogI meant this sentence from the documentation:
In a standby environment, backing up data files and archived redo log files taken on the primary or standby system are usable on either system for recovery.
You can take a backup (datafiles and archivelogs) on the primary side and then restore/recover on the standby side. The same is true vice versa. There's no difference,where you take the backup. The recovery catalog is necessary to resync the controlfiles on both sides with the backup records. By the way I prefer in any case to take archivelog backups on the primary side. Because sometimes archivelog transfer to the standby is interrupted and you don't catch all archivelogs on the standby side (in the moment you take the backup).
Werner -
Physical standby database backup issue
Hello
We have a Data Guard environment if I open Physical Standby database for query by this statement:
"Alter database recover managed standby database cancel" and then start redo apply by
"alter database recover managed standby database using current logfile" and then backup the Physical standby database by RMAN
for example
RMAN> backup database;
I will get this error :
Starting backup at 03-FEB-09
using channel ORA_DISK_1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 02/03/2009 15:36:45
ORA-01219: database not open: queries allowed on fixed tables/views only
but if before restarting redo apply after opening standby database for query I shutdown the database first and then start redo apply I don't get that error while backing up
If DataGuard mode is Maximum Performance or Maximum Availability shutting down the standby database before
restarting redo apply is possible but if DataGuard mode is Maximum Protection shutting down the standby database
cause failing Primary database
do you know what is problem and it's solution ?
thankslike I said bro, i have made standby controlfile....
I made it on Primary Database (DG1)...........
but when I copied it to Physical Standby Database, the error message raised "DBID IS NOT SAME",
thanks Renato OCP for uR attention..........
is there any other suggestion.............?
regards
abip -
Backup physical standby delete arch
Hi
I am scheduling hot backup for physical standby, the backup does backup database plus archivelog delete input...
my question is what if there is delay with apply process and the rman job back's up the archive log and removes them before they get aplplied to the standby?
is above described case a vlaid senario ? what can i do to avoid this ?
thanksyou said:
>
consider senario where logs are not shipped due to network issue ... so standby is couple of hours behind ....
and also we loss the primary !! how do you recover the gap between primary and stnadby ?
>
Let us just assume that:
1. Your Network Connection to the Standby interrupts
2. After a while, the Primary gets completely destroyed
Your solution to that would be to ship Archivelogs that you took on the Primary to the Standby? When where the Archivelogs taken?
Regardless of your concrete answer to that: You are encountering loss of transactional data with that 'solution' - the only question is: How much data do you lose?
In other words: This is not really a sensible solution to that assumed scenario.
Instead, the real solution would be to
a) Have multiple Standby Databases
b) Have at least redundant Network Connection to the one Standby
Instead of fixing your dysfunctional solution, you may better put your efforts on the implementation of a functional solution.
At least that is what I would recommend.
Kind regards
Uwe Hesse
http://uhesse.wordpress.com
Edited by: Uwe Hesse on 30.07.2011 22:45
removed the Recover Primary part -
Starting Physically Standby Database in Mount Mode
Hi All
I have configured Data Guard using Oracle 10g 10.2.0.4.0 (64 bits) on Windows 2008 Server (64 bits) Release 2 Enterprise.
Data guard configuration was OK as the message from "Enable Configuration DG1" was "SUCCESS" for both
Primary and Standby Database. I have also set both Databases and TNS to start Automatically whenever Windows Starts.
The Problem is as long as the Standby Server is running, there is No issue.
But when we Restarts the Backup Server, Physically Standby Database is Started and TNS is also Started,
but Archives are not received until I physically do the following steps so that it can received the Archives.
SQL> startup nomount;
SQL> alter database mount standby database;
SQL> alter database recover managed standby database disconnect from session;
Is there a way to start Physically Standby Database in Mount mode when windows started.
Regards
Thunder2777Hi Mihael
I have created 2 files. 1 Bat file 2nd sql file which contains all commands as written above.
When I execute start.bat file
1. set ORACLE_HOME=C:\oracle\product\10.2.0\db_1
2. set ORACLE_SID=UMISBK
3. sqlplus / [email protected]
1 & 2 executed properly. At 3 it just display SQL help for login as shown below.
SQL*Plus: Release 10.2.0.4.0 - Production
Copyright (c) 1982, 2007, Oracle. All Rights Reserved.
Usage 1: sqlplus -H | -V
-H Displays the SQL*Plus version and the usage help.
-V Displays the SQL*Plus version.
Usage 2: sqlplus [ [<option>] [<logon>] [<start>] ]
<option> is: [-C <version>] [-L] [-M "<options>"] [-R <level>] [-S]
It Did Not execute start.sql file to excute sql commands.
Regards
Thunder2777 -
RMAN question concerning Physical Standby
We have a database in a two-server Dataguard environment. We use RMAN to backup up the Primary database (on the server CORE), but we do not backup the Physical Standby (this was recommended by our vendor).
Once a month, I switchover the Primary database (on the server CORE) over to the Physical Standby database (which is on the server DG). I apply Linux patches to the CORE server and reboot. I then bring up the database as Physical Standby (using "startup nomount", followed by "alter database mount standby database" and then "alter database recover managed standby database disconnect from session"), and then I do a switchover and make it the Primary again.
My question is, after I bring up the database on the server CORE as a Physical Standby, and before I do a switchover to make it the Primary again, can I use RMAN to run a "restore database validate" to see if my backups are currently valid, or would this not give me the expected results since I am the Physical Standby?
Thanks in advance.You should have any problem. What you're doing is similar to a a "rolling upgrade". When your physical to production environment make sure put the dest_2 in defer. Is your current physical standby works now? If so, there's problem.
-
Physical standby database backup
HI,
Is it necessary to take a physical standby Db backup.our standby db is in manual mode and it is opened for read only mode.we are taking backups of priamary database,I am taking care of DR site.So i would like to know should i go for a RMAN to take a standby database or as wer are taking a backup of primarty db so there is no need to take backup of standby db.
If our primary db is failed then we can swithciover to standby to primary but if we are not having a backup of standby db then can we recover the standby db from primary db backup.
another question is that while taking logical backup of the primary db from the client side i.e remote location ,backup is failed bcoz our ary Db version is
SQL> select * from v$version;
BANNER
Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
PL/SQL Release 9.2.0.6.0 - Production
CORE 9.2.0.6.0 Production
TNS for Solaris: Version 9.2.0.6.0 - Production
NLSRTL Version 9.2.0.6.0 - Productionbut our oracle client version is 9.2.0.1 and the backup was terminated after gerating an error *"ORA-03113 exp-00056 getting an error while exporting "*
Pls suggest me.....Hi!
There is no need to take a backup of your standby DB. A standby DB is only a clone of your primary DB so if your standby DB crashes you can take a backup of your primary DB and build a new standby DB.
Your problem with logical backup. The Oracle clientsoftware should allways have the same version as your DB. Avoid situations where client and server have different version. If it is possible upgrade your clientsoftware.
Hope this helps! -
Backup physical standby database
Hi,
as for a backup & restore concept we are planning to implement a physical standby database using Oracle 10g on Sun Solaris.
The idea is to use the standby database as backup source.
What are the required steps and constraints, do i have to stop log apply during backups or change the database state from recovery mode ?
Thanks,
RobertHi,
Its a good way to reduce load of backup on Live node.
According to the your plan:
If the live node has failes Standby will be failed over or switched over to production.
Then through RMAN we can restore the standby database from It's backup , and the standby is back.
Is this correct/Feasible....?
Regards,
Ven. -
Got RMAN error when running RMAN backup of archivelogs on physical standby database
Got below error when running RMAN backup of datafiles and archivelogs on physical standby database.
RMAN-06820: WARNING: failed to archive current log at primary database
ORACLE error from target database:
ORA-17629: Cannot connect to the remote database server
ORA-17627: ORA-00942: table or view does not exist
Could anyone help me? Thanks,Hello;
When you connect RMAN to the source database as TARGET you must specify a password even if RMAN uses operating system authentication.
So the errors ORA-17627 and ORA-00942 appear to be cause and effect.
What version of Oracle? ( 11.2.0.4 according to the tag )
Can you post your backup script?
Best Regards
mseberg
Update
According to :
Database Error Messages 11g Release 2 (11.2) E17766-03
RMAN-06820: WARNING: failed to archive current log at primary database
Cause: An attempt to switch the archived log at the primary database failed.
So I would check my Primary alert log for an issue.
Message was edited by: mseberg -
RMAN backup on the physical standby database.
Hello,
11.2.0.3 EE database. Is it a requirement to open the database in read only mode in order to take a hot backup?
SQL>ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
SQL> ALTER DATABASE OPEN READ ONLY;
I've initiated a rman backup without opening the db in read only and the following output is so far:
RMAN> backup format '/dbstor2/LTS/LTS_rman/%d_set%s_piece%p_%T_%U' check logical database plus archivelog;
Starting backup at 15-OCT-12
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=603 device type=DISK
specification does not match any archived log in the repository
backup cancelled because there are no files to backup
I plan on taking this backup and using it to refresh our Dev and QA dbs. Do you see any issues with taking a backup without opening the db in ready only mode?
-SteveVNo we are not using Active Dataguard. An issue I am investigating is why can't I perform an archivelog backup from the standby?
RMAN> backup archivelog all format '/dbstor2/LTS/LTS_rman/arc.rman.bak';
Starting backup at 15-OCT-12
using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: SID=603 device type=DISK
specification does not match any archived log in the repository
backup cancelled because there are no files to backup
Finished backup at 15-OCT-12 -
Backup Physical Standby (Dataguard) using RMAN : Issues
Hello All,
I am running a RMAN backup on standby server using the command below. The RMAN backup is actually connecting to the primary database on another server, I found this very confusing and to reassure, i shutdown the primary database and ran the backup again. It fails with not able to conenct to target database. Can you please explain?
run {
allocate channel t1 type disk format '/backup/oracle/PRODCDW/RMAN/DBFILES_%d_t%t_s%s_p%p';
allocate channel t2 type disk format '/backup/oracle/PRODCDW/RMAN/DBFILES_%d_t%t_s%s_p%p';
recover copy of database with tag 'STDBY_PRODCDW';
backup as compressed backupset format '/backup/oracle/PRODCDW/RMAN/DBFILES_%d_t%t_s%s_p%p' tag 'STDBY_PRODCDW' incremental level 1 for recover of copy with tag 'STDBY_PRODCDW' database plus archivelog delete input;
}I am not doing the image copy anymore, I am taking the RMAN incremental backups for the database. I am not getting any errors now but, Here is what I want to achieve:
I am running the RMAN backups on the standby database. I want to :
1) Delete archivelogs on my PRIMARY server only when these logs are successfully TRANSFERED/APPLIED to all my standby databases?
2) Delete archivelogs on my STANDBY server only when these logs are sucessfully APPLIED to the database?
Regards -
Error while trying to open physical standby database - (DATA GUARD)
Hi Everyone,
I have problems in opening the database of the physical standby in read- write mode/ read only mode. I have a primary server which is running on 2 node RAC and the standby on a seperate single server being used as DR. I recently got this server and my aim was to isolate the standby server from primary server and perform few test. As it has never been tested even once.
Primary Database spec: (2 Node Rac on ASM)
Oracle Version : 10.2.0.3.0
O/s : HP-UX B.11.23
Standby Database spec: (Single Node)
Oracle Version : 10.2.0.3.0
O/s: HP-UX db01 B.11.23
Error:
alter database recover managed standby database cancel;
Database altered.
SQL> alter database open
2 ;
alter database open
ERROR at line 1:
ORA-16004: backup database requires recovery
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '+DATA/dprod/datafile/system01.dbf'
Parameters :
log_archive_dest_2 string SERVICE=PROD1 LGWR ASYNC VALID
FOR=(ONLINELOGFILES,PRIMARY_
ROLE) DB_UNIQUE_NAME=PROD
remote_archive_enable string true
fal_client string DPROD
fal_server string PROD1, PROD2
Steps tried so far:
Changed log_archive_dest_2 = DEFER on both the primary nodes
Standby :
startup nomount
alter database mount standby database;
alter database recover managed standby database disconnect;
alter database recover managed standby database cancel;
alter database open/readonly (tried both)
Same error.
On Primary:
SQL> select max(sequence#) from v$log_history;
MAX(SEQUENCE#)
55702
on Standby:
MAX(SEQUENCE#)
33289
Primary Database:
SELECT SEQUENCE#, FIRST_TIME, NEXT_TIME FROM V$ARCHIVED_LOG ORDER BY SEQUENCE#;
SEQUENCE# FIRST_TIME NEXT_TIME
55700 13-JUN-11 13-JUN-11
55700 13-JUN-11 13-JUN-11
55701 13-JUN-11 13-JUN-11
55701 13-JUN-11 13-JUN-11
55702 13-JUN-11 13-JUN-11
60824 rows selected.
Standby Database:
SEQUENCE# FIRST_TIME NEXT_TIME
55698 13-JUN-11 13-JUN-11
55699 13-JUN-11 13-JUN-11
55700 13-JUN-11 13-JUN-11
55701 13-JUN-11 13-JUN-11
15206 rows selected.
Additional Information :
There is a delay of 20 minutes before the logs get applied. which has been intentional set by team.
Any help will be highly appreciated. Thanks in advance
SadiqHi,
Primary Database:
select status,checkpoint_count from v$datafile_header;
STATUS CHECKPOINT_COUNT
ONLINE 672472065
ONLINE 672472065
ONLINE 672472065
ONLINE 672472065
ONLINE 672472065
ONLINE 672472065
ONLINE 672472065
ONLINE 672472065
ONLINE 672472065
ONLINE 672472065
ONLINE 672472065
STATUS CHECKPOINT_COUNT
ONLINE 672472065
ONLINE 672472065
ONLINE 672472065
ONLINE 672472065
ONLINE 672472065
ONLINE 672472065
ONLINE 59736
ONLINE 59736
ONLINE 59736
ONLINE 59736
ONLINE 59736
STATUS CHECKPOINT_COUNT
ONLINE 57717
ONLINE 57717
57 rows selected.
Standby Database;
select status,checkpoint_count from v$datafile_header;
STATUS CHECKPOINT_COUNT
ONLINE 672445072
ONLINE 672445072
ONLINE 672445072
ONLINE 672445072
ONLINE 672445072
ONLINE 672445072
ONLINE 672445072
ONLINE 672445071
ONLINE 672445071
ONLINE 672445071
ONLINE 672445071
STATUS CHECKPOINT_COUNT
ONLINE 672445071
ONLINE 672445071
ONLINE 672445071
ONLINE 672445071
ONLINE 672445071
ONLINE 672445071
ONLINE 32742
ONLINE 32742
ONLINE 32742
ONLINE 32742
ONLINE 32742
STATUS CHECKPOINT_COUNT
ONLINE 30723
ONLINE 30723
57 rows selected.
Archieve log list :
Primary database:
SQL> archive log list
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 49110
Next log sequence to archive 49111
Current log sequence 49111
Standby Database:
SQL> archive log list;
Database log mode Archive Mode
Automatic archival Enabled
Archive destination USE_DB_RECOVERY_FILE_DEST
Oldest online log sequence 49110
Next log sequence to archive 0
Current log sequence 49111
I tried log switch multiple times in primary database i saw that its getting highlighted in standby database. -
Drop a datafile from physical standby's control file
Hi,
I am trying to create a physical standby database for my production...
1) I have taken cold backup of my primary database on 18-Nov-2013...
2) I added a datafile on 19-nov-2013 ( 'O:\ORADATA\SFMS\SFMS_DATA4.DBF' )
3) Standby control file was generated on 20-ov-2013 (today) after shutting down and then mounting the primary database...
When i try to recover the newly setup standby using archive files, i am getting the following error (datafile added on 19th Nov is missing)
SQL> recover standby database;
ORA-00283: recovery session canceled due to errors
ORA-01110: data file 39: 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
ORA-01157: cannot identify/lock data file 39 - see DBWR trace file
ORA-01110: data file 39: 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
How to overcome this situation...
Can i delete the entry for the newly added datafile from the backup control file ?
When i tried to delete datafile using "alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF';", it is showing that database should be open..
SQL> alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
ERROR at line 1:
ORA-01109: database not open
SQL> show parameter STANDBY_FILE_MANAGEMENT
NAME TYPE VALUE
standby_file_management string AUTO
SQL> alter system set STANDBY_FILE_MANAGEMENT=manual;
System altered.
SQL> show parameter STANDBY_FILE_MANAGEMENT
NAME TYPE VALUE
standby_file_management string MANUAL
SQL> alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
ERROR at line 1:
ORA-01109: database not open
Regards,
JibuJibu wrote:
Hi,
I am trying to create a physical standby database for my production...
1) I have taken cold backup of my primary database on 18-Nov-2013...
2) I added a datafile on 19-nov-2013 ( 'O:\ORADATA\SFMS\SFMS_DATA4.DBF' )
3) Standby control file was generated on 20-ov-2013 (today) after shutting down and then mounting the primary database..
Hi,
What is your version?
If you added new datafile or created new tablespace, take backup again for restore new created standby database.
If your standby database running well, DG configuration success, then this datafile will create on standby side, too.
Set STANDBY_FILE_MANAGEMENT=AUTO best practice.
When i try to recover the newly setup standby using archive files, i am getting the following error (datafile added on 19th Nov is missing)
SQL> recover standby database;
ORA-00283: recovery session canceled due to errors
ORA-01110: data file 39: 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
ORA-01157: cannot identify/lock data file 39 - see DBWR trace file
ORA-01110: data file 39: 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
How to overcome this situation...
Can i delete the entry for the newly added datafile from the backup control file ?
Not need any delete datafile from standby side, you must recreate standby database, or you can take RMAN backup and restore to standby side again.
When i tried to delete datafile using "alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF';", it is showing that database should be open..
SQL> alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
ERROR at line 1:
ORA-01109: database not open
SQL> show parameter STANDBY_FILE_MANAGEMENT
NAME TYPE VALUE
standby_file_management string AUTO
SQL> alter system set STANDBY_FILE_MANAGEMENT=manual;
System altered.
SQL> show parameter STANDBY_FILE_MANAGEMENT
NAME TYPE VALUE
standby_file_management string MANUAL
SQL> alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
alter tablespace SFMS_BR_DATA drop datafile 'O:\ORADATA\SFMS\SFMS_DATA4.DBF'
ERROR at line 1:
ORA-01109: database not open
It is not logical, Physical standby must be bit-for-bit same with Primary database.
Regards
Mahir M. Quluzade
Maybe you are looking for
-
Folks, Hello. I have been installing HCM and Campus Solution 9.0 with PeopleTools8.53. Server machine is Oracle Linux 5.10 and client machine is Windows XP. My internet architecture is WebLogic11g/Tuxedo11g/OracleDatabase 11gR1. Peopletools 8.53 run
-
[BOXI 3.0] missing preferences - close browser - log me off infoview
when we were testing BOXI R2 we wererunning on IIS now with BOXI 3.0 we are using TOMCAT on R2 under Preferences in InfoView there was an option"When I close my browser window" and I could tick "always log me off InfoView" I think there were other o
-
Is this a bug? about multimap
code: #include <map> int main() std::multimap<int, float> coll; coll.insert(std::make_pair(2, 22.3f)); return 0; compile with CC command . get some error compile with g++ command. OK why? Best D.Y
-
I have a html page with several frames that loads JSP-files. The JSP's use the same application module, and two view-objects. So in the request to the JSP's I send in two rowkeys, one for each view-object which are linked together as parent-detail. W
-
TNS-12541: TNS: no lilstener
I installed Oracle 9i on a linux machine. Everything works well on it. Now I want to access the database from a win2k machine. Unforuately, the above message pops up. Here is the details. Used parameter files: d:\oracle\ora92\network\admin\sqlnet.ora