存储过程未出现在 SSMS 中
在 SQL Server Management Studio 2008 中,我创建了一个存储过程,但在对象资源管理器中查看时,它没有出现在“存储过程”列表中。
我还重新启动了服务器,并重新启动了我的计算机,并在其他计算机上进行了测试,但存储过程仍然没有出现。
我知道这个存储过程存在于系统中,因为如果我执行以下查询:
exec dbo.sp_Orders
我收到以下错误:
Msg 201, Level 16, State 4, Procedure sp_Orders, Line 0
Procedure or Function 'sp_Orders' expects parameter '@OrderID', which was not supplied.
因此它识别出该存储过程存在,甚至返回有关未提供的参数的错误。
为什么会发生这种情况以及如何访问存储过程?
In SQL Server Management Studio 2008, I created a Stored Procedure, but its not appearing in the 'Stored Procedures' list when viewing in Object Explorer.
I've also restarted the server, and restarted my machine, and tested on other machines, and the Stored Procedure still isn't appearing.
I know that this Stored Procedure exists in the system because if I execute the following query:
exec dbo.sp_Orders
I get the following error:
Msg 201, Level 16, State 4, Procedure sp_Orders, Line 0
Procedure or Function 'sp_Orders' expects parameter '@OrderID', which was not supplied.
Therefore its recognising that the Stored Procedure exists, and even returns an error about a Parameter which was not supplied.
Why is this happening and how can I access the sproc?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以尝试按照以下方式访问您的 sp:
exec sp_helptext xxxx
其中 xxxx 是您的 sp 名称。you can try followign to access your sp:
exec sp_helptext xxxx
where xxxx is your sp name.