找不到对象"XXX".因为它不存在或您没有权限 [英] Cannot find the object "XXX" because it does not exist or you do not have permission
问题描述
调用存储过程时出现以下错误:
I'm getting the following error when calling a stored procedure:
找不到对象"XXX",因为它不存在或您没有权限.
Cannot find the object "XXX" because it does not exist or you do not have permission.
我已经检查了数据库,并且SP具有正确的权限,但仍然出现错误.
I've checked the database and the SP is there with the correct permissions yet I'm still getting the error.
有什么建议吗?
推荐答案
好的,这就是发生的事情. SP结束之前有一个特殊字符,因此它不完整但仍然有效,以某种方式.
Ok, here's what happened. There was a special character before the end of the SP so it was incomplete yet still valid, somehow.
所以我可以看到SP并看到它的权限,但我无法运行它.因此,要解决该问题,我必须将文本从SQL Management Studio中复制并粘贴到记事本中,然后删除特殊字符,然后将其复制并粘贴回SQL Management Studio中并运行alter script.
So I could see the SP and see the permissions on it but I could not run it. So to solve the issue I had to copy the text out of SQL Management Studio and paste it into Notepad, then remove the special character, then copy and paste it back into SQL Management Studio and run the alter script.
很奇怪角色是怎么到达那里的!
Very strange how the character got there!
这篇关于找不到对象"XXX".因为它不存在或您没有权限的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!