August 3, 2009 at 9:13 am
Hi Everybody,
SPID where it will be stored in MS SQL SERVER
i hope it is stored in MAster database or msdb which table it will be stored could you plz help me asp
Regards
raj
August 3, 2009 at 9:57 am
I'm not sure what you are asking. You can see the SPID as session_id in sys.dm_exec_sessions, sys.dm_exec_requests, and sys.dm_exec_connections.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
August 3, 2009 at 10:12 am
Hi Jack,
Thank you for your reply
I am asking spid where it stored in MS SQL SERVER.
Thank you very much.....
August 3, 2009 at 2:07 pm
Those are the places I know of where you can retrieve information about the SPID. Well those and using the @@SPID function.
I'm still not sure what you mean by storing SPID? SPID's are session id's so when a session ends that SPID can be re-used. The system views, the ones I mentioned and some others, can give you all the information about what a specific SPID is doing.
If this is related to your other post, you can find lock information from sys.dm_tran_locks using request_session_id.
Jack Corbett
Consultant - Straight Path Solutions
Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
August 4, 2009 at 2:19 am
Hi Shiv,
SPID is a unique id number given by sql server to uniquely identify user connections. It is not stored in any of the databases.
for better understanding try this scenario
1. connect to your sql server
2. run the following query
select @@spid
3. disconnect from sql server
4. connect to your sql server again
5. run the following query
select @@spid
Output from step 2 and step 5 will be different if you have many users who are connected or getting connected to databases. If you are connecting to a sql server where there is less user activity or to your pc there is a high chance that you may get the same processid.
[font="Verdana"]Thanks
Chandra Mohan[/font]
August 4, 2009 at 5:16 am
Microsoft have re-invented the SPID - it now refers to the session ID of the current user process.
Books Online
This is called the server process ID in earlier versions of SQL Server.
Session ID (or session_id) is contained in many dynamic management views like sys.dm_exec_connections, sys.dm_exec_sessions, and sys.dm_tran_session_transactions...to name but a few. These are available in all databases.
Paul
Paul White
SQLPerformance.com
SQLkiwi blog
@SQL_Kiwi
August 4, 2009 at 5:38 am
shiv (8/3/2009)
Hi Jack,Thank you for your reply
I am asking spid where it stored in MS SQL SERVER.
Thank you very much.....
SPID is dynamic. Once a process is completed, it's SPID may be assigned to a new process.
Viewing 7 posts - 1 through 6 (of 6 total)
You must be logged in to reply to this topic. Login to reply