Hi @Doria ,
According to MS document, i listed the permissions of performing below commands.
- DBCC CHECKDB ([master]) WITH ALL_ERRORMSGS; ------- Requires membership in the sysadmin fixed server role or the db_owner fixed database role.
- DBCC SHRINKDATABASE ();------Requires membership in the sysadmin fixed server role or the db_owner fixed database role.
- DBCC UPDATEUSAGE ();------Requires membership in the sysadmin fixed server role or the db_owner fixed database role.
- EXEC sp_cycle_errorlog;------Execute permissions for sp_cycle_errorlog are restricted to members of the sysadmin fixed server role.
- EXEC sp_updatestats;------ To run sp_updatestats, the user must be the owner of the database (the dbo, not just member of the role db_owner) or to be member of the sysadmin fixed server role.
- sys.database_files------ Requires membership in the public role. sys.dm_exec_requests ------ If the user has VIEW SERVER STATE permission on the server, the user will see all executing sessions on the instance of SQL Server; otherwise, the user will see only the current session. sys.dm_exec_sessions.------ SQL Server: Requires VIEW SERVER STATE permission on SQL Server to see all sessions on the server.
SQL Database: Requires VIEW DATABASE STATE to see all connections to the current database.
> Is it possible to perform the commands below on SQL Server 2017 not belonging to the sysadmin or db_owner roles?
No, it is not possible. We can check this from above information.
Best regards,
Cathy
If the response is helpful, please click "Accept Answer" and upvote it.
Hot issues October--Users always get connection timeout problem when using multi subnet AG via listener. Especially after failover to another subnet