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
Name | Description | Type | Required |
---|---|---|---|
license_key | The license key. | String | True |
member | The name of the member. Comma-separated list for multiples. | String | False |
dxcli activate-server "AAAA-BBBB-CCCC-DDDD"
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
Name | Description | Type | Required |
---|---|---|---|
primary_replica_server_name | The name of the server that is currently the primary replica for the availability group. | String | True |
sql_instance_name | The name of the SQL Server instance. | String | True |
ag_name | The name of the availability group. | String | True |
sql_login | The user name used to login to SQL Server. | String | True |
sql_pass | The password used to login to SQL Server. | String | True |
starting_tunnel_port | The port from which to start the tunneling port numbers. Each additional tunnel will increment the port number by 1. | Int | False |
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
Name | Description | Type | Required |
---|---|---|---|
passkey | The passkey for the group. | String | True |
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
Name | Description | Type | Required |
---|---|---|---|
member_name | The name of the member. | String | False |
,... | 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
Name | Description | Type | Required |
---|---|---|---|
member_name | The name of the member. | String | True |
Example
dxcli deactivate-server "member1"
encrypt-text
Description
Encrypts text for use in other DxCLI commands.
Syntax
dxcli encrypt-text <value>
Parameters
Name | Description | Type | Required |
---|---|---|---|
value | The text to be encrypted. | String | True |
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
Name | Description | Type | Required |
---|---|---|---|
member_name | The name of the member. | String | False |
Example
dxcli get-interfaces "member1"
get-license
Description
Returns the license key for the specified member.
Syntax
dxcli get-license [member_name]
Parameters
Name | Description | Type | Required |
---|---|---|---|
member_name | The name of the member. | String | False |
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
Name | Description | Type | Required |
---|---|---|---|
member_name | The name of the member. | String | False |
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
Name | Description | Type | Required |
---|---|---|---|
license_key | The license of the member. | String | True |
member_name | The name of the member. | String | False |
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
Name | Description | Type | Required |
---|---|---|---|
primary_replica_server_name | The name of the server that is currently the primary replica for the availability group. | String | True |
sql_instance_name | The name of the SQL Server instance. | String | True |
ag_name | The name of the availability group. | String | True |
sql_login | The user name used to login to SQL Server. | String | True |
sql_pass | The password used to login to SQL Server. | String | True |
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
Name | Description | Type | Required |
---|---|---|---|
target | The IP of the target server. | String | True |
passkey | The passkey of the target server. | String | True |
use_nat | Specifies 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. | Bool | False |
Examples
dxcli join-cluster-ex "10.2.2.29" "Pa$$Key"
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
Name | Description | Type | Required |
---|---|---|---|
setting_name | The name of the global setting. Run dxcli get-globalsettings to list any non-default global settings. | String | True |
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
Name | Description | Type | Required |
---|---|---|---|
primary_replica_server_name | The name of the server that is currently the primary replica for the availability group. | String | True |
sql_instance_name | The name of the SQL Server instance. | String | True |
ags_name | The name of the availability group. | String | True |
sql_login | The user name used to login to SQL Server. | String | True |
sql_pass | The password used to login to SQL Server. | String | True |
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
Name | Description | Type | Required |
---|---|---|---|
member_name | The name of the member. | String | True |
Example
dxcli set-appcoordinator "member1"
set-coordinator
Description
Sets the cluster coordinator.
Syntax
dxcli set-coordinator <member_name>
Parameters
Name | Description | Type | Required |
---|---|---|---|
member_name | The name of the member. | String | True |
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
Name | Description | Type | Required |
---|---|---|---|
member_name | The name of the member. | String | True |
ip | IP 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. | String | True |
,... | 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
dxcli set-cluster-member-addresses "member1" "192.168.1.101"
dxcli set-cluster-member-addresses "member1" "{eth0:IPV4},172.16.1.1"
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
Name | Description | Type | Required |
---|---|---|---|
setting_key | The name of the global setting. | String | True |
setting_value | The value for the global setting. | String, Int, Bool | True |
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
Name | Description | Type | Required |
---|---|---|---|
license_key | The license key for the member. | String | True |
license_response | The activation response string given by the Client Portal. | String | True |
member_name | The name of the member. If no member is specified, the command defaults to the currently connected member. | String | False |
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
Name | Description | Type | Required |
---|---|---|---|
expiration_date | The 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. | String | False |
otpk | The One-Time Passkey in base64. A One-Time PassKey can be generated using dxcli generate-guid . | String | False |
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
Name | Description | Type | Required |
---|---|---|---|
target | The target member. | String | True |
passkey | The passkey of the target member. The member group passkey must be set using dxcli cluster-set-secret or dxcli cluster-set-secret-ex . | String | True |
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
Name | Description | Type | Required |
---|---|---|---|
-v | Enables verbose output. | Switch | False |
Example
dxcli test-nat -v