Performs cluster operations such as configuring SAP ASE as
a secondary companion in a high availability system and moving a
companion server from one failover mode to another. sp_companion is
run from the secondary companion.
Syntax
sp_companion
[server_name
{, configure
[, {with_proxydb | NULL}]
[, srvlogin]
[, server_password]
[, cluster_login]
[, cluspassword]]
| drop
| suspend
| resume
| prepare_failback
| do_advisory}
{, all
| help
| group_attribute_name
| base_attribute_name}
Parameters
- server_name – is the name of the SAP ASE server on which you
are performing a cluster operation.
- configure – configures the server specified by server_name as
the primary companion in a failover configuration.
- drop – permanently drops a companion from failover configuration.
After the command has completed, the servers are in single-server
mode.
- suspend – temporarily removes the companions from a failover
configuration. After the command is completed, the companions are
in suspended mode.
- resume – reverses the suspend command
and resumes normal companion mode between the companions.
- prepare_failback – prepare the secondary companion to relinquish the
primary companion’s resources so it can failback.
- do_advisory – verifies that the secondary companion is compatible
for successfully performing the primary companion’s functions
during failover mode.
all – causes do_advisory the
investigate all the parameters.
help – displays information
and syntax about the do_advisory parameter.
group_attribute_name – is
the name of the group attribute upon which sp_companion reports
base_attribute_name – is
the name of the base attribute upon which you want sp_companion
do_advisory reports.
- with_proxydb – creates proxy databases on the secondary companion
for all database other than the system databases – and
all subsequent databases that are added – when this parameter
is included in the initial configuration of the companion servers.
By default, with_proxydb is disabled.
- srvlogin – is a user’s login to access the companion
server. By default, the value of srvlogin is “sa”.
- srvpassword – is the user’s password to access the companion
server. By default, the value of srvpassword is
null.
- cluster_login – is the user’s login to log into the cluster.
By default, the value of cluster_login is “sa”.
- cluspassword – is the user password you must provide to log into
the cluster. By default, the value of cluspassword is
null.
Examples
- Example 1 – Configures the SAP ASE MONEY1 as the primary companion:
sp_companion "MONEY1", configure
- Example 2 – Configures the SAP ASE MONEY1 as the primary companion
and creates proxy databases on the secondary companion:
sp_companion "MONEY1", configure, with_proxydb, "sa", "sapsswd"
- Example 3 – Drops the SAP ASE PERSONEL1 from the failover configuration. After
the command has completed, both the primary companion and the secondary
companion are in single-server mode:
sp_companion "PERSONEL1", "drop"
- Example 4 – Resumes normal companion mode for the companion server
(in this example, MONEY1):
sp_companion "MONEY1", "resume"
- Example 5 – Prepares the primary companion (in this example,
PERSONEL1) to change to normal companion mode and resume control
of the SAP ASE server that failed over:
sp_companion "PERSONEL1", "prepare_failback"
- Example 6 – Checks to make sure a cluster operation with the
PERSONEL1 companion is successful. Because do_advisory in
this example uses the all parameter, it checks
all the do_advisory attributes of PERSONEL1
to make sure that none of them prevent a successful cluster operation,
and that the secondary companion can successfully perform the primary
companion’s operations after failover is complete:
sp_companion "PERSONEL1", do_advisory, "all"
- Example 7 – Checks to make sure that none of the attributes for
the Component Integration Services (CIS) on the companion server
is compatible with the local server:
sp_companion "PERSONEL1", do_advisory, "CIS"
Usage
sp_companion performs cluster
operations such as configuring SAP ASE as a secondary companion
in a high availability system. sp_companion also
moves companion servers from one failover mode to another (for example,
from failover mode back to normal companion mode). sp_companion is
run from the secondary companion.
sp_companion is installed with
the installhasvss (insthasv on
Windows), not the installmaster script. installhasvss is
located in the scripts subdirectory in $SYBASE_ASE.
sp_companion automatically disables
SAP’s mirroring. You should use a third-party
mirroring software to protect your data from disk failures.
For complete information, see Using Failover in
A High Availability System. Before running the do_advisory command,
make sure to read the configuration chapter of this book as well
as the do_advisory chapter.
Permissions
You must be user with ha_role to
execute sp_companion. Permission checks
do not differ based on the granular permissions settings
Auditing
Values in event and extrainfo columns
from the sysaudits table are:
Information | Values |
---|
Event | |
Audit option | |
Command or access audited | |
Information in extrainfo |
-
Roles – Current active roles
-
Keywords or options – NULL
-
Previous value – NULL
-
Current value – NULL
-
Other information – All input parameters
-
Proxy information – Original login name, if set
proxy in effect
|