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

Environment Variables example (Windows) #264

Merged
merged 3 commits into from
Feb 6, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions doc/usage_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,10 +233,22 @@ Note this example is for Linux and macOS usage.
You can set environment variables for your connection string through the following steps:


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

# (linux/bash)
# set environment variable MSSQL_SCRIPTER_PASSWORD so no password input is required.
$ export MSSQL_SCRIPTER_PASSWORD='[PLACEHOLDER]'
$ mssql-scripter -S localhost -d AdventureWorks -U sa

# (windows)
# set environment variable MSSQL_SCRIPTER_CONNECTION_STRING with a connection string.
$Env:MSSQL_SCRIPTER_CONNECTION_STRING = 'Server=myserver;Database=mydb;User Id=myuser;Password=mypassword;'
mssql-scripter

# (windows)
# set environment variable MSSQL_SCRIPTER_PASSWORD so no password input is required.
$Env:MSSQL_SCRIPTER_PASSWORD = "placeholder"
mssql-scripter -S localhost -d AdventureWorks -U sa