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

Cloud Command utility (dbcloudcmd)

Connects the user to the cloud and allows the user to perform cloud tasks, update cloud information, and query the status of the cloud.

Syntax
dbcloudcmd [ options ] command 
Option Description
@data

Reads in options from the specified environment variable or configuration file.

To protect passwords or other information in the configuration file, you can use the File Hiding utility (dbfhide) to encrypt the contents of the configuration file.

-cc HOST= cloud-host-name[ : port ];UID= cloud-user-ID ;PWD= cloud-password [ connection-parameters ]

This connection string is optional if you are running dbcloudcmd from a cloud host.

Cloud connection string:

  • Host

    Host name. Default is localhost. (Required for non-cloud hosts only)

  • Port

    HTTP or HTTPS port number (Required for non-cloud hosts only).

    The default port number is 80 for HTTP, and 443 for HTTPS.

  • UID

    User ID to connect to the cloud (Optional)

  • PWD

    Password to connect to the cloud (Optional)

  • connection-parameters

    Other connection-parameters can be specified.

    If you specify ENCRYPTION=TLS, then:

    • Specify the TRUSTED_CERTIFICATES protocol option when you are connecting from a non-cloud host.

    • Disable the host name check by specifying skip_certificate_name_check=ON.
-json Displays output in JSON format.
-tto number

Number of seconds to wait for a task to complete.

-o filename

Output messages to the window and to the specified file.

-v

Displays verbose output.

-q

Displays no output.

-?, /?, -h, --help help

Displays help for the dbcloudcmd command.

Command Description
describe search-query

Run a search query to return information about a particular type of cloud object.

download URI filename Download data from the cloud and save it to a file.
poll task-ID

Wait for any of a set of tasks to complete (up to timeout -tto value).

queue task parameters Start a cloud task and do not wait for it to finish before starting another task.
run task parameters

Start a cloud task and wait for it to finish before starting another task.

Use the -l option to view a complete list of tasks you can run in the cloud. For example:

dbcloudcmd run -l

To view a subset of tasks, use the -l option with a portion of a task name. For example, running the following command returns all tasks that include the word "create".

dbcloudcmd run -l create
wait task-ID Wait for a set of tasks to complete (up to timeout -tto value).
Remarks

When you are administering the cloud using dbcloudcmd, provide user authentication each time you run a task.

The -cc connection string is optional if you are running dbcloudcmd from a running cloud host. Otherwise, specify the connection parameters every time you run the utility. You can store the -cc connection string in the DBCLOUDCONNECT environment variable or in a data file.

If you don't specify the user ID or password, dbcloudcmd prompts for these values.

If you run a task that interrupts the connection between dbcloudcmd and the cloud server it is running on, an error is displayed and dbcloudcmd may not display the task results. For dbcloudcmd to reconnect to a running cloud server, you must run another task from dbcloudcmd.

dbcloudcmd installation directory

The path to dbcloudcmd is not permanently set. When you update the cloud, you receive a new version of dbcloudcmd. The current version of dbcloudcmd is still available, but to run the updated version of dbcloudcmd, reset your PATH environment variable to the directory that contains the new version.

No environment variables are set when the cloud is installed. From the installation directory, you can run cloudenv.bat on Windows or source cloudenv.sh on Linux to set the path to dbcloudcmd temporarily (for the duration of your session). Each time you start a session, run this file.

The browser-based Cloud Console does not use environment variables.

Example

The following commands all return information about the cloud's users.

  • Connect to the cloud from a computer system that is part of the cloud. You are prompted for a cloud user ID and password. The connection is secure using the HTTPS protocol.

    dbcloudcmd describe type:user
  • Connect to the cloud from a computer system that is part of the cloud. The user ID and password are supplied on the command line. The connection is secure using the HTTPS protocol.

    dbcloudcmd -cc "myUsername,myPassword" describe type:user
  • Connect to the cloud from a computer system that is part of the cloud. The user ID and password are supplied on the command line in the form of keyword=value pairs. The connection is secure using the HTTPS protocol.

    dbcloudcmd -cc "UID=myUsername;PWD=myPassword" describe type:user 
  • Connect to the cloud from a computer system that is part of the cloud. The host computer name and HTTPS port, user ID, and password are supplied on the command line. The ENC parameter indicates that HTTPS encryption is to be used. The certificate path is not specified so a local search will be made for the certificate file. The connection is secure using the HTTPS protocol.

    dbcloudcmd -cc "HOST=myHost-pc:9443;ENC=tls;UID=myUsername;PWD=myPassword" describe type:user
  • Connect to the cloud from a remote computer system that is not part of the cloud. The host computer name and HTTP port, user ID, and password are supplied on the command line. The connection is not secure and is not recommended for public networks.

    dbcloudcmd -cc "HOST=myHost-pc:9080;UID=myUsername;PWD=myPassword" describe type:user
  • Connect to the cloud from a remote computer system that is not part of the cloud. The host computer name and HTTPS port, user ID, and password are supplied on the command line. The certificate for encryption is specified using the ENC parameter. The connection is secure using the HTTPS protocol. This form of remote connection is recommended.

    dbcloudcmd -cc "HOST=myHost-pc:9443;ENC=tls(skip_certificate_name_check=yes;trusted_certificates=\certs\root-id.pem);UID=myUsername;PWD=myPassword" 
    describe type:user

The following commands return information about the specified cloud object or dbcloudcmd command.

  • Run the following command to view a list of all tasks and their parameters.

    dbcloudcmd describe type:TaskDefinition
  • Run the following command to view help for the run command.

    dbcloudcmd help run
  • Run the following command to view the usage information for a specific task. You are prompted for a cloud user ID and password.

    dbcloudcmd help run task-name
  • Run the following command to view information about a particular cloud object. Specify the object name or the object-ID. The object-ID prefix is case sensitive. For example, to view information about the tag with the ID TG-t2w5.

    dbcloudcmd describe TG-t2w5
  • Run the following command to view information about all the servers in a cloud including extra diagnostic information.

    dbcloudcmd -v describe type:server