To give my process high priority in SQL server 2000

  • Is there a way to tell MS SQL that it should give higher priority to a query?. that is, i want my query to execute even when another process is trying to kill this process. Any help would be greatly appreciated.

  • Only in SQL 2008, and that's just a cpu-time and memory priority. If a kill command is issued against your session, it will be terminated.

    I'm curious. Why do you need a connection that can survive a kill?

    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
  • You can't survive a kill. If someone has authority to kill your process, SQL Server will do an orderly kill and roll back the work.

  • Actually, there is a script which kills all the processess and instances in sqlserver. The requirement is to that this should not kill one particular instance where some other important processes are running.

  • prasanna_pathangi (9/26/2008)


    Actually, there is a script which kills all the processess and instances in sqlserver. The requirement is to that this should not kill one particular instance where some other important processes are running.

    You can not possibly do this without hacking the internals of SQL. You will have to fix your script which is killing everyone.

    [font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
    Proactive Performance Solutions, Inc.
    [/font]
    [font="Verdana"] "Performance is our middle name."[/font]

  • prasanna_pathangi (9/25/2008)


    Is there a way to tell MS SQL that it should give higher priority to a query?. that is, i want my query to execute even when another process is trying to kill this process. Any help would be greatly appreciated.

    I'm thinking that you're talking about deadlocks... the best thing to do is to write code that doesn't get involved in deadlocks... then, nothing will try to kill it. 😉

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • Change the script, figure out which process is doing what you need and don't kill that one.

Viewing 7 posts - 1 through 7 (of 7 total)

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