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 > comp.db.ms-sqlserver > Application Roles and SQL Server 2005 - DDL?
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Application Roles and SQL Server 2005 - DDL?

Réponse
 
LinkBack Outils de la discussion
Vieux 30/09/2008, 09h53   #1
JimL
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Application Roles and SQL Server 2005 - DDL?

Hello group,

We have recently come up with a problem where SQLServer 2005 differs
from 2000.

We have an application role, which needs to run DDL to alter tables
etc. The documentation for 2005 states quite clearly that application
roles cannot be made members of built in roles like db_owner or
db_ddladmin - which proves to be the case, but this was possible in
2000.

How are we to give application roles these rights in 2005 (and, for
all I know 2008)?

Thanks,

Jim

  Réponse avec citation
Vieux 30/09/2008, 10h05   #2
Eric Isaacs
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Application Roles and SQL Server 2005 - DDL?

When you create an object such as a stored procedure, try declaring it
WITH EXECUTE AS OWNER. If dbo owns the procedure, it will execute as
dbo. Anyone that has permission to run that sproc has the required
permission. Just make sure any other spocs it calls also have this
permission declared. That should with most of the permission
issues.

http://www.mssqltips.com/tip.asp?tip=1227

-Eric Isaacs
  Réponse avec citation
Vieux 30/09/2008, 23h47   #3
Erland Sommarskog
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Application Roles and SQL Server 2005 - DDL?

JimL (jmlawton@gmail.com) writes:
> We have recently come up with a problem where SQLServer 2005 differs
> from 2000.
>
> We have an application role, which needs to run DDL to alter tables
> etc. The documentation for 2005 states quite clearly that application
> roles cannot be made members of built in roles like db_owner or
> db_ddladmin - which proves to be the case, but this was possible in
> 2000.
>
> How are we to give application roles these rights in 2005 (and, for
> all I know 2008)?


Not sure that I understand. This worked fine for me on SQL 2005:

create application role approlle with password = 'rolle'
exec sp_addrolemember db_owner, approlle



--
Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se

Links for SQL Server Books Online:
SQL 2008: http://msdn.microsoft.com/en-us/sqlserver/cc514207.aspx
SQL 2005: http://msdn.microsoft.com/en-us/sqlserver/bb895970.aspx
SQL 2000: http://www.microsoft.com/sql/prodinf...ons/books.mspx

  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 02h31.


É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,08920 seconds with 11 queries