Tag Info

New answers tagged


ApexSQL Search - http://www.apexsql.com/sql_tools_search.aspx free tools, search database object (for this tasks) - search code for columns name


The Activity Monitor shows up as a standard user session, "sleeping" in tempdb (database_id = 2, generally), with the program_name of "Microsoft SQL Server Management Studio". It only queries at the rate of it's refresh window, but those identifiers, plus the total_elapsed_time, should make it feasible to find your idling monitors.


This request is very similar to, if not the same as, another question on here (DBA.StackExchange) regarding the need for very granular elevated permissions. I provided working code in my answer, and that could be used here as well: What minimum permissions do I need to provide to a user so that it can check the status of SQL Server Agent Service? The ...


sysmail_update_account_sp requires membership in the sysadmin fixed server role. This means that DatabaseMailUserRole or any other msdb fixed database role is not enough. Using EXECUTE AS LOGIN to impersonate a sysadmin login from your non-privileged login completely defeats the purpose of using a non-privileged user, as it can escalate permissions at any ...


The least intrusive way to get this working is to either use the following command or have the DBA issue this command for you: use master go GRANT VIEW SERVER STATE TO <user_name>


Instead of relying on shaky assumptions on the application name, why don't you just revoke permissions from those users that are not supposed to run the procedure? You said that developers should not run it accidentally: revoke EXECUTE permissions from them and force them to use a different login to perform this task (if they are supposed to perform it, ...

Top 50 recent answers are included