Solved

SQL Server EXEC sp_helprotect

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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

So every once in a while at work I am asked to export data from one table and insert it into another on a different server.  I hate doing this.  There's so many different tables and data types.  Some column data needs quoted and some doesn't.  What …
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.

688 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