OPATCH FAQ Copyright (c) Oracle Corporation 2007 General Questions: Q1. What are some of the new options in OPatch? '-property_file' is a new option available for 'opatch apply' and 'opatch rollback' operations. This option can be used to provide the user defined property file, giving details like the path to system commands like 'fuser', 'cp', etc... Q2. What does: " Exception in thread "main" java.lang.UnsatisfiedLinkError: no oraInstaller in java.library.path" mean? This is a unix specific issue. The most frequent reason for this is the liboraInstaller shared object file cannot be located at run time. The extension is ".so" for most systems, ".sl" for most other systems. It means LD_LIBRARY_PATH (or SHLIB_PATH, LIBPATH, DYLD_LIBRARY_PATH or it's equivalent) doesn't include a path to liboraInstaller file. The file is located under the "oui" hierarchy (normally under oui/bin/, like oui/bin/solaris). The "oui" directory should be in the same directory as the oraInventory directory that is pointed to by the oraInst.loc file. Q3. Where does OPatch officially reside? Currently, OPatch resides in $ORACLE_HOME/OPatch. Some people prefer to keep a central copy. Some download it each time given it's small size. Q4. When applying a patch I got the following error: "sh: ar: not found" This means that the patch involves archiving a file, and OPatch can not find the executable "ar" in your PATH. Reset your PATH and try OPatch again. Q5. Where can I find info. about patch 123 that I applied last year? If the patch is not rolled back, then look at the files in $ORACLE_HOME/inventory/oneoffs/. It has info. about the patch such as bugs fixed and bugs descr. You can also use 'opatch lsinventory -detail' to see which files had been modified by the patch. A copy of original patch will be kept in $ORACLE_HOME/.patch_storage//original_patch Whether the patch is rolled back or not, you can get the information from here also. Q6. I just want to run 'opatch version' and 'opatch help', but OPatch keeps prompting for ORACLE_HOME as follow: "Please enter the location for ORACLE_HOME" If you just want to get opatch version and help text, you can set ORACLE_HOME to any directory containing jdk in it. For example, If /tmp has jdk in it i.e /tmp/jdk exists, then "setenv ORACLE_HOME /tmp" would be good. Q7. How can I minimize the downtime when applying a patch to my RAC? The short answer is to use the "-minimize_downtime" flag to the "apply" command and follow the prompts. Q8. How does the "-minimize_downtime" flag work? The local node is always patched first. This is used as a base to patch the other nodes. The user is prompted for the list of nodes to patch first out of the remaining nodes. For each node in this first list the user is asked to stop the instance and then the patch is propagated to that node before continuing to the next node. When the initial group of nodes has been patched the user is asked to bring down the remaining nodes. When this is done the patch is propagated to this last group and the inventory is updated. Q9. What is the difference between "rolling RAC" and "minimum downtime"? With a normal patch the system resources being used need to be released. This means stopping the instance of the database. When using the minimum downtime argument it reduces the time the data base is inaccessable. This can be specified on the command line. In rolling RAC the instantance on one node is inactive. This is for the node to be patched. It can then be activated again. This means there a mixture of patched and unpatched nodes operating together. A patch is issued by Oracle as being rolling RAC installable. There is no command line argument for this feature. Q10. What is a rolling RAC patch and how do I enable it? Rolling RAC patching allows the interoperation of a patched node and an unpatched node simultaneously. This means only one node is out of commission while it is patched. This cannot be enabled from the command line. Oracle supplies a patch that is recognized as being suitable for rolling RAC. To test if a patch is a rolling patch, you can use 'opatch query -all' Q11. What is the basic actions that happen when applying a rolling RAC patch? The user is prompted to stop the instances on the node to be patched. First the local node is patched and its inventory is updated, then the user is asked for the next node to patch from a list. As each node is patched the user is prompted when it is safe to restart the patched node. The cycle of prompt for a node, stop the instances on the node, patch the node and restarting the instances continues until stopped by the user or all nodes are patched. Q12. Is it possible to stop applying a patch after applying it to a few nodes and what are the issues? Yes, it is possible to interrupt the process. There is a prompt that allows the user to stop applying the patch. However, since only some of the node are patched, if the user wants to apply the patch to other nodes as well, then he has to start the operation from an un-patched node and use -remote_nodes option to specify the nodes to which the patch has to be propogated. If you want to rollback the patch, then use -remote_nodes option to specify the nodes on which the patch has to be rollbacked. Q13. Is there a limit to partially applying a patch and then rolling it back and what are the issues? There is a limit. The locking mechanism only allows you to partially apply a patch and then user has to run the restore.sh script to manually restore the system. User will not be able to re-apply the patch before restoring the system. Q14. Can rollback be interrupted? Yes, rolling back a patch can be stopped after any node in the same way applying a patch can be stopped. However the system has to be restored using restore.sh back before applying another patch or reapplying the same patch. Q15. When I apply a patch I get an error that reads "Failed to load the patch object. Possible causes are: The specified path is not an interim patchshiphome. Meta-data files are missing from the patch area ". What do I do? This simply means the directory OPatch is using to find the patch doesn't match the template it is checking for. For more information on this error, refer to section "Not a valid patch area" on page 8-30 of OPatch User Guide. Q16. When I apply a patch I get an error that reads "Syntax error.....Patch location not valid". What do I do? This simply means that the patch location that you specified is an invalid one. Give the correct patch location and apply the patch again. The patch should have the following directory structure. | | -- etc | | | - config | | | - xml | | -- files | | -- custom | - scripts a. A directory /etc that has the files that drive OPatch b. A directory /files that has patches for the files c. An optional directory /custom that contain the pre/post scripts. Q17. When I apply a patch I get an error that reads "Exception in thread "main" java.lang.NoClassDefFoundError: ". What do I do? This may be due to OPatch not able to find the particular class listed in the error, which is supposed to be located inside $ORACLE_HOME/OPatch/jlib/opatch.jar file. Check if you have the particular class file there. To check this, execute the following command; the missing class file will be printed out: cd $ORACLE_HOME/OPatch/jlib jar tf opatch.jar .class It is recommended that you contact Oracle support when you encounter this error. Another reason might be having done a file transfer of OPatch in a non-binary mode. Q18. When I apply a patch, I get an error that reads "OPatch cannot find the required command ar from Property file and your PATH". What do I do? ar is a command used by OPatch. This message may appear if OPatch is not able to locate this command. For more details and workaround for this problem, refer to section "OPatch cannot find system commands like fuser, make" on page 8-31 of OPatch User Guide. Q19. When I apply a patch, I get an error that reads "OPatch cannot find the required command fuser from Property file and your PATH". What do I do? fuser is a command used by OPatch. This message may appear if OPatch is not able to locate this command. For more details and workaround for this problem, refer to section "OPatch cannot find system commands like fuser, make" on page 8-31 of OPatch User Guide. Q20. Can I run patching in scripted mode? Yes, it is possible by using the command opatch