How to avoid VIEW SERVER STATE permission error using SQL Doc?
Are there settings for SQL Doc that avoid attempting to do operations that require VIEW SERVER STATE permissions?
We are developers (not DBAs) who do not have and will not be granted these permissions on our QA (or production) servers.
Our current .sqldoc file includes the following:
We are developers (not DBAs) who do not have and will not be granted these permissions on our QA (or production) servers.
Our current .sqldoc file includes the following:
Option uri="http://sqldoc/project/selections/sections/advancedserversettings/include/" value="False"
Option uri="http://sqldoc/project/selections/sections/serversettings/include/" value="False"
Bob Good
Answers
Sean Quigley | Product Support Engineer | Redgate Software
Have you visited our Help Center?
For SQL Compare 13; VIEW DEFINITION is the only minimum permission needed.
Even including the following option to exclude trusted assemblies, a VIEW SERVER STATE error was generated when SQL Doc submitted a select query against the sys.trusted_assemblies DMV.
Option uri="http://sqldoc/project/selections/sections/trustedassemblies/include/" value="False"
Defect or proposed feature request:
SQL Doc should determine whether VIEW SERVER STATE permissions exist; and modify its behavior to not issue any DMV query requiring that permission.
Where appropriate, in place of the parts of the documentation (nodes) for which the privileged DMVs are needed, a message stating the item cannot be documented because the user does not have view server state permissions.
Alternative: an option to avoid privileged DMVs should be part of the .sqldoc project file. The difference between this option and that above is how the behavior is determined (by querying for the existence of permissions, or by a project file option).
It is not too much of a leap to include consideration of permissions in controlling the behavior of SQL Doc.
Is there a specific object or section I can exclude to get around this error?