Skip to content

Commit 93c36e0

Browse files
Merge pull request #247533 from Ritvik-Jayaswal/main
Added New DBA Commands
2 parents 82b6c3e + 21e9ee0 commit 93c36e0

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

articles/managed-instance-apache-cassandra/dba-commands.md

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ In most cases you might only need the commandOutput or the exitCode. Here is an
6363

6464
## How to run an `sstable` command
6565

66-
The `sstable` commands require read/write access to the cassandra data directory and the cassandra database to be stopped. To accommodate this, two extra parameters `--cassandra-stop-start true` and `--readwrite true` need to be given:
66+
The `sstable` commands require read/write access to the Cassandra data directory and the Cassandra database to be stopped. To accommodate this, two extra parameters `--cassandra-stop-start true` and `--readwrite true` need to be given:
6767

6868
```azurecli-interactive
6969
az managed-cassandra cluster invoke-command --resource-group <test-rg> --cluster-name <test-cluster> --host <ip> --cassandra-stop-start true --readwrite true --command-name sstableutil --arguments "system"="peers"
@@ -76,7 +76,24 @@ The `sstable` commands require read/write access to the cassandra data directory
7676
"exitCode": 0
7777
}
7878
```
79-
79+
## How to run other commands
80+
The `cassandra-reset-password` command lets a user change their password for the Cassandra user.
81+
```azurecli-interactive
82+
az managed-cassandra cluster invoke-command --resource-group <rg> --cluster-name <cluster> --host <ip of data node> --command-name cassandra-reset-password --arguments password="<password>"
83+
```
84+
The `cassandra-reset-auth-replication` command lets a user change their schema for the Cassandra user. Separate the datacenter names by space.
85+
```azurecli-interactive
86+
az managed-cassandra cluster invoke-command --resource-group <rg> --cluster-name <cluster> --host <ip of data node> --command-name cassandra-reset-auth-replication --arguments password="<datacenters>"
87+
```
88+
The `sstable-tree` command lets a user see their sstables.
89+
```azurecli-interactive
90+
az managed-cassandra cluster invoke-command --resource-group <rg> --cluster-name <cluster> --host <ip of data node> --command-name sstable-tree
91+
```
92+
The `sstable-delete` command lets a user delete their sstables made before a certain time.
93+
```azurecli-interactive
94+
az managed-cassandra cluster invoke-command --resource-group <rg> --cluster-name <cluster> --host <ip of data node> --command-name sstable-delete --arguments datetime="<YYYY-MM-DD hh:mm:ss>"
95+
```
96+
Datetime argument must be formatted as shown above. You can also add --dry-run="" as an argument to see which files will be deleted.
8097
## List of supported `sstable` commands
8198

8299
For more information on each command, see https://cassandra.apache.org/doc/latest/cassandra/tools/sstable/index.html

0 commit comments

Comments
 (0)