How to properly close out User connections listed in the Task Manager

I have an issue that when I remote connect and go into the Task Manager of that session. I notice my username and a (9) next to it. I am assuming it it the amount of connections opened .  How can I close all but 1 connection and keep just that connection open, also when I close the current session of my RDP how can I make sure it closes correctly?

Thanks in advance.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Dean ChafeeIT/InfoSec ManagerCommented:
The 9 next to the user name is not connections open, it is your session ID.  in CMD do this:
query session

you will see a list of users, ID and state. Your session is indicated by the > on the left side.

You can logoff any use in CMD, run as administrator:

logoff X


that will force a logoff if the user/session id

you can logoff your current session with just logoff command
Nakul VachhrajaniTechnical Architect, Capgemini IndiaCommented:
The number shown in the brackets is not the number of connections.

It is the session Id for that user's context. The session would include many system processes running as part of the OS that keep things running (including, but not limited to various host processes, your browser processes, service host processes and any other user processes).

Task Manager is not the correct way to find out open connections to SQL Server. The task manager only monitors that one machine, whereas SQL Server would have an inventory of all open connections - from remote machines and processes too. If I am not mistaken, this information is available in the sys.sysprocesses catalog view (a simple internet search would take you in the right direction).

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Server 2012

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.