Академический Документы
Профессиональный Документы
Культура Документы
https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&...
Type HOWTO
Status MODERATED
In this Document
Goal
Solution
This document is being delivered to you via Oracle Support's Rapid Visibility (RaV) process, and therefore has
not been subject to an independent technical review.
Applies to:
Oracle Server - Enterprise Edition - Version: 9.0.1.0 to 11.1.0.6
Information in this document applies to any platform.
Goal
Step by step guide on how to create a physical standby database using RMAN without using duplicate
command.
Solution
Below are the steps to accomplish the task :
Step 1:
Step 2:
Step 3:
Step 4:
Step 5:
Backup the database that includes backup of datafiles, archivelogs and controlfile for standby
Move the backups to the standby server
Make proper changes in the parameter files of both primary and standby database
Do the restore and recover on standby database
Put the standby database in recover managed mode
Example :
=======
Step 1: Backup the primary database that includes backup of datafiles, archivelogs and controlfile for
standby
18/11/2009 11:10
2 de 9
https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&...
allocated channel: c3
channel c3: sid=137 devtype=DISK
Starting backup at 09:DEC:2007:14:57:27
current log archived
channel c1: starting archive log backupset
channel c1: specifying archive log(s) in backup set
input archive log thread=1 sequence=32 recid=44 stamp=640387774
input archive log thread=1 sequence=33 recid=45 stamp=640387945
input archive log thread=1 sequence=34 recid=48 stamp=640668312
channel c1: starting piece 1 at 09:DEC:2007:14:57:32
channel c2: starting archive log backupset
channel c2: specifying archive log(s) in backup set
input archive log thread=1 sequence=35 recid=50 stamp=640882651
channel c2: starting piece 1 at 09:DEC:2007:14:57:32
channel c3: starting archive log backupset
channel c3: specifying archive log(s) in backup set
input archive log thread=1 sequence=20 recid=20 stamp=640385760
input archive log thread=1 sequence=21 recid=21 stamp=640385772
input archive log thread=1 sequence=22 recid=22 stamp=640385775
input archive log thread=1 sequence=23 recid=23 stamp=640385778
input archive log thread=1 sequence=24 recid=24 stamp=640386245
input archive log thread=1 sequence=25 recid=25 stamp=640386250
channel c3: starting piece 1 at 09:DEC:2007:14:57:32
channel c2: finished piece 1 at 09:DEC:2007:14:57:35
piece handle=/u01/oracle/product/ora10g/flash_recovery_area/ORA10G/backupset/2007_12_09
/o1_mf_annnn_TAG20071209T145731_3oqf84xl_.bkp tag=TAG20071209T145731 comment=NONE
channel c2: backup set complete, elapsed time: 00:00:04
channel c3: finished piece 1 at 09:DEC:2007:14:57:36
piece handle=/u01/oracle/product/ora10g/flash_recovery_area/ORA10G/backupset/2007_12_09
/o1_mf_annnn_TAG20071209T145731_3oqf84z6_.bkp tag=TAG20071209T145731 comment=NONE
channel c3: backup set complete, elapsed time: 00:00:05
channel c2: starting archive log backupset
channel c2: specifying archive log(s) in backup set
input archive log thread=1 sequence=26 recid=26 stamp=640386253
input archive log thread=1 sequence=27 recid=27 stamp=640386256
input archive log thread=1 sequence=28 recid=36 stamp=640387757
input archive log thread=1 sequence=29 recid=37 stamp=640387764
input archive log thread=1 sequence=30 recid=40 stamp=640387769
input archive log thread=1 sequence=31 recid=41 stamp=640387771
channel c2: starting piece 1 at 09:DEC:2007:14:57:37
channel c2: finished piece 1 at 09:DEC:2007:14:57:40
piece handle=/u01/oracle/product/ora10g/flash_recovery_area/ORA10G/backupset/2007_12_09
/o1_mf_annnn_TAG20071209T145731_3oqf892x_.bkp tag=TAG20071209T145731 comment=NONE
channel c2: backup set complete, elapsed time: 00:00:04
channel c1: finished piece 1 at 09:DEC:2007:14:57:41
piece handle=/u01/oracle/product/ora10g/flash_recovery_area/ORA10G/backupset/2007_12_09
/o1_mf_annnn_TAG20071209T145731_3oqf84xf_.bkp tag=TAG20071209T145731 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:10
Finished backup at 09:DEC:2007:14:57:41
Starting backup at 09:DEC:2007:14:57:41
channel c1: starting full datafile backupset
channel c1: specifying datafile(s) in backupset
input datafile fno=00002 name=/u01/oracle/product/oradata/ora10g/data/undo01.dbf
input datafile fno=00003 name=/u01/oracle/product/oradata/ora10g/data/sysaux01.dbf
channel c1: starting piece 1 at 09:DEC:2007:14:57:41
channel c2: starting full datafile backupset
channel c2: specifying datafile(s) in backupset
input datafile fno=00001 name=/u01/oracle/product/oradata/ora10g/data/sys01.dbf
input datafile fno=00004 name=/u01/oracle/product/oradata/ora10g/data/rman.dbf
channel c2: starting piece 1 at 09:DEC:2007:14:57:41
channel c3: starting full datafile backupset
channel c3: specifying datafile(s) in backupset
including current control file in backupset
channel c3: starting piece 1 at 09:DEC:2007:14:57:45
channel c3: finished piece 1 at 09:DEC:2007:14:57:52
piece handle=/u01/oracle/product/ora10g/flash_recovery_area/ORA10G/backupset/2007_12_09
/o1_mf_ncnnf_TAG20071209T145741_3oqf8kdz_.bkp tag=TAG20071209T145741 comment=NONE
channel c3: backup set complete, elapsed time: 00:00:11
channel c3: starting full datafile backupset
channel c3: specifying datafile(s) in backupset
including current SPFILE in backupset
channel c3: starting piece 1 at 09:DEC:2007:14:57:53
channel c3: finished piece 1 at 09:DEC:2007:14:57:56
18/11/2009 11:10
3 de 9
https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&...
piece handle=/u01/oracle/product/ora10g/flash_recovery_area/ORA10G/backupset/2007_12_09
/o1_mf_nnsnf_TAG20071209T145741_3oqf8sq8_.bkp tag=TAG20071209T145741 comment=NONE
channel c3: backup set complete, elapsed time: 00:00:04
channel c1: finished piece 1 at 09:DEC:2007:14:58:31
piece handle=/u01/oracle/product/ora10g/flash_recovery_area/ORA10G/backupset/2007_12_09
/o1_mf_nnndf_TAG20071209T145741_3oqf8fk4_.bkp tag=TAG20071209T145741 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:50
channel c2: finished piece 1 at 09:DEC:2007:14:58:31
piece handle=/u01/oracle/product/ora10g/flash_recovery_area/ORA10G/backupset/2007_12_09
/o1_mf_nnndf_TAG20071209T145741_3oqf8fod_.bkp tag=TAG20071209T145741 comment=NONE
channel c2: backup set complete, elapsed time: 00:00:50
Finished backup at 09:DEC:2007:14:58:31
Starting backup at 09:DEC:2007:14:58:31
current log archived
channel c1: starting archive log backupset
channel c1: specifying archive log(s) in backup set
input archive log thread=1 sequence=36 recid=51 stamp=640882711
channel c1: starting piece 1 at 09:DEC:2007:14:58:32
channel c1: finished piece 1 at 09:DEC:2007:14:58:33
piece handle=/u01/oracle/product/ora10g/flash_recovery_area/ORA10G/backupset/2007_12_09
/o1_mf_annnn_TAG20071209T145831_3oqfb0p6_.bkp tag=TAG20071209T145831 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:02
Finished backup at 09:DEC:2007:14:58:33
released channel: c1
released channel: c2
released channel: c3
RMAN> run
2> {
3> allocate channel c1 type disk;
4> backup current controlfile for standby;
5> }
allocated channel: c1
channel c1: sid=159 devtype=DISK
Starting backup at 09:DEC:2007:15:00:09
channel c1: starting full datafile backupset
channel c1: specifying datafile(s) in backupset
including standby control file in backupset
channel c1: starting piece 1 at 09:DEC:2007:15:00:10
channel c1: finished piece 1 at 09:DEC:2007:15:00:11
piece handle=/u01/oracle/product/ora10g/flash_recovery_area/ORA10G/backupset/2007_12_09
/o1_mf_ncnnf_TAG20071209T150009_3oqff2fb_.bkp tag=TAG20071209T150009 comment=NONE
channel c1: backup set complete, elapsed time: 00:00:01
Finished backup at 09:DEC:2007:15:00:11
released channel: c1
Step 3: Make proper changes in the parameter files of both primary and standby database
Add the below parameter in primary database parameter file :
log_archive_dest_2='SERVICE=STANDBY'
18/11/2009 11:10
4 de 9
https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&...
18/11/2009 11:10
5 de 9
https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&...
18/11/2009 11:10
6 de 9
https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&...
18/11/2009 11:10
7 de 9
https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&...
---- ------- ---------- -------------------- ---------- --------1 20 272861 03:DEC:2007:20:11:33 274614 03:DEC:2007:20:56:00
1 21 274614 03:DEC:2007:20:56:00 274621 03:DEC:2007:20:56:12
1 22 274621 03:DEC:2007:20:56:12 274624 03:DEC:2007:20:56:15
1 23 274624 03:DEC:2007:20:56:15 274627 03:DEC:2007:20:56:18
1 24 274627 03:DEC:2007:20:56:18 274796 03:DEC:2007:21:04:05
1 25 274796 03:DEC:2007:21:04:05 274800 03:DEC:2007:21:04:10
BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ -------------------9 25.00K DISK 00:00:02 09:DEC:2007:14:57:38
BP Key: 9 Status: AVAILABLE Compressed: NO Tag: TAG20071209T145731
Piece Name: /u01/oracle/product/ora10g/flash_recovery_area/ORA10G/backupset/2007_12_09
/o1_mf_annnn_TAG20071209T145731_3oqf892x_.bkp
List of Archived Logs in backup set 9
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- -------------------- ---------- --------1 26 274800 03:DEC:2007:21:04:10 274803 03:DEC:2007:21:04:13
1 27 274803 03:DEC:2007:21:04:13 274806 03:DEC:2007:21:04:16
1 28 274806 03:DEC:2007:21:04:16 275324 03:DEC:2007:21:29:17
1 29 275324 03:DEC:2007:21:29:17 275328 03:DEC:2007:21:29:24
1 30 275328 03:DEC:2007:21:29:24 275332 03:DEC:2007:21:29:29
1 31 275332 03:DEC:2007:21:29:29 275335 03:DEC:2007:21:29:31
BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ -------------------10 95.73M DISK 00:00:09 09:DEC:2007:14:57:40
BP Key: 10 Status: AVAILABLE Compressed: NO Tag: TAG20071209T145731
Piece Name: /u01/oracle/product/ora10g/flash_recovery_area/ORA10G/backupset/2007_12_09
/o1_mf_annnn_TAG20071209T145731_3oqf84xf_.bkp
List of Archived Logs in backup set 10
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- -------------------- ---------- --------1 32 275335 03:DEC:2007:21:29:31 275338 03:DEC:2007:21:29:34
1 33 275338 03:DEC:2007:21:29:34 275545 03:DEC:2007:21:32:25
1 34 275545 03:DEC:2007:21:32:25 400351 07:DEC:2007:03:25:09
BS Key Size Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ -------------------15 2.00K DISK 00:00:01 09:DEC:2007:14:58:32
BP Key: 15 Status: AVAILABLE Compressed: NO Tag: TAG20071209T145831
Piece Name: /u01/oracle/product/ora10g/flash_recovery_area/ORA10G/backupset/2007_12_09
/o1_mf_annnn_TAG20071209T145831_3oqfb0p6_.bkp
List of Archived Logs in backup set 15
Thrd Seq Low SCN Low Time Next SCN Next Time
---- ------- ---------- -------------------- ---------- --------1 36 489499 09:DEC:2007:14:57:27 489527 09:DEC:2007:14:58:31
RMAN> recover database until sequence 37;
Starting recover at 09:DEC:2007:15:22:38
using channel ORA_DISK_1
starting media recovery
channel ORA_DISK_1: starting archive log restore to default destination
channel ORA_DISK_1: restoring archive log
archive log thread=1 sequence=36
channel ORA_DISK_1: reading from backup piece /u01/oracle/product/ora10g/flash_recovery_area/ORA10G
/backupset/2007_12_09/o1_mf_annnn_TAG20071209T145831_3oqfb0p6_.bkp
channel ORA_DISK_1: restored backup piece 1
18/11/2009 11:10
8 de 9
https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&...
piece handle=/u01/oracle/product/ora10g/flash_recovery_area/ORA10G/backupset/2007_12_09
/o1_mf_annnn_TAG20071209T145831_3oqfb0p6_.bkp tag=TAG20071209T145831
channel ORA_DISK_1: restore complete, elapsed time: 00:00:01
archive log filename=/u01/oracle/product/ora10g/flash_recovery_area/ABC/archivelog/2007_12_09
/o1_mf_1_36_3oqgq81h_.arc thread=1 sequence=36
channel default: deleting archive log(s)
archive log filename=/u01/oracle/product/ora10g/flash_recovery_area/ABC/archivelog/2007_12_09
/o1_mf_1_36_3oqgq81h_.arc recid=1 stamp=640884160
Oracle Error:
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '/u01/oracle/product/ora10g/oradata/standby/data/sys01.dbf'
media recovery complete, elapsed time: 00:00:00
Finished recover at 09:DEC:2007:15:22:41
RMAN> exit
Recovery Manager complete.
Note : No need to worry about the errors, you can safely ignore and move to step 5.
Oracle Error:
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '/u01/oracle/product/ora10g/oradata/standby/data/sys01.dbf'
Related
18/11/2009 11:10
9 de 9
https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&...
Products
Oracle Database Products > Oracle Database > Oracle Database > Oracle Server - Enterprise Edition
Keywords
PHYSICAL STANDBY; DATAGUARD
Errors
ORA-1110; ORA-1152; ORA-1547
18/11/2009 11:10