SQL Server losing sql code in stored procs...HELP!

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Koretex
    New Member
    • Feb 2007
    • 4

    SQL Server losing sql code in stored procs...HELP!

    In the last week, a stored procedure that updates a table used for populating our websites, has lost code for various columns, causing several of our Euro Websites to fall over! I can't figure out why, how, when..in other words I am lost. No-one has changed the sp since it was created, but out of the blue, update statements etc for several columns went missing. Is there a known bug/problem that anyone knows about that could cause this?
  • almaz
    Recognized Expert New Member
    • Dec 2006
    • 168

    #2
    I don't think that looking for bugs in SQL Server engine have any perspective.
    It is more likely that input data somehow became corrupted. Or your stored procedures don't use transactions correctly, so a single failure caused data corruption.

    Comment

    • Koretex
      New Member
      • Feb 2007
      • 4

      #3
      Originally posted by almaz
      I don't think that looking for bugs in SQL Server engine have any perspective.
      It is more likely that input data somehow became corrupted. Or your stored procedures don't use transactions correctly, so a single failure caused data corruption.
      It's not data corruption, but actual code being lost. I have to re-add code that was in the stored proc, that is not right. This is a stable stored proc that has been in use for months, but out of the blue loses bit of information.

      Comment

      • almaz
        Recognized Expert New Member
        • Dec 2006
        • 168

        #4
        Originally posted by Koretex
        It's not data corruption, but actual code being lost. I have to re-add code that was in the stored proc, that is not right. This is a stable stored proc that has been in use for months, but out of the blue loses bit of information.
        So... your stored procedure just lost several SQL statements? So that part of the stored procedure exists, but some of SQL statements are lost? It is much more likely to be a human factor.
        To be sure that your DB objects are consistent, try running DBCC CHECKDB

        Comment

        • Koretex
          New Member
          • Feb 2007
          • 4

          #5
          Originally posted by almaz
          So... your stored procedure just lost several SQL statements? So that part of the stored procedure exists, but some of SQL statements are lost? It is much more likely to be a human factor.
          To be sure that your DB objects are consistent, try running DBCC CHECKDB
          Yep that's exactly it, several of the sql statements were lost, but some still there. It is not possible that it's human factor. Ran checks and all objects are consistent with no other errors. :S
          Thanks for the help!

          Comment

          Working...