<p>I get the following error message in SQL Server 2005:</p>

<pre><code>User '&lt;username&gt;' does not have permission to run DBCC DBREINDEX for object '&lt;table&gt;'.
</code></pre>

<p>Which minimum role do I have to give to user in order to run the command?</p>

[{'answer_id': 56720, 'author': 'Galwegian', 'author_id': 3201, 'author_profile': 'https://Stackoverflow.com/users/3201', 'pm_score': 4, 'selected': True, 'text': '<p>You will need to be a member of the <strong>db_ddladmin</strong> or the <strong>db_owner</strong> role AFAIK</p>\n'}, {'answer_id': 56733, 'author': 'Forgotten Semicolon', 'author_id': 1960, 'author_profile': 'https://Stackoverflow.com/users/1960', 'pm_score': 1, 'selected': False, 'text': '<blockquote>\n  <p>Caller must own the table, or be a member of the sysadmin fixed server role, the db_owner fixed database role, or the db_ddladmin fixed database role.</p>\n</blockquote>\n\n<p><a href="http://msdn.microsoft.com/en-us/library/ms181671(SQL.90).aspx" rel="nofollow noreferrer">DBCC DBREINDEX (Transact-SQL) @ MSDN</a></p>\n'}, {'answer_id': 29942812, 'author': 'justintjacob', 'author_id': 1374202, 'author_profile': 'https://Stackoverflow.com/users/1374202', 'pm_score': 1, 'selected': False, 'text': '<p>ALTER AUTHORIZATION ON Tablename TO [domain\\username]</p>\n'}]
['https://Stackoverflow.com/questions/56709', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/383/']