Cannot find the object “XXX” because it does not exist or you do not have permission

前端 未结 13 1058
[愿得一人]
[愿得一人] 2021-01-11 11:23

I\'m getting the following error when calling a stored procedure:

Cannot find the object \"XXX\" because it does not exist or you do not have permission.

I\'

相关标签:
13条回答
  • 2021-01-11 12:17

    Possible typo or already removed? Refresh your view or query for it (looks like this was for a stored procedure):

    SELECT name AS procedure_name   
        ,SCHEMA_NAME(schema_id) AS schema_name  
        ,type_desc  
        ,create_date  
        ,modify_date  
    FROM sys.procedures; 
    

    Then if it's listed, copy the name and try your query with the name taken from those results (or copy the object's name any other way you may be familiar with).

    MORE GENERIC SOLUTION FOR ANY OBJECT (if you have SSMS): In SQL Server Management Studio, right-click on the object, "Script [OBJECT_TYPE] as", DROP To (or the action you're attempting), New Query Editor.

    If you can run this successfully you probably had a typo.

    0 讨论(0)
提交回复
热议问题