Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Clone db to another machine

Clone db to another machine

From: OakRogbak_erPine_at_yahoo.com Kill the 2 trees in email address to reply <OakRogbak_erPine_at_yahoo.com>
Date: 21 Jul 2004 14:01:20 -0700
Message-ID: <13fdc9b4.0407211204.7ca2c11@posting.google.com>


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! Received on Wed Jul 21 2004 - 16:01:20 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US