Solved

SQL Server EXEC sp_helprotect

Posted on 2011-03-08
5
1,243 Views
Last Modified: 2012-06-27
I find that there are lots of tables granted to PUBLIC in SQL Server 2000 when I run the EXEC sp_helprotect
Is this the default setting?
If granted to public is that mean everyone can access it?
Any table should NOT grant to public?
anyone can help?
0
Comment
Question by:mawingho
  • 3
  • 2
5 Comments
 
LVL 17

Accepted Solution

by:
dbaSQL earned 500 total points
ID: 35078212
0
 

Author Comment

by:mawingho
ID: 35078292
thank you! I have read it, but... still don't understand...
I have to check my client's SQL Server to see if grant everything to public is it valid?
0
 
LVL 17

Assisted Solution

by:dbaSQL
dbaSQL earned 500 total points
ID: 35078434
No, not necessarily.  Users are automatically added to the public role by default, when the logins are enabled at the database.  This role provides the permissions any new user has in the database.  Every login is a member of public, and inherits the public role privileges.

But -- by default, the role has only the very basic connection permissions.  Unless somebody has revoked or granted explicitly, I don't think you have anything to worry about.
0
 
LVL 17

Assisted Solution

by:dbaSQL
dbaSQL earned 500 total points
ID: 35078467
and you can take a look at this to see your public role privileges:


SELECT a.[name] + ' ' + v.[name] + ' ON ' + QuoteName(oo.[name])
+ '.' + QuoteName(o.[name]) + ' TO ' + QuoteName(u.[name])
   FROM dbo.sysprotects AS p
   JOIN master.dbo.spt_values AS a
      ON (a.number = p.protecttype
      AND 'T' = a.type)
   JOIN master.dbo.spt_values AS v
      ON (v.number = p.action
      AND 'T' = v.type)
   JOIN dbo.sysobjects AS o
      ON (o.id = p.id)
   JOIN dbo.sysusers AS oo
      ON (oo.uid = o.uid)
   JOIN dbo.sysusers AS u
      ON (u.uid = p.uid)
   WHERE  'public' = u.name
0
 

Author Closing Comment

by:mawingho
ID: 35121458
thanks
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

by Mark Wills Attending one of Rob Farley's seminars the other day, I heard the phrase "The Accidental DBA" and fell in love with it. It got me thinking about the plight of the newcomer to SQL Server...  So if you are the accidental DBA, or, simp…
In this article I will describe the Copy Database Wizard method as one possible migration process and I will add the extra tasks needed for an upgrade when and where is applied so it will cover all.
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

785 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question