By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,766 Members | 1,295 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,766 IT Pros & Developers. It's quick & easy.

Connecting to Sql Server from Application

P: n/a
What is actually happening behind the scenes when you open a connection
to sql server in code such as C# or vb.net.

Jul 23 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
(jw*****@gmail.com) writes:
What is actually happening behind the scenes when you open a connection
to sql server in code such as C# or vb.net.


There is some communication taking place over TCP or some other network.
The communication is carried out over a protocol known as TDS, Tabular
Data Stream. This protocol is proprietary to Microsoft (and Sybase have
their version). On the server side, a server process is created, and some
memory structures are allocated for the connection.
--
Erland Sommarskog, SQL Server MVP, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 23 '05 #2

P: n/a
To add to Erland's response, connection pooling also affects open behavior.
When you close a connection with pooling enabled, the connection isn't
actually closed but rather reset and placed in an available connection pool.
These pooled connections can then be used for subsequent open requests
without the overhead of establishing a new SQL Server connection. A new
connection will be obtained when an available one doesn't exist in the pool.

--
Hope this helps.

Dan Guzman
SQL Server MVP

<jw*****@gmail.com> wrote in message
news:11*********************@f14g2000cwb.googlegro ups.com...
What is actually happening behind the scenes when you open a connection
to sql server in code such as C# or vb.net.

Jul 23 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.