Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

sql view server state permission was denied

I just installed SQL server 2014 however, I have a problem creating the database or even view properties.

I get "VIEW SERVER STATE permission was denied on the object 'server', database 'master'. Microsoft Server, Error:300"

I cannot alter my server roles, I have only "Public" role for some reason. any ideas?

like image 678
Mindan Avatar asked May 22 '17 06:05

Mindan


3 Answers

connect to ssms using administrator(sysadmin) account and execute the below

USE MASTER
GO
GRANT VIEW SERVER STATE TO [username]
like image 84
Ramkumar Sambandam Avatar answered Sep 22 '22 08:09

Ramkumar Sambandam


From SQL Server Expert

Login user do not have VIEW SERVER STATE permission and granting the required permission solves the issue.

USE MASTER
GO
GRANT VIEW SERVER STATE TO <username>
like image 37
Mukesh Modhvadiya Avatar answered Sep 19 '22 08:09

Mukesh Modhvadiya


Just for reference, this problem seems to be related to this bug.

I have the same problem with SQL Server Management Studio 2012.

If anyone finds stuck with this problem, try to update the SQL Server Management Studio. This way, you don't need to grant the permission VIEW SERVER STATE to the user.

Using SQL Server Management Studio 2014 (12.0.4213.0) now, and the problem seems to be gone

like image 35
EeNiArT Avatar answered Sep 22 '22 08:09

EeNiArT