Skip to content

Users & Roles for SQL Server and Oracle #3610

Closed

Description

@datlechin

Problem

Database > Users & Roles lists accounts, edits their privileges as a tree and stages CREATE, ALTER, GRANT, REVOKE and DROP statements for review. It is available on MySQL, MariaDB, PostgreSQL and PGlite only, and dimmed everywhere else (features/users-roles.mdx:8). A driver opts in by implementing PluginPrincipalManagement (apple/Plugins/TableProPluginKit/PluginPrincipalManagement.swift); the SQL Server and Oracle plugins do not.

On those two engines, checking what a login can do, or granting a role, means writing catalog queries and GRANT statements by hand.

Proposed solution

  • SQL Server: server logins from sys.server_principals and database users and roles from sys.database_principals, with the mapping between a login and its user in each database. Privileges from sys.server_permissions and sys.database_permissions at server, database, schema and object scope. Role membership through ALTER ROLE ... ADD MEMBER and ALTER SERVER ROLE. Create, disable and drop logins and users, set a password, set the default database and schema.
  • Oracle: users and roles from DBA_USERS and DBA_ROLES, falling back to the ALL_ and USER_ views when the account cannot read DBA_. System privileges from DBA_SYS_PRIVS, object privileges from DBA_TAB_PRIVS, and granted roles from DBA_ROLE_PRIVS, including WITH ADMIN OPTION and WITH GRANT OPTION. Create, lock, unlock and drop users, set a password, set the default tablespace and quota.
  • The same review and apply flow as today: statements staged, previewed and applied under Safe Mode, and SQL Server's statements run in one transaction where the server allows it.

Done when: on SQL Server 2019 and Oracle 19c, an account's effective privileges match what the server reports, and creating a user, granting a role and revoking it round-trip.

Alternatives considered

Query the catalog views and write GRANT and REVOKE in a query tab.

Platform

macOS

Related database type

N/A / General

Activity

  1. added
    enhancement
    platform-macos
    on Oct 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementplatform-macos

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions