Welcome to dbForumz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Application Roles and SQL Server 2005 - DDL?

 
   Database Forums (Home) -> General Discussions RSS
Next:  What caused parsing error?  
Author Message
JimL

External


Since: Sep 30, 2008
Posts: 1



(Msg. 1) Posted: Tue Sep 30, 2008 12:53 am
Post subject: Application Roles and SQL Server 2005 - DDL?
Archived from groups: comp>databases>ms-sqlserver (more info?)

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

 >> Stay informed about: Application Roles and SQL Server 2005 - DDL? 
Back to top
Login to vote
Eric Isaacs

External


Since: May 12, 2008
Posts: 103



(Msg. 2) Posted: Tue Sep 30, 2008 1:05 am
Post subject: Re: Application Roles and SQL Server 2005 - DDL? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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 help with most of the permission
issues.

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

-Eric Isaacs

 >> Stay informed about: Application Roles and SQL Server 2005 - DDL? 
Back to top
Login to vote
Erland Sommarskog2

External


Since: May 30, 2004
Posts: 1556



(Msg. 3) Posted: Tue Sep 30, 2008 6:25 pm
Post subject: Re: Application Roles and SQL Server 2005 - DDL? [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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 RemoveThis @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/prodinfo/previousversions/books.mspx
 >> Stay informed about: Application Roles and SQL Server 2005 - DDL? 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
T-Sql & Active Directory Roles, Identification of original.. - Folks, I have 3 loosely linked problems which I am would appreciate feedback on. 1). T-Sql and Active directory roles. We want to be able to control access to data within a table based on a role within Active directory. For example, Region1 has 4 sites...

SQL Server 2005 article - I'm looking for articles about SQL Server for a new sql server community website. Any article dealing with: T-SQL, Design, OLAP, Reporting, DTS, Administration, ..NET Development. If the article is accepted, and paid for, the author will retain..

Access 2000 and SQL Server 2005 - Is it possible to connect to Sql Server 2005 using an Access 2000 adp? I keep trying, but it doesn't want to accept my id, even though it is right.

Why is SQL Server 2005 Express on my PC and why won't it u.. - I've recently bought a laptop with Windows XP Pro SP2. It keeps trying to install an MS update for SQL Server 2005 Express, but failing (with error 0x2B22). What I'm wondering is, why is this there anyway? No SQL services are shown on the other two..

Help Needed For writting a query (SQl Server 2005). - Hi experts, I am working on SQL Server 2005. Now i have to write a query which will extract some data from 3 to 4 tables. My main table is having few columns supose 4 columns. EmpNo EmpName Date_Of_Joining Date_Of_Appraisal Now records are..
   Database Forums (Home) -> General Discussions All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You can edit your posts in this forum
You can delete your posts in this forum
You can vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]