Safety tiers and transaction modes
What each tier allows, how transaction modes work and what is never allowed.
In short
Before a connection opens, the server checks every run against the environment's tier, not what the test asks for. Production allows only read-only, rolled-back runs. A refused run is recorded as Refused by policy, and nothing reaches the database.
Before you start
- Who: setting an environment's tier and Read-only needs Manage on the project. Only an organization administrator can lower a tier or make an environment writable.
- Plan: Production execution is included in Pro, Business and Enterprise. Without it a Production run is refused.
- First: set the tier to what the database really is.
Set an environment's safety
- Open "Connections" and edit the environment.
- Set its "Tier" to what the database really is: Local, Development, QA, Custom, Preprod, Staging or Production.
- Tick "Read-only" to force every run to roll back without the other Production rules.
- Press "Save". Every test run there follows the tier's rules from now on.
Tiers
Transaction modes
Commit is permanent There is no undo. Use setup and teardown SQL for normal tests and let the rollback clean up.
Good to know
- Production execution is included in Pro, Business and Enterprise.
- A rolled-back run still runs: the statement really executes before it is undone. A heavy query still loads the server, and an UPDATE holds locks until the rollback.
- Never allowed: connecting to the platform's own database or to a host outside the deployment's allowed list. Also never allowed: DDL or administrative statements in a Query test, a disabled environment and an unreadable connection string. A timeout above 300 seconds or more than 1,000 captured rows is lowered.
- Procedure bodies are not inspected. The DDL and unfiltered-write checks read the SQL in the test, its setup and its teardown. That is why the login you store for Production should not be able to write.
If something goes wrong
- "Refused: …": the reason names the rule. Change the transaction mode or the statement, or run on a lower tier.
- "Only an organization administrator can lower this environment's tier or make it writable."
- "Refused: this environment points at the platform's own database."
Related
- /help/sql-tester/connections-and-environments
- /help/sql-tester/load-testing
- /help/sql-tester/what-a-run-keeps