Skip to content
GitHub (opens in a new tab)

FAQ · Security and credentials

Does GateRook run SQL reads in read-only transactions?

Updated

Yes, for databases that support them, and this protection is always on. PostgreSQL, MySQL and MariaDB, and Oracle run every read in a read-only transaction that ends with ROLLBACK, so the database itself refuses writes to its tables. Amazon Redshift and Google Cloud Spanner reads use read-only transactions too. Other engines differ:

  • SQLite reads through a read-only file handle.
  • SQL Server has no read-only transactions: GateRook applies strict SELECT checks and rolls back. Use a SELECT-only login for protection the server enforces.
  • BigQuery, Snowflake, Databricks, Trino and Athena get no read-only transaction. GateRook checks each statement, in some with the engine's own plan or dry run, and the account's permissions remain the boundary.

A read-only transaction doesn't contain every side effect of a function: advisory locks, signals to other sessions, server files and dblink connections act outside it. GateRook refuses known functions of that kind, and a read that calls a function GateRook doesn't recognize as built in waits for approval; on SQL Server it is refused. This check can't see functions called inside a view or without parentheses, so database privileges still matter: see what GateRook adds to a read-only database user.

All questions

Still have a question?

Ask the GateRook team.

Write to support@gaterook.com about setup, security or anything these answers do not cover. Report bugs and suggest features on GitHub.

Get GateRook

Download GateRook 2.0.0 for your Mac, or get the Windows app from Microsoft Store.

macOS

Version 2.0.0 for Apple Silicon (arm64). This download does not support Intel Macs.

Open the DMG and drag GateRook to Applications.

Windows

Available for free from Microsoft Store. Install GateRook and receive updates through the Store.

macOS release notes and checksums (opens in a new tab)

Optional analytics

Google Analytics measures visits and download clicks. You can turn it off here or change your choice later in Analytics settings.

Analytics is currently on.

Privacy Policy & cookie choices · Google privacy policy (opens in a new tab)