Ryan Shine
Ryan Shine

Reputation: 522

How to grant specific table ownership to specific user?

I am intend to execute DBCC which is change seed identity on the sqlserver

DBCC CHECKIDENT ('[dbo].[AUTO_CAMPAIGNTRX]', RESEED, 266)

Now when i execute this, i get this

User 'wlDBusr' does not have permission to run DBCC CHECKIDENT for object 'AUTO_CAMPAIGNTRX'.

But i cannot grant this user have db ownership because it involved many tables, i want to grant him the ownership to that particular table only.

What i have tried,

Right click the table and specific the user and grant him all access, not work. enter image description here

Upvotes: 2

Views: 506

Answers (1)

Stanislav Kundii
Stanislav Kundii

Reputation: 2894

Use exec proc

CREATE PROC dbo.chk
WITH EXECUTE AS OWNER
AS
DBCC CHECKIDENT ('[dbo].[a]', RESEED, 266)
GO

Upvotes: 1

Related Questions