I have a database and have a Sql script to add some fields to a table called \"Products\" in the database.
But when i am executing this script, I am getting the foll
I found a reason why this would happen. The user had the appropriate permissions, but the stored procedure included a TRUNCATE
statement:
TRUNCATE TableName
Since TRUNCATE
deletes items without logging, you (apparently) need elevated permissions to execute a stored procedure that contains it. We changed the statement to:
DELETE FROM TableName
...and the error went away!
It could also be possible that you have created the "Products" in your login schema and you were trying to execute the same in a different schema (probably dbo)
Steps to resolve this issue
1)open the management studio 2) Locate the object in the explorer and identify the schema under which your object is? ( it is the text before your object name ). In the image below its the "dbo" and my object name is action status
if you see it like "yourcompanydoamin\yourloginid" then you should you can modify the permission on that specific schema and not any other schema.
you may refer to "Ownership and User-Schema Separation in SQL Server"