Ask Tom - DB Cloning - What Is It and Why
Ask Tom - DB Cloning - What Is It and Why
Stanley -- Thanks for the question regarding "db cloning -- what is it and why", version 8.0.4
Submitted on 18-Aug-2000 2:10 Central time zone Tom's latest followup | Bookmark | Bottom
Last updated 28-Dec-2010 15:25
You Asked
and we said...
http://asktom.oracle.com/pls/asktom/f?p=100:11:::::P11_QUESTION_ID:318216852435
Advantages and uses -- people use it to test with mostly. You clone a production
instance onto a test machine to try out new things -- "what if I changed this init.ora
parameter", "what if my code did this instead" and so on...
Reviews
unable to clone July 19, 2002 - 2pm Central time zone Bookmark | Bottom | Top
Reviewer: Ravi Kumar from Chicago, IL USA
Hi Tom,
I am trying to clone one of my database and getting errors. I am on WIN2K and Oracle 8.1.7. I am
giving here the steps that I followed.
I have only one version of oracle installed and only one DB on both the machines.
In your previous answer I noticed you mentioning "exactly the same directory structure". Is that
what I am messing in this situation? If so, what should I do?
Please help.
Thanks,
Ravi.
did you create a database on the other machine? have you read about oradim and how to use it to
register an instance on the other machine? I don't see that step in there. Refer to the NT admin
1 of 40 7/8/2011 1:54 AM
Ask Tom "db cloning -- what is it and why" http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION...
guide
http://download-west.oracle.com/docs/cd/A87860_01/doc/win.817/a73008/toc.htm
...
checked log files July 19, 2002 - 6pm Central time zone Bookmark | Bottom | Top
Reviewer: Ravi Kumar from Chicago, IL USA
Hi Tom,
On the target machine, as part of the installation, I created the database. Backedup the files. I
am able to start the database using those files.
I copied the same file from source machine to the target machine. After restarting I checked the
same file and now it is showing
ORA-01157: cannot identify/lock data file 1 - see DBWR trace file
ORA-01110: data file 1: 'D:\ORACLE\ORADATA\<sid>\SYSTEM01.DBF'
It shows that it is still looking at d:\oracle\oradata\ folder where as I don't have D: drive but
only C:
Does it store the hardcoded paths somewhere?
Thanks,
Ravi.
password file March 20, 2003 - 9am Central time zone Bookmark | Bottom | Top
Reviewer: abid dawood from pakistan
orapwd
database creation (oracle 9i) March 20, 2003 - 9am Central time zone Bookmark | Bottom | Top
Reviewer: abid dawood from pakistan
(error) when i execute my database creation query .It create control files,log files and in the end
give me error that password file is not found. how i add password file .
2 of 40 7/8/2011 1:54 AM
Ask Tom "db cloning -- what is it and why" http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION...
step 1
step 2
feedback requested March 30, 2003 - 6am Central time zone Bookmark | Bottom | Top
Reviewer: Saminathan Seerangan from CA,USA
Hi Tom,
http://asktom.oracle.com/pls/asktom/f?p=100:11:::::P11_QUESTION_ID:318216852435
I'm getting the following error in (step # 12. Run the "ccf.sql" script )
Sorry, overlooked step # 7 March 31, 2003 - 4am Central time zone Bookmark | Bottom | Top
Reviewer: Saminathan Seerangan from CA,USA
I have changed
a) "olddbname" to "newdbname"
b) "NORESETLOGS" to "RESETLOGS"
New Server Replication October 22, 2003 - 1pm Central time zone Bookmark | Bottom | Top
Reviewer: Denise from Virginia, USA
Tom
question:
if we create the exact same directory structure and install
the exact same OS (Windows 2000 Server)...can we simply
restore, from the Production backup tapes, all the Oracle files to the new server. We would also
import a copied
version of the registry from the Production Server to the
new server.
3 of 40 7/8/2011 1:54 AM
Ask Tom "db cloning -- what is it and why" http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION...
suggest you setup server, install oracle, use oradim to setup the registry (register the instance)
and restore from backup
October 22, 2003 - 6pm Central time zone Bookmark | Bottom | Top
Reviewer: A reader
Tom,
If the same situation applies to Solaris 8.0, can i restore the file systems and relink oracle
without doing any installation??
Thanks
pretty much.
hey -- that would mean maybe unix is easier then windows sometimes? say it ain't so
I've always thought the registry was MS's attempt at copy protection. remember in the early days
when you could just copy a directly and a .ini file and all would be well?
I HATED getting a new laptop when I ran windows. took me a week to get going again (now there is
an entire cottage industry built on migration of windows from one machine to another). Linux -- I
just sort of nfs mount,
and i be done. sure, it looks obscure, but if you read man pages........
New Server Registry Installation October 23, 2003 - 8am Central time zone Bookmark | Bottom | Top
Reviewer: Denise from Virginia, USA
Thanks Tom....
Clone a database March 24, 2004 - 12pm Central time zone Bookmark | Bottom | Top
Reviewer: Arun Gupta from Harrisburg, PA USA
Tom,
Is it possible to clone a database A running in archivelog mode as another database B which runs in
noarchivelog mode? We want to clone production database as pre-production test database on a weekly
basis. This will give us the same data volume as production for query tuning. The constraints are:
a) Production database cannot be shutdown.
b) The production database runs in archivelog mode whereas pre-production test database runs in
noarchivelog mode.
c) The cloning process has to be unattended, if possible.
database b will initially be "archivelog" but then you'll shutdown -- change it and bring it
backup.
4 of 40 7/8/2011 1:54 AM
Ask Tom "db cloning -- what is it and why" http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION...
so, "yes" you can clone it cause you can very very easily change it.
April 28, 2004 - 10am Central time zone Bookmark | Bottom | Top
Reviewer: Arun Gupta from Harrisburg, PA USA
Tom,
I am cloning database A as database B, both exactly identical, running in NOARCHIVELOG mode.
Database A will be shutdown before copying files. I am using the CREATE CONTROLFILE statement to
clone.
a) Do I need to copy redo log files from A to B if I need to open B with RESETLOGS option? My
understanding is that if I use RESETLOGS option in CREATE CONTROLFILE, the redo log files will be
created by Oracle as per the specifications given in the create controlfile statement.
b) Do I need to copy control files from A to B since I will be creating controlfile for B?
Thanks
a) you do not need to, but it would not hurt and you could avoid having to open resetlogs if that
makes you feel better.
b) not if you are doing the create controlfile trick. You could just copy EVERYTHING, startup
mount, and issue a series of
and then alter database open (assuming logs are in the same place, else you'll drop and create
them).
relink oracle July 9, 2004 - 8am Central time zone Bookmark | Bottom | Top
Reviewer: Thiru
a.I have a new sol server. What is the best way I can have the same oracle setup that is there on a
prodn db.?
b. How do I go about relinking oracle? Does this mean that there is no need to go through the steps
for oracle installation from a CD and just copy all the directories from the prodn. server?
a) install the same software? backup and restore would work as well.
b) see the admin guide for your OS for details on things like this. the installer will relink for
you as well.
clone db by rman August 6, 2004 - 5pm Central time zone Bookmark | Bottom | Top
Reviewer: Sean from NJ, USA
Hi Tom,
I tried to create duplicate db by reading chapter 12 of Recovery manager user s guide (920).
5 of 40 7/8/2011 1:54 AM
Ask Tom "db cloning -- what is it and why" http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION...
(3) copy rman backup file (03fsola1_1_1) from $ORACLE_HOME/dbs (host1) to $ORACLE_HOME/dbs
(host1).
The error I got: "no backup or copy of datafile". But I put duplicate copy of rman backup file in
the same location of host2 as in host1. And I issued "List backup" and all datafiles are there in
rman backup file.
-------------------------------------------------------------------------------------
-- Here is the error message
Starting Duplicate Db at 06-AUG-04
allocated channel: ORA_AUX_DISK_1
channel ORA_AUX_DISK_1: sid=13 devtype=DISK
6 of 40 7/8/2011 1:54 AM
Ask Tom "db cloning -- what is it and why" http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION...
<quote>
You must issue a log switch and backup the archivelogs as well. This error is
indicating that all pieces required to perform the duplication are not present.
When you issue a backup script which backs up all of the archivelogs (after a
log switch), the duplicate database script completes successfully.
</quote>
creaet duplicate db by rman August 9, 2004 - 7pm Central time zone Bookmark | Bottom | Top
Reviewer: Sean from NJ, USA
Hi Tom,
By looking at metalink as you mentioned, I find two scripts to backup and restore db, it WORKS, but
still gave me some error messages when creating duplicating db (see the bottom of the screen shot)
In step (2)
In step (7)
-- Time is after backup time and before the current time.
run{
set until time "to_date('2004/08/09 18:50:00','YYYY/MM/DD HH24:MI:SS')";
allocate auxiliary channel ch1 type disk;
allocate auxiliary channel ch2 type disk;
DUPLICATE TARGET DATABASE TO cbtest3 NOFILENAMECHECK;
sql "alter database open resetlogs";
}
--------------------------------
7 of 40 7/8/2011 1:54 AM
Ask Tom "db cloning -- what is it and why" http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION...
8 of 40 7/8/2011 1:54 AM
Ask Tom "db cloning -- what is it and why" http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION...
9 of 40 7/8/2011 1:54 AM
Ask Tom "db cloning -- what is it and why" http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION...
well, wall clock times are withing +/- so many minutes -- so, I would suggest using SCN based
recovery for this operation.
August 10, 2004 - 2am Central time zone Bookmark | Bottom | Top
Reviewer: steve
1. ensure the environment on the new machine is setup, to match the cloned system.
this would include memory & disc allocation space.
2. ensure the "new" machine time is the same or greater than the machine you were cloning from
duplicate db using rman August 10, 2004 - 12pm Central time zone Bookmark | Bottom | Top
Reviewer: Sean from NJ, USA
Hi Tom,
run{
allocate auxiliary channel ch1 type disk;
allocate auxiliary channel ch2 type disk;
DUPLICATE TARGET DATABASE TO cbtest3 NOFILENAMECHECK;
sql "alter database open resetlogs";}
(2) But Metalink did show one script with time. How can I make it work without error. I set
anytime after backup, it always give error message. Since the note in Metalink didn't mention how
to backup in details, I guess I still have some problem with my backup script.
10 of 40 7/8/2011 1:54 AM
Ask Tom "db cloning -- what is it and why" http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION...
(3)I used change number, it works. I used the change number in the error message minus 1.
Actually I would like to know how to get the change number after backup, so it won't generate error
during duplication.
run{
set until change 1296047;
allocate auxiliary channel ch1 type disk;
allocate auxiliary channel ch2 type disk;
DUPLICATE TARGET DATABASE TO cbtest3 NOFILENAMECHECK;
sql "alter database open resetlogs";}
space February 3, 2005 - 1pm Central time zone Bookmark | Bottom | Top
Reviewer: abc
Regarding resetlogs September 15, 2005 - 2am Central time zone Bookmark | Bottom | Top
Reviewer: Amit Bansal from Bangalore,India
Why do we need to specify resetlogs option twice? At the time of opening the database we can simply
reset the logs.
...
RESETLOGS
Specify RESETLOGS if you want Oracle to ignore the contents of the files listed in the LOGFILE
clause. These files do not have to exist. Each redo_log_file_spec in the LOGFILE clause must
specify the SIZE parameter. Oracle assigns all online redo log file groups to thread 1 and enables
this thread for public use by any instance. After using this clause, you must open the database
using the RESETLOGS clause of the ALTER DATABASE statement.
.......
.....
RESETLOGS
Specify RESETLOGS to reset the current log sequence number to 1 and discards any redo information
11 of 40 7/8/2011 1:54 AM
Ask Tom "db cloning -- what is it and why" http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION...
that was not applied during recovery, ensuring that it will never be applied. This effectively
discards all changes that are in the redo log, but not in the database.
You must specify RESETLOGS to open the database after performing media recovery with an incomplete
recovery using the RECOVER clause or with a backup control file. After opening the database with
this clause, you should perform a complete database backup.
...........
They do "different" things, one lets you create a controlfile without having the online redo logs
already there, the other effectively "resets" them to sequence 1
Thanks... September 15, 2005 - 10am Central time zone Bookmark | Bottom | Top
Reviewer: Amit Bansal from Bangalore,India
Thanks Tom !!it cleared my doubts.. though it might sound very elementary to many.. but i couldn't
find it's answer anywhere..
What about statistics October 19, 2005 - 3pm Central time zone Bookmark | Bottom | Top
Reviewer: Chris from VA USA
When a db is cloned to a machine with a different hardware or configuration profile (ie less
physical memory or different init.ora settings) is there a need or benefit to regenerate
statistics?
system stats perhaps (cpu speed, single block IO rate, multi-block IO rate...)
November 13, 2005 - 2pm Central time zone Bookmark | Bottom | Top
Reviewer: A reader
what is the (best) way to determine *when* a database has been cloned?
well, you cannot - all you need is any backup and you can clone it over and over.
the database being cloned typically isn't a participant in the clone process - it's backups might
be - but "it" isn't.
Minimizing amount of archive log applied in creating duplicate db November 14, 2005 - 5pm Central time zone
Bookmark | Bottom | Top
Reviewer: Sean from NJ, USA
Hi Tom,
My question is whether there is command which would let us create duplicate database without
applying archive log file (or at least minimizing the amount of archive log applied).
12 of 40 7/8/2011 1:54 AM
Ask Tom "db cloning -- what is it and why" http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION...
if you did a hot backup, you must apply redo to make the files consistent.
create duplicate database. November 15, 2005 - 11am Central time zone Bookmark | Bottom | Top
Reviewer: Sean from NJ, USA
Hi Tom,
It is 500 GB database, rman spent most of time to copy rman backup from shared disk to local disk.
Since we only want to create duplicate db with latest full backup, we would like to apply archive
log files as less as we can. With "until with time" command, it is hard to calculate the right
time, we simply wasted a lot time to apply a lot of archive log files.
I just need a command to tell rman "Please create duplicate database and apply as less archive
logfile as possible", so we can decrease the total time to create duplicate db.
Sean
you'd have to apply them to the point of time of the completion of the last backup, so look at the
time the last backup finished - that is the point in time at which you can restore to.
create duplicate db using rman. November 15, 2005 - 12pm Central time zone Bookmark | Bottom | Top
Reviewer: Sean from NJ, USA
Hi Tom,
We want to have a job to run every week to create duplicate db, which means the operation without
human involvement. We don't know when full backup finish before hand, then sysdate in "until time"
command only considers when it starts to do recovery, which means after restoring of all data
files. (Time to restore all data files vary).
In short, I just don't have a good command to tell rman to create duplicate db each week, without
human involvement, with applying minimum archive log files.
Sean
can you use the RC_BACKUP_SET view in the recovery catalog - it has start and end times.
create duplicate db using rman November 15, 2005 - 3pm Central time zone Bookmark | Bottom | Top
Reviewer: Sean from NJ, USA
Sure. But the result is a little confusing. Besides, how could I pass the time to rmna script?
Here is my query:
13 of 40 7/8/2011 1:54 AM
Ask Tom "db cloning -- what is it and why" http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION...
TO_CHAR(COMPLETI INCREMENTAL_LEVEL
---------------- -----------------
01:25 11:15:2005
01:25 11:15:2005
01:25 11:15:2005
09:54 11:15:2005
10:03 11:15:2005
10:03 11:15:2005
10:03 11:15:2005
10:03 11:15:2005
12:46 11:15:2005
12:47 11:15:2005
12:47 11:15:2005
TO_CHAR(COMPLETI INCREMENTAL_LEVEL
---------------- -----------------
12:47 11:15:2005
Only 1:25 is the entry for full backup, but it didn't show incremental_level=0.
Sean
I guess you want the "max" completition time there don't you?
create duplicate db using rman November 15, 2005 - 4pm Central time zone Bookmark | Bottom | Top
Reviewer: Sean from NJ, USA
Hi Tom,
Sean
Recovering a datafile December 3, 2005 - 3am Central time zone Bookmark | Bottom | Top
Reviewer: Rupa Dutta from INDIA
Hi Tom,
How do I recover a datafile that has not physically been backed up since its creation and has been
deleted. Please provide syntax example.
do you have EVERY SINGLE ARCHIVE REDO LOG created since this file was added?
Recovering Datafile December 3, 2005 - 11pm Central time zone Bookmark | Bottom | Top
Reviewer: Rupa Dutta from INDIA
"do it yourself"
http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96572/osrestore.htm#19041
14 of 40 7/8/2011 1:54 AM
Ask Tom "db cloning -- what is it and why" http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION...
"rman"
http://download-west.oracle.com/docs/cd/B10501_01/server.920/a96572/osrestore.htm#19041
relink "oracle home" December 22, 2005 - 5pm Central time zone Bookmark | Bottom | Top
Reviewer: A reader from UK
Tom,
Two machines (A and B) are of same architecture with same operating system and with HP-UX but with
different directory structure. Oracle version is 8.1.7.4 is running on machine A.
[1] My fellow DBA copied "oracle home" of machine A to machine B in different folder then ran
"relink all" on machine B then rectified errors related to path and other errors. Now oracle is
working on machine B
But somehow I think this is not the right approach to copy "oracle home" and rectify errors and
while relinking.
it would not be the "supported" approach. It is so rare to have the "same os" too - I'd bet they
are a tiny bit different. It usually "works", but could have quirks.
relink "oracle home" December 22, 2005 - 6pm Central time zone Bookmark | Bottom | Top
Reviewer: A reader from UK
Tom,
If you can please clarify what do you mean by "tiny bit different"
But if we are doing "relink all" (re-compiling) does "os" difference makes any impact
patches, options, packages installed = 'tiny bit different'. uname -a doesn't being to describe
what the OS really has.
relink oracle home December 22, 2005 - 7pm Central time zone Bookmark | Bottom | Top
Reviewer: A reader
Tom,
If you are running "amazing_os version x.y.z" on two machines (that is what uname -a might report
out), it is unlikely they are "exactly the same" unless one machine is a physical restore of the
15 of 40 7/8/2011 1:54 AM
Ask Tom "db cloning -- what is it and why" http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION...
other machine.
Meaning - patches, packages, options - I'll bet you there is something different.
relink "oracle home" December 23, 2005 - 7am Central time zone Bookmark | Bottom | Top
Reviewer: A reader from UK
Tom,
I agree with you that os can be different. But my question is still unanswered.
"But if we are doing "relink all" (re-compiling) does "os" difference makes any impact."
Base of above is "Doc ID: Note:1014014.6". which tells that executables store location of stared
libraries in it and use them while executing. I don't understand that if "relink all" refresh all
executables then where "os difference" comes in between.
different packages, different things. The os's will be slightly different - they will not be
exactly the same.
or as I like to say "there is no reason it wouldn't work - which probably means you'll find some
reason while doing it someday that won't let it work"
process hang January 16, 2006 - 7pm Central time zone Bookmark | Bottom | Top
Reviewer: neeraj
c:\rman
rman> backup database; ( if tstp is in noarchive log mode then make sure it should not be open
mode)
2.
16 of 40 7/8/2011 1:54 AM
Ask Tom "db cloning -- what is it and why" http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION...
RMAN> run
2> {
3> SET NEWNAME FOR DATAFILE 1 TO 'c:\tstrmn\system01.dbf';
4> DUPLICATE TARGET DATABASE TO tstrmn
5> LOGFILE
6> GROUP 1 ('c:\tstrmn\redo01a.log',
7> 'c:\tstrmn\redo01b.log') SIZE 200K REUSE,
8> GROUP 2 ('c:\tstrmn\redo02a.log',
9> 'c:\tstrmn\redo02b.log') SIZE 200K REUSE;
10> }
17 of 40 7/8/2011 1:54 AM
Ask Tom "db cloning -- what is it and why" http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION...
why it hung?
Process hung January 16, 2006 - 7pm Central time zone Bookmark | Bottom | Top
Reviewer: Neeraj
:) My bad
My 2cents:
c:\rman
rman> backup database; ( if tstp is in noarchive log mode then make sure it should not be open
mode)
2.
18 of 40 7/8/2011 1:54 AM
Ask Tom "db cloning -- what is it and why" http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION...
RMAN> run
2> {
3> SET NEWNAME FOR DATAFILE 1 TO 'c:\tstrmn\system01.dbf';
4> DUPLICATE TARGET DATABASE TO tstrmn
5> LOGFILE
6> GROUP 1 ('c:\tstrmn\redo01a.log',
7> 'c:\tstrmn\redo01b.log') SIZE 200K REUSE,
8> GROUP 2 ('c:\tstrmn\redo02a.log',
9> 'c:\tstrmn\redo02b.log') SIZE 200K REUSE;
10> }
19 of 40 7/8/2011 1:54 AM
Ask Tom "db cloning -- what is it and why" http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION...
REUSE
DATAFILE
'C:\TSTRMN\SYSTEM01.DBF'
CHARACTER SET US7ASCII
database dismounted
Oracle instance shut down
database opened
Finished Duplicate Db at 16-JAN-06
Resetlogs January 18, 2006 - 11am Central time zone Bookmark | Bottom | Top
Reviewer: abc
Tom,
20 of 40 7/8/2011 1:54 AM
Ask Tom "db cloning -- what is it and why" http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION...
I have serious problem here and My manager is one of the nuts in this world.
It is viable.
clone January 19, 2006 - 8pm Central time zone Bookmark | Bottom | Top
Reviewer: abc
it is a cold copy, there is no need for applying archive logs. Copy all the data files and redo
logs, then do
1. startup mount
3. when it comes back with a prompt type cancel and hit return
Above #2 and #3 can be skipped to #4, alter database open resetlogs. You always can try to open
database, if it prompt for recover, then you do recover database. For cold copy, it is no need to
apply archives.
Now, Appreciate if you please help me to understand How to explain that above procedure is wrong to
my manager?
Thanks!
clone January 20, 2006 - 12pm Central time zone Bookmark | Bottom | Top
Reviewer: abc
Database copied with hotbackup which included all datafiles,logfile and controlfiles then somebody
validated the hot backup and did shutdown abort
I copied all datafiles and rename it to TDEV but while opening the database it was asking for
archive logs so I had to startup backup database and then shutdown immediate during shutdown 8
archivelogs got generated which I applied to TDEV to bring it up
...
1. Restore all datafiles ,log files ( DB name is TP )
21 of 40 7/8/2011 1:54 AM
Ask Tom "db cloning -- what is it and why" http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION...
2. Startup mount
3. create controlfile set "TB" noresetlogs noarchivelog
4. alter database open;
......
and say "it is crazy". I look at it and say "if you are restoring LOG FILES, I presume you mean
ONLINE LOG FILES, and the only time they might even be part of a backup would be from a
noarchivelog mode cold backup"
So you need to either be much more precise as to the steps and conditions or accept that the steps
are not "crazy"
And if they are crazy, just sit back and ask her to "show you how to do it" and when it fails, say
"see, told you" I guess.
Now, if you are taking a hot backup from an archivelog mode database, then yes - you will always
need to apply some amount of archived redo log and do a cancel or time based recovery. But, that
is not information that was provided previously.
rman clone January 22, 2006 - 7pm Central time zone Bookmark | Bottom | Top
Reviewer: abc
clone January 24, 2006 - 5pm Central time zone Bookmark | Bottom | Top
Reviewer: abc
Agree, after database is up, all fuzzy transactions are in synch. There is no need to apply
archives. If this database is in non-archive mode, you shutdown abort, does that mean you can't
open database? There are no archive logs to apply.
abc, I'd appreciate it if you would email me directly. I need to talk to you about something.
please identify yourself in the subjec as "abc" so I know it is from you.
thanks.
Database installation via recovery January 27, 2006 - 1pm Central time zone Bookmark | Bottom | Top
Reviewer: Tom
Tom,
At the moment when I install a new database, I install the software and then run dbca to create the
database. Installing the software is quick [20 mins or so] but installing the database takes about
1hr.
I was wondering if instead I could do one install and back it up, then instead of using dbca, just
register the instance and recover the backup as this would be must faster and less error prone.
My questions are what needs to be the same between the backed up machine and the restored machine
Thanks
22 of 40 7/8/2011 1:54 AM
Ask Tom "db cloning -- what is it and why" http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION...
if you used the "seed" database, it would be rather quick - it is only when you create a custom
database that it'll take a while.
Or you can use 10g EM to "clone" an existing instance (software and database if you like)...
But just restoring a database would be OK as well - you would want them to be exactly the "same"
version/patch wise (9.2.0.7 against 9.2.0.7 datafiles, 10.1.0.2 against 10.1.0.2 datafiles - not
9.2.0.7 against 9.2.0.4, not ....)
location of software - easiest if it is "the same" (paths in the controlfiles and such - assuming
you are using OFA type directory structures)
This is just like restoring a database to a new host after a total loss of your production system.
The documentation for it is in the backup and recovery guides.
Tell you what - since you have practiced restoring to a new host at least 100 times, just use the
same process you do there!! You already know what to do (I hope - since recovery is the only thing
a DBA is not allowed to get wrong...)
Seed databases January 30, 2006 - 5am Central time zone Bookmark | Bottom | Top
Reviewer: Tom
Tom,
I wasn't using one of the custom seed databases as I wanted to remove all the functionality our
application doesn't use such as xdb,data mining,etc. I had however forgotten that you could create
your own seed databases from an existing database.
I couldn't find anything in the documents which states the restrictions on the portability of these
seed databases. Are the restrictions on this the same as for cloning a database [same db version
and patchset, same os version]?
You'd need everything to be "the same". It is like restoring from a backup (well, it is in fact
restoring from a backup)
Hmm....how do the default templates work then January 31, 2006 - 4am Central time zone
Bookmark | Bottom | Top
Reviewer: Tom
Tom,
Thanks for your feedback on this. I spent yesterday playing with the seed databases to see whether
they would fit what I want them to do and have a couple of questions.
1. If I download the install CD for Oracle 10g it comes with a seed database [Transaction
Processing for example]. Now I use the same installer on windows 2000 that I use for windows 2003
and the seed database still works. Does the OUI install a different set of seed databases
depending on the version of the OS, and if not, how do these seed databases work independently of
the OS?
2. The seed database files [.djf] files are absolutely tiny compared with a full database
backup....what format are they stored in?
I wasn't saying you can replace our seed, but rather that if you USED the seed... (it - dbca -
would be apparently "much faster")
a) install software
b) restore a backup of a template database you backed up
23 of 40 7/8/2011 1:54 AM
Ask Tom "db cloning -- what is it and why" http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION...
DBCA provides a nice simple way of doing this February 1, 2006 - 3am Central time zone
Bookmark | Bottom | Top
Reviewer: Tom
Tom,
I agree completely that conceptually, I want to create template database, backup and then restore
onto the new machine [this is just to make life easy for developers to be honest and to make sure
everyone has a consistent database on their machine].
The nice thing about dbca is it makes this process transparent to the person installing....all they
know is that they choose a template, fill in some values and get a consistent database with all
setup done for them.
It sounds like I doing this would just require me to keep a template database up to date. I'll
check with support as to whether seed databases created with dbca are portable across windows
versions.
Thanks for your suggestions.....I think with a bit of investigation this could do exactly what I
need. If not, we'll go the manual restore route.
rman duplicate database on same server March 7, 2006 - 7am Central time zone Bookmark | Bottom | Top
Reviewer: Parag J Patankar from India
Hi Tom,
I am trying to do duplicate database with rman ( Oracle 9.2 ) on same server. Database is in
noarchive log mode.
I would like to know does RMAN requires target database backup for duplication ? if not I am
getting following error
RMAN April 11, 2006 - 10am Central time zone Bookmark | Bottom | Top
Reviewer: A reader
If you can make an operating system copy of a database file on one platform and then restore it to
another platform, then it is also possible to duplicate a database from one platform to another.
Otherwise, duplication is not possible.
What does this mean? Does it mean RMAN can be used for cross platform datamigration?
If I have a db in solaris, can I use RMAN backups and create the same db on Linux?
restore incremental backup on cloned database June 26, 2006 - 9am Central time zone
24 of 40 7/8/2011 1:54 AM
Ask Tom "db cloning -- what is it and why" http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION...
Hi Tom,
To make the cloned database B updated every night we are doing the same thing. Now I want to ask
that is there any way by which we can take incremental backup using RMAN of production database A
and restore it to B.
I have already tried to take incremental level 1 backup and try to restore it to B. But in database
B dosen't have the metadata for RMAN so it doesen't recognize the backup.
So if is there any other way that we can take an incremental backup of Database A and retore it to
cloned Database B which resides on other server? please give me solution.
Perhaps you want to look at data guard - if you use a physical standby, you can open it read only
to report, close it and have it get caught up from the redo. If you use logical standby, it can be
opened read write and have the logs continously applied.
How to clone a Stand alone database as 2 node rac database July 6, 2006 - 1am Central time zone
Bookmark | Bottom | Top
Reviewer: Ajeet
Hi Tom,
I cloned it on one node of the RAC without any problems but when I try to clone it another node ,
it gives an error saying that can not identfiy the control files.
Regards,
Ajeet
... As the cold backup is huge so I wanted to convert this into as 2 node rac. ..
that does not compute? what does the size of the backup have to do with it?
With RAC there is ONLY ONE DATABASE. I don't know what you mean by "when I try to clone it on
another node", all nodes have 100% access to the same database - there is only ONE database here -
if you are restoring it twice, you have missed the fundemental point of RAC
Question July 26, 2006 - 9pm Central time zone Bookmark | Bottom | Top
Reviewer: Aru from NZ
Hi Tom,
We are using 9iR2 database as our production database ( eg.- prod).
We are using RMAN/Tivoli to backup our database straight to tape.
We want to create a duplicate database( with different name, eg.- test) on different server and are
using the following command to do the cloning:
25 of 40 7/8/2011 1:54 AM
Ask Tom "db cloning -- what is it and why" http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION...
Is there any chance at all that the rman can overwrite the production database ?
Regards,
Aru.
August 28, 2006 - 2pm Central time zone Bookmark | Bottom | Top
Reviewer: Su Baba
On a Linux system, if I copy the contents of the entire disks to another server, would this, in
effect, create a database clone?
well, if you copied everything - and I mean everything (OS, everything) - sure, you would have
cloned the entire machine
as long as the machine was "dead", not "on" when you did it - it is called a "level zero file
system dump" sort of thing.
The keys are in the ignition, but the car doesn't start til 4 hours later September 26, 2006 - 12am Central time zone
Bookmark | Bottom | Top
Reviewer: Erika from Auckland, New Zealand
I'm cloning a production RAC database to a test server running in non cluster mode using the
following script:
The database on production is 30Gb. I run the script in nohup and I can watch the rman log file. I
wait over 4 hours for there to be anything written to the log file. Is this normal? How can I see
what Rman is doing? I only can see inactive sessions connected to production and test. I thought
the clone was hung during these 4 hours until voila', rman finally writes to the log file.
"cross platform transports are supported in 10g." January 4, 2007 - 4pm Central time zone
Bookmark | Bottom | Top
Reviewer: Sokrates
you wrote
"cross platform transports are supported in 10g."
eg: from windows 2000 to sun solaris, from HP/UX to linux on intel
there is no matrix, because they are all supported for cross platform tablespace transports.
26 of 40 7/8/2011 1:54 AM
Ask Tom "db cloning -- what is it and why" http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION...
I wanted to say
dbca clone in 9i and catpatch January 5, 2007 - 1pm Central time zone Bookmark | Bottom | Top
Reviewer: Dodie from Allyn, WA USA
Created a clone database via dbca in a 9.2.0.8 environment, and successfully ran dbca with that clone template in a 9.2.0.6 environment. I
was surprised when the database appeared to function just fine ... but suspect some issues may occur further on down the line (assume
clone/seed dbj copies dictionary info, thus reason for same version requirement and the reason creation is so fast).
Until we can get everyone on 9208 in our production/development environment, assume I need to:
1. Re-create the clone in a 9206 environment?
2. Run $OH/rdbms/admin/catpatch.sql against a 9206-dbca-template-created database built in a 9208 environment to migrate the newly
created database and dictionary objects up to the proper level?
If option 2 would work, would running 9206 catpatch.sql against a 9208-dbca-template-created database built in a 9206 environment also
work to migrate database down to 9206?
thanks,
Dodie
Thanks for looking at this, I know you are flooded with questions, and very much appreciate your time and expertise.
Result: The database created above seemed to function fine, so this seemed like a quick way to re-deploy initial database (this particular
database is used by a COTS product to display information from other sources, so we do not need to backup/restore or even preserve
data; we just need to rebuild it quickly in production with initial configuration data).
While looking for some other issue, I found this thread, and gave additional thought to how the clone template is likely created. Since it
builds so quickly, am I correct in guessing that it contains the 9206 level dictionary objects and data?
Based on the contents of this thread, I will rebuild the clone template from a 9206 level database to match current production level.
However, I wondered if running the appropriate level catpatch.sql would migrate a 9206 clone database clone up to 9208 level in some of
our development environments, or if I need to create two clones, one for each 9206 and 9208 level.
thanks again,
Dodie
if you just created a template, it is just a bunch of scripts with "creates" and running of scripts.
not really sure what you have going there - i would suggest using a consistent set of software however since there are differences
between 9206 and 9208 - it would not make sense to develop in one and deploy to another.
Cloning a RAC database January 14, 2007 - 1am Central time zone Bookmark | Bottom | Top
Reviewer: A reader
Hi tom,
I need to clone a two node RAC environment and I am trying to use rman. In the new servers I brought the two new instances in nomount
and then I ran the script that does the rman duplication, after the restore was finished the duplication failed while trying to create the
control file saying:
27 of 40 7/8/2011 1:54 AM
Ask Tom "db cloning -- what is it and why" http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION...
Base on this error I am wondering if I need to run the duplication having only one instance in nomount with the cluster_database=false,
and then after the duplication is finished I have to manually set up the cluster environment again. Am I right on this? or is there any way to
run a duplication using rman that will work having two instances in nomount? If that is the case what do I need to do in order to resolve the
error and have the second thread enabled so the rman process will not failed while trying to recreate the control file?
Cloning across versions June 6, 2007 - 9am Central time zone Bookmark | Bottom | Top
Reviewer: Mike
If we want to clone an 8.1.7 database to a 10.2.0 database server, is there any way to do it? Obviously the normal cloning procedures will
not work, i.e. copying a backup etc, as the versions of Oracle are different. Also, the database in question is too big to do an Oracle export.
Are there any other options?
I can get away with copying the relevant schema bit-by-bit using the sqlplus Copy command across a link or something similar but this
would be very time consuming.
you have to UPGRADE it, you can restore the 817 database and then upgrade it to 10.2 using normal upgrade processes.
The keys are in the ignition, but the car doesn't start til 4 hours later July 2, 2007 - 5pm Central time zone
Bookmark | Bottom | Top
Reviewer: Erika from New Zealand
Just wanted to follow up on my original question.
My rman clone process was taking 40 hours for a 50Gb database. Now it takes just 12 hours if you add:
sql "alter session set optimizer_mode=RULE";
Restore database to new Server October 16, 2007 - 12pm Central time zone Bookmark | Bottom | Top
Reviewer: A Reader
Tom
run {
delete noprompt backup;
set controlfile autobackup format for device type disk to 'D:\TestDB10G\Sunday_Controlfile%F';
backup incremental level 0 database format='D:\TestDB10G\SUNDAY_%u%p%c' tag=sunday_backup;
}
D:\TestDB10G\DATAFILES
D:\TestDB10G\SYSTEMFILES
D:\TestDB10G\CONTROLFILES
D:\TestDB10G\REDOLOGS
D:\TestDB10G\ARCHIVEDLOGS
(pls don't ask me why, but that is how the structure is)
It doesn't. Why ?
Rman duplication May 15, 2008 - 2am Central time zone Bookmark | Bottom | Top
Reviewer: ck
Hi Tom,
I try to find the answer long time but can't get the answer anywhere.
Rman duplication require connect target to the source database, why does it need to connect to the
source and how is the overhead inccured in the source db during the duplication?
28 of 40 7/8/2011 1:54 AM
Ask Tom "db cloning -- what is it and why" http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION...
it wants to know what the source database "is", connecting to it gives it the dbid and all - also, it provides access to all of the archives - the
duplicated database will be "as of the last available archive redo log" (as onlines are not available to be processed - they are "online", not
archived yet).
You can "duplicate" without connecting to source. Note 444437.1 has the details. But basically, you would do some of the things the
duplicate command does automatically for you - you would have to create the auxillary instance, and pretend you are "restoring to a new
host" and then change the dbnames/dbid's if you wanted to.
question about "Cloning an Oracle Home" October 31, 2008 - 11am Central time zone Bookmark | Bottom | Top
Reviewer: LEE from Grand Rapids, MI USA
Tom,
I like your web site, and read your comments all the time, it helpled me a lot.
Now I have a question:
I want to clone an Oracle Home to a different directory, e.g. from
/u01/app/oracle/product/10.2.0/db_1 to /u02/app/oracle/product/10.2.0/db_2
Can I do it like:
1. copy all the files from /u01/app/oracle/product/10.2.0/db_1 to
/u02/app/oracle/product/10.2.0/db_2
2. $ORACLE_HOME/oui/bin/runInstaller -silent -clone
ORACLE_HOME="/u02/app/oracle/product/10.2.0/db_2" ORACLE_HOME_NAME="db_2"
Thanks!
RMAN: duplicate database September 26, 2009 - 12pm Central time zone Bookmark | Bottom | Top
Reviewer: Mark from CT USA
Hi Tom, I searchd for Note 444437.1 and found nothing. I would like to clone databases without
connecting to the source db. Looking through the log of DUPLICATE DATABASE command, i see it
executing several memory scripts running some commands that are not in rman doc:
restore clone database
switch clone database
recover clone database
alter clone database
They all are using CLONE DATABASE clause, explanation of which I could not find. Is there any doc
explaining the internals of the DUPLICATE DATABASE and the purpose of CLONE DATABASE clause? I
understand the process, but would like to know more at the level of each operation I see in the
log.
it is fairly self documenting in this case - clone is just a name for "duplicate"
note number 732624.1 - I don't know if I cut and pasted bad or if it changed- but that it the number now
September 29, 2009 - 9pm Central time zone Bookmark | Bottom | Top
Reviewer: A reader
Tom,
Thanks for your response, but I was looking for the description of the CLONE DATABASE clause and
wanted to know if I can use it or if it is only an rman internal operation.
How do I get a copy of Note 444437.1, since I couldnt find ot on Metalink.
I would like to be able to clone the database without any access to the source db. Since I have a
backup, including controlfile and archivelogs, I should be able to do this.
29 of 40 7/8/2011 1:54 AM
Ask Tom "db cloning -- what is it and why" http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION...
Sorry, I missed the new Note # you provided. I got it now and will review.
Thanks.
RMAN cloning June 10, 2010 - 7am Central time zone Bookmark | Bottom | Top
Reviewer: Niharika from London
Hello Tom,
I am using Oracle 10.2.0.4.0 on Solaris 5.10. I am trying to clone the database 'DB1' to 'DB2'
using RMAN. I have only full backup of DB1 including archive logs, taken on weekends. The DB1 was
recovered recently, so there is a new incarnation in DB1.
I am trying to clone DB2 from the 'before-resetlogs' backup of DB1. The cloning is failing as it
says the backup is from before-resetlogs.
I was told to reset the incarnation in DB1 database and then try cloning onto DB2. But DB1 is a
production database, and I cannot reset the incarnation to previous one.
Is there any other solutions for this problem? Can I reset the incarnation of DB1 to previous one
(so that it clones without error) and after cloning, again move the incarnation to the current
(incarnation which is 'current' now) - what will be the effect of this?
Hope I am clear.
Thanks in advance
Duplicating RAC-ASM Database July 23, 2010 - 3am Central time zone Bookmark | Bottom | Top
Reviewer: Santosh Vijayan from India
Tom,
=====================================================================
To duplicate RAC database , first duplicate RAC Database to a single instance using RMAN and
convert the single instance into a RAC cluster
==========================================================================================
. oraenv
ORACLE_SID = [MMHP11] ? MMHP11
In case backup is not available then take full database & archivelog backup for MMHP1 as shown.
-------------------------------------------------------------------------------------------------
cd /u950/backup
mkdir CR660075
cd /u950/backup/CR660075
mkdir rmanbkup
cd /u950/backup/CR660075
30 of 40 7/8/2011 1:54 AM
Ask Tom "db cloning -- what is it and why" http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION...
-------------------------------------------------------------------------------------------------
vi /u950/backup/CR660075/backup_mmhp1.rman
run
{
configure default device type to disk;
CONFIGURE CHANNEL DEVICE TYPE DISK FORMAT '/u950/backup/CR660075/rmanbkup/%U' parallelism 4 backup
type to compressed backupset;
configure controlfile autobackup on;
configure controlfile autobackup format for device type disk to
'/u950/backup/CR660075/rmanbkup/%F';
configure maxsetsize to 5G;
configure snapshot controlfile name to '/u950/backup/CR660075/rmanbkup/snapf_mmhp1.ora';
sql 'alter system switch logfile';
sql 'alter system archive log current';
backup full database plus archivelog;
}
:wq
-------------------------------------------------------------------------------------------------
vi /u950/backup/CR660075/run_backup.ksh
#!/bin/ksh
export $ORACLE_SID=MMHP11
rman target=/ @/u950/backup/CR660075/backup_mmhp1.rman
:wq
-------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------
tail -f rman_mmhp1.log
scp oracle@mtshlp311:/u950/backup/CR660075/rmanbkup/*
oracle@ghthlc321:/u950/backup/CR660075/rmanbkup/
cd $ORACLE_HOME/dbs
mkdir -p /u01/app/oracle/diag/rdbms/mmhpc1/MMHPC11/trace
mkdir -p /u01/app/oracle/diag/rdbms/mmhpc1/MMHPC11/cdump
mkdir -p /u01/app/oracle/admin/MMHP1/adump
Create Necessary ASM Directories on the Host of the New Database (MMHPC1) for storing controlfile
and redologs.
31 of 40 7/8/2011 1:54 AM
Ask Tom "db cloning -- what is it and why" http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION...
export ORACLE_SID=+ASM1
asmcmd
ASMCMD> cd MTS_DATA
ASMCMD> mkdir mmhpc1
ASMCMD> cd mmhpc1
ASMCMD> mkdir onlinelog
ASMCMD> mkdir controlfile
ASMCMD: exit
asmcmd
ASMCMD> cd MTS_ARCHIVE
ASMCMD> mkdir mmhpc1
ASMCMD> cd mmhpc1
ASMCMD> mkdir onlinelog
ASMCMD> mkdir controlfile
cd $TNS_ADMIN
vi tnsnames.ora
tnsping MMHP11
vi /u01/app/asm/product/11.1.0/asm_1/network/admin/listener.ora
LISTENER = (DESCRIPTION_LIST
LISTENER_GHTHLC321 =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
(ADDRESS = (PROTOCOL = TCP)(HOST = ghthlc321-vip)(PORT = 1521)(IP = FIRST))
(ADDRESS = (PROTOCOL = TCP)(HOST = 10.210.108.17)(PORT = 1521)(IP = FIRST))
)
)
SID_LIST_LISTENER_GHTHLC321 =
(SID_LIST =
(SID_DESC =
(SID_NAME = +ASM1)
(ORACLE_HOME = /u01/app/asm/product/11.1.0/asm_1)
)
(SID_DESC =
(SID_NAME = MMHPC1)
(ORACLE_HOME = /u01/app/oracle/product/11.1.0/db_1)
)
)
9) Copy the Parameter File from the TARGET to the AUXILIARY (MMHP1 to MMHPC1).
export ORACLE_SID=MMHP11
10) Edit the Parameter File, Changing Necessary Values on Auxiliary Host (MMHPC1)
. oraenv
ORACLE_SID = [oracle] ? MMHPC1
cd /u01/app/oracle/product/11.1.0/db_1/dbs/
32 of 40 7/8/2011 1:54 AM
Ask Tom "db cloning -- what is it and why" http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION...
mv initMMHP11.ora initMMHPC1.ora
In this example, the Diskgroup is switched from DATA to +MTS_DATA and FLASH to MTS_ARCHIVE.
The online redo logs shall be created as part of the DUPLICATE clause.
Comment all RAC related parameters for ex:- cluster_database, cluster_instances, thread ...Etc
vi /u01/app/oracle/product/11.1.0/db_1/dbs/initMMHPC1.ora
background_dump_dest='/u01/app/oracle/diag/rdbms/mmhpc1/MMHPC11/trace'
core_dump_dest='/u01/app/oracle/diag/rdbms/mmhpc1/MMHPC11/cdump'
user_dump_dest='/u01/app/oracle/diag/rdbms/mmhpc1/MMHPC11/trace'
control_files='+MTS_DATA/mmhpc1/controlfile/control01.ctl','+MTS_ARCHIVE/mmhpc1/controlfile/control0
2.ctl'
db_file_name_convert=('+DATA','+MTS_DATA')
log_file_name_convert=('+DATA','+MTS_DATA')
audit_file_dest='/u01/app/oracle/admin/MMHPC1/adump'
audit_sys_operations=TRUE
audit_trail='db'
compatible='11.1.0.7.0'
db_block_size=8192
db_domain=''
db_name='MMHPC1'
db_recovery_file_dest='+MTS_ARCHIVE'
db_recovery_file_dest_size=2147483648
db_create_file_dest='+MTS_DATA'
db_create_online_log_dest_1='+MTS_DATA'
db_create_online_log_dest_1='+MTS_ARCHIVE'
diagnostic_dest='/u01/app/oracle'
log_archive_dest_1='location=+MTS_ARCHIVE/'
db_unique_name=MMHPC1'
log_archive_format='%t_%s_%r.dbf'
log_archive_trace=511
max_dump_file_size='4000'
sga_target=3G
sga_max_size=3G
open_cursors=300
processes=500
remote_login_passwordfile='EXCLUSIVE'
undo_retention=86400
undo_tablespace='UNDOTBS1'
export ORACLE_SID=MMHPC1
sqlplus / as sysdba
startup nomount;
exit
33 of 40 7/8/2011 1:54 AM
Ask Tom "db cloning -- what is it and why" http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION...
export ORACLE_SID=MMHPC1
export ORACLE_HOME=/u01/app/oracle/product/11.1.0/db_1
export LD_LIBRARY_PATH=$ORACLE_HOME/lib
export PATH=$ORACLE_HOME/bin:$PATH
rman
RUN
{
ALLOCATE AUXILIARY CHANNEL D1 DEVICE TYPE disk format '/u950/backup/CR660075/rmanbkup/%U';
ALLOCATE AUXILIARY CHANNEL D2 DEVICE TYPE disk format '/u950/backup/CR660075/rmanbkup/%U';
ALLOCATE AUXILIARY CHANNEL D3 DEVICE TYPE disk format '/u950/backup/CR660075/rmanbkup/%U';
ALLOCATE AUXILIARY CHANNEL D4 DEVICE TYPE disk format '/u950/backup/CR660075/rmanbkup/%U';
ALLOCATE AUXILIARY CHANNEL D5 DEVICE TYPE disk format '/u950/backup/CR660075/rmanbkup/%U';
ALLOCATE AUXILIARY CHANNEL D6 DEVICE TYPE disk format '/u950/backup/CR660075/rmanbkup/%U';
13) If duplication of database is successful, then turn the auxiliary database into a RAC database
by adding back all the necessary parameters,
such as cluster_database, cluster_instances, thread , undo_tablespace etc.
14) Add second thread of online redo logs and enable that thread:
15) Uncomment or add all RAC related parameters such as cluster_database, cluster_instances, thread
, undo_tablespace etc.
Shutdown the single database instance and startup both Instances.
16) Create spfile on the shared storage, because all instances must use the same server parameter
file.
34 of 40 7/8/2011 1:54 AM
Ask Tom "db cloning -- what is it and why" http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION...
September 27, 2010 - 3am Central time zone Bookmark | Bottom | Top
Reviewer: neeraj from nepal
helo tom
i am new in orcle dba field
35 of 40 7/8/2011 1:54 AM
Ask Tom "db cloning -- what is it and why" http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION...
36 of 40 7/8/2011 1:54 AM
Ask Tom "db cloning -- what is it and why" http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION...
after this is it restore all the file except redologs file in clone database
and after this it is not terminating.......
my clone db is in nomount stage....
guide me
help me pliz September 28, 2010 - 12am Central time zone Bookmark | Bottom | Top
Reviewer: neeraj from nepal
hello ...
pliz rply the above question ..
i m waiting 4 rply..
I cannot understand why a professional would communicate using the writing skills of a 12 year old (I am referring to your use of "texting"
as a language).
anyway...
I don't work on windows, not sure what this "it is not terminating" is about. It is at the point where it should be creating a new controlfile.
http://download.oracle.com/docs/cd/E11882_01/backup.112/e10642/rcmdupdb.htm#sthref1818
The online redo logs would not be restored, you would do an alter database open resetlogs after a point in time recovery like that (and that
creates the logs). You should be able to just open the database with resetlogs now.
</
http://download.oracle.com/docs/cd/B19306_01/backup.102/b14191/rcmdupdb.htm#i1006946/
>
What happens to the existing database files during this process? Let's say I ran it once successfully, then I wanted to run this regularly
from then on. The files will all be there next time, does RMAN overwrite them? Do they get deleted? I'm hoping I don't have to drop the
database every time.
You are taking an existing database - going to the backups of it and duplicating it to a new location.
the only existing datafiles are the ones of the existing database, and it is not touched.
October 27, 2010 - 8am Central time zone Bookmark | Bottom | Top
Reviewer: Alexander
You can run duplicate database against an existing database, if you initially created it by using
duplicate database.
http://download.oracle.com/docs/cd/B19306_01/backup.102/b14191/rcmdupdb.htm#i1006946
37 of 40 7/8/2011 1:54 AM
Ask Tom "db cloning -- what is it and why" http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION...
Reviewer: Alexander
Tom, did you see above? Where you aware of that? On a related note, I'm seeing inconsistent clone
times, it's much quicker when you run one a 2nd time, as if RMAN is smart enough to know nothing
has changed since the first clone.
<quote>
... The example uses the DUPLICATE DATABASE command to transfer complete copies of all updated datafiles from the source database
to the duplicate site. ...
</quote>
November 7, 2010 - 1am Central time zone Bookmark | Bottom | Top
Reviewer: Alexander
That's cool. Can you define "updated datafiles" though, does mean changes since the last
duplicate? That seems too good to be true, how would it know that.
it'll be pretty much everything with the exception of read only tablespaces (which will be pretty much the only thing not updated in the
database)
November 16, 2010 - 8am Central time zone Bookmark | Bottom | Top
Reviewer: Alexander
Tom,
When you are duplicating a database you have to use static listener registration for the listener correct? Is there anything special you have
to do vs dynamic to allow clients to connect? I can't for the life of me connect from my desktop using sqlplus.
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = lx-cpora-t01k)(PORT = 1521))
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
)
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /oracle/product/11.2)
(PROGRAM = extproc)
)
(SID_DESC =
(SID_NAME = OCP36T.LMIG.COM)
(ORACLE_HOME = /oracle/product/11.2)
)
(SID_DESC =
(SID_NAME = OCP37T.LMIG.COM)
(ORACLE_HOME = /oracle/product/10.2.0.3)
)
)
ADR_BASE_LISTENER = /oracle/product
/database/oracle
(lx-cpora-t01k:oracle)> cat /oracle/product/11.2/network/admin/tnsnames.ora
OCP36T =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = lx-cpora-t01k)(PORT = 1521))
)
(CONNECT_DATA =
38 of 40 7/8/2011 1:54 AM
Ask Tom "db cloning -- what is it and why" http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION...
(SERVICE_NAME = OCP36T.LMIG.COM)
)
)
OCP37T =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = lx-cpora-t01k)(PORT = 1521))
)
(CONNECT_DATA =
(SERVICE_NAME = OCP37T.LMIG.COM)
)
)
OCP25X1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = x223kdc-v)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = OCP25X.LMIG.COM)
(INSTANCE_NAME = OCP25X1)
)
)
ocp37t =
(description =
(address_list =
(address =
(protocol = tcp)
(host = lx-cpora-t01k)
(port = 1521)) )
(connect_data =
(service_name = ocp37p.lmig.com) ) )
http://download.oracle.com/docs/cd/E11882_01/backup.112/e10642/rcmdupdb.htm#sthref1819
you give no "symptoms" regarding your comment "I can't for the life of me connect from my desktop using sqlplus. " so it is hard to
diagnose
all of your tnsnames.ora entries seem to be using services - for a static connection, you'd use oracle_sid in the connect string, not a
service - since a service can only be registered with a listener after the database is up (and we are connecting in order to get the database
up).
November 17, 2010 - 4pm Central time zone Bookmark | Bottom | Top
Reviewer: Alexander
Are you saying my tnsnames on the server also needs to be using SID not a service?
By the way I'm jealous you are in Nuremburg. If I were you I'd rent a Porsche to take around the
Nuremburg track.
http://goeurope.about.com/od/germany/a/nurburgring.htm
Tom,
Is the an option when duplicating a database to tell it to remove the archivelogs it used from the
target when it's done?
December 28, 2010 - 2pm Central time zone Bookmark | Bottom | Top
Reviewer: Alexander
39 of 40 7/8/2011 1:54 AM
Ask Tom "db cloning -- what is it and why" http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION...
Tom, do you have any suggestions about the best way to cleanup archivelogs after a duplicate? I
could add a step to do 'rm *' in my archlog directory, but I was hoping there was something a bit
cleaner than that. I tried cataloging them so I could blow them away via rman, but they have
different dbids.
Hi Tom,
why must have an odd number of voting disks, such as three, five,and so on.
why not 2,4,6, and so on for voting disks.
Thanks
rman cloneing January 11, 2011 - 12pm Central time zone Bookmark | Bottom | Top
Reviewer: A reader
i did rman cloneing with different servers for catalog,target,auxilary.I took thr onlinr backup of taget database.When iam connected to 3
database in auxilary level its shows error like no backup of datafile 5,4...????????
rman duplicate July 1, 2011 - 6am Central time zone Bookmark | Bottom | Top
Reviewer: Michael from Switzerland
Hi Tom,
The DEV1 database is refreshed on a recurring basis from PROD there. So, I got let's say DEV1 (dbid
1), DEV1 (dbid 2), DEV1 (dbid 3) and DEV1 (dbid 4) currently.
Development wants DEV2 to be equal to DEV1 (dbid 1) now. Is there a way to to this directly without
restoring DEV1 (dbid 1) before?
I know with Oracle 11g there is a new feature where it is not required to connect to the target
database anymore as there's a DBID clause with the duplicate command.
Cheers,
Michael
Write a Review
All information and materials provided here are provided "as-is"; Oracle disclaims all express and implied warranties, including, the implied warranties of merchantability or fitness
for a particular use. Oracle shall not be liable for any damages, including, direct, indirect, incidental, special or consequential damages for loss of profits, revenue, data or data
use, incurred by you or any third party in connection with the use of this information or these materials.
40 of 40 7/8/2011 1:54 AM