Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. The Lounge
  3. My faith in SQL Server has been knocked [modified]

My faith in SQL Server has been knocked [modified]

Scheduled Pinned Locked Moved The Lounge
csharpbeta-testinghelpdatabasesql-server
9 Posts 8 Posters 4 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Shaun Wilde
    wrote on last edited by
    #1

    I'll say this now SQL (Server) and I have never been friends - there is something about it that grates with my OO brain; but I get by and I am determined to get much better. Now the rant. Been tracking a (unrepeatable, at the moment, bug in test - happens sporadically on live) bug in our system. Traced/reviewed all the code in SQL, BizTalk and C# moduled, all looks okay; code reviewed by many eyeballs and all involved puzzled. Started hitting google with random queries (usually coffee induced). Came across this article SCOPE_IDENTITY() sometimes returns incorrect value[^] scenario is very much like ours. WTF! SCOPE_IDENTITY() was one of my little comfort blankets when using SQL and now not even it offers the security I thought it did. Now researching the issue more thoroughly and going through the options suggested. I might start crying/drinking or both, if after testing/live the issue is resolved. [edited title due to CP pedantry]

    I'll be more enthusiastic about encouraging thinking outside the box when there's evidence of any thinking going on inside it. - pTerry
    BizSquawk

    modified on Thursday, June 11, 2009 10:15 AM

    E N P T L 5 Replies Last reply
    0
    • S Shaun Wilde

      I'll say this now SQL (Server) and I have never been friends - there is something about it that grates with my OO brain; but I get by and I am determined to get much better. Now the rant. Been tracking a (unrepeatable, at the moment, bug in test - happens sporadically on live) bug in our system. Traced/reviewed all the code in SQL, BizTalk and C# moduled, all looks okay; code reviewed by many eyeballs and all involved puzzled. Started hitting google with random queries (usually coffee induced). Came across this article SCOPE_IDENTITY() sometimes returns incorrect value[^] scenario is very much like ours. WTF! SCOPE_IDENTITY() was one of my little comfort blankets when using SQL and now not even it offers the security I thought it did. Now researching the issue more thoroughly and going through the options suggested. I might start crying/drinking or both, if after testing/live the issue is resolved. [edited title due to CP pedantry]

      I'll be more enthusiastic about encouraging thinking outside the box when there's evidence of any thinking going on inside it. - pTerry
      BizSquawk

      modified on Thursday, June 11, 2009 10:15 AM

      E Offline
      E Offline
      Ennis Ray Lynch Jr
      wrote on last edited by
      #2

      .

      Need custom software developed? I do C# development and consulting all over the United States. A man said to the universe: "Sir I exist!" "However," replied the universe, "The fact has not created in me A sense of obligation." --Stephen Crane

      M 1 Reply Last reply
      0
      • E Ennis Ray Lynch Jr

        .

        Need custom software developed? I do C# development and consulting all over the United States. A man said to the universe: "Sir I exist!" "However," replied the universe, "The fact has not created in me A sense of obligation." --Stephen Crane

        M Offline
        M Offline
        Michael Bookatz
        wrote on last edited by
        #3

        Couldn't say it better myself :confused::confused:

        1 Reply Last reply
        0
        • S Shaun Wilde

          I'll say this now SQL (Server) and I have never been friends - there is something about it that grates with my OO brain; but I get by and I am determined to get much better. Now the rant. Been tracking a (unrepeatable, at the moment, bug in test - happens sporadically on live) bug in our system. Traced/reviewed all the code in SQL, BizTalk and C# moduled, all looks okay; code reviewed by many eyeballs and all involved puzzled. Started hitting google with random queries (usually coffee induced). Came across this article SCOPE_IDENTITY() sometimes returns incorrect value[^] scenario is very much like ours. WTF! SCOPE_IDENTITY() was one of my little comfort blankets when using SQL and now not even it offers the security I thought it did. Now researching the issue more thoroughly and going through the options suggested. I might start crying/drinking or both, if after testing/live the issue is resolved. [edited title due to CP pedantry]

          I'll be more enthusiastic about encouraging thinking outside the box when there's evidence of any thinking going on inside it. - pTerry
          BizSquawk

          modified on Thursday, June 11, 2009 10:15 AM

          N Offline
          N Offline
          Nagy Vilmos
          wrote on last edited by
          #4

          XIV years ago I similarly had an occassional problem; but this was with an Oracle db. The issue came down to a corruption of session data over the network. Lots of big word were being banded around and we just had to bite the bullet and down grade the application performance to counteract the issue with a lotsa dollar database.


          Panic, Chaos, Destruction. My work here is done.

          1 Reply Last reply
          0
          • S Shaun Wilde

            I'll say this now SQL (Server) and I have never been friends - there is something about it that grates with my OO brain; but I get by and I am determined to get much better. Now the rant. Been tracking a (unrepeatable, at the moment, bug in test - happens sporadically on live) bug in our system. Traced/reviewed all the code in SQL, BizTalk and C# moduled, all looks okay; code reviewed by many eyeballs and all involved puzzled. Started hitting google with random queries (usually coffee induced). Came across this article SCOPE_IDENTITY() sometimes returns incorrect value[^] scenario is very much like ours. WTF! SCOPE_IDENTITY() was one of my little comfort blankets when using SQL and now not even it offers the security I thought it did. Now researching the issue more thoroughly and going through the options suggested. I might start crying/drinking or both, if after testing/live the issue is resolved. [edited title due to CP pedantry]

            I'll be more enthusiastic about encouraging thinking outside the box when there's evidence of any thinking going on inside it. - pTerry
            BizSquawk

            modified on Thursday, June 11, 2009 10:15 AM

            P Offline
            P Offline
            Pete OHanlon
            wrote on last edited by
            #5

            Damn it. I blithely tell people to use scope_identity because we've been assured that it's guaranteed to be safe.

            "WPF has many lovers. It's a veritable porn star!" - Josh Smith

            As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

            My blog | My articles | MoXAML PowerToys | Onyx

            S G 2 Replies Last reply
            0
            • S Shaun Wilde

              I'll say this now SQL (Server) and I have never been friends - there is something about it that grates with my OO brain; but I get by and I am determined to get much better. Now the rant. Been tracking a (unrepeatable, at the moment, bug in test - happens sporadically on live) bug in our system. Traced/reviewed all the code in SQL, BizTalk and C# moduled, all looks okay; code reviewed by many eyeballs and all involved puzzled. Started hitting google with random queries (usually coffee induced). Came across this article SCOPE_IDENTITY() sometimes returns incorrect value[^] scenario is very much like ours. WTF! SCOPE_IDENTITY() was one of my little comfort blankets when using SQL and now not even it offers the security I thought it did. Now researching the issue more thoroughly and going through the options suggested. I might start crying/drinking or both, if after testing/live the issue is resolved. [edited title due to CP pedantry]

              I'll be more enthusiastic about encouraging thinking outside the box when there's evidence of any thinking going on inside it. - pTerry
              BizSquawk

              modified on Thursday, June 11, 2009 10:15 AM

              T Offline
              T Offline
              ToddHileHoffer
              wrote on last edited by
              #6

              Wow! I have scope_identity() in about 1000 stored procedures that I have written. How can we tell if it will cause a problem. I don't know what the heck a "parallel plan" is.

              I didn't get any requirements for the signature

              1 Reply Last reply
              0
              • P Pete OHanlon

                Damn it. I blithely tell people to use scope_identity because we've been assured that it's guaranteed to be safe.

                "WPF has many lovers. It's a veritable porn star!" - Josh Smith

                As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

                My blog | My articles | MoXAML PowerToys | Onyx

                S Offline
                S Offline
                Shaun Wilde
                wrote on last edited by
                #7

                My thoughts exactly - for single inserts using INSERT/VALUE it shouldn't be an issue and it is rare you would use it to get the last ID of a multiple insert but in our case we had INSERT X (A, B, C) SELECT @A, @B, @C -- probably a product of an insert that evolved after many changes Easily changed to INSERT/VALUES style but not sure the parrellism would or would not kick in. Have to check the query plan

                I'll be more enthusiastic about encouraging thinking outside the box when there's evidence of any thinking going on inside it. - pTerry
                BizSquawk

                1 Reply Last reply
                0
                • P Pete OHanlon

                  Damn it. I blithely tell people to use scope_identity because we've been assured that it's guaranteed to be safe.

                  "WPF has many lovers. It's a veritable porn star!" - Josh Smith

                  As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

                  My blog | My articles | MoXAML PowerToys | Onyx

                  G Offline
                  G Offline
                  Giorgi Dalakishvili
                  wrote on last edited by
                  #8

                  If you use nhibernate, you don't need to worry about such things: NHibernate: Avoid identity generator when possible[^]

                  Giorgi Dalakishvili #region signature My Articles Asynchronous Registry Notification Using Strongly-typed WMI Classes in .NET [^] My blog #endregion

                  1 Reply Last reply
                  0
                  • S Shaun Wilde

                    I'll say this now SQL (Server) and I have never been friends - there is something about it that grates with my OO brain; but I get by and I am determined to get much better. Now the rant. Been tracking a (unrepeatable, at the moment, bug in test - happens sporadically on live) bug in our system. Traced/reviewed all the code in SQL, BizTalk and C# moduled, all looks okay; code reviewed by many eyeballs and all involved puzzled. Started hitting google with random queries (usually coffee induced). Came across this article SCOPE_IDENTITY() sometimes returns incorrect value[^] scenario is very much like ours. WTF! SCOPE_IDENTITY() was one of my little comfort blankets when using SQL and now not even it offers the security I thought it did. Now researching the issue more thoroughly and going through the options suggested. I might start crying/drinking or both, if after testing/live the issue is resolved. [edited title due to CP pedantry]

                    I'll be more enthusiastic about encouraging thinking outside the box when there's evidence of any thinking going on inside it. - pTerry
                    BizSquawk

                    modified on Thursday, June 11, 2009 10:15 AM

                    L Offline
                    L Offline
                    leppie
                    wrote on last edited by
                    #9

                    Shaun Wilde wrote:

                    Came across this article SCOPE_IDENTITY() sometimes returns incorrect value[^] scenario is very much like ours.

                    Wont fix for both SQL2005 and SQL2008. Just great MS! It's the bloody Enterprise edition! :wtf:

                    xacc.ide
                    IronScheme - 1.0 beta 3 - out now!
                    ((lambda (x) `((lambda (x) ,x) ',x)) '`((lambda (x) ,x) ',x))

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups