VIEW SERVER STATE permissions error

Discussion in 'Databases' started by DJGray, Apr 18, 2018.

Tags:
  1. I am connecting to my DB via SSMS, and have set the default database to my WinHost assigned DB name. I'm able to connect and work with the database.

    The problem arises when I right click any table in the DB in order to do a select or edit on that table. Following the right-click, I am greeted with a modal popup that says:

    An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

    VIEW SERVER STATE permission was denied on object 'server', database 'master'. (Microsoft SQL Server, Error: 300)

    It would appear that WinHost's SQL Server still believes my default DB is "master" and given that belief, the error message makes sense. But I set the default DB to be my own database in the connect dialog.

    Any insights?

    - damon
     
  2. ComputerMan

    ComputerMan Winhost Staff

    I've seen this issue before and I believe the error is misleading.

    First question is what version of SQL Server Management Studio are you using? Next what version of SQL database are you connecting to.

    If you're using an older SSMS to connect to a newer SQL Server. You might run into this error. Try upgrading SSMS locally on your computer to the highest version.
     
    Elshadriel likes this.
  3. Aha. That may indeed be the issue. I'm at work, and there I have SSMS 2012, but the WinHost SQL Server to which I am connected is 2016. Let me do as you suggest and get a newer version of SSMS and try it again.

    Thanks ComputerMan!

    UPDATE:

    Shazaam! You nailed it. Updated SSMS to 2016 and everything behaves exactly as I would expect it to. Problem solved.
     
    Last edited: Apr 18, 2018
    ComputerMan likes this.

Share This Page