Hour 17

for RuBoard

Quiz Answers

1:

When is a connection pool entry established?

  1. When you open a connection to the database

  2. When you fill a DataSet

  3. When you close a connection to the database

  4. When you read the rows from the DataSet

A1:

a. When you open a connection to the database. If there is a matching connection string in the connection pool, it will draw on it. Otherwise, it will create a new one (and establish the minimum pool size entries).

2:

True or false: Connection pooling is automatically turned off for .NET.

A2:

False. In .NET, connection pooling is on as the default ( pooling = "true" ).

3:

What must you do every time in coding to make sure that you and others can take advantage of the connection pool in subsequent processing?

  1. Store it in cache

  2. Record the time it was used in a local variable

  3. Close the connection to the database

  4. Open a new connection to a different database

A3:

c. Close the connection to the database. This will release the connection back to the connection pool for subsequent use. If you do not explicitly close the connection, it will not be available to use.

4:

What must match exactly for the application to draw on an already established connection pool entry?

  1. The entire connection string

  2. The database portion of the connection string

  3. The DataSet name

  4. The minimum pool size

A4:

a. The entire connection string. Even the smallest difference in the coding of a conceptually equivalent connection string will cause it not to match an entry in the connection spool.

5:

What performance object can you use to monitor usage of connection pooling?

  1. MSSQL$NetSDK:Buffers

  2. .NET CLR Security ”performance object

  3. ADO.NET ”performance object

  4. .NET CLR Data ”performance object

A5:

d. .NET CLR Data ”performance object and its associated pool connection counters.

for RuBoard


Sams Teach Yourself ADO. NET in 24 Hours
Sams Teach Yourself ADO.NET in 24 Hours
ISBN: 0672323834
EAN: 2147483647
Year: 2002
Pages: 237

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net