Performs cluster operations such as configuring Adaptive Server 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.
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}
is the name of the Adaptive Server on which you are performing a cluster operation.
configures the server specified by server_name as the primary companion in a failover configuration.
permanently drops a companion from failover configuration. After the command has completed, the servers are in single-server mode.
temporarily removes the companions from a failover configuration. After the command is completed, the companions are in suspended mode.
reverses the suspend command and resumes normal companion mode between the companions.
prepare the secondary companion to relinquish the primary companion’s resources so it can failback.
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.
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.
is a user’s login to access the companion server. By default, the value of srvlogin is “sa”.
is the user’s password to access the companion server. By default, the value of srvpassword is null.
is the user’s login to log into the cluster. By default, the value of cluster_login is “sa”.
is the user password you must provide to log into the cluster. By default, the value of cluspassword is null.
Configures the Adaptive Server MONEY1 as the primary companion:
sp_companion "MONEY1", configure
Configures the Adaptive Server MONEY1 as the primary companion and creates proxy databases on the secondary companion:
sp_companion "MONEY1", configure, with_proxydb, "sa", "sapsswd"
Drops the Adaptive Server PERSONEL1 from the failover configuration. After the command has completed, both the primary companion and the secondary companion will be in single-server mode:
sp_companion "PERSONEL1", "drop"
Resumes normal companion mode for the companion server (in this example, MONEY1):
sp_companion "MONEY1", "resume"
Prepares the primary companion (in this example, PERSONEL1) to change to normal companion mode and resume control of the Adaptive Server that failed over:
sp_companion "PERSONEL1", "prepare_failback"
Checks to make sure a cluster operation with the PERSONEL1 companion will be 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 will 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"
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"
sp_companion performs cluster operations such as configuring Adaptive Server 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 NT), not the installmaster script. installhasvss is located in the scripts subdirectory in $SYBASE_ASE.
sp_companion automatically disables Sybase’s mirroring. Sybase recommends that you use a third-party mirroring software to protect your data from disk failures.
For complete information, see Using Sybase 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.
You must be user with ha_role to execute sp_companion. Permission checks do not differ based on the granular permissions settings
Values in event and extrainfo columns from the sysaudits table are:
Event |
Audit option |
Command or access audited |
Information in extrainfo |
---|---|---|---|
38 |
exec_procedure |
Execution of a procedure |
|