Search Results for

    Show / Hide Table of Contents

    Access SQL Server

    With remote VS Code

    1. "Open file share" on your container
    2. On first launch, choose "Windows" as platform in the VS Code Window if you're asked
    3. In the new VS Code window, install the extension SQL server (mssql)
    4. Use the SQL Server extension and run "MS SQL: Connect" to connect to localhost\SQLEXPRESS with container user and password
    5. Run SQL queries: Run SQL Query

    With local Software

    1. "Open terminal" on your container

    2. Exit remote terminal and copy IP address

      PowerShell 7.4.6
      PS C:\Users\sshuser> exit
      Connection to <ip> closed.
      
    3. Create SSH tunnel with a local shell (e.g. PowerShell)

      ssh -N -L "1433:127.0.0.1:1433" "sshuser@<ip>"
      
      Note

      Closing the shell will stop the SSH tunnel

    4. Connect to SQL Server from any local software
      (e.g. VS Code extension SQL server (mssql) or SQL Management Studio)

      • Server = 127.0.0.1\SQLEXPRESS
      • Port = 1433
      • Authorization = Container user and password
    In This Article
    Back to top 2025 © COSMO CONSULT - Data protection - Imprint