This should have been the easiest task on my todo list: Install Oracle 10.2.0.3 EE standalone on a new Linux RHEL 5 server, later to be used as a standby for a production RAC system. This means 2 lines of “runinstall -silent …”, less than 5 minutes of DBA work and maybe 20 minutes of waiting. I did not expect to spend over 5 hours doing this.
Problems started when I discovered that I don’t have the 10.2.0.3 patchset and another patch that exists on production and should be installed on the standby. I had to wait for my Metalink credentials to be approved for this customer CSI before I could download the patches for them.
“Why don’t you just clone the software from production?” asked a helpful colleague.
Sounds like a great suggestion. I cloned Oracle software before and it is a simple process: tar $ORACLE_HOME, copy the tar file to the new server, untar, run the cloning script which will register the new home with the inventory, and you are done!
In theory, at least.
Here is what actually happened:
- Tar, copy, untar, script
- Ran OPatch to verify that the new oracle home is in the inventory and that I see the correct version and patches.
- OPatch is showing two nodes. Oops. I didn’t realize oracle home has information about the cluster – didn’t Oracle move the inventory elsewhere? Spend an hour looking for the cause of this.
- Found that the two nodes are mentioned in $ORACLE_HOME/inventory/ContentsXML/oraclehomeproperties.xml
- Removed this file.
- Deattached Oracle Home to clean inventory without deleting the software.
- Ran the clone script again
- Yay! OPatch looks good now.
- Decided to create test database to be extra sure everything is fine
- NETCA failed with linking error. Spent an hour figuring out why. Cursed a bit.
- Had to install libc-devel, 32 bit version. Too bad RDA didn’t catch this.
- Created test database, but SQLPLUS now fails with linking error. More cursing. Wondered what I did to deserve this.
- libaio.so.1 was missing so I had to install the 64 bit version of libaio. Too bad RDA was silent about this as well.
- Couldn’t start the database because the database couldn’t find the cluster. Why was it even looking for a cluster? Spent an hour figuring out why. Ah, because I copied the software from a RAC server and it was linked as RAC database.
- Relinked everything with RAC_OFF option.
- Finally things are working. Too bad it is 8pm already.
What I should have done: (I’m not sure if it is supported by Oracle, but at least it works)
- Double check that we have all RPMs.
- Tar, copy, untar
- remove $ORACLE_HOME/inventory/ContentsXML/oraclehomeproperties.xml
- run clone.pl: clone/bin/clone.pl ORACLE_HOME=/appl/oracle/product/10.2.0/db_1 ORACLE_HOME_NAME=OraDb10g_home1
- Relink as non-RAC: make -f ins_rdbms.mk rac_off
- Verify with OPatch.
- Create test DB:
netca /silent /responsefile ~/netca.rsp
dbca -silent -createDatabase -templateName General_Purpose.dbc -gdbName TST -sid TST -SysPassword xxx -SystemPassword xxxx -emConfiguration NONE -datafileDestination /appl/oracle/oradata -storageType FS -characterSet WE8ISO8859P1 -nationalcharacterSet AL16UTF16 -memoryPercentage 40
- Go for a nice afternoon ride.
I hope that I’m not the only DBA who always have to find the most difficult way to accomplish a task, and that this post will be useful to others. Perhaps the best piece of advice I can offer is to avoid this type of cloning in the first place.
5 Responses to “Cloning Oracle Home from RAC to Stand-Alone”
Leave a Reply