LessThanDot Site Logo

LessThanDot

A Technical Community for IT Professionals

Less Than Dot is a community of passionate IT professionals and enthusiasts dedicated to sharing technical knowledge, experience, and assistance. Inside you will find reference materials, interesting technical discussions, and expert tips and commentary.

LTD Social Sitings

Lessthandot twitter Lessthandot Linkedin Lessthandot facebook Lessthandot rss

Note: Watch for social icons on posts by your favorite authors to follow their postings on these and other social sites.

Highly Rated Users

Forum
No Posts Rated

Top 50
Given
Received

Forum Statistics

Users
Members:
1879
Members Online:
1
Guests Online:
69

Total Post History
Posts:
81451
Topics:
18716

7-Day Post History
New Posts:
0
New Topics:
0
Active Topics:
0

Our newest member
mwojcik

Other

FAQ
All times are UTC [ DST ]

Error about Permission

Please wait...

Error about Permission

Postby lareau on Mon Jul 30, 2012 6:01 pm

Hi,

I'm running SqlCop against our sql 2008 R2 database (which is clustered, not sure if it matters).

My permissions on the server are fairly limited. I get an error when run all the rules.

sqlCopError.png
You do not have the required permissions to view the files attached to this post.
lareau
Apprentice
Apprentice
LTD Bronze - Rating: 1
 
Posts: 20
Joined: Fri Oct 15, 2010 7:11 pm
Unrated

Re: Error about Permission

Postby SQLDenis on Mon Jul 30, 2012 6:37 pm

For some of these checks you need to be an admin or have appropriate permissions
User avatar
SQLDenis
LTD Admin
LTD Admin
LTD Gold - Rating: 3467LTD Gold - Rating: 3467LTD Gold - Rating: 3467LTD Gold - Rating: 3467LTD Gold - Rating: 3467
LTD Gold - Rating: 3467LTD Gold - Rating: 3467LTD Gold - Rating: 3467LTD Gold - Rating: 3467LTD Gold - Rating: 3467
LTD Gold - Rating: 3467LTD Gold - Rating: 3467LTD Gold - Rating: 3467
 
Posts: 21784
Joined: Wed Oct 10, 2007 6:43 pm
Location: Princeton, New Jersey, USA,World, Solar System, Milky Way, Universe and Beyond
Unrated

Re: Error about Permission

Postby lareau on Fri Aug 03, 2012 12:29 pm

Agreed, maybe we should not display the error if it occurs? I would mark that the rule failed but a popup isn't necessary.
lareau
Apprentice
Apprentice
LTD Bronze - Rating: 1
 
Posts: 20
Joined: Fri Oct 15, 2010 7:11 pm
Unrated

Re: Error about Permission

Postby gmmastros on Fri Aug 03, 2012 1:17 pm

Can you please run the following query and let me know the output?

  1. If Exists(Select 1 From fn_my_permissions(NULL, 'SERVER') WHERE permission_name = 'VIEW SERVER STATE')
  2.   SELECT instance_name,cntr_value
  3.   FROM   sys.dm_os_performance_counters
  4.   WHERE  OBJECT_NAME collate sql_latin1_general_CP1_CI_AI Like '%:Deprecated Features'
  5.          and cntr_value > 0
  6. Else
  7.   Select 'You do not have VIEW SERVER STATE permissions within this instance.' As ProblemItem
  8.  


It appears as though you need "View Server State" in order to execute the query. The code above should check to make sure you have the appropriate permissions prior to running the actual check itself.
-George
User avatar
gmmastros
LTD Admin
LTD Admin
LTD Gold - Rating: 1630LTD Gold - Rating: 1630LTD Gold - Rating: 1630LTD Gold - Rating: 1630LTD Gold - Rating: 1630
LTD Gold - Rating: 1630LTD Gold - Rating: 1630LTD Gold - Rating: 1630LTD Gold - Rating: 1630LTD Gold - Rating: 1630
LTD Gold - Rating: 1630LTD Gold - Rating: 1630
 
Posts: 2369
Joined: Tue Oct 09, 2007 5:19 pm
Unrated

Re: Error about Permission

Postby lareau on Fri Aug 03, 2012 2:27 pm

As you thought, I received "You do not have View SERVER STATE permissions within this instance.
lareau
Apprentice
Apprentice
LTD Bronze - Rating: 1
 
Posts: 20
Joined: Fri Oct 15, 2010 7:11 pm
Unrated

Re: Error about Permission

Postby gmmastros on Fri Aug 03, 2012 2:37 pm

Great. I will modify SQLCop with this check which will prevent the error from occurring. Thank you very much for bringing this to my attention.

I've been working on other updates to SQLCop and will post the corrected check when I upload the new version of SQLCop.
-George
User avatar
gmmastros
LTD Admin
LTD Admin
LTD Gold - Rating: 1630LTD Gold - Rating: 1630LTD Gold - Rating: 1630LTD Gold - Rating: 1630LTD Gold - Rating: 1630
LTD Gold - Rating: 1630LTD Gold - Rating: 1630LTD Gold - Rating: 1630LTD Gold - Rating: 1630LTD Gold - Rating: 1630
LTD Gold - Rating: 1630LTD Gold - Rating: 1630
 
Posts: 2369
Joined: Tue Oct 09, 2007 5:19 pm
Unrated

Re: Error about Permission

Postby lareau on Fri Aug 03, 2012 3:06 pm

Perfect. If you're doing any ui changes. The suggestions in the post from in October 2010 still apply - Topic12688: Ui Suggestions
lareau
Apprentice
Apprentice
LTD Bronze - Rating: 1
 
Posts: 20
Joined: Fri Oct 15, 2010 7:11 pm
Unrated

Re: Error about Permission

Postby gmmastros on Fri Aug 03, 2012 3:11 pm

I'll see what I can do. Thanks again.
-George
User avatar
gmmastros
LTD Admin
LTD Admin
LTD Gold - Rating: 1630LTD Gold - Rating: 1630LTD Gold - Rating: 1630LTD Gold - Rating: 1630LTD Gold - Rating: 1630
LTD Gold - Rating: 1630LTD Gold - Rating: 1630LTD Gold - Rating: 1630LTD Gold - Rating: 1630LTD Gold - Rating: 1630
LTD Gold - Rating: 1630LTD Gold - Rating: 1630
 
Posts: 2369
Joined: Tue Oct 09, 2007 5:19 pm
Unrated