Unix Technical Forum

Clone db to another machine

This is a discussion on Clone db to another machine within the Oracle Database forums, part of the Database Server Software category; --> Hi friends, I seek your assistance. I have been working a good part of the day trying to clone ...


Go Back   Unix Technical Forum > Database Server Software > Oracle Database

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-24-2008, 07:08 AM
OakRogbak_erPine@yahoo.com Kill the 2 trees in email address to reply
 
Posts: n/a
Default Clone db to another machine

Hi friends, I seek your assistance.

I have been working a good part of the day trying to clone an OPEN
Oracle DB to another machine.

The source db in Oracle 8.1.7 on Windows 2000 running in archive log
mode. Please don't tell me to use a current version of Oracle because
the whole purpose of this second database is to test upgrading it to a
current version.

Also, I usually do this sort of thing by creating a new instance and
then using export/import, but I wanted to expand my Oracle skills.

I want my clone database to have the same name. It doesnt have to have
the exact transactions as the original, just anything that works for
testing. Also, the copy database will have the exact file structure
and paths the original db has.

Here's what I have done:
1. Installed Oracle server on new machine.
2. Create directories, initfile, etc for the copy database on second
server
3. Added database name to tnsnames.ora,listener.ora on second server
4. created database service with ORADIM
5. on original OPEN db: ALTER DATABASE BACKUP CONTROL FILE TO TRACE
RESETLOGS
6. renamed trace file to create_control.sql, edited, contents are as
follows:
STARTUP NOMOUNT
CREATE CONTROLFILE SET DATABASE "WDEV" RESETLOGS ARCHIVELOG
MAXLOGFILES 128
MAXLOGMEMBERS 4
MAXDATAFILES 1024
MAXINSTANCES 1
MAXLOGHISTORY 1815
LOGFILE
GROUP 1 'E:\ORACLE\ORADATA\WDEV\REDO_01A.LOG' SIZE 25M,[list of logfiles]
GROUP 10 'E:\ORACLE\ORADATA\WDEV\REDO_10A.LOG' SIZE 25M
DATAFILE
'E:\ORACLE\ORADATA\WDEV\SYSTEM01.DBF',[list of datafiles]
'E:\ORACLE\ORADATA\WDEV\USERS2_02.DBF'
CHARACTER SET WE8ISO8859P1;

7. Then I do a ALTER SYSTEM ARCHIVE LOG CURRENT
8. Copy the ORADATA dirctory including archived logs to second server
9. Go to second server, set SID, sqlplus connecting as internal
10. Delete the control files that I copied over using OS commands
11. Runc create Control file script shown above
12. RECOVER DATABASE USING BACKUP CONTROLFILE until CANCEL

Here is where I have problems. No matter what I choose (RETURN, AUTO,
or Specify one of my archivedlogs) I get errors such as:

ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get
error below
ORA-01194: file 1 needs more recovery to be consistent

or it wants an archive log file that comes after the ones I copied.

My last step would be
13. ALTER DATABASE OPEN RESETLOGS;
but this fails

Any tips appreciated. The Backup and Recovery Book that I am following
apparently is omitting some details.
Thanks!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-24-2008, 07:09 AM
Ana C. Dent
 
Posts: n/a
Default Re: Clone db to another machine

OakRogbak_erPine@yahoo.com (OakRogbak_erPine@yahoo.com Kill the 2 trees
in email address to reply) wrote in
news:13fdc9b4.0407211204.7ca2c11@posting.google.co m:

> Hi friends, I seek your assistance.
>
> I have been working a good part of the day trying to clone an OPEN
> Oracle DB to another machine.
>
> The source db in Oracle 8.1.7 on Windows 2000 running in archive log
> mode. Please don't tell me to use a current version of Oracle because
> the whole purpose of this second database is to test upgrading it to a
> current version.
>
> Also, I usually do this sort of thing by creating a new instance and
> then using export/import, but I wanted to expand my Oracle skills.
>
> I want my clone database to have the same name. It doesnt have to have
> the exact transactions as the original, just anything that works for
> testing. Also, the copy database will have the exact file structure
> and paths the original db has.
>
> Here's what I have done:
> 1. Installed Oracle server on new machine.
> 2. Create directories, initfile, etc for the copy database on second
> server
> 3. Added database name to tnsnames.ora,listener.ora on second server
> 4. created database service with ORADIM
> 5. on original OPEN db: ALTER DATABASE BACKUP CONTROL FILE TO TRACE
> RESETLOGS
> 6. renamed trace file to create_control.sql, edited, contents are as
> follows:
> STARTUP NOMOUNT
> CREATE CONTROLFILE SET DATABASE "WDEV" RESETLOGS ARCHIVELOG
> MAXLOGFILES 128
> MAXLOGMEMBERS 4
> MAXDATAFILES 1024
> MAXINSTANCES 1
> MAXLOGHISTORY 1815
> LOGFILE
> GROUP 1 'E:\ORACLE\ORADATA\WDEV\REDO_01A.LOG' SIZE 25M,
>[list of logfiles]
> GROUP 10 'E:\ORACLE\ORADATA\WDEV\REDO_10A.LOG' SIZE 25M
> DATAFILE
> 'E:\ORACLE\ORADATA\WDEV\SYSTEM01.DBF',
>[list of datafiles]
> 'E:\ORACLE\ORADATA\WDEV\USERS2_02.DBF'
> CHARACTER SET WE8ISO8859P1;
>
> 7. Then I do a ALTER SYSTEM ARCHIVE LOG CURRENT
> 8. Copy the ORADATA dirctory including archived logs to second server
> 9. Go to second server, set SID, sqlplus connecting as internal
> 10. Delete the control files that I copied over using OS commands
> 11. Runc create Control file script shown above
> 12. RECOVER DATABASE USING BACKUP CONTROLFILE until CANCEL
>
> Here is where I have problems. No matter what I choose (RETURN, AUTO,
> or Specify one of my archivedlogs) I get errors such as:
>
> ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get
> error below
> ORA-01194: file 1 needs more recovery to be consistent
>
> or it wants an archive log file that comes after the ones I copied.
>
> My last step would be
> 13. ALTER DATABASE OPEN RESETLOGS;
> but this fails
>
> Any tips appreciated. The Backup and Recovery Book that I am following
> apparently is omitting some details.
> Thanks!
>


If you are doing with with DB #1 online, then I'm not surprised.
Step #8 (at a minimum) needs to be done with DB#1 shutdown.
Ideally 1 - 13 with DB#1 shutdown or running in STATRUP RESTRICT
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-24-2008, 07:10 AM
OakRogbak_erPine@yahoo.com Kill the 2 trees in email address to reply
 
Posts: n/a
Default Re: Clone db to another machine

Sure, I agree that it is easier with the database shut down, but this
is a production database that I do not want to shut down. The this
particular exercise that I am following in a Backup and Recovery book
is specifically for an OPEN database. It is supposed to be possible.
>
> If you are doing with with DB #1 online, then I'm not surprised.
> Step #8 (at a minimum) needs to be done with DB#1 shutdown.
> Ideally 1 - 13 with DB#1 shutdown or running in STATRUP RESTRICT

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-24-2008, 07:11 AM
Sybrand Bakker
 
Posts: n/a
Default Re: Clone db to another machine

On 22 Jul 2004 05:56:25 -0700, OakRogbak_erPine@yahoo.com
(OakRogbak_erPine@yahoo.com Kill the 2 trees in email address to
reply) wrote:

>Sure, I agree that it is easier with the database shut down, but this
>is a production database that I do not want to shut down. The this
>particular exercise that I am following in a Backup and Recovery book
>is specifically for an OPEN database. It is supposed to be possible.



restoring a hot backup (preferably a RMAN backup) should do without
problem.


--
Sybrand Bakker, Senior Oracle DBA
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-24-2008, 07:16 AM
OakRogbak_erPine@yahoo.com Kill the 2 trees in email address to reply
 
Posts: n/a
Default Re: Clone db to another machine

Yes, I finally got it working. I needed to put the tablespaces in
backup mode. First I wanted to do it without using RMAN. That will be
my next experiment when time permits.
-Roger

Sybrand Bakker <sybrandb@hccnet.nl> wrote in message news:<cnvvf0t8jmfgrf529bc6l5mociqam8ij5j@4ax.com>. ..
> On 22 Jul 2004 05:56:25 -0700, OakRogbak_erPine@yahoo.com
> (OakRogbak_erPine@yahoo.com Kill the 2 trees in email address to
> reply) wrote:
>
> >Sure, I agree that it is easier with the database shut down, but this
> >is a production database that I do not want to shut down. The this
> >particular exercise that I am following in a Backup and Recovery book
> >is specifically for an OPEN database. It is supposed to be possible.

>
>
> restoring a hot backup (preferably a RMAN backup) should do without
> problem.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 07:39 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com