Safe Mode
Safe Mode puts a check in front of queries on a connection. Use it on production databases so a stray DELETE needs a second look, or a password, before it runs.
Levels
Each connection has its own level. Set it from the lock icon in the top bar while the connection is open.
| Level | Before any query | Before a write |
|---|---|---|
| Silent Mode | Nothing | Nothing |
| Alert Mode 1 | Confirm | Confirm |
| Alert Mode 2 | Nothing for reads | Confirm |
| Safe Mode 1 | Password | Password |
| Safe Mode 2 | Nothing for reads | Password |
Reads are SELECT, EXPLAIN, and SHOW. Everything else counts as a write, including DDL.
Silent Mode is the default for new connections. Alert Mode 2 is a good choice for most production databases, and Safe Mode 2 where a mistake would be expensive.
A banner above the editor shows when a connection is in Alert or Safe Mode.
What Safe Mode covers
The check runs on the server for every way a query reaches the database:
- The SQL editor
- Saving edits in the data grid
- Saving schema changes from forms and diagrams
- Writes the AI agent asks you to confirm
Safe Mode password
The first time you pick a Safe Mode level, DBO Studio asks you to choose a Safe Mode password. You need it to run protected queries and to lower the level again.
After you enter it, the connection stays unlocked for 10 minutes by default, so you are not asked again for every query. You can unlock for between 1 and 60 minutes.
- It is separate from your login password and from database passwords.
- Change it in Settings → Security.
- It is stored as a bcrypt hash.
On the desktop app you can unlock Safe Mode with Touch ID, Face ID, or Windows Hello instead of typing the password. Turn that on in Settings → Security.
What Safe Mode is not
Safe Mode protects against mistakes in DBO Studio. It does not replace database permissions. To stop someone from changing data, give them a database user without write access.