?
Solved

SQL Server EXEC sp_helprotect

Posted on 2011-03-08
5
Medium Priority
?
1,276 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 17

Accepted Solution

by:
dbaSQL earned 2000 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 2000 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 2000 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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

In SQL Server, when rows are selected from a table, does it retrieve data in the order in which it is inserted?  Many believe this is the case. Let us try to examine for ourselves with an example. To get started, use the following script, wh…
Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

770 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