My apologies if this is simple, or off-topic for this site: I just wanted to know what goes on in the background when one connects to SQL Server, say, within Management Studio. Just what is it we are connecting to, is it a virtual machine, or some server somewhere? Thanks for any explanations, refs. etc.

2 Answers 2


Usually, you are making a TCP connection to a remote host.

SSMS would ask your DNS server for the IP address associated with the hostname of the server, then initiate a TCP connection to that address on remote port 1433.

SSMS and MS SQL Server would then begin a conversation using the binary Tabular Data Stream protocol (TDS).

You type a query. SSMS encodes this query into TDS. SQL Server gets it, parses it, runs it, returns some data (encoded in TDS), back to SSMS, which decodes it and displays it on screen.

However, you can also connect to SQL Server installed on the same OS as SSMS, or running in a virtual machine on the same box.

  • Hi, sorry for the necropolis. I guess if we're connecting with a local sql server, process is similar, but we use Named Pipes or Via as protocols to communicate, and DNS request is not needed?
    – MSIS
    Sep 25, 2022 at 18:45

In simple terms you connect to a Sql Server instance which runs on a Windows machine. This instance may be hosted on the same machine from where you are accessing it or on a remote windows server.

  • Please provide feedback for down votes.
    – Baljeet
    Aug 19, 2016 at 9:03
  • 1
    I didn't downvote you, as you did answer the question. I think the issue is that everyone who opens this thread is looking for a bit more comprehensive answer than "you connect to a SQL Server instance which runs on a Windows Machine." It's kind of like asking what goes on in the background of a calculator and someone answering "You enter numbers and the calculator calculates them." Again, I didn't downvote and don't mean offense, just my suggestion as to why you may have been downvoted.
    – SQLDevDBA
    Aug 19, 2016 at 13:15
  • I didn't downvote either (I am the OP) but I agree with @MguerraTorres : I was hoping for some more detail.
    – MSIS
    Feb 6, 2020 at 21:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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