You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+16-2
Original file line number
Diff line number
Diff line change
@@ -30,7 +30,15 @@ This repo contains the `sqlcmd` command line tool and go packages for working wi
30
30
31
31
`sqlcmd` is available via [Linuxbrew][], and as a downloadable .rpm/.deb and .tar from the [releases page][].
32
32
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`|
34
42
35
43
## Use sqlcmd to create local SQL Server and Azure SQL Edge instances
36
44
@@ -48,6 +56,8 @@ sqlcmd open ads
48
56
49
57
Use `sqlcmd --help` to view all the available sub-commands. Use `sqlcmd -?` to view the original ODBC `sqlcmd` flags.
50
58
59
+
### The ~/.sqlcmd/sqlconfig file
60
+
51
61
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`.
52
62
53
63
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:
To see all version tags to choose from (2017, 2019, 2022 etc.), and install a specific version, run:
61
73
62
74
```
@@ -74,7 +86,9 @@ sqlcmd start
74
86
sqlcmd delete
75
87
```
76
88
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:
0 commit comments