Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    Join Date
    Jun 2007
    Posts
    8

    Angry Unanswered: Kill spid command not working

    Hi
    I have a strange problem on my sql 2000 sp4 server

    When I kill a session I gives me

    Msg 6101, Level 16, State 1, Line 2
    Process ID 61 is not a valid process ID. Choose a number between 1 and 32817.

    The process exists in sp_who and sp_who2
    it even has an entry in the sysprocesses
    this happens with all processes even test ones that we create that are'nt doing anything

    any suggections (I have been told to re-install sql 2000 but this is not possible as it is a production server and I will only get maintenance time on sunday's not enough time to rebuild )

  2. #2
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    is the kill command coming from the same session as the one you are trying to kill?
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

  3. #3
    Join Date
    Jun 2007
    Posts
    8
    nope

    I create seperate sessions
    from different machines
    It looks like the kill command is not working any ideas

  4. #4
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    What is the output from:
    Code:
    SELECT @@spid
    
    DECLARE @cSpid VARCHAR(5)
    SET @cSpid = '9999'  --  Replace with spid to kill
    
    SELECT *
       FROM master.dbo.sysprocesses
       WHERE  (@cSpid) = spid
    
    EXECUTE ('KILL ' + @cSpid)
    -PatP

  5. #5
    Join Date
    Jun 2004
    Location
    Long Island
    Posts
    696
    maybe you're mistaking the rownumber for the spid, look closely at the output.

  6. #6
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    That's a good thought! I don't use grids that often, so I rarely think of that particular problem.

    -PatP

  7. #7
    Join Date
    Jun 2007
    Posts
    8
    Here is the output of the select from sysprocesses

    Does anyone know where / what procedure/ command is executed
    when kill is called

    I just found out that the server had a disk crash and alot of db's have
    corruption

    What do i need to replace in sql to get kill working again?






    108 0 0 0x0000 0 MISCELLANEOUS 56 1 109 0 3 2008-05-19 15:12:23.630 2008-05-19 15:12:25.587 0 0 sleeping 0xD8A30287A4976C49B2606D1D91C510B20000000000000000 00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000 000000000000000000000000 CRUSADER Microsoft(R) Windows (R) 2000 Operating System 2364 AWAITING COMMAND 00114330E4DA TCP/IP UpdateUser 0x000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000 00000000 0x0000000000000000000000000000000000000000 0 0

  8. #8
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Quote Originally Posted by JivanDN
    I just found out that the server had a disk crash and alot of db's have
    corruption

    And you don't think you have to rebuild the box?
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  9. #9
    Join Date
    Jun 2007
    Posts
    8
    I know :-)


    Talked to the business and they said I must 'TRY'
    to fix without rebuilding


    Thanks for the help

  10. #10
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Is master corrupted?

    Do this

    DBCC CHECKDB('master')
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  11. #11
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Quote Originally Posted by JivanDN
    I know :-)


    Talked to the business and they said I must 'TRY'
    to fix without rebuilding


    Thanks for the help
    They sound a lot like my business partners...
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  12. #12
    Join Date
    Jun 2007
    Posts
    8
    Never thought of running a dbcc on master

    Found the problem

    Thanks for the help

    oh I work for a Bank heheheheh

  13. #13
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    Quote Originally Posted by JivanDN
    Never thought of running a dbcc on master

    Found the problem

    Thanks for the help

    oh I work for a Bank heheheheh

    It would be good to let us know what it was

    No one will laugh
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

  14. #14
    Join Date
    Jun 2007
    Posts
    8
    Master model and msdb are corrupt

    have to wait till a maint window to fix

    Will let you know if this fixes the problem

  15. #15
    Join Date
    Nov 2002
    Location
    Jersey
    Posts
    10,322
    hope you have backups
    Brett
    8-)

    It's a Great Day for America everybody!

    dbforums Yak CorralRadio 'Rita
    dbForums Member List
    I'm Good Once as I ever was

    The physical order of data in a database has no meaning.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •