Connect to your sandbox database

While developing with the Caliper SDK, you might need to run SQL queries to your database. This topic describes how to set up this connection using Visual Studio Code. Other database editors also work and follow a similar process.

Prerequisites

Navigate to the Q2 Developer Portal Dashboard and obtain the following information from the Development Information box:

  • Database Name

  • Database User

  • Database Password

  • Database Host

Setting up a connection in Visual Studio Code

Complete the following steps to set up the database connection:

  1. Open the SQL server extension and then select the add icon (+) to add a new connection.

  2. Enter the following information:

    1. Profile Name–the name you want this database to use in Visual Studio Code

    2. Server name–database name

    3. Authentication type–SQL Login

    4. User name–database user

    5. Password–database password

  3. Select Connect.

  4. On the popup, select Enable Trust Server Certificate.

Visual Studio Code is now set up to make manual SQL queries. You can explore the database through the Connections tab in the SQL server extension.

Warning

Running SQL queries can break your environment. Run these at your own risk. If you need to reset your environment, submit a ticket to Q2.