SAPDatabase OCF script(Red Hat Cluster Suite) typo prevents it from working in Red Hat Enterpise Linux5

Solution Verified - Updated -

Issue

  • Two node cluster set-up with SAP as resource in it. The script located at /usr/share/cluster/SAPDatabase fails to translate the Database Instance name to the second part of Oracle User ID.
  • The script attempts to convert database to lowercase and append it to ora. It is missing required escape characters in the "tr" command.

    # diff SAPDatabase.fixed SAPDatabase.vendor
    191c191
    <   orasid="ora`echo $SID | tr [\:upper:\] [:lower:]`"
    ---
    >   orasid="ora`echo $SID | tr [:upper:] [:lower:]`"
    209c209
    <   orasid="ora`echo $SID | tr [\:upper:\] [:lower:]`"
    ---
    >   orasid="ora`echo $SID | tr [:upper:] [:lower:]`"
    233c233
    <   orasid="ora`echo $SID | tr [\:upper:\] [:lower:]`"
    ---
    >   orasid="ora`echo $SID | tr [:upper:] [:lower:]`"
    492c492
    <   db2sid="db2`echo $SID | tr [\:upper:\] [:lower:]`"
    ---
    >   db2sid="db2`echo $SID | tr [:upper:] [:lower:]`"
    651d650
    <   echo "monitoring start" >> /tmp/SAPDB.mon
    743c742
    <          SUSER="ora`echo $SID | tr [\:upper:\] [:lower:]`"
    ---
    >          SUSER="ora`echo $SID | tr [:upper:] [:lower:]`"
    747c746
    <          SUSER="db2`echo $SID | tr [\:upper:\] [:lower:]`"
    ---
    >          SUSER="db2`echo $SID | tr [:upper:] [:lower:]`"
    983c982
    < sidadm="`echo $SID | tr [\:upper:\] [:lower:]`adm"
    ---
    > sidadm="`echo $SID | tr [:upper:] [:lower:]`adm"
    

Environment

  • Red Hat Enterprise Linux 5.6
  • cman-2.0.115-68.el5_6.1.x86_64
  • rgmanager-2.0.52-9.el5.x86_64

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In