Environments & read-only

Know which server you are on before you press F5

Classify a connection as Development, Test, Production or Failover, and put a read-only guard on the ones nobody should write to.

  • Development, Test, Production, Failover
  • Colour plus a text badge, never colour alone
  • Visible in the navigator and on the editor tab
  • Independent read-only guard
  • Existing Production connections stay guarded

Everyone in this field has either done it or come within one keystroke of it: the editor tab that looked like the test system, an UPDATE without a WHERE, and a very quiet few seconds afterwards. The usual defences are a naming convention and paying attention, and both fail on the day you are tired.

Version 4.01 adds an Environment tab to the connection properties. It answers two separate questions: what kind of system is this, and may I write to it.

The four classifications

Classification Badge What it says Read-only
Development [DEV] Your own instance, or one nobody minds you breaking. Off by default.
Test [TEST] A shared integration or acceptance system. Other people are working on it, even if the data is disposable. Off by default — but this is the classification most worth turning it on for.
Production [PROD] The system where a wrong UPDATE becomes an incident report. Ticked for you when you choose it.
Failover [FAILOVER] A mirror member or standby that must stay identical to its primary. Ticked for you when you choose it.

Each classification has its own colour, and that colour appears in the two places you are actually looking: the Server Navigator tree, and the tab of the SQL editor you are typing into. Next to the colour sits the badge — [DEV], [TEST], [PROD], [FAILOVER] — because a signal that only exists as a colour is not a signal for everyone, and does not survive a screenshot pasted into a ticket.

Why read-only is a separate switch

Because the two questions genuinely come apart. A shared test system that four teams rely on is a Test system you should not be writing to. A reporting replica is not production, but writing to it is meaningless at best. And a production system during an agreed maintenance window is a system you are deliberately writing to, where you still want the red marker shouting at you.

So: Connection is read-only sits next to the classification and is independent of it. Choosing Production or Failover ticks it for you, as the safe default; you can clear it again, and a confirmation asks first in either direction — turning the guard off is a decision, and so is turning it on for a connection someone else may be using.

What the guard actually refuses

  • The SQL editor passes only statements it can recognise as read-only. A statement that writes does not leave the client.
  • The result grid stays uneditable — no in-place cell edits on a guarded connection.
  • The Data Pumper refuses it as a copy target.
  • The class actions — Delete, Copy, Import, Compile — and the cached-query purge refuse to run against it.

This is a client-side guard, and it is honest about being one. It is not a replacement for connecting with a read-only database account, which is the real boundary and which SQL DATA LENS is designed to work with — see security and privacy. Use both: the account stops what reaches the server, the guard stops the mistake before you have made it.

After the update, and where it comes from

Connections you already have keep their protection. One that was already classified as Production or Failover is read-only after the update without any action from you; nothing else is silently locked down.

For IRIS and Caché the classification can follow the instance's own system mode, so a server the administrator already marked as a production instance arrives here classified — without a second, hand-maintained list of which server is which. Taking that value over never switches the read-only guard off.

One classification is set for you and cannot be argued with: the SQL analytics endpoint of a Microsoft Fabric Lakehouse is read-only because the endpoint itself is. See Azure SQL and Fabric.

Rolling it out to a team

A classification is only worth something if everyone's client agrees on it. Export the connection — or the whole group — as a team profile, put the file on a share, and everyone who imports it gets the same servers with the same classifications and the same guards, and no credentials in the file at all. That mechanism is described on secure connections.

Questions about the guard

What exactly does "read-only" block?

Four things. The SQL editor passes only statements it can recognise as read-only, so a SELECT runs and an UPDATE, INSERT, DELETE or DDL statement does not leave the client. The result grid stays uneditable — no in-place cell editing. The Data Pumper refuses that connection as a target. And the class actions and the cached-query purge refuse to run against it.

It is a client-side guard, not a substitute for a read-only database account. Use both: the account is the boundary, this is the thing that stops the mistake before it reaches the server.

Can a Test system be read-only, or a Production one writable?

Yes to both, which is the point of keeping the two settings separate. A shared test system or a reporting replica can carry its Test colour and still refuse writes. A production system you deliberately write to — a maintenance window, a data fix agreed with the business — keeps the red marker as the warning it is meant to be. Choosing Production or Failover ticks the read-only box for you, and you can clear it again; a confirmation asks first in either direction.

What happens to my existing connections after the update?

They keep whatever protection they had. A connection already classified as Production or Failover stays read-only after updating to 4.01, with no action from you. Unclassified connections stay unclassified and behave exactly as before — nothing is silently locked down.

Can the classification come from the IRIS instance itself?

Yes. For IRIS and Caché, the classification can follow the instance's own system mode, so a server the administrator has marked as a production instance shows up as Production here without anyone typing it twice. Taking that value over never switches the read-only guard off — a server that was guarded stays guarded.

Is colour the only signal?

No, deliberately. Every classification carries a short text badge — [DEV], [TEST], [PROD], [FAILOVER] — next to the colour, so the distinction survives a colour-blind reader, a projector, a screenshot in a ticket and a dark theme.

Next step

Classify your production connection first, before anything else. It takes about fifteen seconds and it is the one that matters. Download SQL DATA LENS and start there.

Explore your IRIS data from SQL down to globals

Download, unzip, connect. Your first namespace is on screen in about three minutes.

Windows 10, 11 and Windows Server (64-bit) · ~130 MB · version 4.01 · full 30-day Pro trial included