Screens: Connections and explorer

Connection profiles

A connection profile shows on screen which environment a connection belongs to (local, development, production and so on) and sets how carefully SQL is run on it. You set it in the Profile tab of the connection dialog. Whose setting a profile is and which executions it applies to is explained in Safeguards for production databases.

Where you can use itWebDesktopWithout signing inSigned inLocal projectsAccount projects

What's on the screen

No.NameDescription
1EnvironmentChoosing an environment fills in Color, Background watermark and Protection mode with that environment's values (table below). You can then change each one.
2Reset buttonReturns the profile to its initial state (the Custom environment, Color None, Background watermark off, Protection mode None).
3ColorThe color that tells the connection apart. There are ten swatches and a color picker; the X swatch clears the color.
4Label (optional)The text used as the watermark. If left empty, the value of Connection name is used.
5Background watermark switchWhen on, the label is laid over the background of the SQL editor and the ERD.
6Protection modeWhether to confirm before running SQL on this connection, or to allow only queries.
EnvironmentColorBackground watermarkProtection mode
LocalTealOffNone
DevBlueOffNone
StagingOrangeOffConfirm (DDL + risky DML)
ProdRedOnConfirm (DDL + risky DML)
CustomLeft as isLeft as isLeft as is

Which statements a protection mode confirms or blocks, and which execution paths it covers, is explained under 'Protection modes' in Safeguards for production databases.

Setting a profile for a production connection

  1. Right-click the connection in the explorer, choose Explorer context menuEdit..., and open the Profile tab.
  2. In Environment (1), click Prod. Color is set to red, the Background watermark switch to on, and Protection mode to Confirm (DDL + risky DML), all together.
  3. For a connection used only for queries, choose Read-only (block non-SELECT) in Protection mode (6).
  4. To use different text instead of the value of Connection name in the watermark, enter it in Label (optional) (4).
  5. Click the Save button.

After you save, the SQL tabs of this connection color the work tab marker (1) and the line next to the line numbers (2) with the chosen color, and lay the label (3) over the background.

Idle timeouts that follow the environment

In the desktop app, the chosen environment also sets the SQL tab idle timeouts. When nothing is run in a SQL tab for the time set in Transaction idle timeout, uncommitted changes are rolled back; after the time set in Connection idle timeout, the database connection is closed.

EnvironmentConnection idle timeoutTransaction idle timeout
Local240 min120 min
Dev180 min90 min
Staging120 min60 min
Prod60 min30 min
Custom, no profile60 min30 min
  • These are the initial values. Change them per environment, between 30 and 720 minutes, in the Project settingsSQL Editor tab. These values are personal settings too.
  • The web app has no such option; the connection idle time is fixed at 30 minutes and does not follow the environment.
  • Picking a color yourself in Color switches the environment to Custom, so the idle timeouts follow the Custom environment as well.

Things to keep in mind

  • A profile is a personal setting. Setting Protection mode to Read-only (block non-SELECT) for yourself has no effect on your teammates' screens or on other tools. To block execution for sure, reduce the database account's privileges (Safeguards for production databases).
  • A connection without a profile has Protection mode set to None.
  • Clicking a button in Environment again resets Color, Background watermark and Protection mode that you changed one by one to that environment's values.
  • In an account project, this tab opens and saves even if you cannot edit the connection. Saving changes only your own profile.