views:

501

answers:

4

I get the following error message in SQL Server 2005:

User '<username>' does not have permission to run DBCC DBREINDEX for object '<table>'.

Which minimum role do I have to give to user in order to run the command?

+1  A: 

You will need to be a member of the db_ddladmin or the db_owner role AFAIK

Galwegian
+1  A: 

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.

DBCC DBREINDEX (Transact-SQL) @ MSDN

Forgotten Semicolon
A: 

Cheers, adding db_owner worked :)

GateKiller
+1  A: 

@GateKiller: db_owner is not the minimum privileged role.

Forgotten Semicolon