Skip to content

Commit 212bfdd

Browse files
StefanStefan
authored andcommitted
cli update
1 parent 7bea10e commit 212bfdd

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

articles/postgresql/flexible-server/connect-azure-cli.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ az postgres flexible-server connect --help
4444
```
4545

4646
## Test database server connection
47-
You can test and validate the connection to the database from your development environment using the command.
47+
You can test and validate the connection to the database from your development environment using the [az postgres flexible-server connect](/cli/azure/postgres/flexible-server#az-postgres-flexible-server-connect) command.
4848

4949
```azurecli-interactive
5050
az postgres flexible-server connect \
@@ -53,11 +53,12 @@ az postgres flexible-server connect \
5353
**Example:**
5454
```azurecli-interactive
5555
az postgres flexible-server connect \
56-
-n postgresdemoserver -u dbuser -p "dbpassword" -d postgres
56+
-n server372060240 -u dbuser -p "dbpassword" -d postgres
5757
```
58-
You see the output if the connection was successful.
58+
You see similar output if the connection was successful.
59+
5960
```output
60-
Successfully connected to <servername>.
61+
Successfully connected to server372060240.
6162
```
6263

6364
If the connection failed, try these solutions:
@@ -78,7 +79,7 @@ az postgres flexible-server connect \
7879

7980
```azurecli-interactive
8081
az postgres flexible-server connect \
81-
-n postgresdemoserver -u dbuser -p "dbpassword" -d flexibleserverdb --interactive
82+
-n server372060240 -u starchylapwing9 -p "dbpassword" -d postgres --interactive
8283
```
8384

8485
You see the **psql** shell experience as shown here:
@@ -100,7 +101,7 @@ postgres>
100101
```
101102

102103
## Execute single queries
103-
You can run single queries against Postgres database using [az postgres flexible-server execute](/cli/azure/postgres/flexible-server?view=azure-cli-latest#az-postgres-flexible-server-execute).
104+
You can run single queries against Postgres database using [az postgres flexible-server execute](/cli/azure/postgres/flexible-server#az-postgres-flexible-server-execute).
104105

105106
```azurecli-interactive
106107
az postgres flexible-server execute \
@@ -111,7 +112,7 @@ az postgres flexible-server execute \
111112
**Example:**
112113
```azurecli-interactive
113114
az postgres flexible-server execute \
114-
-n postgresdemoserver -u dbuser -p "dbpassword" -d flexibleserverdb \
115+
-n server372060240 -u starchylapwing9 -p "dbpassword" -d postgres \
115116
-q "SELECT 1" --output table
116117
```
117118

@@ -137,9 +138,9 @@ az postgres flexible-server execute \
137138
```
138139

139140
**Example:**
140-
```azureazurecli-interactivecli
141+
```azurecli-interactive
141142
az postgres flexible-server execute \
142-
-n postgresdemoserver -u dbuser -p "dbpassword" -d flexibleserverdb \
143+
-n server372060240 -u dbuser -p "dbpassword" -d postgres \
143144
-f "./test.sql"
144145
```
145146

@@ -149,7 +150,7 @@ You see an output as shown here:
149150
Command group 'postgres flexible-server' is in preview and under development. Reference and support levels: https://aka.ms/CLI_refstatus
150151
Running sql file '.\test.sql'...
151152
Successfully executed the file.
152-
Closed the connection to postgresdemoserver.
153+
Closed the connection to server372060240.
153154
```
154155

155156
## Next Steps

0 commit comments

Comments
 (0)