Sql-server – SQL User with only access to maintain indexes and statistics

indexmaintenancepermissionssql-server-2008-r2statistics

I need to have an AD user account with access to all databases on a specific instance of SQL Server 2008 R2, and the only thing that user will be doing is;

  • Reorganize indexes
  • Database integrity
  • Update stats

The database admin here says for this I need to give dbo access to this user on all databases; is that really true or is there a better / more secure way of giving this specific access to one user?

Best Answer

Create stored procedures that do these tasks for them - these can be set to execute as owner and the user account can just be granted execute rights on the stored procedures. It means they'll have to learn the interface to your stored procedures (so document them well or give them view definition rights to them also).