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

StopServer task

Stops running cloud servers.

Syntax 1 (SQL)
CALL DBCloud.StopServer ( server_list=server_list [, optional-parameters ] )
Syntax 2 (Cloud Command utility)
dbcloudcmd run StopServer server_list [ optional-parameters ]
Parameters
  • server_list

    A list of cloud servers to stop. Accepts a search query that identifies cloud servers. The search query can be a list of cloud server names or IDs separated by semicolons (;), or a full search. (Required)

  • unconditionally

    Set to 1 to stop the cloud server(s) unconditionally or to 0 to stop only if no database copies are running on the cloud server. The default is 0.

Required privileges

StartStopServer

Remarks

This task stops the specified cloud server, making it unavailable in the cloud.

You cannot stop a cloud server that is running the primary database in a mirroring system, or is a cloud partner in a high availability system.

If necessary, move any databases running on the cloud server to a new cloud server.

If unconditionally is set to 1, the following rules apply:

  • If the cloud server is an arbiter in a mirroring system, the database is stopped only if the mirror database is stopped.

  • If the cloud server is running a scale-out database copy, the copy is stopped.

  • If the cloud server is running a database that is not part of a mirroring or read-only scale-out system, the database is stopped.

  • If the cloud server is running either a primary or mirror database in a mirroring system, and both databases, as well as the arbiter, are running, the database is stopped.

  • If the cloud server is running the read-write database of a read-only scale-out system, the database and all its scale-out database copies are stopped.

Example

Run the following task to stop the cloud server my-server#3 even though it is running a database copy:

dbcloudcmd run StopServer server_list=my-server#3 unconditionally=1

Run the following task to stop the cloud server my-server#1:

dbcloudcmd run StopServer my-server#1 

Run the following task to stop the cloud server my-server#1:

CALL DBCloud.StopServer( 'name:"my-server#1" and status:running' )