> User Jans_Test is member of role db_dealer. The role db_dealer is owned by
> Jans_Test.
>
> The role db_dealer owns schema AT.
Permission checking is bypassed for the object owner. Consequently, you
should not specify a role (db_dealer) as the schema owner if you want to
prevent members of that role from using objects in the schema.
> I want to be able to add new users to the role db_dealer and then they
> should only have permission to connect to the database and execute stored
[quoted text clipped - 3 lines]
> And the role should only have permission to connect and execute stored
> procedures.
The script below specifies a database user as the AT schema owner and grants
EXECUTE permission on the AT schema to db_dealer members:
EXEC sp_addrole 'db_dealer'
GO
CREATE USER db_dealer_owner WITHOUT LOGIN;
GO
CREATE SCHEMA AT AUTHORIZATION db_dealer_owner;
GO
CREATE USER Jans_Test FOR LOGIN Jans_Test
WITH DEFAULT_SCHEMA = AT;
GO
EXEC sp_addrolemember 'db_dealer', 'Jans_Test';
GO
--test security
CREATE PROC AT.usp_TestProc AS
SELECT OBJECT_NAME(@@PROCID)
GO
GRANT EXEC ON SCHEMA::AT TO db_dealer;
GO
EXECUTE AS USER = 'Jans_Test';
GO
EXEC AT.usp_TestProc;
GO
REVERT;
GO

Signature
Hope this helps.
Dan Guzman
SQL Server MVP
> Hi
>
[quoted text clipped - 30 lines]
>
> Jan Nielsen
Jan Nielsen - 26 Oct 2006 14:34 GMT
Hi Dan
Thanks a lot for answering. I'll look into this tomorrow.
Best regards
Jan
>> User Jans_Test is member of role db_dealer. The role db_dealer is owned
>> by Jans_Test.
[quoted text clipped - 83 lines]
>>
>> Jan Nielsen