Home » RDBMS Server » Backup & Recovery » Cloning database (Oracle 10g, Windows 7)
Cloning database [message #561569] Tue, 24 July 2012 01:23 Go to next message
bg1984
Messages: 21
Registered: July 2012
Junior Member
Hi All,
I've cloned one database manually and tried to open it only mounts and it comes up with this error
"ORA-01589: must use RESETLOGS or NORESETLOGS option for database open"
Now, I issue "ALTER DATABASE OPEN RESETLOGS" but still getting following errors:
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: 'F:\ORACLE\PRODUCT\10.2.0\ORADATA\ORAL\SYSTEM01.DBF'
Please help..! Sad
Re: Cloning database [message #561571 is a reply to message #561569] Tue, 24 July 2012 01:29 Go to previous messageGo to next message
Michel Cadot
Messages: 68728
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Do you think we have enough information to help you?
The only thing we can tell you is to repeat the message "file 1 needs more recovery to be consistent", so recover more.

Regards
Michel
Re: Cloning database [message #561573 is a reply to message #561571] Tue, 24 July 2012 01:33 Go to previous messageGo to next message
bg1984
Messages: 21
Registered: July 2012
Junior Member
Hi Michel,

Thanks for your response.

Please let me know what information would you like me to provide you with?

Regards,
BG
Re: Cloning database [message #561588 is a reply to message #561573] Tue, 24 July 2012 02:08 Go to previous messageGo to next message
Michel Cadot
Messages: 68728
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
The complete listing of what you did and got.

Regards
Michel
Re: Cloning database [message #561591 is a reply to message #561573] Tue, 24 July 2012 02:13 Go to previous messageGo to next message
bg1984
Messages: 21
Registered: July 2012
Junior Member
Michel,

Actually, I moved database from one machine to another by copying datafiles and redologfiles. Also, I created new control file on the target database from the trace file of the source database. I also moved the init.ora file to the target database. Then I made changes in this file accordingly. I had to create a new instance on the target database. Did I follow the correct procedure for moving database from one machine to another?. Sorry, If I confused you, with the term "Cloning". Please help.

Regards,
BG
Re: Cloning database [message #561594 is a reply to message #561591] Tue, 24 July 2012 02:26 Go to previous messageGo to next message
Michel Cadot
Messages: 68728
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
Without the listing, I can't.

Regards
Michel
Re: Cloning database [message #561597 is a reply to message #561594] Tue, 24 July 2012 02:36 Go to previous messageGo to next message
bg1984
Messages: 21
Registered: July 2012
Junior Member
My .sql file on the target database is:
CREATE CONTROLFILE SET DATABASE "ORAL" RESETLOGS NOARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 292
LOGFILE
GROUP 1 'F:\ORACLE\PRODUCT\10.2.0\ORADATA\ORAL\REDO01.LOG' SIZE 50M,
GROUP 2 'F:\ORACLE\PRODUCT\10.2.0\ORADATA\ORAL\REDO02.LOG' SIZE 50M,
GROUP 3 'F:\ORACLE\PRODUCT\10.2.0\ORADATA\ORAL\REDO03.LOG' SIZE 50M
-- STANDBY LOGFILE
DATAFILE
'F:\ORACLE\PRODUCT\10.2.0\ORADATA\ORAL\SYSTEM01.DBF',
'F:\ORACLE\PRODUCT\10.2.0\ORADATA\ORAL\UNDOTBS01.DBF',
'F:\ORACLE\PRODUCT\10.2.0\ORADATA\ORAL\SYSAUX01.DBF',
'F:\ORACLE\PRODUCT\10.2.0\ORADATA\ORAL\USERS01.DBF',
'F:\ORACLE\PRODUCT\10.2.0\ORADATA\ORAL\EXAMPLE01.DBF',
'F:\ORACLE\PRODUCT\10.2.0\ORADATA\ORAL\DF1'
CHARACTER SET AL32UTF8
;
ALTER DATABASE OPEN RESETLOGS;

Michel, would you like me to paste the init.ora file as well?


Re: Cloning database [message #561599 is a reply to message #561597] Tue, 24 July 2012 02:38 Go to previous messageGo to next message
Michel Cadot
Messages: 68728
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
There is no restore and no recover in your script, so you can't open.
What I want is the complete listing of what you did and got, the complete OS and sqlplus session.

Regards
Michel
Re: Cloning database [message #561600 is a reply to message #561599] Tue, 24 July 2012 02:52 Go to previous messageGo to next message
bg1984
Messages: 21
Registered: July 2012
Junior Member
C:\Users\Administrator>oradim -new -sid oral -intpwd oral -startmode M

OPW-00005: File with same name exists - please delete or rename
Instance created.

C:\Users\Administrator>set oracle_sid=oral

C:\Users\Administrator>set db_name=oral

C:\Users\Administrator>sqlplus

SQL*Plus: Release 10.2.0.4.0 - Production on Tue Jul 24 13:20:11 2012

Copyright (c) 1982, 2007, Oracle. All Rights Reserved.

Enter user-name: sys as sysdba
Enter password:
Connected to an idle instance.
SQL> startup;
ORACLE instance started.

Total System Global Area 1258291200 bytes
Fixed Size 2065408 bytes
Variable Size 318770176 bytes
Database Buffers 922746880 bytes
Redo Buffers 14708736 bytes
ORA-00205: error in identifying control file, check alert log for more info


SQL> @D:\test.sql

Control file created.

ALTER DATABASE OPEN RESETLOGS
*
ERROR at line 1:
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: 'F:\ORACLE\PRODUCT\10.2.0\ORADATA\ORAL\SYSTEM01.DBF'
Re: Cloning database [message #561601 is a reply to message #561600] Tue, 24 July 2012 02:55 Go to previous messageGo to next message
bg1984
Messages: 21
Registered: July 2012
Junior Member
SQL> select status from v$instance;

STATUS
------------
MOUNTED

SQL> select name from v$database;

NAME
---------
ORAL

SQL> startup force;
ORACLE instance started.

Total System Global Area 1258291200 bytes
Fixed Size 2065408 bytes
Variable Size 318770176 bytes
Database Buffers 922746880 bytes
Redo Buffers 14708736 bytes
Database mounted.
ORA-01589: must use RESETLOGS or NORESETLOGS option for database open
Re: Cloning database [message #561603 is a reply to message #561601] Tue, 24 July 2012 02:58 Go to previous messageGo to next message
bg1984
Messages: 21
Registered: July 2012
Junior Member
SQL> alter database open resetlogs;
alter database open resetlogs
*
ERROR at line 1:
ORA-01194: file 1 needs more recovery to be consistent
ORA-01110: data file 1: 'F:\ORACLE\PRODUCT\10.2.0\ORADATA\ORAL\SYSTEM01.DBF'
Re: Cloning database [message #561605 is a reply to message #561603] Tue, 24 July 2012 03:09 Go to previous messageGo to next message
Michel Cadot
Messages: 68728
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
First fix what I said.
Then reexecute with "set echo on" in your script so we can see the commands.

Was the original database opened when you copied the files?
If not, was it shut donw cleanly?

Regards
Michel
Re: Cloning database [message #561606 is a reply to message #561605] Tue, 24 July 2012 03:13 Go to previous messageGo to next message
bg1984
Messages: 21
Registered: July 2012
Junior Member
Sure, let me do that first. And yes Michel, I think the database was open when I copied the files.
Re: Cloning database [message #561607 is a reply to message #561606] Tue, 24 July 2012 03:28 Go to previous messageGo to next message
trantuananh24hg
Messages: 744
Registered: January 2007
Location: Ha Noi, Viet Nam
Senior Member
bg1984 wrote on Tue, 24 July 2012 15:13
Sure, let me do that first. And yes Michel, I think the database was open when I copied the files.


When opening Database, you can backup datafile with User Managed Backup or RMAN.
Don't think, you must verify status of Database this time

SQL> select open_mode from v$database;


You should make a copy to clone database by RMAN, the strongest utility by Oracle to do.
Re: Cloning database [message #561609 is a reply to message #561606] Tue, 24 July 2012 03:46 Go to previous messageGo to next message
Michel Cadot
Messages: 68728
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator
bg1984 wrote on Tue, 24 July 2012 10:13
Sure, let me do that first. And yes Michel, I think the database was open when I copied the files.


So it is "normal" the database files were in an incoherent state.
You must either shut down the database when you copy its files, or put the database in BACKUP mode or use RMAN to copy the files.

Regards
Michel
Re: Cloning database [message #561610 is a reply to message #561609] Tue, 24 July 2012 04:09 Go to previous message
bg1984
Messages: 21
Registered: July 2012
Junior Member
Michel, thank you very much for your assistance. Thanks a lot.
Previous Topic: datapump error
Next Topic: difference between the flashback database and incomplete recover
Goto Forum:
  


Current Time: Tue Dec 17 20:00:46 CST 2024