138:
be called just like the "close" method on the database connection. Unlike the method on the database connection, the method on the wrapper may not actually close the database connection, but instead return it to the pool. The application need not be aware of the connection pooling when it calls the methods on the wrapper object.
137:
The connection object obtained from the connection pool is often a wrapper around the actual database connection. The wrapper understands its relationship with the pool, and hides the details of the pool from the application. For example, the wrapper object can implement a "close" method that can
153:
An application failure occurs when the connection pool overflows. This can occur if all of the connections in the pool are in use when an application requests a connection. For example, the application may use a connection for too long when too many clients attempt to access the web site or one or
141:
This approach encourages the practice of opening a connection in an application only when needed, and closing it as soon as the work is done, rather than holding a connection open for the entire life of the application. In this manner, a relatively small number of connections can service a large
149:
In a client/server architecture, on the other hand, a persistent connection is typically used so that server state can be managed. This "state" includes server-side cursors, temporary products, connection-specific functional settings, and so on.
127:
and can take a disproportionately long time to create relative to the operations performed on them. It is inefficient for an application to create, use, and close a database connection whenever it needs to update a database.
115:(and later), do not impose this limitation. However, databases that provide multiple operations per connection usually incur far more overhead than those that permit only a single operation task at a time.
111:
statement) is sent to the database and a result set is returned, the connection is open but not available for other operations until the client finishes consuming the result set. Other databases, like
134:
is a technique designed to alleviate this problem. A pool of database connections can be created and then shared among the applications that need to access the database.
97:, if one exists) can be set. The Connection String is composed of a set of key/value pairs as dictated by the data access interface and data provider being used.
195:
205:
200:
59:
44:
51:
was invented to improve performance. No command can be performed against a database without an "open and available" connection to it.
93:). Once a connection has been built it can be opened and closed at will, and properties (such as the command time-out length, or
215:
104:) only allow one operation to be performed at a time on each connection. If a request for data (a
210:
Hitchhiker's Guide to Visual Studio and SQL Server (7th
Edition) Addison Wesley, William Vaughn,
163:
112:
94:
8:
37:
242:
71:
48:
25:
211:
63:
21:
131:
124:
55:
29:
236:
143:
108:
47:
programming. Since some DBMS engines require considerable time to connect,
101:
74:
and instance as well as user authentication credentials (for example,
67:
168:
227:
183:
178:
173:
40:
and receive answers, usually in the form of a result set.
105:
201:
Managing and
Monitoring .NET Connections whitepaper.
154:more operations are blocked or simply inefficient.
54:Connections are built by supplying an underlying
32:software, whether on the same machine or not. A
234:
66:, which is a way of addressing a specific
206:Getting and Staying Connected whitepaper.
142:number of requests. This is also called
235:
123:Database connections are finite and
13:
14:
254:
221:
174:ODBC (Open Database Connectivity)
43:Connections are a key concept in
196:IDbConnection Interface on MSDN
1:
189:
7:
157:
10:
259:
118:
100:Many databases (such as
228:ConnectionStrings.com
36:is required to send
28:software to talk to
18:database connection
132:Connection pooling
49:connection pooling
64:connection string
20:is a facility in
250:
22:computer science
258:
257:
253:
252:
251:
249:
248:
247:
233:
232:
224:
192:
160:
121:
113:SQL Server 2005
30:database server
12:
11:
5:
256:
246:
245:
231:
230:
223:
222:External links
220:
219:
218:
216:978-0321243621
208:
203:
198:
191:
188:
187:
186:
181:
176:
171:
166:
159:
156:
120:
117:
9:
6:
4:
3:
2:
255:
244:
241:
240:
238:
229:
226:
225:
217:
213:
209:
207:
204:
202:
199:
197:
194:
193:
185:
182:
180:
177:
175:
172:
170:
167:
165:
162:
161:
155:
151:
147:
145:
139:
135:
133:
129:
126:
116:
114:
110:
107:
103:
98:
96:
92:
90:
86:
82:
78:
73:
69:
65:
61:
57:
52:
50:
46:
41:
39:
35:
31:
27:
23:
19:
152:
148:
144:multiplexing
140:
136:
130:
122:
99:
88:
84:
80:
76:
75:
53:
45:data-centric
42:
33:
24:that allows
17:
15:
95:transaction
190:References
102:PostgreSQL
34:connection
243:Databases
125:expensive
91:password;
81:Database=
237:Category
158:See also
85:User ID=
79:sql_box;
68:database
60:provider
38:commands
169:ADO.NET
119:Pooling
83:Common;
77:Server=
62:with a
214:
109:Select
72:server
56:driver
26:client
184:RDBMS
212:ISBN
179:JDBC
89:Pwd=
87:uid;
164:ADO
106:SQL
70:or
58:or
239::
146:.
16:A
Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.