Base roles
Each role has its own generated username and password. The database name is
not a username. Reveal or rotate one credential at a time on the database
detail page; rotating one role does not change the others. Rotation and
revocation close that role’s open connections. See
Managed role changes for the API.
Additional roles
You can add up to 10 additional roles per database, for example a separate login for a worker, an analytics tool or a contractor. Pick one access profile when you create the role:
DBHost never gives an additional role
CREATE, TEMPORARY, superuser,
CREATEDB, CREATEROLE or replication privileges. Each role has its own
connection limit, and all roles share the database’s
server connection cap.
Grant access to a Custom role
Run grants as the owner role, ideally in a migration so they are versioned with your schema. Replacereporting_role with the generated
username shown in the dashboard:
ALTER DEFAULT PRIVILEGES only applies to objects created later by the role
that runs it, so run it as the owner role that runs your migrations.
Manage additional roles
On the database page, open the Roles tab. Under Extra roles (or Additional database roles on an existing single-login database), the owner can:- Add a role with a name, access profile and connection limit
- Reveal its password when you need to configure a client
- Rotate its password; open sessions are disconnected
- Revoke it; new logins and active sessions are denied
- Remove a revoked role to free its slot
dbhost managed custom-* commands) require Pro or Business.
Existing databases
A database created before managed SQL roles keeps its single login. The owner can opt in to additional roles from the Roles tab. The existing login, password and connection string stay unchanged. Backups made before opt-in do not include the additional roles. After opt-in, DBHost-produced backups of that database can be restored in place; see Restore from a DBHost backup. Cloning a database that has additional roles is not offered and returns409 LEGACY_OVERLAY_REQUIRES_V4.