Skip to main content
Version: v22.0

DxPlus DxCLI Admin Guide

Introduction

This document contains the list of DxCLI commands used for DxPlus administration.

Commands

activate-server

Description

Activates the server via internet using the provided license key. See get-license-request for offline member activation.

Syntax

dxcli activate-server <license_key> [member]

Parameters

NameDescriptionTypeRequired
license_keyThe license key.StringTrue
memberThe name of the member. Comma-separated list for multiples.StringFalse
Activate the current member
dxcli activate-server "AAAA-BBBB-CCCC-DDDD"
Activate multiple members
dxcli activate-server "AAAA-BBBB-CCCC-DDDD" "member1,member2,member3"

boost-sqlag

Description

Creates tunnel endpoints for availability groups to boost replication data throughput.

Syntax

dxcli boost-sqlag <primary_replica_server_name> <sql_instance_name> <ag_name> <sql_login> <sql_pass> [starting_tunnel_port]

Parameters

NameDescriptionTypeRequired
primary_replica_server_nameThe name of the server that is currently the primary replica for the availability group.StringTrue
sql_instance_nameThe name of the SQL Server instance.StringTrue
ag_nameThe name of the availability group.StringTrue
sql_loginThe user name used to login to SQL Server.StringTrue
sql_passThe password used to login to SQL Server.StringTrue
starting_tunnel_portThe port from which to start the tunneling port numbers. Each additional tunnel will increment the port number by 1.IntFalse

Example

dxcli boost-sqlag "server1" "instance1" "ag1" "sql_admin" "Pa$$w0rd" 50001

clear-otpk

Description

Clears and invalidates any generated One-Time PassKey for the member group.

Syntax

dxcli clear-otpk

Parameters

None

Example

dxcli clear-otpk

cluster-set-secret

Description

Begins interactive process of setting the group passkey. This command cannot be run remotely.

Syntax

dxcli cluster-set-secret

Parameters

Interactive only.

Example

dxcli cluster-set-secret

cluster-set-secret-ex

Description

Sets the group passkey non-interactively. This command cannot be run remotely.

Syntax

dxcli cluster-set-secret-ex <passkey>

Parameters

NameDescriptionTypeRequired
passkeyThe passkey for the group.StringTrue

Example

dxcli cluster-set-secret-ex "Pa$$Key"

collect-log

Description

Generates logs on the specified member(s). Logs will be gathered from every member if collect-log is run without a member_name parameter.

Log locations

  • Windows - The logs are created in the %ProgramFiles%\DH2i\Support folder.

  • Linux - The logs are created in the /opt/dh2i/support folder.

Syntax

dxcli collect-log [member_name][,...]

Parameters

NameDescriptionTypeRequired
member_nameThe name of the member.StringFalse
,...Comma-delimited list of additional members.False

Example

dxcli collect-log "member1,member2,member3"

deactivate-server

Description

Deactivates and clears the license on the specified member.

Syntax

dxcli deactivate-server <member_name>

Parameters

NameDescriptionTypeRequired
member_nameThe name of the member.StringTrue

Example

dxcli deactivate-server "member1"

encrypt-text

Description

Encrypts text for use in other DxCLI commands.

Syntax

dxcli encrypt-text <value>

Parameters

NameDescriptionTypeRequired
valueThe text to be encrypted.StringTrue

Example

dxcli encrypt-text "Pa$$w0rd"

format-xml

Description

Formats the command output in well-formed XML.

Syntax

dxcli <command> [parameters] | dxcli format-xml

Parameters

None

Example

dxcli get-globalsettings | dxcli format-xml

generate-guid

Description

Generates a new One-Time PassKey to use with dxcli set-otpk.

Syntax

dxcli generate-guid

Parameters

None

Example

dxcli generate-guid

get-coordinators

Description

Returns which cluster member(s) are the cluster and app coordinators.

Syntax

dxcli get-coordinators

Parameters

None

get-dxversion

Description

Returns the version of DxPlus installed on the current member.

Syntax

dxcli get-dxversion

Parameters

None

Example

dxcli get-dxversion

get-features

Description

Returns a list of license features enabled on the connected member.

Syntax

dxcli get-features

Parameters

None

Example

dxcli get-features

get-globalsettings

Description

Returns any non-default configurations of global settings.

Syntax

dxcli get-globalsettings

Parameters

None

Example

dxcli get-globalsettings

get-interfaces

Description

Returns output of all interfaces available for connected member group, or a specified member if supplied.

Syntax

dxcli get-interfaces [member_name]

Parameters

NameDescriptionTypeRequired
member_nameThe name of the member.StringFalse

Example

dxcli get-interfaces "member1"

get-license

Description

Returns the license key for the specified member.

Syntax

dxcli get-license [member_name]

Parameters

NameDescriptionTypeRequired
member_nameThe name of the member.StringFalse

Example

dxcli get-license "member1"

get-license-detail

Description

Returns details for license including license key, product, expirations, etc. for the connected server, or for a specified member.

Syntax

dxcli get-license-detail [member_name]

Parameters

NameDescriptionTypeRequired
member_nameThe name of the member.StringFalse

Example

dxcli get-license-detail "member1"

get-license-request

Description

Returns a license request for a member; use in conjunction with set-license. Go to the Client Portal and paste the output of get-license-request to obtain an activation response. The response from the website is used in the set-license command to activate the server.

Syntax

dxcli get-license-request <license_key> [member_name]

Parameters

NameDescriptionTypeRequired
license_keyThe license of the member.StringTrue
member_nameThe name of the member.StringFalse

Example

dxcli get-license-request "AAAA-BBBB-CCCC-DDDD" "member1"

get-otpk

Description

Returns the current One-Time PassKey (OTPK) for the member group and its expiration date.

Syntax

dxcli get-otpk

Parameters

None

Example

dxcli get-otpk

get-producttype

Description

Returns the product name and license features. This command cannot be run remotely.

Syntax

dxcli get-producttype

Parameters

None

Example

dxcli get-producttype

get-sqlag-detail

Description

Displays the availability group and replicated database details and status for the authenticated primary replica.

Syntax

dxcli get-sqlag-detail <primary_replica_server_name> <sql_instance_name> <ags_name> <sql_login> <sql_pass>

Parameters

NameDescriptionTypeRequired
primary_replica_server_nameThe name of the server that is currently the primary replica for the availability group.StringTrue
sql_instance_nameThe name of the SQL Server instance.StringTrue
ag_nameThe name of the availability group.StringTrue
sql_loginThe user name used to login to SQL Server.StringTrue
sql_passThe password used to login to SQL Server.StringTrue

Example

dxcli get-sqlag-detail "server1" "instance1" "ag1" "sql_admin" "Pa$$w0rd"

get-sqlags

Description

Displays the details for all currently boosted availability groups.

Syntax

dxcli get-sqlags

Parameters

None

Example

dxcli get-sqlags

join-cluster

Description

Begin the interactive process of joining a group. This command cannot be run remotely.

Syntax

dxcli join-cluster

Parameters

Interactive only.

Example

dxcli join-cluster

join-cluster-ex

Description

Join an existing group non-interactively.

Syntax

dxcli join-cluster-ex <target> <passkey> <use_nat>

Parameters

NameDescriptionTypeRequired
targetThe IP of the target server.StringTrue
passkeyThe passkey of the target server.StringTrue
use_natSpecifies whether or not to use the DH2i Matchmaking Service. Use match.dh2i.com as the target and an OTPK instead of a passkey. Default value is false. See dxcli set-otpk for more information.BoolFalse

Examples

Local Join
dxcli join-cluster-ex "10.2.2.29" "Pa$$Key"
NAT Join
dxcli join-cluster-ex "match.dh2i.com" "8c478877-8d78-9757-df9b-318abe925b1e" "true"

list-globalsettings

Description

Returns a list of all available global settings in plain text, including their definitions and defaults.

Syntax

dxcli list-globalsettings

Parameters

None

Example

dxcli list-globalsettings

list-globalsettings-xml

Returns a list of all available global settings in XML, including their definitions and defaults.

Syntax

dxcli list-globalsettings-xml

Parameters

None

Example

dxcli list-globalsettings-xml

remove-globalsetting

Description

Resets a global setting to its default value.

Syntax

dxcli remove-globalsetting <setting_name>

Parameters

NameDescriptionTypeRequired
setting_nameThe name of the global setting. Run dxcli get-globalsettings to list any non-default global settings.StringTrue

Example

dxcli remove-globalsetting "timeout.ping"

revert-sqlag

Description

Removes the tunnel endpoints for availability groups and applies the original saved endpoints.

Syntax

dxcli revert-sqlag <primary_replica_server_name> <sql_instance_name> <ags_name> <sql_login> <sql_pass>

Parameters

NameDescriptionTypeRequired
primary_replica_server_nameThe name of the server that is currently the primary replica for the availability group.StringTrue
sql_instance_nameThe name of the SQL Server instance.StringTrue
ags_nameThe name of the availability group.StringTrue
sql_loginThe user name used to login to SQL Server.StringTrue
sql_passThe password used to login to SQL Server.StringTrue

Example

dxcli revert-sqlag "server1" "instance1" "ags1" "sql_admin" "Pa$$w0rd"

set-appcoordinator

Description

Assigns the application coordinator role to the specified member.

Syntax

dxcli set-appcoordinator <member_name>

Parameters

NameDescriptionTypeRequired
member_nameThe name of the member.StringTrue

Example

dxcli set-appcoordinator "member1"

set-coordinator

Description

Sets the cluster coordinator.

Syntax

dxcli set-coordinator <member_name>

Parameters

NameDescriptionTypeRequired
member_nameThe name of the member.StringTrue

Example

dxcli set-coordinator "member1"

set-cluster-member-addresses

Description

Sets the member’s interface(s) and protocol(s) for cluster communication.

Syntax

dxcli set-cluster-member-addresses <member_name> <ip>[,...]

Parameters

NameDescriptionTypeRequired
member_nameThe name of the member.StringTrue
ipIP Address, alias, or asterisk("*") to assign to the member. The asterisk (*) selection will cycle through the interfaces until a valid connection is established to the other cluster members.StringTrue
,...Ordered, comma-delimited list for multiple IP addresses and/or aliases. The order in which the interfaces and/or protocols are ordered determine their priority, from highest to lowest.False

Examples

Set the member IP address
dxcli set-cluster-member-addresses "member1" "192.168.1.101"
Set an interface:protocol and IP address
dxcli set-cluster-member-addresses "member1" "{eth0:IPV4},172.16.1.1"
Set to the default 'bind all'
dxcli set-cluster-member-addresses "member1" "*"

set-globalsetting

Description

Assigns a new value to a global setting. For more information on the available global settings, please see dxcli list-globalsettings.

Syntax

dxcli set-globalsetting <setting_key> <setting_value>

Parameters

NameDescriptionTypeRequired
setting_keyThe name of the global setting.StringTrue
setting_valueThe value for the global setting.String, Int, BoolTrue

Example

dxcli set-globalsetting "timeout.ping" 10

set-license

Description

Activates a member that has no internet connection; used in conjunction with get-license-request.

Syntax

dxcli set-license <license_key> <license_response> [member_name]

Parameters

NameDescriptionTypeRequired
license_keyThe license key for the member.StringTrue
license_responseThe activation response string given by the Client Portal.StringTrue
member_nameThe name of the member. If no member is specified, the command defaults to the currently connected member.StringFalse

Example

dxcli set-license "AAAA-BBBB-CCCC-DDDD" "2ki44uOaLK4gbfjSStNVUXNQsM4eMwjVRBNyAQrp6UABN0frE9ZiGwhP1oxLD+y6F5UDwfaZkTZqQF0JfoEpGhu8V8WAS/dkOGNkBqGv2Qi+Nuc21kV/d2p4elTZSdI2rGrL==" "member2"

set-otpk

Description

Sets the One-Time PassKey (OTPK).

Syntax

dxcli set-otpk [expiration_date] [otpk]

Parameters

NameDescriptionTypeRequired
expiration_dateThe time and date the One-Time PassKey will expire. Should be formatted as YYYY-MM-DDTHH:MM:SS. Leaving this parameter empty will default the expiration to one hour.StringFalse
otpkThe One-Time Passkey in base64. A One-Time PassKey can be generated using dxcli generate-otpk.StringFalse

Example

dxcli set-otpk "2021-01-01T18:00:00" "8c478877-8d78-9757-df9b-318abe925b1e"

set-server

Description

Interactively connect to a remote member for member group administration.

Syntax

dxcli set-server

Parameters

Interactive only.

Example

dxcli set-server

set-server-ex

Description

Non-interactively connect to a remote member for member group administration.

Syntax

dxcli set-server-ex <target> <passkey>

Parameters

NameDescriptionTypeRequired
targetThe target member.StringTrue
passkeyThe passkey of the target member. The member group passkey must be set using dxcli cluster-set-secret or dxcli cluster-set-secret-ex.StringTrue

Example

dxcli set-server-ex "10.2.2.29" "Pa$$Key"

test-nat

Description

Determines the NAT type for the connected server.

Syntax

dxcli test-nat [-v]

Parameters

NameDescriptionTypeRequired
-vEnables verbose output.SwitchFalse

Example

dxcli test-nat -v