?
Solved

SQL 2008 R2 Permissions

Posted on 2013-05-13
1
Medium Priority
?
362 Views
Last Modified: 2013-05-30
How do you give permissions to add or drop indexes? I do not want the user to be able to truncate tables, drop tables stop replication. I only want this user to be able to login with a special SQL login and add or drop indexes on a table. Please do not suggest I do this myself or ask why I'm allowing this. This is the business requirement period. Can this be done and if so how?
0
Comment
Question by:cheryl9063
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 8

Accepted Solution

by:
didnthaveaname earned 2000 total points
ID: 39161523
Create index:
Requires ALTER permission on the table or view. User must be a member of the sysadmin fixed server role or the db_ddladmin and db_owner fixed database roles.
(src: http://msdn.microsoft.com/en-us/library/ms188783%28v=sql.100%29.aspx)

Drop index: same as create index (src: http://msdn.microsoft.com/en-us/library/ms176118%28v=sql.105%29.aspx

Alternatively, you could look at creating a stored procedure that takes the requisite arguments and creates the index using an execute as clause and give aforementioned permissions to that account instead of the user.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Ever needed a SQL 2008 Database replicated/mirrored/log shipped on another server but you can't take the downtime inflicted by initial snapshot or disconnect while T-logs are restored or mirror applied? You can use SQL Server Initialize from Backup…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question