none
MSSQL 2008: Where is the KPID?

    Question

  • Hi Guys,

    Can someone advise where I can find the KPID from sysprocesses in the equivalent dm%'s (can't  find it in sessions, connections or requests)?  I realise this is still available within (the compatability view) sysprocesses but would rather source it from the (new) correct location.

    Is KPID still available?

    Thanks, Rob

    Tuesday, April 27, 2010 8:57 AM

Answers

  • Check out the following DMV:

    select * from sys.dm_os_threads 

     

    Let us know if helpful.


    Kalman Toth, SQL Server & Business Intelligence Training; SQLUSA.com

    • Marked as answer by Robert Varga Tuesday, April 27, 2010 9:59 AM
    Tuesday, April 27, 2010 9:33 AM
    Moderator

All replies

  • Hi, 

    I think there is view as well as table named sysprocesses. 

    View sysprocesses is based on table sysprocesses and hence the information is stored in table sysprocesses.

    Thanks,

    £

    Tuesday, April 27, 2010 9:17 AM
  • Hi Vatsal, thanks for the post, but unfortunatly it's not correct.  There is only a backward-compatability view that in turn calls the system-only func openrowset(table sysprocesses).

    Does anyone know if KPID is available in a compliant dm%?

    Tuesday, April 27, 2010 9:25 AM
  • Check out the following DMV:

    select * from sys.dm_os_threads 

     

    Let us know if helpful.


    Kalman Toth, SQL Server & Business Intelligence Training; SQLUSA.com

    • Marked as answer by Robert Varga Tuesday, April 27, 2010 9:59 AM
    Tuesday, April 27, 2010 9:33 AM
    Moderator
  • One of the two can help select * from sys.sysprocesses sp_who
    • Proposed as answer by Muhammad Abbas Tuesday, April 27, 2010 9:57 AM
    • Unproposed as answer by Robert Varga Tuesday, April 27, 2010 10:00 AM
    Tuesday, April 27, 2010 9:36 AM
  • Thanks Kalman, that's what I was after: KPID equiv. is now sys.dm_os_threads.os_thread_id

    Cheers,

    Rob

    Tuesday, April 27, 2010 10:00 AM
  • Thanks Mohammad, but as noted in my original post, this is exactly where I did not want to obtain KPID from.
    Tuesday, April 27, 2010 10:00 AM