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. Database & SysAdmin
  3. Database
  4. Procedure is using server resource but unmanaged how to managed that...

Procedure is using server resource but unmanaged how to managed that...

Scheduled Pinned Locked Moved Database
databasesysadmintutorialquestionlearning
5 Posts 3 Posters 0 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
    Sasmi_Office
    wrote on last edited by
    #1

    Hi Friend, I have one question about database management... I have one Procedure which take 30 min to execute.... I have crate front end for that Process, the scenario is when user press the button to execute that Procedure but find no response and close the browser what happen for that procedure after this, i mean that procedure is executed but did't stop....that procedure is using server resource but unmanaged how to managed that. Thanks and regard's in advance.

    Sasmi

    D A 2 Replies Last reply
    0
    • S Sasmi_Office

      Hi Friend, I have one question about database management... I have one Procedure which take 30 min to execute.... I have crate front end for that Process, the scenario is when user press the button to execute that Procedure but find no response and close the browser what happen for that procedure after this, i mean that procedure is executed but did't stop....that procedure is using server resource but unmanaged how to managed that. Thanks and regard's in advance.

      Sasmi

      D Offline
      D Offline
      dan sh
      wrote on last edited by
      #2

      In case of SQL server 2008, the stored procedure won't execute if the calling program is stopped. Which database or you speaking of?

      S 1 Reply Last reply
      0
      • D dan sh

        In case of SQL server 2008, the stored procedure won't execute if the calling program is stopped. Which database or you speaking of?

        S Offline
        S Offline
        Sasmi_Office
        wrote on last edited by
        #3

        i am talking about sql Server 2005...

        D 1 Reply Last reply
        0
        • S Sasmi_Office

          i am talking about sql Server 2005...

          D Offline
          D Offline
          dan sh
          wrote on last edited by
          #4

          I believe it should also behave the same way. You can try to replicate the scenario using following in the stored procedure:

          waitfor delay '00:00:10'
          insert into SomeTable values ('some value')

          This will cause a delay of 10 seconds before the insert. While SQL is waiting for the delay to get over, you can stop the calling application of yours and then check if the insert happened. BTW is 30 min execution time expected or not? If not, you can check the execution plan and it would give you an idea why so much time is taken.

          1 Reply Last reply
          0
          • S Sasmi_Office

            Hi Friend, I have one question about database management... I have one Procedure which take 30 min to execute.... I have crate front end for that Process, the scenario is when user press the button to execute that Procedure but find no response and close the browser what happen for that procedure after this, i mean that procedure is executed but did't stop....that procedure is using server resource but unmanaged how to managed that. Thanks and regard's in advance.

            Sasmi

            A Offline
            A Offline
            Ashfield
            wrote on last edited by
            #5

            First and foremost, what user is going to sit there and wait for 30 minutes for the query to execute? I would spend my time optimising the query rather than worry about what happens WHEN the user closes the browser. Anyone who has a stored proc taking that amount of time to execute while a user sits waiting deserves any and all problems which they get from it.

            Bob Ashfield Consultants Ltd

            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