Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.

SAP SQL Anywhere, on-demand edition 1.0 SP 6 » Task syntax

FailoverToMirror task

Forces the current tenant primary to switch roles with the tenant mirror.

Syntax 1 (SQL)
CALL DBCloud.FailoverToMirror ( database=database )
Syntax 2 (Cloud Command utility)
dbcloudcmd run FailoverToMirror database
  • database

    The tenant database. Accepts a search query that identifies one database, for example a database name or ID. (Required)

Required privileges



Initiating failover forces the tenant mirroring partners to change their roles without stopping the cloud servers. The primary (that has ownership of the read-write copy of the database) becomes the mirror. The mirror becomes the primary, and its database becomes the read-write copy.

FailoverToMirror results in restarting the tenant database. This task can complete before the database is restarted.

The primary database stops and restarts as the mirror database, resulting in dropped connections. Connections to the mirror database that becomes the primary database and scale-out database copies are not affected.

To stop or drop the primary database without stopping or dropping the tenant database, you must first use the FailoverToMirror task to make the primary the mirror. You can then convert the mirror to a scale-out database copy and stop or drop it.


Run the following task to force the primary and mirror databases for the tenant database my_db to switch roles:

dbcloudcmd run FailoverToMirror my_db