Tuesday, December 31, 2019

Configuring an Oracle Service Group in Veritas InfoScale for High Availability

Overall there are below steps to configure an Oracle single instance database and local listener under VCS control. The Oracle binaries, database, and networking is considered to be pre-installed and configured. 
  • A: Verifying the Oracle configuration
  • B: Preparing storage and network resources for the Oracle service group
  • C: Testing the Oracle database manually
  • D: Configuring Oracle under VCS control
  • E: Running a virtual fire drill and switching the Oracle service group
  • F: (Optional) Oracle monitoring
Here we will do only D i.e., to configure oracle under VCS control.
Login to sys1 as root.
  1. Add a resource of type Netlsnr named oralisten to the orasg service group.
    Note: You must be the root user.
    hares -add oralisten Netlsnr orasg
    VCS NOTICE V-16-1-10242 Resource added. Enabled attribute must be set before agent monitors
  2. Modify the Critical, Owner, Home and TnsAdmin resource attributes for the oralisten resource using the following information.
    • Set Critical to 0 (zero).
    • Set Owner to oracle.
    • Set Home to /u01/app/oracle/product/12.1.0/dbhome_1.
    • Set TnsAdmin to /u01/app/oracle/product/12.1.0/dbhome_1/network/admin.
      hares -modify oralisten Critical 0
      hares -modify oralisten Owner oracle
      hares -modify oralisten Home /u01/app/oracle/product/12.1.0/dbhome_1
      hares -modify oralisten TnsAdmin /u01/app/oracle/product/12.1.0/dbhome_1/network/admin
  3. Display the resource attribute values for the oralisten resource to confirm your input.
    hares -display oralisten | more
    #Resource Attribute System Value
    oralisten Group global orasg
    oralisten Type global Netlsnr
    oralisten AutoStart global 1
    oralisten Critical global 0
    oralisten Enabled global 0

    oralisten Home global /u01/app/oracle/product/12.1.0/dbhome_1
    oralisten Listener global LISTENER

    oralisten Owner global oracle

    oralisten TnsAdmin global /u01/app/oracle/product/12.1.0/dbhome_1/network/admin …
  4. Enable the oralisten resource. Bring the oralisten resource online on sys1 and wait for it to come online. Display the state of the oralisten resource and use the ps -ef | grep tnslsnr command to confirm the resource is online.
    hares -modify oralisten Enabled 1
    hares -value oralisten Enabled
    1
    hares -online oralisten -sys sys1
    hares -state oralisten
    #Resource Attribute System Value
    oralisten State sys1 ONLINE
    oralisten State sys2 OFFLINE
    ps -ef | grep tnslsnr
    oracle 21572 1 0 08:24 ? 00:00:00 /u01/app/oracle/product/12.1.0/dbhome_1/bin/tnslsnr LISTENER -inherit
    root 22051 2198 0 08:24 pts/0 00:00:00 grep tnslsnr
  5. Save the VCS configuration, but do not close it.
    haconf -dump
  6. Add a CDB resource of type Oracle named oracdb1 to the orasg service group.
    hares -add oracdb1 Oracle orasg
    VCS NOTICE V-16-1-10242 Resource added. Enabled attribute must be set before agent monitors
  7. Modify the Critical, Sid, Owner and Home resource attributes for the oracdb1 resource using the following information.
    Set Critical to 0 (zero).
    Set Sid to paycdb1.
    Set Owner to oracle.
    Set Home to /u01/app/oracle/product/12.1.0/dbhome_1.
    Set StartUpOpt to STARTUP
    hares -modify oracdb1 Critical 0
    hares -modify oracdb1 Sid paycdb1
    hares -modify oracdb1 Owner oracle
    hares -modify oracdb1 Home /u01/app/oracle/product/12.1.0/dbhome_1
    hares -modify oracdb1 StartUpOpt STARTUP
  8. Add a PDB resource of type Oracle named orapdb1 to the orasg service group.
    hares -add orapdb1 Oracle orasg
    VCS NOTICE V-16-1-10242 Resource added. Enabled attribute must be set before agent monitors
  9. Modify the Critical, Sid, Owner and Home resource attributes for the orapdb1 resource using the following information.
    • Set Critical to 0 (zero).
    • Set Sid to paycdb1.
    • Set Owner to oracle.
    • Set Home to /u01/app/oracle/product/12.1.0/dbhome_1.
    • Set PDBName to paypdb1
      hares -modify orapdb1 Critical 0
      hares -modify orapdb1 Sid paycdb1
      hares -modify orapdb1 Owner oracle
      hares -modify orapdb1 Home /u01/app/oracle/product/12.1.0/dbhome_1
      hares -modify orapdb1 PDBName paypdb1
  10. Display the resource attribute values for the oracdb1 resource to confirm your input.
    hares -display oracdb1 | more
    #Resource Attribute System Value
    oracdb1 Group global orasg
    oracdb1 Type global Oracle
    oracdb1 AutoStart global 1
    oracdb1 Critical global 0
    oracdb1 Enabled global 0

    oracdb1 Home global /u01/app/oracle/product/12.1.0/dbhome_1

    oracdb1 Owner global oracle

    oracdb1 ShutDownOpt global IMMEDIATE
    oracdb1 Sid global paycdb1
    oracdb1 StartUpOpt global STARTUP
  11. Display the resource attribute values for the orapdb1 resource to confirm your input.
    hares -display orapdb1 | more
    #Resource Attribute System Value
    orapdb1 Group global orasg
    orapdb1 Type global Oracle
    orapdb1 AutoStart global 1
    orapdb1 Critical global 0
    orapdb1 Enabled global 0

    orapdb1 Home global /u01/app/oracle/product/12.1.0/dbhome_1

    orapdb1 Owner global oracle
    orapdb1 PDBName global paypdb1

    orapdb1 ShutDownOpt global IMMEDIATE
    orapdb1 Sid global paycdb1
    orapdb1 StartUpOpt global STARTUP_FORCE
  12. Enable the oracdb1 and orapdb1 resource. Bring the oracdb1 resource online on sys1 and wait for it to come online. Display the state of the oracdb1 resource and use the ps -ef | grep oracle command to confirm the resource is online.
    hares -modify oracdb1 Enabled 1
    hares -value oracdb1 Enabled
    1
    hares -modify orapdb1 Enabled 1
    hares -value orapdb1 Enabled
    1
    hares -online oracdb1 -sys sys1
    hares -state oracdb1
    #Resource Attribute System Value
    oracdb1 State sys1 ONLINE
    oracdb1 State sys2 OFFLINE
    ps -ef | grep oracle
    root 15755 15727 0 07:32 pts/1 00:00:00 su - oracle
    oracle 15756 15755 0 07:32 pts/1 00:00:00 -bash
    oracle 21572 1 0 08:24 ? 00:00:00 /u01/app/oracle/product/12.1.0/dbhome_1/bin/tnslsnr LISTENER -inherit
    oracle 22643 1 0 08:29 ? 00:00:00 ora_pmon_paycdb1
    ……
    oracle 22952 1 0 08:29 ? 00:00:00 ora_j010_paycdb1
    oracle 22954 1 0 08:29 ? 00:00:00 ora_j011_paycdb1
    oracle 22956 1 0 08:29 ? 00:00:00 ora_j012_paycdb1
    oracle 22958 1 0 08:29 ? 00:00:00 ora_j013_paycdb1
    oracle 22968 1 0 08:29 ? 00:00:00 ora_j014_paycdb1
    root 22982 2198 0 08:30 pts/0 00:00:00 grep --color=auto oracle
  13. Bring the orapdb1 resource online on sys1 and wait for it to come online. Display the state of the orapdb1 resource and use the ps -ef | grep oracle command to confirm the resource is online.
    hares -online orapdb1 -sys sys1
    hares -state orapdb1
    #Resource Attribute System Value
    orapdb1 State sys1 ONLINE
    orapdb1 State sys2 OFFLINE
  14. Save the VCS configuration, but do not close it.
    haconf -dump
  15. Use the hares command to set the following resource dependencies.
    • oralisten requires oraip
    • oralisten requires oracdb1
    • orapdb1 requires oracdb1
    • oracdb1 requires oraredomnt
    • oracdb1 requires oraarchivemnt
    • oracdb1 requires oraredomnt
      hares -link oralisten oraip
      hares -link oralisten oracdb1
      hares -link orapdb1 oracdb1
      hares -link oracdb1 oradatamnt
      hares -link oracdb1 oraarchivemnt
      hares -link oracdb1 oraredomnt
      hares -dep | grep orasg
      orasg oraarchivemnt oraarchivevol
      orasg oraarchivevol oradg
      orasg oracdb1 oraredomnt
      orasg oracdb1 oraarchivemnt
      orasg oracdb1 oradatamnt
      orasg oradatamnt oradatavol
      orasg oradatavol oradg
      orasg oraip oranic
      orasg oralisten oracdb1
      orasg oralisten oraip
      orasg orapdb1 oracdb1
      orasg oraredomnt oraredovol
      orasg oraredovol oradg
  16. Save the VCS configuration, but do not close it.
    haconf -dump
  17. Display the orasg service group resources that are set to non-critical.
    hares -list Critical=0 Group=orasg
    oracdb1 sys1
    oracdb1 sys2
    oralisten sys1
    oralisten sys2
    orapdb1 sys1
    orapdb1 sys2
  18. Use the hares command to set the identified resources to critical.
    hares -modify oralisten Critical 1
    hares -modify oracdb1 Critical 1
    hares -modify orapdb1 Critical 1
  19. Confirm that all orasg service group resources are now set to critical.
    hares -list Critical=1 Group=orasg
    oraarchivemnt sys1
    oraarchivemnt sys2
    oraarchivevol sys1
    oraarchivevol sys2
    oracdb1 sys1
    oracdb1 sys2
    oradatamnt sys1
    oradatamnt sys2
    oradatavol sys1
    oradatavol sys2
    oradg sys1
    oradg sys2
    oraip sys1
    oraip sys2
    oralisten sys1
    oralisten sys2
    oranic sys1
    oranic sys2
    orapdb1 sys1
    orapdb1 sys2
    oraredomnt sys1
    oraredomnt sys2
    oraredovol sys1
    oraredovol sys2
    Note: IMF is supported only in traditional and container database.
  20. Override the IMF attribute for the PDB resource orapdb1:
    hares -override orapdb1 IMF
  21. Verify if the IMF attribute is overridden using the following command:
    hares -value orapdb1 IMF
    Mode 3 MonitorFreq 5 RegisterRetryLimit 3
  22. Modify the Mode value to 0:
    hares -modify orapdb1 IMF -update Mode 0
  23. Verify the Mode value using the following command:
    hares -value orapdb1 IMF
    Mode 0 MonitorFreq 5 RegisterRetryLimit 3
  24. Save and close the VCS configuration.
    haconf -dump -makero