Skip to content

Commit

Permalink
Update SQL Server guides to mention sqlcmd as default CLI (#29543) (#…
Browse files Browse the repository at this point in the history
…29648)

* docs(sqlserver): update default command to `sqlcmd`

* docs: add `sqlcmd` to spell check dictionary
  • Loading branch information
gabrielcorado authored Jul 27, 2023
1 parent 7f963b4 commit 063bde1
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
5 changes: 1 addition & 4 deletions docs/pages/database-access/guides/azure-sql-server-ad.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -175,10 +175,7 @@ $ tsh db connect --db-user=sqlserver-identity --db-name=master sqlserver

Where `--db-user` is the managed identity name.

<Admonition type="note">
The `mssql-cli` command-line client should be available in `PATH` of the machine
you're running `tsh db connect` from.
</Admonition>
(!docs/pages/includes/database-access/sql-server-connect-note.mdx!)

## Troubleshooting

Expand Down
15 changes: 1 addition & 14 deletions docs/pages/database-access/guides/sql-server-ad.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -360,20 +360,7 @@ To retrieve credentials for a database and connect to it:
$ tsh db connect --db-user=teleport sqlserver
```

<Admonition type="note">
When you run the `tsh db connect` command above, `tsh` attempts to execute
the `mssql-cli` command-line client, which must be available in the user's
`PATH`. If you do not have `mssql-cli` available on your system, you can run the
following command to start a local proxy server that you can connect
to with your SQL Server client:

```code
$ tsh proxy db --db-user=teleport --tunnel sqlserver
```

Read the [Database Access GUI Clients](../../connect-your-client/gui-clients.mdx#sql-server-with-azure-data-studio)
guide for how to connect your DB GUI client to the local proxy.
</Admonition>
(!docs/pages/includes/database-access/sql-server-connect-note.mdx!)

To log out of the database and remove credentials:

Expand Down
16 changes: 16 additions & 0 deletions docs/pages/includes/database-access/sql-server-connect-note.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<Admonition type="note">
Either the `sqlcmd` or `mssql-cli` command-line clients should be available in
`PATH` in order to be able to connect. `tsh` attempts to run `sqlcmd` first and,
if it's not present on the `PATH`, runs `mssql-cli`.

If you have neither command-line clients available on your system, you can run
the following command to start a local proxy server that you can connect to with
your SQL Server client:

```code
$ tsh proxy db --db-user=teleport --tunnel sqlserver
```

Read the [Database Access GUI Clients](../../connect-your-client/gui-clients.mdx#sql-server-with-azure-data-studio)
guide for how to connect your DB GUI client to the local proxy.
</Admonition>

0 comments on commit 063bde1

Please sign in to comment.