This forum is currently locked. You can't register or post questions at this time. (read more)

Oracle RAC -- RMAN switch to copy command

Questions relating to Oracle Real Application Clusters (RAC) and Clusterware.

Moderator: Tim...

me_lucky
Senior Member
Posts: 183
Joined: Tue Jun 02, 2009 11:40 am

Oracle RAC -- RMAN switch to copy command

Postby me_lucky » Tue Jan 28, 2014 12:42 pm

Hello Tim,

I have 11gR2 RAC environment. Am not having hands on experience on RMAN.
I request you to guide me for the below issue.

I have take the RMAN backup "as copy".

When am executing the switch to copy command am getting the error:

RMAN> switch database to copy;

RMAN-03002: failure of switch to copy command at 01/28/2014 17:26:46
ORA-01121: cannot rename database file 1 - file is in use or recovery
ORA-01110: data file 1: '+DATAF/pncrac/datafile/system.259.834421321'

For RAC environment , what we have to do if we want o switch to RMAN copy backup.

Thanks & Regards,
Lucky

Tim...
Site Admin
Posts: 18437
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK
Contact:

Re: Oracle RAC -- RMAN switch to copy command

Postby Tim... » Tue Jan 28, 2014 1:08 pm

Hi.

OK. Let's see what the manual tells us,

http://docs.oracle.com/cd/E11882_01/bac ... m#BRADV999

"In this scenario, the database is shut down, and all of the data files are damaged. You have image copies of all the damaged data files. You decide to use the existing image copies as the new data files, thus eliminating restore time."

So first thing we need to understand is the database needs to be down. In RAC, this means that all instances need to be shutdown. If any instance is up, then the database is open. You need to keep in mind the clear distinction between instance and database. When you are working with single instance databases, it is easy to consider them the same thing. :)

Some (but not all) operations will require the CLUSTER_DATABASE parameter to be set to FALSE, for the operation to succeed. In these situations, you will have to switch it back before starting the other RAC instances.

Cheers

Tim...
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog

me_lucky
Senior Member
Posts: 183
Joined: Tue Jun 02, 2009 11:40 am

Re: Oracle RAC -- RMAN switch to copy command

Postby me_lucky » Wed Jan 29, 2014 6:35 am

Dear Tim,

Thanks for the immediate reply.
will check.

thanks & Regards,
Lucky

Tim...
Site Admin
Posts: 18437
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK
Contact:

Re: Oracle RAC -- RMAN switch to copy command

Postby Tim... » Wed Jan 29, 2014 8:07 am

:)
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog

me_lucky
Senior Member
Posts: 183
Joined: Tue Jun 02, 2009 11:40 am

Re: Oracle RAC -- RMAN switch to copy command

Postby me_lucky » Wed Jan 29, 2014 9:02 am

Hi Tim,

I was able to switch database to copy after the suggestion advised by you.
Now am encountering some other issue.

On the node 1 i have taken RMAN backup to local disk. After the backup, i have moved those file to node2.
And started the database using below commands:

RMAN> switch database to copy;
RMAN> recover database;
RMAN> alter database open;

It worked on the node 1 successfully, but on node2, my database is not starting, its throwing below error:

ORA-01187: cannot read from file 1 because it failed verification tests
ORA-01110: data file 1:
'/u02/bkup/_full_data_D-PNCRAC_I-2481446655_TS-SYSTEM_FNO-1_8iov79rj'

Pl advice me how to resolve the issue.

Thanks & Regards,
Sabhitha

Tim...
Site Admin
Posts: 18437
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK
Contact:

Re: Oracle RAC -- RMAN switch to copy command

Postby Tim... » Wed Jan 29, 2014 9:13 am

Hi.

OK. In RAC, database files *MUST* be on shared storage. Remember, all instances are reading and writing to the same set of files. Even files that are instance specific, like redo threads, must be shared so they can be referenced during recovery.

When you do a switch to an image copy backup, the image copies become the datafiles, so in a RAC environment, this only makes sense if the backups are placed on shared storage also. When you say you are copying files to the other node, alarm bells start ringing... :)

Cheers

Tim...
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog

me_lucky
Senior Member
Posts: 183
Joined: Tue Jun 02, 2009 11:40 am

Re: Oracle RAC -- RMAN switch to copy command

Postby me_lucky » Wed Jan 29, 2014 9:22 am

Hmmm thought that doing some mess... but wanted to confirm.

Will try like that next time :)

Thanks Tim for the support.

Thanks & Regards,
Lucky

Tim...
Site Admin
Posts: 18437
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK
Contact:

Re: Oracle RAC -- RMAN switch to copy command

Postby Tim... » Wed Jan 29, 2014 10:07 am

:)
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog

me_lucky
Senior Member
Posts: 183
Joined: Tue Jun 02, 2009 11:40 am

Re: Oracle RAC -- RMAN switch to copy command

Postby me_lucky » Wed Jan 29, 2014 12:27 pm

Hi Tim,

As said i tried with shared storage, but still the same error.

I have created the shared storage using below link
http://www.oracle-base.com/articles/11g ... ng-nfs.php

And took the RMAN backup and tried to switch to copy, but no luck.

Encountered below error:

ORA-01187: cannot read from file 1 because it failed verification tests
ORA-01110: data file 1:
'/u03/bkup/_full_data_D-PNCRAC_I-2481446655_TS-SYSTEM_FNO-1_biova1t2'

Pl help me in resolving this issue.

Thanks & Regards,
Lucky

Tim...
Site Admin
Posts: 18437
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK
Contact:

Re: Oracle RAC -- RMAN switch to copy command

Postby Tim... » Wed Jan 29, 2014 3:28 pm

Hi.

This suggest this is not a backup of the current database...

Are you sure this is a datafile copy from the current database?

Cheers

Tim...
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog

me_lucky
Senior Member
Posts: 183
Joined: Tue Jun 02, 2009 11:40 am

Re: Oracle RAC -- RMAN switch to copy command

Postby me_lucky » Thu Jan 30, 2014 6:43 am

Yes, it is the copy of current database.
And am able to make Node1 working with the same files, as it is on common storage.

On Node 2 only am getting that error.

select * from dba_data_files;

/u03/bkup/_full_data_D-PNCRAC_I-2481446655_TS-USERS_FNO-5_bmova1vt USERS AVAILABLE
/u03/bkup/_full_data_D-PNCRAC_I-2481446655_TS-UNDOTBS2_FNO-4_blova1ve UNDOTBS2 AVAILABLE
/u03/bkup/_full_data_D-PNCRAC_I-2481446655_TS-UNDOTBS1_FNO-3_bkova1uu UNDOTBS1 AVAILABLE
/u03/bkup/_full_data_D-PNCRAC_I-2481446655_TS-SYSAUX_FNO-2_bjova1tr SYSAUX AVAILABLE
/u03/bkup/_full_data_D-PNCRAC_I-2481446655_TS-SYSTEM_FNO-1_biova1t2 SYSTEM AVAILABLE

Thanks & regards,
Sabhitha

Tim...
Site Admin
Posts: 18437
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK
Contact:

Re: Oracle RAC -- RMAN switch to copy command

Postby Tim... » Thu Jan 30, 2014 10:42 am

Hi.

I'm confused. If not 1 is working, all you need to do is start node 2. You do not need to switch that also...

Cheers

Tim...
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog

me_lucky
Senior Member
Posts: 183
Joined: Tue Jun 02, 2009 11:40 am

Re: Oracle RAC -- RMAN switch to copy command

Postby me_lucky » Thu Jan 30, 2014 11:44 am

Hello Tim,

Sorry for the confusion.

Yes, am not doing any switch on node2. What i did is:

1) Shut down both nodes
2) Startup mount both nodes
3) Execute switch command on node1
4) Open node1
5) Open node2 - its failing

Not executing switch command on node2.

I just wounder y its not working on node2 while both nodes are using same storage.

Thanks & Regards,
Lucky

Tim...
Site Admin
Posts: 18437
Joined: Mon Nov 01, 2004 5:56 pm
Location: England, UK
Contact:

Re: Oracle RAC -- RMAN switch to copy command

Postby Tim... » Thu Jan 30, 2014 12:51 pm

Hi.

You should perform the operation on *only* one node.

1) Shut down both nodes
2) Startup mount node 1 only
3) Execute switch command on node1
4) Open node1
5) Open node2

Try that.

Cheers

Tim...
Tim...
Oracle ACE Director
Oracle ACE of the Year 2006 - Oracle Magazine Editors Choice Awards
OakTable Member
OCP DBA 7.3, 8, 8i, 9i, 10g, 11g
OCP Advanced PL/SQL Developer
Oracle Database: SQL Certified Expert
My website: http://www.oracle-base.com
My blog: http://www.oracle-base.com/blog

me_lucky
Senior Member
Posts: 183
Joined: Tue Jun 02, 2009 11:40 am

Re: Oracle RAC -- RMAN switch to copy command

Postby me_lucky » Fri Jan 31, 2014 8:59 am

Thanks a lot Tim.

It worked. I was mounting database on both nodes, that was the mistake.

Thanks & Regards,
Lucky


Return to “Oracle RAC and Clusterware”

Who is online

Users browsing this forum: No registered users and 2 guests

cron