Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I notice there are some numbering on the tab of each new query (such as the number 52, 56, 57 and 58 as shown in the following pictures)

enter image description here

What does these numbers means and is it possible to reset to the first original values?

share|improve this question
up vote 4 down vote accepted

The numbers represent the process id of the session associated with that tab - as every time you open a new tab it opens a new connection to SQL Server for you. They are not necessarily sequential but they can be. If you run the following command you should be able to see an entry for each of the tabs/connections that you have open:

select * from sys.dm_exec_sessions

I hope this helps you.

share|improve this answer
I was wondering if it is possible to close those connection so that the number will not increase to a "too large" value. – Jack Sep 10 '12 at 8:40
Yes - you can either disconnect the session using the red X next to the database name in management studio or you can close your tab completely - either one will do ;-) – Mr.Brownstone Sep 10 '12 at 13:46
I close the tab completely but the new tab will have a number that is "plus 1" to the number of the close tab. So, wondering if there are other way to close the session (maybe by sqlcmd?) – Jack Sep 11 '12 at 9:50
I don't believe there is a way to control the process id that is assigned to a connection. Why would you want to? – Mr.Brownstone Sep 11 '12 at 10:53
The number that keep on growing make me tempted to reset to the original number. I just can't see why it is growing larger and larger even though I have close the tab. Also, I try to restart the instance inside the Sql server Configuration Manager but the number still grow (even though it have drop a few number). That's why I asked in my question if it is possible to reset the number or at least close as many sleeping or idle connection. – Jack Sep 12 '12 at 4:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.