Skip to content

Access SQL Server

Required roles

To follow the steps in this guide, you need the following roles:

Prerequisites

To follow the steps in this guide, make sure that you meet the following prerequisites:

You can use IAP Desktop to access SQL Server in two ways:

  1. You can let IAP Desktop launch and connect SQL Server Management Studio (SSMS) for you. IAP Desktop automatically establishes an IAP TCP forwarding tunnel and keeps the tunnel open until you close SSMS.

  2. You can let IAP Desktop open a tunnel. You can then use any tool to connect to that tunnel and the tunnel remains open until you close IAP Desktop.

Connect SQL Server Management Studio

The steps to let IAP Desktop launch and connect SQL Server Management Studio (SSMS) differ depending on how you want to authenticate to SQL Server:

To access SQL Server and authenticate using Windows authentication , do the following:

  1. In the Project Explorer tool window, right-click your SQL Server VM and select Connect client application > SQL Server Management Studio:

    Context menu

  2. IAP Desktop now creates an IAP TCP forwarding tunnel and opens SQL Server Management Studio.

    If your connection settings contain Windows credentials, SQL Server Management Studio automatically authenticates you to SQL Server using Windows authentication.

    If you haven't configured Windows credentials yet, you can enter credentials manually:

    SSH Terminal

    Note

    You can use Windows authentication even if your local computer isn't domain-joined, or joined to a different Active Directory domain than the SQL Server VM.

    IAP Desktop now launches SSMS and connects it to the VM:

  3. You can now use SSMS to interact with SQL Server:

    SSMS

To access SQL Server and authenticate using SQL authentication, do the following:

  1. In the Project Explorer tool window, right-click your SQL Server VM and select Connection settings.

  2. In the Connection settings window, set SQL Server > Windows authentication to disabled.

  3. In the Project Explorer tool window, right-click your SQL Server VM and select Connect client application > SQL Server Management Studio:

    Context menu

  4. Enter your SQL Server username and click OK.

    IAP Desktop now launches SSMS. If this is the first time you're connecting to this VM, you might see an error message indicating that the login failed because you haven't provided a password. Dismiss the error message and use the SQL Server login dialog to complete authentication.

Open a tunnel

To let IAP Desktop open a tunnel to SQL Server, do the following:

  1. In the Project Explorer tool window, right-click your SQL Server VM and select Tunnel to > SQL Server.

    Open a tunnel

    A notification appears:

    Baloon notification

  2. Use any tool to connect to the tunnel using the port number indicated in the notification.

    Note

    When you open a tunnel to the same VM again in the future, IAP Desktop will use the same port number unless it's in use by a different application.

To view all active tunnels and their port numbers, select View > Active IAP tunnels in the main menu.

Customize connection settings

To customize the connection settings, you can use the Connection Settings tool window:

  1. In the Project Explorer tool window, right-click the SQL Server VM and select Connection Settings.
  2. In the Connection Settings window, you can save your Windows credentials or switch to SQL Server authentication :

    Connection settings

    If you specify a setting that deviates from the default, it is shown in bold typeface.

Instead of customizing settings for each VM instance individually, you can also specify settings that apply to an entire zone or project.

What's next