Sunday, March 16, 2008

Cloning 11i with 10g database (you may need a patch)

I faced the following error while configuring database when cloning apps 11i with 10g database and it happens directly after entering the path of the third data_top (by the way the script will always assume you have 4 data_tops even if you have more/less data_tops)

StackTrace:
java.lang.NullPointerException
at oracle.apps.ad.context.CloneContext.createContextFileForDbhomes(CloneContext.java:2816)
at oracle.apps.ad.context.CloneContext.getInputFromUsers(CloneContext.java:1485)
at oracle.apps.ad.context.CloneContext.doClone(CloneContext.java:627)
at oracle.apps.ad.context.CloneContext.main(CloneContext.java:6085)

On metalink there was the solution on Note:427981.1 Subject:RC-50004 When Specifying DATA_TOPS While Cloning a 10.2 Database
And the solution is to apply a patch with a version of CloneContext.java above 115.203. the following are possibilities patches

Patch 5473292, Patch 5732291, Patch 5604818, Patch 5456078, Patch 5474116

Well I did not do that because this means that I have to apply the patch and recopy the database, which take time.
So I recreate the database manually using control file. And when try to open the database I issued
SQL>alter database open resetlogs;
It failed with the following
alter database open resetlogs
*
ERROR at line 1:
ORA-01113: file 1 needs media recovery
ORA-01110: data file 1: '/ora_dev/data/system01.dbf'
Even though the database was completely down when I copied it I faced this error the good thing is 2 days ago I was reading bas post http://basklaassen.blogspot.com/2008/01/recover-database.html
I followed the steps for recovery and provided the path to my online log files and the recovery completed successfully.
Next down time for the production database for sure I will apply one of the patches above.

Hope that helped
Fadi

2 comments:

Arnoud Roth said...

Hi,
Interesting stuff, Fadi!
One question: what will you do when your clone DB is on another server? You can't refer to remote files, can you?
Issuing "alter system archive log all" will archive the online logs, and you can copy them to your target system and apply them for recovery??? Would be nice to try. If this works it would be a good idea to issue this command before starting the copy of the database...

Regards,
Arnoud Roth
AMIS Services BV

PS
Bas Klaassen is an excellent DBA, I personally know him, he was a colleague of mine.

Arnoud Roth said...

Fadi,
I am sorry, I misread your and Bas's post. Just point to the online logs of the cloned database. Not the original. I was wondering how that could have been possible with a renamed database...
Anyway, things are a bit clearer now.
Regards,
Arnoud Roth