This solution delves on the role of the file defaults.yaml located in /proddir/data directory (where proddir refers to product directory) in setting environment variables unique to a Shareplex instance. These variables are SP_SYS_VARDIR, ORACLE_HOME and ORACLE_SID. Knowing how Shareplex uses this file can help avert any issues downstream if the environment is not set appropriately for these variables.
If not specifying the environment for certain variables, they are picked up from a file.
Starting with Shareplex 6.0 and up, there is a material change in the the structure of product directory (proddir) and variable directory (vardir). Some of the changes have to do with the fact that the Shareplex installation process now has the flexibility to be installed as root or non-root. Another design change is the encapsulation that is now the norm in Shareplex. During installation and subsequent startup of Shareplex, the environment variables are set at a minimum for SP_SYS_VARDIR, SP_COP_TPORT, SP_COP_UPORT, ORACLE_HOME and ORACLE_SID, among others. If environment variables SP_SYS_VARDIR, ORACLE_HOME and ORACLE_SID are not set, then Shareplex will refer to the file defaults.yaml during startup and inherit the values for these variables from that file. This file is first created when Shareplex is installed or upgraded.
It is OK to have shareplex use the values in defaults.yaml instead of environment variables if so desired and if the user is aware of this setup. However, it is recommened to explicitly set SP_SYS_VARDIR, ORACLE_HOME and ORACLE_SID environment variables instead. This makes these setting more visible.
If the same proddir is used for multiple Shareplex instances, then this file serves no purpose since it can only hold one set of values and cannot be applied to multiple vardirs. This situation also warrants the use of explicit environment variables for a particular Shareplex instance rather than depending on the file defaults.yaml to accomplish this.
In brief, it is recommended to set one's own environment for Shareplex rather than depend on default values in defaults.yaml.
The following output shows the content of an actual defaults.yaml file from a Shareplex proddir/data directory:
serverA# pwd
/u01/shareplex/prod/data
serverA# cat defaults.yaml
---
SP_GROUP_ADMIN: spadmin
ORACLE_SID: quest10g
SP_SYS_VARDIR: /u01/shareplex/var
ORACLE_HOME: /u00/oracle/product/10g
product:
build: 10
oracle_version_id: "100"
release: 6.1.1
Shareplex users are divided into three groups, Administrator, Operator and Viewer. A Shareplex Administrator can issue all Shareplex commands. By default a group named spadmin is created and one user who installed Shareplex is made a user within that group. It is quite possible for the user who installed Shareplex to create a group with a name other than spadmin. The environment variable SP_GROUP_ADMIN points to the group to which the Administrator belongs.