Re: Complete Neophyte Question(s)



James (minorkeys@xxxxxxxxx) writes:
That makes complete sense to me, but somehow I'm overlooking something.

I have a user named james on a database. If I go into properties for
that user they have no owned schemas. They have no role membership
(including public, which isn't listed here for some reason). If I
right-click the database and go to properties -> Permissions, the only
permission they have is Connect, not view definition.

The only thing I can see is that there's a login of the same name at the
server level which is a member of the Server Role public, but my
understanding is that it's unrelated.

So the long and the short of it, is that this user can view definition on
this database, and I can't figure out why.

If you under database roles look at the public role, does it have any
permissions on anything?

If you run:

execute as login = 'james'
go
select * from sys.fn_my_permissions('dbo.Orders', 'object')
go
revert

What do you see?



--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
.