473,503 Members | 4,461 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

Sep 30 '08 #1
2 3903
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
Sep 30 '08 #2
JimL (jm******@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, es****@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

Sep 30 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
5372
by: tommy | last post by:
hello everbody, i write a little asp-application with forms-authentication. i copy my aspx-files with web.config to my webspace and i get the error above... i tried to set the...
3
375
by: Sean | last post by:
HI There, I am having trouble deploying my .aspx pages to a remote server, I have made changes to the config file and it still returns an error. I have also contacted the server administrator to...
9
2753
by: Graham | last post by:
I have been having some fun learning and using the new Controls and methods in .Net 2.0 which will make my life in the future easier and faster. Specifically the new databinding practises and...
5
5693
by: Jonathan Allen | last post by:
Is this the correct way to use application roles? Public Function GetDBConnection() As SqlConnection Dim oCon As New SqlConnection(myConnectionString) oCon.Open() Using oCmd As SqlCommand =...
5
3964
by: bill | last post by:
I am looking for examples and assistance in configuring application roles using SQL Server 2000 and VB.NET, both web forms and windows forms. Are there any suggestions? Thanks Bill
1
1773
by: Matt | last post by:
I'm not entirely sure if this is the best place to post this; if it is not, kindly redirect me to the proper posting area. I'm deploying a Windows Forms application using VB 2005 on top of SQL...
6
1559
by: Matt | last post by:
I have been searching around for quite a while now, trying to figure out how to securely connect a Windows Forms application to an instance of SQL Server 2005. I have looked through SQL Server...
1
1342
by: keithb | last post by:
I developed a web site that uses sql server express for permissions and roles. Now I need to deploy it on a server that uses sql server 2005 standard edition instead of sql server express. What do...
0
995
by: Jack | last post by:
Hello, I need some help in getting my simple web app to work. I can't seem to get the configuration of the Membership/Roles working by pointing my website to a SQL 2005 database as opposed to...
0
7063
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7258
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7313
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7441
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4987
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4663
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3156
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1489
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
366
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.