PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Hébergement serveur > ms.sqlserver.server > How to Grant Permissions on a non dbo Schema and Exclude dbo
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
How to Grant Permissions on a non dbo Schema and Exclude dbo

Réponse
 
LinkBack Outils de la discussion
Vieux 18/06/2008, 11h58   #1
Charles Law
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut How to Grant Permissions on a non dbo Schema and Exclude dbo

I am using SQL Server 2005.

I have a login that is mapped to a user of the same name: MyUser. I also
have a schema MySchema.

I want to grant permissions on all objects in MySchema to MyUser, and at the
same time exclude all dbo objects. I would like to do this through some
role, if possible, and so not have to select each object in turn and tick
lots of boxes. I would also like MyUser to gain permissions on any new
objects in the MySchema schema, without having to go and explicitly grant
permissions every time a new object is added.

Is this a tall order? I haven't found a built-in role that I could use for
this, so I am wondering if this is possible.

TIA

Charles


  Réponse avec citation
Vieux 18/06/2008, 14h04   #2
Dan Guzman
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How to Grant Permissions on a non dbo Schema and Exclude dbo

> I want to grant permissions on all objects in MySchema to MyUser, and at
> the same time exclude all dbo objects. I would like to do this through
> some role, if possible, and so not have to select each object in turn and
> tick lots of boxes. I would also like MyUser to gain permissions on any
> new objects in the MySchema schema, without having to go and explicitly
> grant permissions every time a new object is added.


Try:

GRANT SELECT, INSERT, UPDATE, DELETE, EXECUTE ON SCHEMA::MySchema TO MyRole;

--
Hope this s.

Dan Guzman
SQL Server MVP
http://weblogs.sqlteam.com/dang/

"Charles Law" <blank@nowhere.com> wrote in message
news:ec0tlnS0IHA.4772@TK2MSFTNGP03.phx.gbl...
>I am using SQL Server 2005.
>
> I have a login that is mapped to a user of the same name: MyUser. I also
> have a schema MySchema.
>
> I want to grant permissions on all objects in MySchema to MyUser, and at
> the same time exclude all dbo objects. I would like to do this through
> some role, if possible, and so not have to select each object in turn and
> tick lots of boxes. I would also like MyUser to gain permissions on any
> new objects in the MySchema schema, without having to go and explicitly
> grant permissions every time a new object is added.
>
> Is this a tall order? I haven't found a built-in role that I could use for
> this, so I am wondering if this is possible.
>
> TIA
>
> Charles
>
>


  Réponse avec citation
Vieux 18/06/2008, 16h21   #3
Charles Law
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: How to Grant Permissions on a non dbo Schema and Exclude dbo

Hi Dan

Thanks for the quick reply. That looks like just the ticket. It wasn't
obvious to me how I would do that using the GUI in SSMS, but after seeing
your suggestion I think I have found it.

Cheers.

Charles


"Dan Guzman" <guzmanda@nospam-online.sbcglobal.net> wrote in message
news:918280AA-5C87-44CE-80E9-3AD0CA3CE9E4@microsoft.com...
>> I want to grant permissions on all objects in MySchema to MyUser, and at
>> the same time exclude all dbo objects. I would like to do this through
>> some role, if possible, and so not have to select each object in turn and
>> tick lots of boxes. I would also like MyUser to gain permissions on any
>> new objects in the MySchema schema, without having to go and explicitly
>> grant permissions every time a new object is added.

>
> Try:
>
> GRANT SELECT, INSERT, UPDATE, DELETE, EXECUTE ON SCHEMA::MySchema TO
> MyRole;
>
> --
> Hope this s.
>
> Dan Guzman
> SQL Server MVP
> http://weblogs.sqlteam.com/dang/
>
> "Charles Law" <blank@nowhere.com> wrote in message
> news:ec0tlnS0IHA.4772@TK2MSFTNGP03.phx.gbl...
>>I am using SQL Server 2005.
>>
>> I have a login that is mapped to a user of the same name: MyUser. I also
>> have a schema MySchema.
>>
>> I want to grant permissions on all objects in MySchema to MyUser, and at
>> the same time exclude all dbo objects. I would like to do this through
>> some role, if possible, and so not have to select each object in turn and
>> tick lots of boxes. I would also like MyUser to gain permissions on any
>> new objects in the MySchema schema, without having to go and explicitly
>> grant permissions every time a new object is added.
>>
>> Is this a tall order? I haven't found a built-in role that I could use
>> for this, so I am wondering if this is possible.
>>
>> TIA
>>
>> Charles
>>
>>

>



  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 04h29.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,10301 seconds with 11 queries