dbcc Options for High Availability Systems

Sybase Failover includes dbcc ha_admin, which addresses second point of failures. Second point of failures a situations in which a cluster operation fails because of problems with the high availability subsystem. For example, if you issue sp_companion ‘prepare_failback’ and the secondary companion crashes. dbcc ha_admin provides a method of backing out of the cluster operation. After dbcc ha_admin is complete, you can re-issue the cluster operation.

Notedbcc ha_admin should only by a System Administrator who is familiar with the high availability subsystem. Issuing this command at the wrong time may only further trouble an already problematic situation.

Table B-4 includes information about the dbcc ha_admin options.

Table B-4: dbcc ha_admin options

Option Name

Function

Syntax and Comments

rollback_failback

Rolls back the effect of sp_companion... prepare_failback and returns the companion to the failover mode. This command works irrespective of the results of prepare_failback command.

dbcc ha_admin (" ", rollback_failback)

Where “ “ is a required empty placeholder

  • Can only be used in failback mode.

  • Any failback threads waiting for the resume command are killed with this command.

  • You may need to perform platform-specific steps to prepare you companions for rollback_failback option. See the configuration chapter for your platform for more information.

  • This command is only issued from the secondary companion.

rollback_failover

Rolls back the effects of failover from the primary companion, and returns it to normal companion mode. rollback_failover does not affect the secondary companion.

dbcc ha_admin (" ", rollback_failover)

Where “ “ is a required empty placeholder

  • This command can only be used in failover mode.

  • You may need to perform platform-specific steps to prepare you companions for rollback_failover option. See the configuration chapter for your platform for more information.

  • rollback_failover has no effect on the companion server that failed. The companion server that takes over the failed companion’s work load resumes normal companion mode.

  • This command is only issued from the secondary companion.

  • This command works even when failover marked the databases “suspect”

drop_failedoverdb

Only used in failover mode. drop_failoeverdb drops the failed-over databases that could not be dropped with the drop database command. This command also cleans up the master_companion of all the metadata relating to the dropped database

dbcc ha_admin (" ", drop_failedoverdb, database_name)

Where “ “ is a required empty placeholder, and database_name is the name of the database you are dropping.

  • Use as a last resort, when you must drop a database to complete the load of another database.

clusterlock

Acquires or releases cluster-wide locks during a cluster operation.

dbcc ha_admin (" ", clusterlock, [acquire | release])

For more information about cluster-wide locks and releasing them, see “Cluster Locks in a High Availability Node”.

state_machine

Moves the companion server to single-server mode.

dbcc ha_admin (' ', 'state_machine', 'halt')

Where “ “ is a required empty placeholder. For information about using this option, see “Re-Installing installmaster and installhasvss”.

session

Invokes clients that are sleeping because of a failed sp_companion...resume. Clients that are invoked disconnect from the secondary companion and connect to the primary companion.

dbcc ha_admin (SYB_HACMP, session, "drop")