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

Ping task

Tests connections to a host, cloud server, database, or database copy.

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

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

  • from_host

    The source host where connections are being tested. Accepts a host name, ID, or search that returns a host. The default is NULL.

  • gather_statistics

    Specify 1 to gather extra statistics, or 0 to only check the connection. The default is 0.

Required privileges

None

Remarks

This task can be used to help debug connection problems in a cloud. When pinging a host, a test connection is attempted to a running cloud server on that host. When pinging a cloud server, a test connection is attempted to that specific cloud server. When pinging a database, a test connection is attempted to the primary database. When pinging a database copy, a test connection is attempted to that specific database copy.

Due to the behavior of the ping task, the task succeeds if the ping succeeds, and fails if the ping fails. No specific error is returned if the ping fails.

  • gather_statistics

    The gather_statistics parameter only applies to databases and database copies. The statistics are stored in an ETD file for the ping agent action in the logs directory of the host specified in the from_host parameter, or the host the task ran on (if no host was specified for the from_host parameter).

  • from_host

    If you do not set from_host, the task chooses a host in the cloud to run the ping agent action on, other than the host running the cloud server or database copy being pinged. If you are attempting to ping a tenant database, the ping agent action runs on a host other than the host running the primary database copy.

Example

Run the following task to ping all hosts in the cloud.

dbcloudcmd run Ping "type:Host"

Run the following task to ping the cloud host HostA.

dbcloudcmd run Ping "type:Host and name:HostA"

Run the following task to ping all cloud servers in the cloud.

dbcloudcmd run Ping "type:Server"

Run the following task to ping cloud server 'hostA#1'.

dbcloudcmd run Ping "type:Server and name:hostA#1"

Run the following task to ping all databases in the cloud.

dbcloudcmd run Ping "type:Database"

Run the following task to ping database 'demo'.

dbcloudcmd run Ping "type:Database and name:demo"

Run the following task to ping all database copies in the cloud.

dbcloudcmd run Ping "type:DatabaseCopy"

Run the following task to ping database copy 'demo@hostA#4' in the cloud.

dbcloudcmd run Ping "type:DatabaseCopy and name:demo@hostA#4"

Run the following task to ping cloud hosts HostA and HostB.

dbcloudcmd run Ping "HostA;HostB"

Run the following task to ping HostA and server HostA#3.

dbcloudcmd run Ping "HostA;HostA#3"

Run the following task to ping all cloud servers on HostA.

dbcloudcmd run Ping "type:Server and host:hostA"