In this short blog post, I will demonstrate an issue with the current version 220.127.116.11.4 of the famous ORAchk tool running on SuSE Linux Enterprise Server 12.
Redesign of ORAchk
With the release 18.104.22.168.4, Oracle has rewritten ORAchk completely in Python with the focus of performance improvements and extensibility. Python is shipped with ORAchk which leads to a much bigger download size – increased from 18 MB to 257 MB – of the orachk.zip. But for Windows user this change has the effect, that ORAchk can be executed without an existing installation of Cygwin.
For a complete history of the changes and bug fixes of each ORAchk version, you can download the Version History from My Oracle Support.
After unzipping the orachk.zip, every execution leads to the following errors.
$> ./orachk ./orachk: line 145: [: -eq: unary operator expected ./orachk: line 147: [: -eq: unary operator expected ./orachk: line 149: [: -eq: unary operator expected RC-001- Unable to read driver files. Please refer this error code in troubleshooting section in the orachk User Guide RC-001- Unable to read driver files. Please refer this error code in troubleshooting section in the orachk User Guide
The User Guide decribes the RC-001 error, but the mentioned solutions do not work in this case.
Oracle already opened the currently unpublished Bug 27364179 – UNABLE TO EXECUTE ORACHK ON SUSE 12 for this issue. The bug should be fixed with the next version.
Why is this happening at all? Because of a wrong check of the operating system version. ORAchk uses the /etc/SuSE-release file to get the version.
os_version=`grep -v ^# /etc/SuSE-release|grep release|tr "[A-Z]" "[a-z]"|sed 's/[a-z]//g'|cut -d. -f1|cut -d'(' -f1|sed 's/ //g'|head -1`
The Perl snippet tries to grep the file for the word “release”, but this word does not exists.
$> cat /etc/SuSE-release SUSE Linux Enterprise Server 12 (x86_64) VERSION = 12 PATCHLEVEL = 3
To fix this issue, we have to do the following three things.
- Add the word “release” to the version string in /etc/SuSE-release file with root
$> vi /etc/SuSE-release SUSE Linux Enterprise Server release 12 (x86_64) ...
- Create an etc directory in your unzipped ORAchk directory and copy the SuSE-release file
$> mkdir etc $> cp /etc/SuSE-release etc/
- Correct a wrong filename
$> cp .cgrep/lcgreps11 .cgrep/lgreps11