Skip to content
This repository was archived by the owner on May 7, 2024. It is now read-only.

Commit bef011a

Browse files
authored
Environment Variables example (Windows)
The included examples for "Environment Variables" do not work on Windows. This change adds the equivalent commands on Windows using setx.
1 parent b9b38be commit bef011a

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

doc/usage_guide.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,10 +233,25 @@ Note this example is for Linux and macOS usage.
233233
You can set environment variables for your connection string through the following steps:
234234

235235

236+
# (linux/bash)
236237
# set environment variable MSSQL_SCRIPTER_CONNECTION_STRING with a connection string.
237238
$ export MSSQL_SCRIPTER_CONNECTION_STRING='Server=myserver;Database=mydb;User Id=myuser;Password=mypassword;'
238239
$ mssql-scripter
239240

241+
# (linux/bash)
240242
# set environment variable MSSQL_SCRIPTER_PASSWORD so no password input is required.
241243
$ export MSSQL_SCRIPTER_PASSWORD='[PLACEHOLDER]'
242244
$ mssql-scripter -S localhost -d AdventureWorks -U sa
245+
246+
# (windows)
247+
# set environment variable MSSQL_SCRIPTER_CONNECTION_STRING with a connection string.
248+
setx MSSQL_SCRIPTER_CONNECTION_STRING 'Server=myserver;Database=mydb;User Id=myuser;Password=mypassword;'
249+
# note: you must start a new PS session for the change to take effect
250+
mssql-scripter
251+
252+
# (windows)
253+
# set environment variable MSSQL_SCRIPTER_PASSWORD so no password input is required.
254+
setx MSSQL_SCRIPTER_PASSWORD mypassword
255+
# note: you must start a new PS session for the change to take effect
256+
$ mssql-scripter -S localhost -d AdventureWorks -U sa
257+

0 commit comments

Comments
 (0)