消失的存储过程 [英] Disappearing Stored Procedure

查看:26
本文介绍了消失的存储过程的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

所以,不确定发生了什么.但是我有存储过程,它在 SQL 2k 中一直从我的数据库中消失.

So, not sure what is happening. But I have stored procedure and it keeps disappearing out of my DB in SQL 2k.

我可以再次添加它,然后尝试从我的 Web 应用程序执行它,但我收到一个异常,说找不到存储过程.然后我回到管理和刷新,它又消失了!?!

I can add it again and then try to execute it from my web app and i get an exception saying the stored procedure cant be found. So then ill go back to management and refresh and its gone again !?!

这里是存储过程的配置:

here is the config for the stored proc:

set ANSI_NULLS OFF
set QUOTED_IDENTIFIER ON
GO

ALTER PROCEDURE [dbo].[USP_Equipment_Delete]
    @EquipmentID int
AS

DELETE FROM [dbo].[Equipment]
WHERE
    [EquipmentID] = @EquipmentID

我的其他存储过程都没有消失.这是唯一的.我在那里很容易有 100 个.它们都使用相同的 SQLHelper 类.这个一直在消失!!!??!!

None of my other stored procedure disappear. This is the only one. I have easily 100 in there. They all use the same SQLHelper class. This one just keeps disappearing!!!??!!

感谢任何帮助或建议!

非常感谢!

推荐答案

你正在创建这个或另一个存储过程,在你的代码结束时,也许在评论之后,你没有看到它,你有一滴这个过程

You were creating this or another stored proc and at the end of your code, maybe after a comment, where you did not see it you have a drop of this proc.

使用以下命令查看您的数据库:

Take a look at your db using:

select syo.name
from syscomments syc
    join sysobjects syo on
        syo.id = syc.id
where syc.[text] like '%DROP PROC%'

这篇关于消失的存储过程的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆