Solved

SQL Server EXEC sp_helprotect

Posted on 2011-03-08
5
1,232 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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

In this article I will describe the Backup & Restore 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.
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

706 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

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now