Stored Procedure Disappearing

  • Hey all,

    I have a .NET 2.0 C# application running with a SQL 2005 Express backend. We are taking a proprietary flat file and running in through our application to add information to the database. We are having an issue at ONE of our client sites where it will run through 50 records (exact same point every time) successfully inserting records through the stored procedure then we get an error. "System.Data.SqlClient.SqlException: Could not find stored procedure 'InsertUser'." It then shows the same error for every record thereafter.

    One of the parent applications has code on startup that will put the stored proc back in the database. So, we verify the stored proc is not in the database, run the parent app, it puts the procedure back, we verify that the procedure is in the database, rerun the secondary app to import this flat file, get through 50 records and then get the error. We can run the cycle all day, it is perfectly consistent.

    Problem is, there is no code in any of the apps to drop the stored proc.

    We have these applications installed around the world and it is only this one client that is having this problem.

    Any ideas on what I am missing here or what I should be looking for?

  • Very strange. As a suggestion, download one of the evaluation versions of SQL Server, install the client tools somewhere and use profiler to watch what's happening to the DB.

    What's the code that you are using to insert the rows?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Looks like we are going to be getting a copy of SQL 2005 Developer Edition to send to the client in order to upgrade their management tools. That will allow us to get the trace info that we need to troubleshoot the problem. Thanks for the info, I will post back when I know more.

  • Really strange behavior!

    You could write a DDL trigger to track the procedure drop.

    -- Gianluca Sartori

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply