Skip to content

Commit 84e9021

Browse files
committed
Update README to cover new sceanrios
1 parent 8aa10b5 commit 84e9021

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

README.md

+16-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,15 @@ This repo contains the `sqlcmd` command line tool and go packages for working wi
3030

3131
`sqlcmd` is available via [Linuxbrew][], and as a downloadable .rpm/.deb and .tar from the [releases page][].
3232

33-
`sqlcmd` is also available through `apt-get`, `yum` and `zypper` package managers. Instructions can be found [here](https://learn.microsoft.com/sql/tools/sqlcmd/go-sqlcmd-utility?view=sql-server-ver16#download-and-install-go-sqlcmd).
33+
On Linux, `sqlcmd` is also available through `apt-get`, `yum` and `zypper` package managers. Instructions can be found [here](https://learn.microsoft.com/sql/tools/sqlcmd/go-sqlcmd-utility?view=sql-server-ver16#download-and-install-go-sqlcmd).
34+
35+
#### Linuxbrew
36+
37+
The Homebrew package manager may be used on Linux and Windows Subsystem for Linux (WSL) 2. Homebrew was formerly referred to as Linuxbrew when running on Linux or WSL.
38+
39+
| Install: | Upgrade: |
40+
| --------------------- | --------------------- |
41+
| `brew install sqlcmd` | `brew upgrade sqlcmd` |
3442

3543
## Use sqlcmd to create local SQL Server and Azure SQL Edge instances
3644

@@ -48,6 +56,8 @@ sqlcmd open ads
4856

4957
Use `sqlcmd --help` to view all the available sub-commands. Use `sqlcmd -?` to view the original ODBC `sqlcmd` flags.
5058

59+
### The ~/.sqlcmd/sqlconfig file
60+
5161
Each time `sqlcmd create` completes, a new context is created (e.g. mssql, mssql2, mssql3 etc.). A context contains the endpoint and user configuation detail. To switch between contexts, run `sqlcmd config use <context-name>`, to view name of the current context, run `sqlcmd config current-context`, to list all contexts, run `sqlcmd config get-contexts`.
5262

5363
To view connection strings (ODBC/ADO.NET/JDBC etc.) for the current context and user & endpoint details for all contexts held in the `~/.sqlcmd/sqlconfig` file:
@@ -57,6 +67,8 @@ sqlcmd config connection-strings
5767
sqlcmd config view
5868
```
5969

70+
### Versions
71+
6072
To see all version tags to choose from (2017, 2019, 2022 etc.), and install a specific version, run:
6173

6274
```
@@ -74,7 +86,9 @@ sqlcmd start
7486
sqlcmd delete
7587
```
7688

77-
To connect to the current context (SQL Server running in a local container), and use the original ODBC sqlcmd flags (e.g. -q, -Q, -i, -o etc.) that can be listed with `sqlcmd -?` run:
89+
### Backwards compatibility with ODBC sqlcmd
90+
91+
To connect to the current context, and use the original ODBC sqlcmd flags (e.g. -q, -Q, -i, -o etc.), that can be listed with `sqlcmd -?`, run:
7892

7993
```
8094
sqlcmd -q "SELECT @@version"

0 commit comments

Comments
 (0)