Cannot find the object because it does not exist or you do not have permissions. Error in SQL Server

前端 未结 14 2081
面向向阳花
面向向阳花 2020-12-05 12:35

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

14条回答
  •  一整个雨季
    2020-12-05 13:23

    Look for any DDL operation in the script. Maybe the user does not have access rights to run changes.

    In my case it was SET IDENTITY_INSERT tblTableName ON

    You can either add db_ddladmin for the whole database or for just the table to solve this issue (or change the script)

    -- give the non-ddladmin user INSERT/SELECT as well as ALTER:
    GRANT ALTER, INSERT, SELECT ON dbo.tblTableName TO user_name;
    

提交回复
热议问题