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

Database Duplication using RMAN

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

Moderator: Tim...

Rijo Roy
Member
Posts: 35
Joined: Wed Apr 17, 2013 5:39 am

Database Duplication using RMAN

Postby Rijo Roy » Wed Apr 17, 2013 9:23 am

Hi Tim

I really need to clarify a doubt and I think you are the right person to ask for.

I am working in a 3-node RAC env. and I needed to duplicate my DB(10g in RHEL Itanium) using RMAN.

My concept of duplicating a DB is transferring the backups of the source DB to the destination m/c where i have installed the oracle 10g and created a DB using DBCA. and recover and restore the same until the Last SCN or until this time.

Now my doubt is am I right or wrong..

Please guide..


Thanks & Regards

Rijo

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

Re: Database Duplication using RMAN

Postby Tim... » Wed Apr 17, 2013 1:06 pm

Hi.

No. You don't create a database using the DBCA on the destination server. You just do a database duplication. This article tells you how to do it.

http://www.oracle-base.com/articles/11g ... -11gr2.php

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

Rijo Roy
Member
Posts: 35
Joined: Wed Apr 17, 2013 5:39 am

Re: Database Duplication using RMAN

Postby Rijo Roy » Wed Apr 17, 2013 1:47 pm

Hi Tim

Thanks a lot for your reply.

Still I am confused so I am writing down what is confusing me by jotting down the steps that I plan to follow:

- Install Oracle 10g software in my destination server.
- Create the necessary directories as in the source server.
- Take a full backup(including control file,archivelogfiles and spfile..) of my source DB and transfer the same to my destination server.
- Create a password file in my destination server.
- then configure the tnsname and listener.ora files in destination servers
- Take the Database in the nomount state.
- Then follow your doc in the url:http://www.oracle-base.com/articles/11g/duplicate-database-using-rman-11gr2.php for duplicating.

Please correct me if I am wrong. I am actually confused with the initora file that should i have to do :
SQL>create pfile='path/initdup.ora' from spfile; in the source server like that in oracle Data Guard configuration.
and transfer the same to the destination server.

Thanks & Regards

Rijo Roy

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

Re: Database Duplication using RMAN

Postby Tim... » Wed Apr 17, 2013 3:08 pm

Hi.

Regarding the SPFILE, the answer is, it depends...

If you want to create a copy of the SPFILE from the source server you can do that manually. That is fine.

Alternatively, you can create a nearly empty pfile and use that to recover the SPFILE from the backup, as I have done in the article.

Neither way is better or worse.

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

Rijo Roy
Member
Posts: 35
Joined: Wed Apr 17, 2013 5:39 am

Re: Database Duplication using RMAN

Postby Rijo Roy » Wed Apr 17, 2013 5:11 pm

Thank you Tim.. :)

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

Re: Database Duplication using RMAN

Postby Tim... » Wed Apr 17, 2013 5:13 pm

:)
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

Rijo Roy
Member
Posts: 35
Joined: Wed Apr 17, 2013 5:39 am

Re: Database Duplication using RMAN

Postby Rijo Roy » Thu Apr 18, 2013 6:08 am

Hi Tim

Sorry a little more clarification.I need to fire these:

$ ORACLE_SID=DB11G; export ORACLE_SID

$ rman AUXILIARY /
$ rman TARGET sys/password@DB11G-SOURCE AUXILIARY /
$ rman CATALOG rman/password@rman-catalog AUXILIARY /
$ rman TARGET sys/password@DB11G-SOURCE CATALOG rman/password@rman-catalog AUXILIARY /
We can then duplicate the database using one of the following commands. Remember, remove the SPFILE clause if you have manually created a full PFILE or SPFILE.

# Backup files are in matching location to that on the source server.
# Duplicate database to TARGET's current state.
DUPLICATE TARGET DATABASE TO DB11G
SPFILE
NOFILENAMECHECK;

at the source database server right.

Also, How to convert my duplicated database to a 3 node?

Thanks & Regards

Rijo Roy

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

Re: Database Duplication using RMAN

Postby Tim... » Thu Apr 18, 2013 6:52 am

Hi.

As far as RMAN is concerned, it doesn't matter where you are. I usually do this from the destination server...

Regarding the duplicate to RAC, you can see what to do here:

http://mdesouza.wordpress.com/2012/01/2 ... ac-system/

The process is the same, but once you've got your duplicate single instance you convert it to RAC, like you would convert a regular database to RAC.

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

Rijo Roy
Member
Posts: 35
Joined: Wed Apr 17, 2013 5:39 am

Re: Database Duplication using RMAN

Postby Rijo Roy » Thu Apr 18, 2013 8:29 am

Hi Tim

Thanks for the document that you shared. I also find it similar till the duplication part. But I am a little confused about the step 7 which says the creation of a tempfile in temporary tbs. Is it necessary?

I have also seen some people adding more logfiles-- Is this necessary or shall I follow with the creation of tempfile itself.

From 8th step onwards shall I follow it blindly(of course the name and path is different).



Thanks & Regards

Rijo Roy

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

Re: Database Duplication using RMAN

Postby Tim... » Thu Apr 18, 2013 8:36 am

Hi.

Temporary tablespaces are full of junk, so RMAN doesn't back them up. When you do a recovery, the system metadata about the temp tablespace is present, but the file is not actually recovered, so you need to create one. That is what this step is doing.

You should never follow anything blindly. :) You need to convert your single instance database into a RAC database. Those are the steps you need to follow. The poster is creating a 4 node RAC, so many of the commands are run 4 times (1 per node). Your situation will be different for obvious reasons.

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

Rijo Roy
Member
Posts: 35
Joined: Wed Apr 17, 2013 5:39 am

Re: Database Duplication using RMAN

Postby Rijo Roy » Thu Apr 18, 2013 9:11 am

Thanks Tim.. :D

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

Re: Database Duplication using RMAN

Postby Tim... » Thu Apr 18, 2013 9:24 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

Rijo Roy
Member
Posts: 35
Joined: Wed Apr 17, 2013 5:39 am

Re: Database Duplication using RMAN

Postby Rijo Roy » Mon Apr 29, 2013 5:44 am

Hi Tim

Today I was about to perform the duplication in a m/c where oracle software is installed and all the files(required for duplication) is there except for listener.ora.

My problem is that neither I am able to connect to the sqlplus or RMAN prompt. What did I miss? Is it because of the missing listener.ora?

Pls help..



Thanks & Regards

Rijo

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

Re: Database Duplication using RMAN

Postby Tim... » Mon Apr 29, 2013 7:30 am

Hi.

You should have no problems connecting using these:

Code: Select all

sqlplus / as sysdba
rman target=/


If you try to connect using "username/password@service" type connections, these will fail without a listener.

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

Rijo Roy
Member
Posts: 35
Joined: Wed Apr 17, 2013 5:39 am

Re: Database Duplication using RMAN

Postby Rijo Roy » Mon Apr 29, 2013 7:41 am

hi Tim

Issue got resolved.
Sorry I was getting bash sqlplus command not found. So i checked with the env variables that are set for oracle and it was not set in the bash_profile but to some .db file.

After setting the env I could connect to sqlplus as well as rman. :)


Thanks & Regards

Rijo Roy


Return to “Oracle RAC and Clusterware”

Who is online

Users browsing this forum: No registered users and 0 guests