sql-server


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

Related Links

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
Informatica powercenter
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

Categories

HOME
json
cluster-computing
mql4
erlang
angular-cli
windows-store-apps
phaser-framework
devstack
apiconnect
jframe
cartodb
spinnaker
data-analysis
lstm
mule-studio
primes
vs2017
jni
jconsole
raphael
http-method
novnc
sumo
dpi
lmdb
protobuf-net
openshift-enterprise
bing-maps-api
es-shell
discord.net
dart-pub
jupyter-console
datalog
pytest-django
upsert
prototypejs
automator
range-v3
number-theory
drawingarea
xmgrace
spell-checking
greenhills
maintenance
google-maps-ios
search-box
sql-import-wizard
c64
xib
visible
dts
dojox.charting
kendo-combobox
string-parsing
git-rebase
cmocka
servlet-3.0
test-class
fabric-twitter
python-winshell
pyrocms
ipojo
ibm-data-studio
pgm
ember-cli-addons
es2015
errorprovider
cg
sortable
snmp4j
yahoo-boss-api
indexing-service
healthvault
cdata
sql-server-2012-web
haskell-platform
windows-update
visual-studio-2003
ng-pattern
resgen
digital-design
pascals-triangle
htmltextwriter
gdataxml
dynamic-data
blockingqueue
scrollto
mpmovieplayer
flexicious
surf
newsstand-kit
collect
smooth
carbide
asp.net-routing
task-management
chdatastructures
pci-bus
webrat
web-statistics
interface-design
divx
document-library
associativity

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App