Custom sp_who without granting view server state
I need a stored procedure that I can give to a group of users that will allow them to see all running processes (like sp_who), but I don't want these users to have VIEW SERVER STATE permissions as this will expose too much metadata. I also need to allow the users to kill processes. This is for a dev server dedicated to this group, and my goal is to allow this functionality without exposing more info than necessary. Anyone have any ideas? So far I've tried creating a stored procedure that calls sp_who as me (DBA), but the results only show the callers current process. TYIA!!!
You need to create a stored procedure with an EXECUTE AS LOGIN SomeLogin with the Permission "View Server State" and grant the users access to that one for such needs. Same for the kill command which you should wrap into such code + do some security checking first
SQL Server to Postgresql - Database migration - Tool issues
SQL Agent Job to run .bat with gsutil rsync
Tool/script to clone SQL Server database with reduced rights (without backup functionality)?
SQL Server function with parameters
Bulk Load Data Conversion Error - Can't Find Answer
when i exec select on linux with odbc, hang on '__select_nocancel'
The system cannot find the file specified on Production server
An Error when trying to connect to SQL Server
Temporary table not created from dynamic query execution
How to process the data in the table, which is frequently inserted
Combine two columns and input the result in a different columns using SQL server
SQL Query to accept time difference
How to change my T-SQL query to overwrite a csv file rather than append data to it?
How to join multiple columns with only one foreign key using linq
Deleting millions on records while using log shipping - SQL Server