Minimum Windows workstation setup to work with Windows servers

If you work on a Mac or Linux workstation and need to script and administer Windows servers, you need a few Windows tools. You can create a Windows Virtual Machine hosted in the free Virtual Box from Oracle. For installation instructions see Install the DevOps development tools on Windows

  • Notepad++
  • Chocolatey
  • Git
  • AWS CLI (Amazon Web Services Command Line Interface)

There are DevOps tools that you can install on your Mac to work with Windows servers and applications

Microsoft SQL Server tools

To connect to Microsoft SQL servers you can install Visual Studio Code and the MSSQL extension on your Mac.

Visual Studio Code

Install Visual Studio Code

  1. Install OpenSSL from the terminal window with
    brew update
    brew install openssl
    ln -s /usr/local/opt/openssl/lib/libcrypto.1.0.0.dylib /usr/local/lib/
    ln -s /usr/local/opt/openssl/lib/libssl.1.0.0.dylib /usr/local/lib/
  2. Download and install Visual Studio Code from https://code.visualstudio.com/Download
  3. In Visual Studio Code open the Code menu and select Preferences, Settings
  4. On the left side select the Extensions icon, and type mssql into the search field
  5. Click the Install button.

To connect to an MSSQL server from Visual Studio Code

  1. In Visual Studio Code press F1 ( or SHIFT+COMMAND+P ) to open the Command Palette
  2. Type sql into the search field to display the MSSQL commands and select MS SQL: Connect
  3. Select Yes, to switch to the SQL language
  4. Type sql into the search field and select SQL
  5. Click Create Connection Profile
  6. Enter the IP address or the name of the server, and press enter
  7. You may enter the database name
  8. Select the authentication type. If you want to connect to the database server with SQL credentials, select SQL Login, to connect with Windows credentials, select Integrated.
  9. Enter the username
  10. Enter the password
  11. To save the password in the connection profile select Yes
  12. Enter a name for the profile
  13. Visual Studio Code connects to the database server. the status bar at the bottom of the page shows the connected server information,
  14. Hover above the server name with the mouse to display the detailed server info.

To edit the SQL Server profile in Visual Studio Code

  1. In the Code menu select Preferences, Settings
  2. Edit the JSON file in the USER SETTINGS window

Execute an SQL script

  1. Enter the script into a Visual Studio Code tab
  2. Press COMMAND+SHIFT+E to execute the script
  3. Choose the profile to connect to the server
  4. The result is displayed on the Results tab

For more info on MSSQL in Visual Studio Code see https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-develop-use-vscode?view=sql-server-2017

Leave a Reply