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 Comments. Leave new
I have long been against this kind of cloning, for the simple reason that I don’t trust every node to be configured exactly the same. Adding in a big difference like rac to standalone isn’t going to help matters. There is value in being supported, even if businesses can’t evaluate it correctly. If the word “production” is involved, mulish is a virtue, don’t take shortcuts, creativity is a negative.
Can’t say as I trust RDA to think for me either. It’s a good tool for what it does.
It’s all like going down stairs without looking where you are stepping, just because the stairs seem standardized everywhere you’ve been. That last one can be a doozy, even if you’ve re-tied your shoes.
Joel,
I’m not sure what you mean – Cloning is fully supported and documented. Turning RAC into stand alone is fully supported and documented. Installing important packages after their lack was discovered is certainly not recommended, but is never a big issue.
What is the problem, then?
Chen, why do you use RDA for pre-requisites check? I see it second time and I was sure that using RDA for that is not what installation guide says. On the other hand, it’s been a while I put my nose inside install guide. :)
Alex,
The documentation says to install a bunch of RPMs, create users, modify kernel parameters, etc.
3 ways to do it:
1) Manually
2) Write a script to automate the issue
3) RDA -T hcve (which should do all the checks according to Metalink)
Option #3 seemed the easiest.
Of course if a certain development team will add prerequisite checks to a certain monitoring tool – I’ll use that instead :)
The ‘oracle-validated’ package can very well be used to validate node properties.
The primary function is an easy way to prepare a linux system, but it has exactly what you were looking for: checks!