Re: Removing Permissions from the public role
- From: "Arnie Rowland" <arnie@xxxxxxxx>
- Date: Mon, 27 Nov 2006 13:35:43 -0800
The OP indicated EM was NOT to be used, therefore it is a good assumption
that the version is 2000.
You could cycle through the list generated from INFORMATION_SCHEMA.TABLES
and REVOKE any SELECTs to PUBLIC. That would require a simple dynamic SQL
statement in a loop.
--
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"Jay B" <jayB@xxxxxxxxxxx> wrote in message
news:bLIah.69$Gs5.27@xxxxxxxxxxxxxxx
did you think about putting those 8 tables in a different schema, and then
just granting rights to that schema, revoking the rights for that group
from public.
BrianK wrote:
I have to allow another application a connection to my database and
only grant them select rights to about 8 tables out of a possible 150
tables in this database. I created a new login and added a new role for
that user and ran some grant scripts to allow them to select from the 8
tables they need to select data from. I see that there is a public role
added by default for all new logins that are created. It seems as if
the public security role is still allowing the new login access to all
of the tables in the database. Rather then have 150 lines of T-SQL to
revoke the select permission from the public role is there an easier
way to do this (NOT THROUGH EM ONLY T-SQL). Below are the scripts that
i used to create the new login:
sp_addlogin 'briank','briank','Northwind'
sp_addrole 'lookup'
sp_grantdbaccess 'briank','briank'
sp_addrolemember 'lookup',briank
GRANT SELECT ON PDF TO briank
GRANT SELECT ON SOCIAL TO briank
Any insight would be appreciated
.
- Follow-Ups:
- Re: Removing Permissions from the public role
- From: BrianK
- Re: Removing Permissions from the public role
- References:
- Removing Permissions from the public role
- From: BrianK
- Re: Removing Permissions from the public role
- From: Jay B
- Removing Permissions from the public role
- Prev by Date: Re: Installing SQL Server 2005 on Vista RTM
- Next by Date: Re: Removing Permissions from the public role
- Previous by thread: Re: Removing Permissions from the public role
- Next by thread: Re: Removing Permissions from the public role
- Index(es):
Relevant Pages
|