Results 1 to 9 of 9
  1. #1
    Join Date
    Jul 2010
    Posts
    10

    What is the difference between spid and the kpid

    Can some one please explain the difference between spid and kpid in sybase

  2. #2
    Join Date
    Feb 2008
    Posts
    15
    spid is the server process id and the kpid is kernal process id, each spid having one kpid which denote the memory location for the process. also in between spid map to host process id and it map to kpid.
    you can see the kpid in sybase using sysprocesses table.

  3. #3
    Join Date
    Jul 2010
    Posts
    10
    Thanks for the reply
    Please correct me if my understanding is incorrect---
    Can we say that on given server the kpid wont get repeated any time..coz I know that spid can get repeated once the process gets completed or is killed for some reason

  4. #4
    Join Date
    Feb 2008
    Posts
    15
    Yes it is same as like spid, after killing this kpid it will you by OS. But the transaction id is unique each time like sybase exact id this column is present in syslogshold table.

  5. #5
    Join Date
    Jul 2010
    Posts
    10
    Sorry I did not get what you r trying to convey..
    I believe in the haste of typing some fumbling in words have occured
    Could please help me understand in a lucid way

    Thanking in advance for your time

  6. #6
    Join Date
    Feb 2008
    Posts
    15
    Sorry for the same.
    When ever any transaction you will start that time one exact id will get create, you can see this in sybase using syslogshold or systransactions table
    select * from syslogshold.
    if you see that exact id it will be unique for each DB and that unique id having one spid, that ( can be see in same table(, Now each spid is map with one kpid at OS level ( can be see that kpid column in sysprocesses table )also this you can see using below command.
    select spid,kpid,hostprocesses from sysprocesses where cmd not like "AWAI%"

    This kpid is unique till the OS Reboot. After OS reboot that can be used by OS it self. This kpid i used for the memory location (i.e that processes is using which memory location in shared memory). This will get lock until that process execution will not get complete. For total shared memory location you can see using cat $SYBASE/$SYBASE_ASE/<server_name>.krg file.
    In this you will get memory location for the total max memory i.e shared memory. If you did rm for this file when your ASE is up then you can not shut down the ASE by normal method you need to take the OS reboot for the same.

    Also kpid can be see in ipcs -ma command this will be for the shared memory for each ASE and the OS level processes.

    Thanks
    Jayant

  7. #7
    Join Date
    Jul 2010
    Posts
    10
    Thanks!!
    That answers my doubt

  8. #8
    Join Date
    Aug 2010
    Posts
    1
    Just what I was looking for...thanks.....

  9. #9
    Join Date
    Aug 2010
    Posts
    1
    Great forum!!! Thanks for sharing this information with us. That is also I want to know.

Posting Permissions

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