Error message 18750

If a companion server issues error message 18750, check the @@cmpstate of your servers. If your primary companion is in normal companion mode, but the secondary companion is in secondary failover mode, your cluster is in an inconsistent state, from which you must manually recover. This inconsistent state may be caused by an sp_companion 'prepare_failback' command failing on the secondary companion. You can determine whether this happened by examining the log on the secondary node. To recover from this:

  1. Restart the secondary companion.

  2. Repair all databases marked “suspect.” To determine which databases are suspect, issue:

    select name, status from sysdatabases
    

    Databases marked suspect have a status value of 320.

  3. Allow updates to system tables:

    sp_configure "allow updates", 1
    
  4. For each suspect, failed-over database, perform the following:

    1> update sysdatabases set status=status-256 where name='database_name'
    2> go
    1> dbcc traceon(3604)
    2> go
    1> dbcc dbrecover(database_name)
    2>go
    
  5. From the secondary companion, issue:

    sp_companion primary_companion_name, prepare_failback
    

    Make sure that this command executes successfully.

  6. Make sure the primary companion is up and running, then resume normal companion mode. From the primary companion, issue:

    sp_companion secondary_companion, resume
    
  7. Make sure the Sybase Companion Server resource for the companion relationship is located on the primary node (use Move Group to move it if not) and is offline. Then use the Cluster Administrator to bring the resource online.