简体   繁体   English

无效的对象名称SQL Server存储过程

[英]Invalid object name sql server stored procedure

I am getting this error while trying to modify the existing stored procedure. 尝试修改现有存储过程时出现此错误。 "Invalid object name [dbo].[BackupDB]"

I was able to create this stored procedure but when I click on modify option to modify this stored procedure system shows me the above error. 我能够创建此存储过程,但是当我单击“修改”选项以修改此存储过程时,系统显示上述错误。 You see the attached image. 您会看到附件的图像。

Also i am getting same error when try to execute this command. 当尝试执行此命令时,我也遇到相同的错误。 It won't find BackupDB 找不到BackupDB

EXEC BackupDB @backupLocation='C:\SQLBackups\', 
                              @databaseName=’wmas_subs’, @backupType='F'

http://i61.tinypic.com/6oj32s.png http://i61.tinypic.com/6oj32s.png

If you drop and re-create a stored procedure it gets a new objectid - the list of stored procedures in SSMS is linked to the id it knows at the time the list was built. 如果删除并重新创建存储过程,它将获得一个新的objectid-SSMS中存储过程的列表将链接到在构建列表时知道的ID。 If you re-create it but don't refresh the stored procedures folder then any attempts to edit it will indicate the procedure is not found as the id has changed. 如果重新创建它但不刷新存储过程文件夹,则任何编辑它的尝试都将指示未找到该过程,因为ID已更改。

尝试刷新Management Studio上存储过程的文件夹

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM