If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Sybase > What is the difference between spid and the kpid

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old
Registered User
 
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
Reply With Quote
  #2 (permalink)  
Old
Registered User
 
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.
Reply With Quote
  #3 (permalink)  
Old
Registered User
 
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
Reply With Quote
  #4 (permalink)  
Old
Registered User
 
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.
Reply With Quote
  #5 (permalink)  
Old
Registered User
 
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
Reply With Quote
  #6 (permalink)  
Old
Registered User
 
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
Reply With Quote
  #7 (permalink)  
Old
Registered User
 
Join Date: Jul 2010
Posts: 10
Thanks!!
That answers my doubt
Reply With Quote
  #8 (permalink)  
Old
Registered User
 
Join Date: Aug 2010
Posts: 1
Just what I was looking for...thanks.....
Reply With Quote
  #9 (permalink)  
Old
Registered User
 
Join Date: Aug 2010
Posts: 1
Great forum!!! Thanks for sharing this information with us. That is also I want to know.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On