Permissions required for SQLjobvis

SQLjobvis is a tool I’ve blogged about before. For more info on what SQLjobvis is and how it can help you you can read my blog post here.

A reader had commented on that post and mentioned that they didn’t have the necessary permissions to run SQLjobvis. But what are those permissions? The website doesn’t appear to mention required permissions and personally I like discovering what permissions are required for tools, apps or code.

After some playing around in a local development instance I discovered that only read access to some system tables in the msdb database are required. Below is the code I created. Note the database role is not required, however I find it best when granting permissions this way.

USE [msdb];
GO
CREATE ROLE [SQLJobVis] AUTHORIZATION [dbo];
GO
GRANT SELECT ON OBJECT::[dbo].[syscategories] TO [SQLJobVis];
GO
GRANT SELECT ON OBJECT::[dbo].[sysjobactivity] TO [SQLJobVis];
GO
GRANT SELECT ON OBJECT::[dbo].[sysjobhistory] TO [SQLJobVis];
GO
GRANT SELECT ON OBJECT::[dbo].[sysjobs] TO [SQLJobVis];
GO

Leave a Reply

Your email address will not be published. Required fields are marked *