Is there a specific SQL Server 2008 R2 Permission to run DBCC CHECKIDENT?
-
11-10-2020 - |
Question
MS Docs (Books online) states the caller must either own the containing schema or be a member of fixed DB roles. (sysadmin, db_owner, db_ddladmin).
Is there a specific permission or set of permissions, that could be granted to allow this in SQL Server 2008 R2?
I have a case where I need to give the permission but with the least amount of privilege and want to avoid creating a stored procedure (with execute as) that allows the specific set of tables they need to perform this against.
They also need TRUNCATE however that's covered with the ALTER permission.
Solution
I think that MS-Docs on DBCC CHECKIDENT are really clear:
Permissions
Caller must own the schema that contains 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.