RMAN Duplicate ASM to ASM
Hi All,
This is more a hypothetical then an actual problem. As part of one of my tasks, I had to do a database duplication using RMAN to another server. Part of the process was to ensure that backup files and archive logs were made available to the server where the database was to be duplicated. To achieve this, we did a NFS mount on the file system directory we needed and we kicked off the duplication job.
However, in a situation where the target database stores all it's backups in the Flash Recover Area in ASM, what would be the easiest way to provide those files to the server hosting the duplicated database?
Thanks.
Hey Tychos,
Thanks for the reply, but unfortunately, we don't have a tape backup system in place for Oracle. But I will look into the 11g active duplication.
Thanks!
Similar Messages
-
Ora-1276 cannot add controlfile - rman duplicate asm database
Hi,
I am trying to duplicate an asm database olddb -> asm database dup in the same diskgroup. somehow got error 0ra-1276 Cannot add file +DISK1/dup/controlfile/current.1669.754164181. File has an Oracle Managed Files file name.
There is nothing in the asm directory +DISK1/dup/controllfile before I run the rman.
in the initdup.ora
control_files=+DISK1,+DISK1 <--- just the disk group, not the file name
db_name='dup'
db_file_name_convert=+DISK1,+DISK1/dup
log_file_name_convert=+DISK1,+DISK1
Recovery Manager: Release 10.2.0.5.0 - Production on Sat Jun 18 20:58:06 2011
Copyright (c) 1982, 2007, Oracle. All rights reserved.
RMAN> connect target sys/oracle@OLDDB
connect auconnected to target database: OLDDB (DBID=1142960293)
RMAN> xiliary /
connected to auxiliary database: DUP (not mounted)
RMAN> duplicate target database to dup
logfile group 1 ('+DISK1/dup') size 200k ,
group 2 ('+DISK1') size 200k;
2> 3>
Starting Duplicate Db at 2011/06/18 20:58:39
using target database control file instead of recovery catalog
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: sid=153 devtype=DISK
WARNING: DB_FILE_NAME_CONVERT resulted in invalid ASM names; names changed to diskgroup only.
contents of Memory Script:
set until scn 1613638;
set newname for datafile 1 to
"+DISK1";
set newname for datafile 2 to
"+DISK1";
set newname for datafile 3 to
"+DISK1";
set newname for datafile 4 to
"+DISK1";
set newname for datafile 6 to
"+DISK1";
restore
check readonly
clone database
executing Memory Script
executing command: SET until clause
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
executing command: SET NEWNAME
Starting restore at 2011/06/18 20:58:42
using channel ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: starting datafile backupset restore
channel ORA_AUX_DISK_1: specifying datafile(s) to restore from backup set
restoring datafile 00001 to +DISK1
restoring datafile 00002 to +DISK1
restoring datafile 00003 to +DISK1
restoring datafile 00004 to +DISK1
restoring datafile 00006 to +DISK1
channel ORA_AUX_DISK_1: reading from backup piece +DISK1/OLDDB/backupset/2011_05_22/nnndf0_tag20110522t000530_0.1691.751766731
channel ORA_AUX_DISK_1: restored backup piece 1
piece handle=+DISK1/OLDDB/backupset/2011_05_22/nnndf0_tag20110522t000530_0.1691.751766731 tag=TAG20110522T000530
channel ORA_AUX_DISK_1: restore complete, elapsed time: 00:01:06
Finished restore at 2011/06/18 20:59:48
sql statement: CREATE CONTROLFILE REUSE SET DATABASE "DUP" RESETLOGS ARCHIVELOG
MAXLOGFILES 192
MAXLOGMEMBERS 3
MAXDATAFILES 1024
MAXINSTANCES 32
MAXLOGHISTORY 292
LOGFILE
GROUP 1 ( '+DISK1/dup' ) SIZE 200 K ,
GROUP 2 ( '+DISK1' ) SIZE 200 K
DATAFILE
'+DISK1/dup/datafile/system.1674.754174727'
CHARACTER SET WE8ISO8859P1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 06/18/2011 20:59:48
RMAN-06136: ORACLE error from auxiliary database: ORA-01503: CREATE CONTROLFILE failed
ORA-01276: Cannot add file +DISK1/dup/controlfile/current.1669.754164181. File has an Oracle Managed Files file name.
RMAN>
thank you very much for your help.
thanks
andrewRMAN-06136: ORACLE error from auxiliary database: ORA-01503: CREATE CONTROLFILE failed
ORA-01276: Cannot add file +DISK1/dup/controlfile/current.1669.754164181. File has an Oracle Managed Files file name.Are you sure is it running under pfile?
Ok, connect to auxiliary intance and post
show parameter db_create
show parameter control_filesIn your pfile, Have you mentioned single quotes?
If your database with OMF then if you give it as below. as there is some work around
Control_files='+DISK1/DUP/controlfile/control01.ctl','+DISK1/DUP/controlfile/control02.ctl'
Check this too *Ora-1276 Error Recreating The Controlfile When Using +Asm [ID 303187.1]* -
Resume a rman duplicate on asm
Hi folks,
ASM, 11gr2
My duplicate job failed after about 20 hours due to a tcp/ip failure to our tsm server.
I read in the oracle documentation that it is possible to resume the job.
So I did as described in the documentation and the duplicate was resumed.
RMAN said "Using previous duplicated file...." for all the files allready restored, and it should only restore the remaining files. About 200Gb.
But after 5 hours and 350Gb (tsm shows this amount) it is still not finished.
I am duplicating from asm to asm.
Why is this happening??
Is it because I am on ASM fs? The oracle doc said nothing about resume would not work on asm.
Thanks!Hello,
This is half information, you are using ASM on production but what about Dev serve ASM or NON-ASMr? What's your Oracle version? Prod? Dev?
Stepwise instructions
See following Doc ID: 73912.1 : RMAN: Creating a Duplicate Database
Regards
Edited by: OrionNet on Mar 1, 2009 11:10 PM -
Cleaning up ASM disk group after failed rman duplicate session?
I am using rman duplicate to create a clone of a production database. The rman duplicate failed in phase 1 (retoration of datafiles) and my datafile are being restored to an ASM diskgroup.
I read in the metalink note Manual Completion of a Failed RMAN Duplicate [ID 360962.1] the following...
Note : From 10g onwards, if duplicate failed during step 1, which is the restore of datafiles, it is probably best to restart the duplicate process. Any files that have already been restored will be skipped and the duplicate process can continue without manual intervention
So I followed the advice in the note and started the rman duplcate script over again from the beggining. I am hoping it will have the intelligence to skip any files that have already been restored but if it is not since this is 10.1.0.3 and I cannot use the asmcmd command to connect to the ASM instance to delete any files that have been created then how can I delete and of the files since the database instance never got created correctly and cannot open?
Any thought on how I can now cleanup the files in the ASM disk group? Also, has anyone started an rman duplicate again after it has previously failed and did it actually skip the files that are already there as stated in the metalink note?
Thanks.Unfortunately the v$asm_file does not have the entire file name or path it just gives you the follwing...
SQL> desc v$asm_file
Name Null? Type
GROUP_NUMBER NUMBER
FILE_NUMBER NUMBER
COMPOUND_INDEX NUMBER
INCARNATION NUMBER
BLOCK_SIZE NUMBER
BLOCKS NUMBER
BYTES NUMBER
SPACE NUMBER
TYPE VARCHAR2(64)
REDUNDANCY VARCHAR2(6)
STRIPED VARCHAR2(6)
CREATION_DATE DATE
MODIFICATION_DATE
This really stinks I wish I didn't have to work with 10gr1 at all but the database I am trying to move to a ew server and new storage is running this version and we did not want to upgrade the existing database first before attempting the migration because it is reliant upon tape backups which I do not have alot of confidence in... -
RMAN duplicate from RAC with ASM to RAC with ASM
I'm still reading and trying to figure out how to duplicate...and I'm finding that there are some extra considerations you have to work with with doing a RAC system.
Does anyone have any good links to articles/docs that spell out what to do in this scenario?
I'm wanting to duplicate from tape backups, using NO connectivity to the source/target....
My tape backups do include the spfile and control files (autobackup) from the source.
Thank you in advance,
cayennedamorgan wrote:
Possibly you are confusing a database with a database.
A RAC database is a just a database. What is different is the instances, the clusterware, and the storage: For example ASM.
A backup is a backup is a backup.
Can you be more specific about what you are trying to do, on what hardware, operating system, version, and edition.
RMAN can not create an instance either RAC or stand-alone.Thank you for the reply.
I have my source system, OS = RHEL5, running Oracle 11Gr2...5 node RAC cluster.
I'm doing RMAN backups to tape...hourly arch. logs, Daily incremental lvl=1 backups and weekly incremental lvl=0
None of the tape backups have ever been tested for restoring...and I've never restored a database myself before, total noob here.
I have a test area I've set up. I have a 2 node RAC cluster, running 11Gr2 and OS=RHEL5.
The tape is accessible from both systems.
I am wanting to test the tape backups...and thought the RMAN DUPLICATE process would be the way to go.
I am wanting to NOT connect to the source database...trying to simulate somewhat of a disaster recovery scenario. I'm only wanting to use tape backup, and the test area for the auxiliary instance.
So far what I've seen I need to learn to do is something like:
1. Create a password file for new aux database to be duplicated to
2. Establish Net connectivity...
3. Create initial parameter file for aux instance
Due to a bug in note:334899.1, add this (because of RAC system)
norecovery_through_resetlogs=TRUE
4. Start aux instance NOMOUNT
Everything I'm reading though...is basically doing this from single instance to single instance...and what little info I've seen on doing it from RAC, indicates there are some differences. The "_no_recovery_through_resetlogs=TRUE" is one thing I found...but wondering what else.
Also, so many of the examples I'm finding...are doing the duplication connecting to the target/source...and also doing backups to disk rather than tape...
Right now, I'm at #1...trying to figure what to put into an init pfile...I'm seeing DB_name, which will be the same as the one I'm cloning from.
I'm not sure what else....
I'm wondering if this is necessary..since on the tape backups from the source...I backup the SPFILE...can that not be used somehow in this?
I'm seeing for the init file, examples show that I need to put in entries for control files and redo logs....if the source system was down and gone...how would I know where these were on the old system? This isn't documented anywhere....is there a way to do this if you didn't know.
If not..guess I need to go through all systems and document the layouts of where everything is located.
Also...most examples I'm finding, in addition to being single instance backup and restore/duplication...they are all using regular file systems....not much to go on with using ASM.
Anyway, I'm trying to learn here...and am having trouble finding examples to go from that match my setup.
Thank you in advance,
cayenne -
Failed RMAN Duplicate from NON-RAC to RAC-ASM
Hi All!
Is it possible to resume a failed RMAN Duplicate? Database is 10gR2.
Please advice...
Regards,
cmadiamOnce you fix the disk group name you can run the duplicatie, it should work fine.
Please refer the link
http://www.oracleracexpert.com/2009/10/migrate-database-to-asm-using-rman.html
Hope this helps,
Regards
http://www.oracleracexpert.com
Duplicate RAC DB using RMAN
http://www.oracleracexpert.com/2009/12/duplicate-rac-database-using-rman.html -
Non-asm to asm restore using duplicate
oracle version 11.2.0.2.0
hello guys a quick question, I am trying to restore a database from non-asm to asm. I want to know if the following will work with the duplicate database.
SET NEWNAME for DATAFILE '/clu15/oracle/database/PROD/dbf/NDX_PROD.dbf' to '+DGDEV1DBDATA03/database/DEV/dbf/NDX_PROD.dbf';
SET NEWNAME for DATAFILE '/clu15/oracle/database/PROD/dbf/NDX_PROD_01.dbf' to '+DGDEV1DBDATA03/database/DEV/dbf/NDX_PROD_01.dbf';
SET NEWNAME for DATAFILE '/clu15/oracle/database/PROD/dbf/NDX_PROD_02.dbf' to '+DGDEV1DBDATA03/database/DEV/dbf/NDX_PROD_02.dbf';
SET NEWNAME for DATAFILE '/clu15/oracle/database/PROD/dbf/NDX_PROD_03.dbf' to '+DGDEV1DBDATA03/database/DEV/dbf/NDX_PROD_03.dbf';
Thank YouThis above will work.
If you want to use OFA architecture, you can just give
SET NEWNAME for DATAFILE '/clu15/oracle/database/PROD/dbf/NDX_PROD.dbf' to '+DGDEV1DBDATA03';
You can also set the parameter db_file_name_convert and log_file_name_convert. -
RMAN Restoration failed from ASM to non asm
While restoring the database, we are getting this error frequently, updated the media center they said media is intact, but there is some "NO POLICY" NO SCHEDULE" error. what does this mean.
Could some one please help us why and how to resolve this issue. We are stuck in between our restoration.
ORA-19870: error reading backup piece ROCT_rman_db_weekly_20110719_2jmhrat3_1_1
ORA-19507: failed to retrieve sequential file, handle="ROCT_rman_db_weekly_20110719_2jmhrat3_1_1", parms=""
ORA-27029: skgfrtrv: sbtrestore returned error
ORA-19511: Error received from media manager layer, error text:
Failed to process backup file <ROCT_rman_db_weekly_20110719_2jmhrat3_1_1>784786 wrote:
While restoring the database, we are getting this error frequently, updated the media center they said media is intact, but there is some "NO POLICY" NO SCHEDULE" error. what does this mean.
Could some one please help us why and how to resolve this issue. We are stuck in between our restoration.
ORA-19870: error reading backup piece ROCT_rman_db_weekly_20110719_2jmhrat3_1_1
ORA-19507: failed to retrieve sequential file, handle="ROCT_rman_db_weekly_20110719_2jmhrat3_1_1", parms=""
ORA-27029: skgfrtrv: sbtrestore returned error
ORA-19511: Error received from media manager layer, error text:
Failed to process backup file <ROCT_rman_db_weekly_20110719_2jmhrat3_1_1>where is No policy/no schedule errors?
Error reading backup piece can occur even the handle was corrupt (or) handle was unable to read (or) did tapes loaded in MML ?
*RMAN Duplicate fails with ORA-19870, ORA-19507, ORA-27029 and ORA-19511 [ID 562780.1]* -
When executing 'duplicate target database for standby from active' the system tablespace/datafile (datafile 1) is not cloned. All other datafiles clone successfully. The RMAN process aborts with the following errors while attempting to clone the system tablespace/datafile.
ORA-19558: error de-allocating device
ORA-19557: device error, device type: DISK, device name:
ORA-17627: ORA-01041: internal error. hostdef extension doesn't exist
ORA-17627: ORA-01041: internal error. hostdef extension doesn't exist
ORA-03135: connection lost contact
Here are the details:
Primary is 11.2.0.2 RAC database on an Exadata platform
Standby is 11.2.0.2 Single Instance database (same patch level as primary) on a Red Hat Linux box
This is an ASM to ASM duplication.
This is not unique to this database. We tried another database and go the same behavior - all datafiles clone successfully with the exception of the system tablespace/datafile.
We have traced the RMAN execution and it seems to fail when it is trying to assign a NEWNAME to the system tablespace/datafile.
We even issued an explicit SET NEWNAME command but RMAN ignored it.
We also shutdown the primary and started is up in mount mode thinking that something had ahold of the System Tablespace/datafile.
We also opened up the network firewall to allow permit any,any traffic.
We increased the max_server_processes
and added TCP.NODELAY=yes to the sqlnet.ora file.
There seems to be some artifact present in our Primary System tablespace/data file that is preventing it form being cloned.
checked all alert files grid, asm, and dbhome - no abnormal messages.
We are in the process of restoring the database from a backup but we would prefer to get this working using the 'Active Database' methodologyI successfully created the standby database using RMAN backup and recovery.
I started the managed recovery. Archive logs are being sent from the primary to the standby ( I can see them in ASM), but the standby is not applying them.
I get the following messages in the standby alert log...
Fetching gap sequence in thread 2, gap sequence 154158-154257
Tue Nov 26 16:19:58 2013
Using STANDBY_ARCHIVE_DEST parameter default value as USE_DB_RECOVERY_FILE_DEST
Using STANDBY_ARCHIVE_DEST parameter default value as USE_DB_RECOVERY_FILE_DEST
Tue Nov 26 16:20:01 2013
Fetching gap sequence in thread 2, gap sequence 154158-154257
Tue Nov 26 16:20:11 2013
Fetching gap sequence in thread 2, gap sequence 154158-154257
Tue Nov 26 16:20:22 2013
Fetching gap sequence in thread 2, gap sequence 154158-154257
Tue Nov 26 16:20:32 2013
Fetching gap sequence in thread 2, gap sequence 154158-154257
I don't see any MRP processes:
select process,
status,
thread#,
sequence#,
block#,
blocks
7 from v$managed_standby;
PROCESS STATUS THREAD# SEQUENCE# BLOCK# BLOCKS
ARCH CLOSING 2 154363 1 132
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
ARCH CONNECTED 0 0 0 0
RFS IDLE 0 0 0 0
RFS IDLE 1 145418 121 1
RFS IDLE 0 0 0 0
PROCESS STATUS THREAD# SEQUENCE# BLOCK# BLOCKS
RFS IDLE 0 0 0 0
12 rows selected.
SQL> SELECT THREAD#, SEQUENCE#, APPLIED FROM V$ARCHIVED_LOG;
THREAD# SEQUENCE# APPLIED
2 154356 NO
2 154357 NO
1 145411 NO
2 154358 NO
2 154360 NO
2 154361 NO
1 145414 NO
1 145415 NO
2 154362 NO
2 154363 NO
1 145416 NO
11 rows selected.
I do have the archive logs that cover sequences 154158-154257
Crosschecked 38 objects
Crosschecked 62 objects
Finished implicit crosscheck backup at 26-NOV-13
Starting implicit crosscheck copy at 26-NOV-13
using channel ORA_DISK_1
using channel ORA_DISK_2
Crosschecked 2 objects
archived log file name=+RECO_XORA/nmuasb00/archivelog/2013_11_26/thread_2_seq_154377.344.832521989 RECID=29 STAMP=832521990
validation succeeded for archived log
archived log file name=+RECO_XORA/nmuasb00/archivelog/2013_11_26/thread_2_seq_154378.346.832521991 RECID=31 STAMP=832521993
Crosschecked 31 objects -
Oracle 11.2.0.2 SE-One 64-bit
Oracle Linux 5.6 x86-64
Question I had never considered. When performing an rman duplicate database with no NEWNAME parameters in sight, how does rman know how to set new names? There is something more than just the init parm “db_create_file_dest”.
The setup:
Server SRVPRD,
- ASM instance
- database DBPRD , has files in diskgroups SAN and SMALL
Server SRVDEV
- ASM instance
- database DBSTG, has files in diskgroups LARGE and SMALL
- database DBDEV, has files in diskgroups DEV_LARGE and DEV_SMALL
Shell script on SRVDEV to replicate DBPRD to DBSTG. Script ftp’s the rman backups from SRVPRD, shuts down the instance DBSTG, deletes all of its files using asmcmd commands, then executes the following:
echo "connect catalog rman/********@rmcat" > /backup/dbstgvb/dbstgvb_refresh.rman
echo "connect target sys/********@srvprd" >> /backup/dbstgvb/dbstgvb_refresh.rman
echo "connect auxiliary /" >> /backup/dbstgvb/dbstgvb_refresh.rman
echo "run {" >> /backup/dbstgvb/dbstgvb_refresh.rman
echo "set until time \"to_date('`date +%Y-%m-%d` 12:38:00','YYYY-MM-DD hh24:mi:ss')\";" >> /backup/dbstgvb/dbstgvb_refresh.rman
echo "duplicate target database to DBSTGVB;" >> /backup/dbstgvb/dbstgvb_refresh.rman
echo "}" >> /backup/dbstgvb/dbstgvb_refresh.rman
$ORACLE_HOME/bin/rman < /backup/dbstgvb/dbstgvb_refresh.rman
It runs perfectly and the files that were in the +SAN diskgroup in prod are correctly placed in +LARGE, and the files that were in +SMALL are correctly placed in +SMALL.
Now a new requirement to start doing the same for DBDEV. Made a copy of the script and changed all references from DBSTG to DBDEV. Equivalent changes in the string of asmcmd commands that delete the files, specifying the correct specific disk groups.
With this one, instead of mapping files from the two disk groups in DBPRD to the two diskgroups in DBDEV, they all get put into the one disk group +DEV_SMALL.
On DBSTG, we see
SQL> show parameter db_create_file_dest
NAME TYPE VALUE
db_create_file_dest string +SMALL
and the rman log output of the replication includes this:
database mounted
contents of Memory Script:
set until scn 2984496;
set newname for datafile 1 to
"+SMALL/dbstgvb/system01.dbf";
set newname for datafile 2 to
"+SMALL/dbstgvb/sysaux01.dbf";
set newname for datafile 3 to
"+SMALL/dbstgvb/undotbs01.dbf";
set newname for datafile 4 to
"+SMALL/dbstgvb/users01.dbf";
set newname for datafile 5 to
"+LARGE/dbstgvb/perfstat_01.dbf";
set newname for datafile 6 to
"+LARGE/dbstgvb/dw_tbs1.dbf";
restore
clone database
executing Memory Script
On DBDEV we see
SQL> show parameter db_create_file_dest
NAME TYPE VALUE
db_create_file_dest string +DEV_SMALL
and the rman log output of the replication includes this:
database mounted
contents of Memory Script:
set until scn 2984496;
set newname for clone datafile 1 to new;
set newname for clone datafile 2 to new;
set newname for clone datafile 3 to new;
set newname for clone datafile 4 to new;
set newname for clone datafile 5 to new;
set newname for clone datafile 6 to new;
restore
clone database
executing Memory Script
So, I am missing exactly how it is that in the replicate to DBSTG, it is able to correctly identify that files coming from prod diskgroup SAN correctly mapped to diskgroup LARGE? And further, why that mechanism did not work to map to +DEV_LARGE when replicating to DBDEV. In DBDEV it seems to be controlled entirely by db_create_file_dest, but in DBSTG there seems to be something that I am missing that allows the greater complexity of mapping two diskgroups.Interesting side observation
In making sure all files ended up in the correct location I started noticing differences in the FQFN from the source db to the target. Doing an asmcmd 'ls -l' on both systems, I discovered things like this:
On the source db, we have
DW_TBS1.dbf => +SAN/DBPRD/DATAFILE/DW_TBS.278.755044731
while on the target it came out
dw_tbs1.dbf => +LARGE/DBSTG/DATAFILE/DW.259.821974713
or
STAGE_CUST_ACCT_I1.ora => +SAN/DBPRD/DATAFILE/STAGE_CUST_ACCT_I.262.754925519
vs
stage_cust_acct_i1.ora => +LARGE/DBSTG/DATAFILE/STG_CUST_ACCT_IDX.266.822009311
Obviously not an operational problem, but a curiosity about the algorithm to generate the base part of the FQFN, and why it generated different names on different systems. -
RMAN duplicate target database error
Hello,
I’m trying to use RMAN ‘duplicate target from active database’ to a remote host however I’m getting a confusing error:
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 11/19/2009 13:47:23
RMAN-03015: error occurred in stored script Memory Script
RMAN-03009: failure of backup command on aux13 channel at 11/19/2009 13:47:23
ORA-19504: failed to create file "+DATA2"
RMAN-03009: failure of backup command on aux14 channel at 11/19/2009 13:47:23
ORA-19504: failed to create file "+DATA2"
Here’s my script:
connect target sys/<password>@node1;
connect auxiliary sys/<password>@node2;
spool log to '/u01/app/oracle/dba/duplicate111909.log'
run
allocate auxiliary channel aux11 device type disk;
allocate auxiliary channel aux12 device type disk;
allocate channel aux13 device type disk;
allocate channel aux14 device type disk;
duplicate target database to node2 from active database DB_FILE_NAME_CONVERT='+DATA1','+DATA2';
release channel aux14;
release channel aux13;
release channel aux12;
release channel aux11;
spool log off;
exit;
Node1 uses ASM disk group DATA1 and I intend to use ASM disk group DATA2 on node2. Has anyone seen this error before? I have tried various permutations of DB_FILE_NAME_CONVERT clauses but all error with ORA-19504. On a side note I was able to use ASMCMD cp command to copy a datafile from node1 DATA1 to node 2 DATA2. Also, if I use disk group DATA1 on node 2 then the RMAN duplicate command runs successfully, it only errors when using DATA2. And yes +DATA2 is mounted on node2:
SQL> select name, state from v$asm_diskgroup;
NAME STATE
DATA1 MOUNTED
DATA2 MOUNTED
Any and all ideas are welcome. I’m running out of things to check.
Thanks,
RJLFor a duplicate you don't need to give the DB_FILE_NAME_CONVERT especially if you go from a asm to asm diskgroup.
The place where it'll put all the files will be automatically done taking care of the init.ora file parameter db_create_file_dest, (db_create_online_log_dest_1) -
Another RMAN duplicate problem - RAC database to single instance
Hi,
I have a problem with the RMAN duplicate procedure and was hoping someone can help.
I would like to create a duplicate of our production RAC database on a separate, stand-alone, database server on another site. This duplicate will be used for intensive querying by another business unit who I don't want to have access to our production database.
My procedure goes like this:
1. Create a disk (not ASM) based backup of the datafiles and any archived redo logs:
"run {
allocate channel d1 type disk;
backup format '/u02/stage/df_t%t_s%s_p%p' database plus archivelog delete input;
release channel d1;
2. Tar and scp these files to the same location on the stand-alone database server.
3. In the meantime, work has been happening on the production database and further archived redo logs have been generated. I don't really care about these logs for the purposes of the duplicate however, I just want to duplicate to the point of the recent backup. To do this, I run the following SQL to determine the sequence number that I should be duplicating up to:
"select max(sequence#), thread# from v$archived_log where deleted='YES' group by thread#;"
4. Duplicate the production database to the stand-alone database (all the SQL Net stuff is working).
"run {
set until sequence (value returned by above SQL statement);
duplicate target database to XXX;
However, my problem arises because I don't know how to handle the fact that there are two threads. I understand that each thread relates to one of the RAC instances, I just don't know which one to specify for the duplicate. We have a database service which the client application connects through, and that service runs on on or other of the instances. Should I just care about the logs from the instance where the service is currently running?
Am I even approaching this is the correct way?
I look forward to any help that people may be able to offer.
Regards,
PhilHi Werner,
Thanks again for your help, there is still something wrong though. "list backup of archivelog all;" shows:
BS Key Size Device Type Elapsed Time Completion Time
3784 202.34M DISK 00:00:08 28-OCT-09
BP Key: 3784 Status: AVAILABLE Compressed: NO Tag: TAG20091028T111718
Piece Name: /u02/stage/df_t701435838_s3820_p1
List of Archived Logs in backup set 3784
Thrd Seq Low SCN Low Time Next SCN Next Time
1 9746 569095777 28-OCT-09 569150229 28-OCT-09
1 9747 569150229 28-OCT-09 569187892 28-OCT-09
1 9748 569187892 28-OCT-09 569231956 28-OCT-09
1 9749 569231956 28-OCT-09 569259816 28-OCT-09
2 7931 569095774 28-OCT-09 569187902 28-OCT-09
2 7932 569187902 28-OCT-09 569259814 28-OCT-09
BS Key Size Device Type Elapsed Time Completion Time
3787 1.04M DISK 00:00:02 28-OCT-09
BP Key: 3787 Status: AVAILABLE Compressed: NO Tag: TAG20091028T112222
Piece Name: /u02/stage/df_t701436142_s3823_p1
List of Archived Logs in backup set 3787
Thrd Seq Low SCN Low Time Next SCN Next Time
1 9750 569259816 28-OCT-09 569261110 28-OCT-09
2 7933 569259814 28-OCT-09 569261108 28-OCT-09
You can see that the highest sequence number is 9750 of thread 1, and that the Low and Next SCNs are 569259816 and 56926111. However, when I look at the output of the RMAN duplicate command:
contents of Memory Script:
set until scn 569505448;
recover
clone database
delete archivelog
executing Memory Script
executing command: SET until clause
Starting recover at 28-OCT-09
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: sid=39 devtype=DISK
starting media recovery
Oracle Error:
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01194: file 4 needs more recovery to be consistent
ORA-01110: data file 4: '/u02/sca-standby/data/users.260.623418479'
RMAN-03002: failure of Duplicate Db command at 10/28/2009 16:12:55
RMAN-03015: error occurred in stored script Memory Script
RMAN-06053: unable to perform media recovery because of missing log
RMAN-06025: no backup of log thread 2 seq 7936 lowscn 569411744 found to restore
RMAN-06025: no backup of log thread 2 seq 7935 lowscn 569321987 found to restore
RMAN-06025: no backup of log thread 2 seq 7934 lowscn 569261108 found to restore
RMAN-06025: no backup of log thread 1 seq 9758 lowscn 569471890 found to restore
RMAN-06025: no backup of log thread 1 seq 9757 lowscn 569440076 found to restore
RMAN-06025: no backup of log thread 1 seq 9756 lowscn 569411439 found to restore
RMAN-06025: no backup of log thread 1 seq 9755 lowscn 569378529 found to restore
RMAN-06025: no backup of log thread 1 seq 9754 lowscn 569358970 found to restore
RMAN-06025: no backup of log thread 1 seq 9753 lowscn 569321882 found to restore
RMAN-06025: no backup of log thread 1 seq 9752 lowscn 569284238 found to restore
RMAN-06025: no backup of log thread 1 seq 9751 lowscn 569261110 found to restore
you can see that something is setting the recovery SCN to 569505448 which higher even then any of the archived logs mentioned above. If I select current_scn from the production database, this gives me 569528258 which is closer to the value which RMAN is expecting to recover to than any of the archived redo logs.
Can you think what might be causing RMAN to try to recover to this value? and why does it appear to be ignoring the SET UNTIL SEQUENCE command?
Cheers,
Phil -
Hi all,
have below doubts.
IF RMAN duplicate failed in the middle of the process due to disk full or any other reason.
Do I start from the beginning again or is there anyway to sort of "resume" from where it stopped?
Please consider what need to do in 9i or in 10G.
Please also reply what need to do for FS or for ASM.
Please also share if you have any doc or link.Hi,
IF RMAN duplicate failed in the middle of the process due to disk full or any other reason.See always perform fresh duplicate.
it will overwrite the existing files... so you need to check in alert log file like how many files restored & recovered during duplicate..
sybrand_b wrote:
Duplicate database is a quite robust command.
It will automatically skip what has already been done, so you can safely re-execute it without problems.
Been there, done that.
Sybrand Bakker
Senior Oracle DBA@sybrand
What it automatically skips?
1)did RMAN duplicate knows about earlier restores...
2)if i restored system,sysaux,users,undo datafiles of another database and again I'm performing another database in same location.. so it will skip?
are you sure...
Thanks
*Manual Completion of a Failed RMAN Duplicate [ID 360962.1]*
Edited by: CKPT on Dec 11, 2010 12:40 PM -
Oracle11gR2 RAC&DataGuard rman duplicate
RAC 環境の data guard でちょっと悩んでいます。
data guard というより、rman と tnsnames.ora の関係あたりです。
結果的に実行したいことは、rman での接続の後の duplicate だけです。
(プライマリ・データベースの複製)
rman での接続がそもそも正常でなく、何が原因か分からない状態です。
詳しい方いれば教えていただきたいと思います。
よろしくお願い致します。
▼
実行時の画面出力:
standby 側 db が open の時:
export ORACLE_SID=HPYMUSIC1
rman target / auxiliary sys/passw@west1_DGMGRL
[oracle@tokyo1 ~]$ export ORACLE_SID=HPYMUSIC1
[oracle@tokyo1 ~]$ rman target / auxiliary sys/passw@west1_DGMGRL
Recovery Manager: Release 11.2.0.1.0 - Production on 水 8月 7 16:48:32 2013
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
ターゲット・データベース: EAST (データベースID=3804390391)に接続されました
補助データベース: WEST (DBID=3187536000)に接続されました
rman target sys/passw@west1_DGMGRL auxiliary /
[oracle@tokyo1 ~]$ rman target sys/passw@west1_DGMGRL auxiliary /
Recovery Manager: Release 11.2.0.1.0 - Production on 水 8月 7 16:50:25 2013
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
ターゲット・データベース: WEST (データベースID=3187536000)に接続されました
補助データベース: EAST (DBID=3804390391)に接続されました
rman target / auxiliary sys/passw@west1
[oracle@tokyo1 ~]$ rman target / auxiliary sys/passw@west1
Recovery Manager: Release 11.2.0.1.0 - Production on 水 8月 7 16:51:53 2013
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
ターゲット・データベース: EAST (データベースID=3804390391)に接続されました
補助データベース: WEST (DBID=3187536000)に接続されました
▼ 上記全てにおいて、以下の状態にして、その後、duplicate をしたいというだけなのですが。。
補助データベース: WEST (DBID=3187536000)に接続されました(マウントされていません)
↓
↓ それが、以下のようにできない。。
↓
○ standby db が offline であるとします。
[root@osaka1 ~]# /u01/app/11.2.0/grid/bin/crsctl status resource -t
NAME TARGET STATE SERVER STATE_DETAILS
Cluster Resources
ora.west.db
1 OFFLINE OFFLINE
2 ONLINE OFFLINE
○ startup nomount します。
ps -ef|egrep -i ora_
export ORACLE_SID=HPYMUSIC1
sqlplus / as sysdba
startup nomount pfile='/u01/app/oracle/product/11.2.0/dbhome_1/dbs/pfile_for_standby.txt'
[oracle@osaka1 ~]$ ps -ef|egrep -i ora_
oracle 4487 4303 0 17:24 pts/1 00:00:00 egrep -i ora_
[oracle@osaka1 ~]$ export ORACLE_SID=HPYMUSIC1
[oracle@osaka1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on 水 8月 7 17:24:35 2013
Copyright (c) 1982, 2009, Oracle. All rights reserved.
アイドル・インスタンスに接続しました。
SQL>
SQL> startup nomount pfile='/u01/app/oracle/product/11.2.0/dbhome_1/dbs/pfile_for_standby.txt'
ORACLEインスタンスが起動しました。
Total System Global Area 814227456 bytes
Fixed Size 2217752 bytes
Variable Size 612370664 bytes
Database Buffers 192937984 bytes
Redo Buffers 6701056 bytes
SQL>
SQL>
● db open の時に成功していたコマンドラインが失敗してしまう。
[oracle@tokyo1 ~]$ export ORACLE_SID=HPYMUSIC1
[oracle@tokyo1 ~]$ rman target / auxiliary sys/passw@west1_DGMGRL
Recovery Manager: Release 11.2.0.1.0 - Production on 水 8月 7 17:27:36 2013
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
ターゲット・データベース: EAST (データベースID=3804390391)に接続されました
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00554: 内部Recovery Managerパッケージの初期化に失敗しました。
RMAN-04006: 補助データベースのエラー: ORA-12514: TNS: リスナーは接続記述子でリクエストされたサービスを現在認識していません
[oracle@tokyo1 ~]$ rman target sys/passw@west1_DGMGRL auxiliary /
Recovery Manager: Release 11.2.0.1.0 - Production on 水 8月 7 17:29:54 2013
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00554: 内部Recovery Managerパッケージの初期化に失敗しました。
RMAN-04005: ターゲット・データベースからのエラー:
ORA-12514: TNS: リスナーは接続記述子でリクエストされたサービスを現在認識していません
[oracle@tokyo1 ~]$ rman target / auxiliary sys/passw@west1
Recovery Manager: Release 11.2.0.1.0 - Production on 水 8月 7 17:30:07 2013
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
ターゲット・データベース: EAST (データベースID=3804390391)に接続されました
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00554: 内部Recovery Managerパッケージの初期化に失敗しました。
RMAN-04006: 補助データベースのエラー: ORA-12514: TNS: リスナーは接続記述子でリクエストされたサービスを現在認識していません
● db open から stop し、starup nomount pfile したとします。
[root@osaka1 ~]# /u01/app/11.2.0/grid/bin/crsctl status resource -t
NAME TARGET STATE SERVER STATE_DETAILS
Cluster Resources
ora.west.db
1 ONLINE ONLINE osaka1 Open
2 ONLINE OFFLINE
[oracle@osaka1 ~]$ srvctl stop database -d west
[root@osaka1 ~]# /u01/app/11.2.0/grid/bin/crsctl status resource -t
NAME TARGET STATE SERVER STATE_DETAILS
Cluster Resources
ora.west.db
1 OFFLINE OFFLINE Instance Shutdown
2 ONLINE OFFLINE
ps -ef|egrep -i ora_
export ORACLE_SID=HPYMUSIC1
sqlplus / as sysdba
startup nomount pfile='/u01/app/oracle/product/11.2.0/dbhome_1/dbs/pfile_for_standby.txt'
[oracle@osaka1 ~]$ id
uid=54321(oracle) gid=54321(oinstall) 所属グループ=54321(oinstall),1101(oper),1201(asmdba),54322(dba)
[oracle@osaka1 ~]$ ps -ef|egrep -i ora_
oracle 6137 4303 0 17:44 pts/1 00:00:00 egrep -i ora_
[oracle@osaka1 ~]$ export ORACLE_SID=HPYMUSIC1
[oracle@osaka1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on 水 8月 7 17:45:40 2013
Copyright (c) 1982, 2009, Oracle. All rights reserved.
アイドル・インスタンスに接続しました。
SQL> startup nomount pfile='/u01/app/oracle/product/11.2.0/dbhome_1/dbs/pfile_for_standby.txt'
ORACLEインスタンスが起動しました。
Total System Global Area 814227456 bytes
Fixed Size 2217752 bytes
Variable Size 612370664 bytes
Database Buffers 192937984 bytes
Redo Buffers 6701056 bytes
SQL>
SQL>
↓
↓
↓ ▼ 結果、エラーになってしまう。
↓
↓
[oracle@tokyo1 ~]$ export ORACLE_SID=HPYMUSIC1
[oracle@tokyo1 ~]$ rman target / auxiliary sys/passw@west1_DGMGRL
Recovery Manager: Release 11.2.0.1.0 - Production on 水 8月 7 17:47:21 2013
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
ターゲット・データベース: EAST (データベースID=3804390391)に接続されました
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00554: 内部Recovery Managerパッケージの初期化に失敗しました。
RMAN-04006: 補助データベースのエラー: ORA-12514: TNS: リスナーは接続記述子でリクエストされたサービスを現在認識していません
[oracle@tokyo1 ~]$ rman target sys/passw@west1_DGMGRL auxiliary /
Recovery Manager: Release 11.2.0.1.0 - Production on 水 8月 7 17:47:33 2013
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00554: 内部Recovery Managerパッケージの初期化に失敗しました。
RMAN-04005: ターゲット・データベースからのエラー:
ORA-12514: TNS: リスナーは接続記述子でリクエストされたサービスを現在認識していません
[oracle@tokyo1 ~]$ rman target / auxiliary sys/passw@west1
Recovery Manager: Release 11.2.0.1.0 - Production on 水 8月 7 17:47:42 2013
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
ターゲット・データベース: EAST (データベースID=3804390391)に接続されました
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00554: 内部Recovery Managerパッケージの初期化に失敗しました。
RMAN-04006: 補助データベースのエラー: ORA-12514: TNS: リスナーは接続記述子でリクエストされたサービスを現在認識していません
● db open から stop し、srvctl start database -d west -o nomount したとします。
[root@osaka1 ~]# /u01/app/11.2.0/grid/bin/crsctl status resource -t
NAME TARGET STATE SERVER STATE_DETAILS
Cluster Resources
ora.west.db
1 ONLINE ONLINE osaka1 Open
2 ONLINE OFFLINE
srvctl stop database -d west
[oracle@osaka1 ~]$ srvctl stop database -d west
[root@osaka1 ~]# /u01/app/11.2.0/grid/bin/crsctl status resource -t
NAME TARGET STATE SERVER STATE_DETAILS
Cluster Resources
ora.west.db
1 OFFLINE OFFLINE Instance Shutdown
2 ONLINE OFFLINE
ps -ef|egrep -i ora_
export ORACLE_SID=HPYMUSIC1
srvctl start database -d west -o nomount
[oracle@osaka1 ~]$ ps -ef|egrep -i ora_
oracle 7521 4303 0 18:03 pts/1 00:00:00 egrep -i ora_
[oracle@osaka1 ~]$ export ORACLE_SID=HPYMUSIC1
[oracle@osaka1 ~]$ srvctl start database -d west -o nomount
[root@osaka1 ~]# /u01/app/11.2.0/grid/bin/crsctl status resource -t
NAME TARGET STATE SERVER STATE_DETAILS
Cluster Resources
ora.west.db
1 ONLINE INTERMEDIATE osaka1 Dismounted
2 ONLINE OFFLINE
↓
↓
↓ ▼ 結果、変わらずエラーになってしまう。
↓
↓
[oracle@osaka1 ~]$ export ORACLE_SID=HPYMUSIC1
[oracle@osaka1 ~]$ rman target / auxiliary sys/passw@west1_DGMGRL
Recovery Manager: Release 11.2.0.1.0 - Production on 水 8月 7 18:05:35 2013
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
ターゲット・データベース: WESTに接続されました(マウントされていません)
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00554: 内部Recovery Managerパッケージの初期化に失敗しました。
RMAN-04006: 補助データベースのエラー: ORA-12528: TNS:リスナー: 該当するインスタンスはすべて、 新規接続をブロックしています
[oracle@osaka1 ~]$ rman target sys/passw@west1_DGMGRL auxiliary /
Recovery Manager: Release 11.2.0.1.0 - Production on 水 8月 7 18:06:21 2013
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00554: 内部Recovery Managerパッケージの初期化に失敗しました。
RMAN-04005: ターゲット・データベースからのエラー:
ORA-12528: TNS:リスナー: 該当するインスタンスはすべて、新規接続をブロックしています
[oracle@osaka1 ~]$ rman target / auxiliary sys/passw@west1
Recovery Manager: Release 11.2.0.1.0 - Production on 水 8月 7 18:06:31 2013
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
ターゲット・データベース: WESTに接続されました(マウントされていません)
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-00554: 内部Recovery Managerパッケージの初期化に失敗しました。
RMAN-04006: 補助データベースのエラー: ORA-12528: TNS:リスナー: 該当するインスタンスはすべて、 新規接続をブロックしています
▼
tnsnames.ora は以下の状態で、tnsping はどの host からも通る状態。
east1_DGMGRL =
(DESCRIPTION =
ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.141)(PORT = 1521)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = east)
east1 =
(DESCRIPTION =
ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.141)(PORT = 1521)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = east)
(INSTANCE_NAME = HPYMUSIC1)
east2 =
(DESCRIPTION =
ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.142)(PORT = 1521)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = east)
(INSTANCE_NAME = HPYMUSIC2)
east =
(DESCRIPTION =
ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.141)(PORT = 1521)
ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.142)(PORT = 1521)
(LOAD_BALANCE = yes)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = east)
west1_DGMGRL =
(DESCRIPTION =
ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.143)(PORT = 1521)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = west)
west1=
(DESCRIPTION =
ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.143)(PORT = 1521)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = west)
(INSTANCE_NAME=HPYMUSIC1)
west2=
(DESCRIPTION =
ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.144)(PORT = 1521)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = west)
(INSTANCE_NAME=HPYMUSIC2)
west=
(DESCRIPTION =
(ADDRESS_LIST=
ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.143)(PORT = 1521)
ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.144)(PORT = 1521)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = west)
LISTENERS_east=
(ADDRESS_LIST =
ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.141)(PORT = 1521)
ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.142)(PORT = 1521)
east2_DGMGRL =
(DESCRIPTION =
ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.142)(PORT = 1521)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = east)
west2_DGMGRL =
(DESCRIPTION =
ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.144)(PORT = 1521)
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = west)
LISTENERS_west=
(ADDRESS_LIST =
ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.143)(PORT = 1521)
ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.144)(PORT = 1521)
▼
hosts は以下のような状態
[root@tokyo1 etc]# more hosts
192.168.56.101 tokyo1.oracle11g.jp tokyo1
192.168.56.102 tokyo2.oracle11g.jp tokyo2
192.168.56.103 osaka1.oracle11g.jp osaka1
192.168.56.104 osaka2.oracle11g.jp osaka2
192.168.56.141 tokyo1-vip.oracle11g.jp tokyo1-vip
192.168.56.142 tokyo2-vip.oracle11g.jp tokyo2-vip
192.168.56.143 osaka1-vip.oracle11g.jp osaka1-vip
192.168.56.144 osaka2-vip.oracle11g.jp osaka2-vip
192.168.56.201 scan.oracle11g.jp scan
192.168.56.202 scan.oracle11g.jp scan
192.168.56.203 scan.oracle11g.jp scan
192.168.56.254 dns1.oracle11g.jp
▼
構成は以下のような状態
PRIMARY STANDBY【 dr 】
Clusterware 11g R2 Grid Infrastructure (11.2.0.1) 11g R2 Grid Infrastructure (11.2.0.1)
Cluster Nodes tokyo1, tokyo2 (2-node RAC) osaka1, osaka2 (2-node RAC)
Cluster Name grid-cluster dr-grid-cluster(都合 primary と同じ名称になっている)
SCAN scan.oracle11g.jp dr-scan.oracle11g.jp(都合 primary と同じ名称になっている)
SCAN listener Host/port SCAN VIPs (port 1521) SCAN VIPs (port 1521)
VIPs tokyo1-vip, tokyo2-vip osaka1-vip, osaka2-vip
DB_UNIQUE_NAME east west
DB_NAME HPYMUSIC HPYMUSIC
DB Instances HPYMUSIC1, HPYMUSIC2 HPYMUSIC1, HPYMUSIC2
DB LISTENER HPYMUSIC_LISTENER HPYMUSIC_LISTENER
DB Listener Host/port tokyo1-vip, tokyo2-vip (port 1521) osaka1-vip, osaka2-vip (port 1521)
DB STORAGE ASM ASM
File Management OMF ( Oracle Managed Files ) OMF ( Oracle Managed Files )
ASM diskgroup for DB files DATA DATA
ASM Diskgroup for FRA FRA
Recovery Files
ORACLE_HOME /u01/app/oracle/product/11.2.0/dbhome_1 /u01/app/oracle/product/11.2.0/dbhome_1
11g R2 RAC version 11.2.0.1 11.2.0.1
OS Oracle Enterprise Linux 6 (64 bit) Oracle Enterprise Linux 6 (64 bit)
ARCHIVELOGモード 有効 有効
FORCE LOGGINGモード 有効 有効
▼
listener.ora は以下の状態
( 配置ディレクトリは2箇所:
/u01/app/11.2.0/grid/network/admin/listener.ora
/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora )
gridユーザでリスナー再起動:
[grid@tokyo1 ~]$ srvctl stop listener
[grid@tokyo1 ~]$ srvctl start listener
[grid@osaka1 ~]$ srvctl stop listener
[grid@osaka1 ~]$ srvctl start listener
LISTENER_west1 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.143)(PORT = 1521)
(IP = FIRST)
(ADDRESS_LIST =
ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.103)(PORT = 1521)
(IP = FIRST)
(ADDRESS_LIST =
ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC)
SID_LIST_LISTENER_west1 =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME=west)
(SID_NAME = HPYMUSIC1)
(ORACLE_HOME = $ORACLE_HOME)
LISTENER_east1 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.141)(PORT = 1521)
(IP = FIRST)
(ADDRESS_LIST =
ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.101)(PORT = 1521)
(IP = FIRST)
(ADDRESS_LIST =
ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC)
SID_LIST_LISTENER_east1 =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME=east)
(SID_NAME = HPYMUSIC1)
(ORACLE_HOME = $ORACLE_HOME)
LISTENER_west2 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.144)(PORT = 1521)
(IP = FIRST)
(ADDRESS_LIST =
ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.104)(PORT = 1521)
(IP = FIRST)
(ADDRESS_LIST =
ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC)
SID_LIST_LISTENER_west2 =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME=west)
(SID_NAME = HPYMUSIC2)
(ORACLE_HOME = $ORACLE_HOME)
LISTENER_east2 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS_LIST =
ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.142)(PORT = 1521)
(IP = FIRST)
(ADDRESS_LIST =
ADDRESS = (PROTOCOL = TCP)(HOST = 192.168.56.102)(PORT = 1521)
(IP = FIRST)
(ADDRESS_LIST =
ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC)
SID_LIST_LISTENER_east2 =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME=east)
(SID_NAME = HPYMUSIC2)
(ORACLE_HOME = $ORACLE_HOME)
Primary Node1
SID_LIST_HPYMUSIC_LISTENER=(SID_LIST=(SID_DESC=(SID_NAME=HPYMUSIC1)(GLOBAL_DBNAME=east)(ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1)))
Primary Node2
SID_LIST_HPYMUSIC_LISTENER=(SID_LIST=(SID_DESC=(SID_NAME=HPYMUSIC2)(GLOBAL_DBNAME=east)(ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1)))
Standby Node1
SID_LIST_HPYMUSIC_LISTENER=(SID_LIST=(SID_DESC=(SID_NAME=HPYMUSIC1)(GLOBAL_DBNAME=west)(ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1)))
Standby Node2
SID_LIST_HPYMUSIC_LISTENER=(SID_LIST=(SID_DESC=(SID_NAME=HPYMUSIC2)(GLOBAL_DBNAME=west)(ORACLE_HOME=/u01/app/oracle/product/11.2.0/dbhome_1)))
▼
リソースの状態
[root@tokyo1 app]# /u01/app/11.2.0/grid/bin/crsctl status resource -t
NAME TARGET STATE SERVER STATE_DETAILS
Local Resources
ora.DATA.dg
ONLINE ONLINE tokyo1
ora.FRA.dg
ONLINE ONLINE tokyo1
ora.LISTENER.lsnr
ONLINE ONLINE tokyo1
ora.asm
ONLINE ONLINE tokyo1 Started
ora.eons
ONLINE ONLINE tokyo1
ora.gsd
OFFLINE OFFLINE tokyo1
ora.net1.network
ONLINE ONLINE tokyo1
ora.ons
ONLINE ONLINE tokyo1
------------------------------------------------------【 CentOS5.9 】
切り分けの一貫で、os を CentOS5.9 にし、しかも Standalone db でテストしてみました。
他要因の警告が出ましたが、問題なく通過したかもしれません。。
Standalone でテストし、問題なさそうであれば、Oracle Linux 6 RAC でも検証してみようと思います。
▼ そもそも rman が機能していない??
[oracle@tokyo1 ~]$ srvctl stop database -d east
[oracle@tokyo1 ~]$
[oracle@tokyo1 ~]$ /u01/app/11.2.0/grid/bin/crsctl status resource -t
NAME TARGET STATE SERVER STATE_DETAILS
Local Resources
ora.DATA.dg
ONLINE ONLINE tokyo1
ora.FRA.dg
ONLINE ONLINE tokyo1
ora.LISTENER.lsnr
ONLINE ONLINE tokyo1
ora.asm
ONLINE ONLINE tokyo1 Started
Cluster Resources
ora.cssd
1 ONLINE ONLINE tokyo1
ora.diskmon
1 ONLINE ONLINE tokyo1
ora.east.db
1 OFFLINE OFFLINE Instance Shutdown
[oracle@tokyo1 ~]$ export ORACLE_SID=HPYMUSIC
[oracle@tokyo1 ~]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on 火 8月 13 16:15:10 2013
Copyright (c) 1982, 2009, Oracle. All rights reserved.
アイドル・インスタンスに接続しました。
SQL> startup nomount
ORACLEインスタンスが起動しました。
Total System Global Area 839282688 bytes
Fixed Size 2217992 bytes
Variable Size 515901432 bytes
Database Buffers 314572800 bytes
Redo Buffers 6590464 bytes
[oracle@tokyo1 dbs]$ rman target /
Recovery Manager: Release 11.2.0.1.0 - Production on 火 8月 13 16:25:59 2013
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
ターゲット・データベース: EASTに接続されました(マウントされていません)
RMAN>
▼ ターゲット・データベース: EASTに接続されました(マウントされていません)
が出たので、方向を逆にしてテスト??
○ 以下は問題になる場合
export ORACLE_SID=HPYMUSIC
rman target / auxiliary sys/passw@west
rman target / auxiliary sys/passw@west_DGMGRL
rman target sys/passw@west_DGMGRL auxiliary /
○ 以下は問題にならない場合??
osaka1 から接続する。
export ORACLE_SID=HPYMUSIC
rman target / auxiliary sys/passw@east
rman target / auxiliary sys/passw@east_DGMGRL
rman target sys/passw@east_DGMGRL auxiliary /
rman target sys/passw@east_DGMGRL
[oracle@osaka1 dbs]$ export ORACLE_SID=HPYMUSIC
[oracle@osaka1 dbs]$ sqlplus / as sysdba
SQL*Plus: Release 11.2.0.1.0 Production on 火 8月 13 16:55:33 2013
Copyright (c) 1982, 2009, Oracle. All rights reserved.
アイドル・インスタンスに接続しました。
SQL> startup nomount pfile='/u01/app/oracle/product/11.2.0/dbhome_1/dbs/pfile_for_standby.txt'
ORACLEインスタンスが起動しました。
Total System Global Area 839282688 bytes
Fixed Size 2217992 bytes
Variable Size 515901432 bytes
Database Buffers 314572800 bytes
Redo Buffers 6590464 bytes
SQL>
[root@osaka1 admin]# su - oracle
[oracle@osaka1 ~]$ export ORACLE_SID=HPYMUSIC
[oracle@osaka1 ~]$ rman target / auxiliary sys/passw@east
Recovery Manager: Release 11.2.0.1.0 - Production on 火 8月 13 16:58:29 2013
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
ターゲット・データベース: EASTに接続されました(マウントされていません)
補助データベース: EAST (DBID=3804991241)に接続されました
[oracle@osaka1 ~]$ rman target / auxiliary sys/passw@east_DGMGRL
Recovery Manager: Release 11.2.0.1.0 - Production on 火 8月 13 16:59:24 2013
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
ターゲット・データベース: EASTに接続されました(マウントされていません)
補助データベース: EAST (DBID=3804991241)に接続されました
rman target sys/passw@east_DGMGRL auxiliary /
[oracle@osaka1 ~]$ rman target sys/passw@east_DGMGRL auxiliary / ← ▼ これで ok??
Recovery Manager: Release 11.2.0.1.0 - Production on 火 8月 13 16:59:48 2013
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
ターゲット・データベース: EAST (データベースID=3804991241)に接続されました
補助データベース: EASTに接続されました(マウントされていません)
[oracle@osaka1 ~]$ rman target sys/passw@east_DGMGRL
Recovery Manager: Release 11.2.0.1.0 - Production on 火 8月 13 17:00:17 2013
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
ターゲット・データベース: EAST (データベースID=3804991241)に接続されました
○ 実行ログ
[oracle@osaka1 ~]$ rman target sys/passw@east_DGMGRL auxiliary /
Recovery Manager: Release 11.2.0.1.0 - Production on 火 8月 13 17:06:23 2013
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
ターゲット・データベース: EAST (データベースID=3804991241)に接続されました
補助データベース: EASTに接続されました(マウントされていません)
RMAN>
RMAN> DUPLICATE TARGET DATABASE FOR STANDBY NOFILENAMECHECK;
Duplicate Dbが開始されました(開始時間: 13-08-13)
リカバリ・カタログのかわりにターゲット・データベース制御ファイルを使用しています
チャネル: ORA_AUX_DISK_1が割り当てられました
チャネルORA_AUX_DISK_1: SID=7 デバイス・タイプ=DISK
メモリー・スクリプトの内容:
restore clone standby controlfile;
メモリー・スクリプトを実行しています
restoreが開始されました(開始時間: 13-08-13)
チャネルORA_AUX_DISK_1の使用
チャネルORA_AUX_DISK_1: データファイル・バックアップ・セットのリストアを開始しています
チャネルORA_AUX_DISK_1: 制御ファイルをリストア中です
チャネルORA_AUX_DISK_1: バックアップ・ピース/home/oracle/backup/Primary_bkp_for_stndby_03oh6kqr_1_1から読取り中です
チャネルORA_AUX_DISK_1: ピース・ハンドル=/home/oracle/backup/Primary_bkp_for_stndby_03oh6kqr_1_1 タグ=TAG20130813T122147
チャネルORA_AUX_DISK_1: バックアップ・ピース1がリストアされました
チャネルORA_AUX_DISK_1: リストアが完了しました。経過時間: 00:00:07
出力ファイル名=+DATA/west/controlfile/control01.ctl
出力ファイル名=+FRA/west/controlfile/control02.ctl
restoreが完了しました(完了時間: 13-08-13)
メモリー・スクリプトの内容:
sql clone 'alter database mount standby database';
メモリー・スクリプトを実行しています
SQL文: alter database mount standby database
RMAN-05529: 警告: DB_FILE_NAME_CONVERTは無効なASM名になりました。名前がディスク・グループにの み変更されます。
メモリー・スクリプトの内容:
set newname for tempfile 1 to
"+data";
switch clone tempfile all;
set newname for datafile 1 to
"+data";
set newname for datafile 2 to
"+data";
set newname for datafile 3 to
"+data";
set newname for datafile 4 to
"+data";
restore
clone database
メモリー・スクリプトを実行しています
実行コマンド: SET NEWNAME
制御ファイルで一時ファイル1の名前を+dataに変更しました
実行コマンド: SET NEWNAME
実行コマンド: SET NEWNAME
実行コマンド: SET NEWNAME
実行コマンド: SET NEWNAME
restoreが開始されました(開始時間: 13-08-13)
チャネルORA_AUX_DISK_1の使用
チャネルORA_AUX_DISK_1: データファイル・バックアップ・セットのリストアを開始しています
チャネルORA_AUX_DISK_1: バックアップ・セットからリストアするデータファイルを指定しています
チャネルORA_AUX_DISK_1: データファイル00001を+dataにリストアしています
チャネルORA_AUX_DISK_1: データファイル00002を+dataにリストアしています
チャネルORA_AUX_DISK_1: データファイル00003を+dataにリストアしています
チャネルORA_AUX_DISK_1: データファイル00004を+dataにリストアしています
チャネルORA_AUX_DISK_1: バックアップ・ピース/home/oracle/backup/Primary_bkp_for_stndby_01oh6kph_1_1から読取り中です
チャネルORA_AUX_DISK_1: ピース・ハンドル=/home/oracle/backup/Primary_bkp_for_stndby_01oh6kph_1_1 タグ=TAG20130813T122104
チャネルORA_AUX_DISK_1: バックアップ・ピース1がリストアされました
チャネルORA_AUX_DISK_1: リストアが完了しました。経過時間: 00:01:25
restoreが完了しました(完了時間: 13-08-13)
メモリー・スクリプトの内容:
switch clone datafile all;
メモリー・スクリプトを実行しています
データファイル1はデータファイル・コピーに切り替えられました
入力データファイル・コピー レコードID=5 スタンプ=823367322 ファイル名=+DATA/west/datafile/system.267.823367237
データファイル2はデータファイル・コピーに切り替えられました
入力データファイル・コピー レコードID=6 スタンプ=823367322 ファイル名=+DATA/west/datafile/sysaux.268.823367239
データファイル3はデータファイル・コピーに切り替えられました
入力データファイル・コピー レコードID=7 スタンプ=823367322 ファイル名=+DATA/west/datafile/undotbs1.269.823367239
データファイル4はデータファイル・コピーに切り替えられました
入力データファイル・コピー レコードID=8 スタンプ=823367322 ファイル名=+DATA/west/datafile/users.270.823367239
Duplicate Dbが完了しました(完了時間: 13-08-13)
RMAN> -
RMAN DUPLICATE FOR STANDBY FROM ACTIVE DATABASE fails
Hello
I'm trying to use RMAN DUPLICATE to create a standby database using Oracle 11.2.0.3 with PSU 6 on HP-UX.
Primary is 2 node RAC. Standby is also 2 node RAC.
Standby database instance is started in nomount mode.
I use:
duplicate target database for standby from active database
spfile
<some spfile parameters>
with PFILE I get:
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 10/01/2013 12:41:13
RMAN-05501: aborting duplication of target database
RMAN-03015: error occurred in stored script Memory Script
RMAN-03009: failure of sql command on clone_default channel at 10/01/2013 12:41:13
RMAN-11003: failure during parse/execution of SQL statement: alter system set spfile= '/opt/oracle/db11203/dbs/spfileCU1.ora'
ORA-02097: parameter cannot be modified because specified value is invalid
ORA-01565: error in identifying file '/opt/oracle/db11203/dbs/spfileCU1.ora'
ORA-27037: unable to obtain file status
HPUX-ia64 Error: 2: No such file or directory
With SPFILE I get;
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of Duplicate Db command at 10/01/2013 13:06:34
RMAN-05501: aborting duplication of target database
RMAN-05537: DUPLICATE without TARGET connection when auxiliary instance is started with spfile cannot use SPFILE clause
But I do have RMAN connexion to target database.
Thanks for your help.Here is the output beginning of the script which clearly shows that I'm always connected to target database:
Recovery Manager: Release 11.2.0.3.0 - Production on Tue Oct 1 13:05:47 2013
Copyright (c) 1982, 2011, Oracle and/or its affiliates. All rights reserved.
connected to target database: CU (DBID=1143962925)
connected to auxiliary database: CU (not mounted)
RMAN> set echo on
2> run
3> {
4> configure device type disk parallelism 10;
5> allocate channel pr1 type disk;
6> allocate channel pr2 type disk;
7> allocate channel pr3 type disk;
8> allocate channel pr4 type disk;
9> allocate channel pr5 type disk;
10> allocate channel pr6 type disk;
11> allocate channel pr7 type disk;
12> allocate channel pr8 type disk;
13> allocate channel pr9 type disk;
14> allocate channel pr10 type disk;
15> allocate auxiliary channel st1 type disk;
16> allocate auxiliary channel st2 type disk;
17> allocate auxiliary channel st3 type disk;
18> allocate auxiliary channel st4 type disk;
19> allocate auxiliary channel st5 type disk;
20> allocate auxiliary channel st6 type disk;
21> allocate auxiliary channel st7 type disk;
22> allocate auxiliary channel st8 type disk;
23> allocate auxiliary channel st9 type disk;
24> allocate auxiliary channel st10 type disk;
25> duplicate target database for standby from active database
26> spfile -
Why do we use RMAN DUPLICATE for cloning DB on a different server ?
DB version : 11.2.0.2, 10.2.0.5
I want to create a clone of my Production DB in a test server. In the past, I have taken hot backup of this production DB and restored and recovered it in a different server using plain RMAN commands.
After restoring the control file , mounting the DB and cataloging the backup pieces in the test server , I run
run {
restore database ;
recover database until time <time> ;
alter database open resetlogs ;
}In OTN , i came across long running discussions like
RMAN duplicate database
where they are trying to restore and recover using DUPLICATE command as shown below.
run
duplicate target database to RBS
nofilenamecheck
pfile=/tmp/aux.ora;
Can't they just use plain RMAN restore and recover commands as I did ? What advantage does RMAN DUPLICATE have over the plain commands ?RMAN DUPLICATE is designed to give to clone database a new database name and new database identifier:
>
If you copy a database with operating system utilities instead of the DUPLICATE command, then the DBID of the copied database remains the same as the original database. To register the copy database in the same recovery catalog with the original, you must change the DBID with the DBNEWID utility (see Oracle Database Utilities). In contrast, the DUPLICATE command automatically assigns the duplicate database a different DBID so that it can be registered in the same recovery catalog as the source database.
Maybe you are looking for
-
Messed up characters in awesome wm
Hey guys I have read MANY forum posts about this and have found nothing that fixed my problem. I am hoping someone could fix this for me (: Here is a pic of the type of issue: http://imgur.com/M1nQ8VR look at the awesome wm tab with firefox and you w
-
Why can't two people in our house use Microsoft Office at the same time?
When my daughter tries to use Microsoft Office on her MacBook while my husband is using it on his MacBook Pro, she gets the following message: Microsoft Office 2008 cannot start because it is already in use. An Office program is being used by [my hus
-
Aus Word File ein PDF erstellen mit Links zu Excel-Arbeitsblatt
Guten Morgen miteinander Ich habe ein Word-File erstellt mit Links zu Excel-Arbeitsblätter. Wenn ich jetzt das Word File in ein PDF (ich besitze Adobe Acrobat X Pro) umwandle, sind diese Links in die Excel-Arbeitsblätter ungültig. Lediglich die Links
-
Cisco WLC Client MAC address backup to new Controller & ISE
Hi All, We have an existing 4400 controller with MAC filtering for clients configured. Right Now, we are migrating to 5500 WLC and ISE setup. We want to use MAC filtering due to company policies on the new Controller as well as ISE. Is there a way (f
-
Sp13 not allowing HTTP Tunnelling?
Ok, sp12 didn't work right, so I grabbed the new sp13. However, I again connect to my server, this time because of the following tunnelling error. Did some property or default change in sp12/13? The app works fine with sp11. Is there something I can