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 ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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! |
| |||
| 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 |
| |||
| 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 |
| |||
| 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 |
| ||||
| 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. |
| Thread Tools | |
| Display Modes | |
|
|