Share via


ADO.NET 2.0 performance counters

ADO.NET 2.0 introduces a new set of performance counters that are specific to each provider. In the Visual Studio 2005 release, the supported providers are the SQL Client and Microsoft’s Oracle Client managed providers. Those legacy .NET CLR data counters were deprecated in Visual Studio 2005, and they will no longer be populated.

The counters themselves will remain present in the product, however, so that code that checks for their existence doesn’t fail. For the managed SQL Client and Oracle Client, Ten new counters have been introduced .

The HardConnectsPerSecond counter was ported forward from the old ODBC performance counters. It represents the number of actual physical connections per second that are being made to a server. It ignores pooled connections, and only real database connection opens are counted.

The HardDisconnectsPerSecond was also ported from the old ODBC counters. It represents the number of actual physical disk connects per second being made to a server. It also ignores pooled connections. Only real database disconnects are counted.

The NumberOfActiveConnectionPoolGgroups is new to ADO.NET 2.0. It represents the number of unique connection strings.

The NumberOfActiveConnectionPools was ported from the CLR data counters from ADO.NET 1.0. It represents the current number of pools associated with the process or AppDomain.

The NumberOfInactiveConnectionPoolGroups is new to ADO.NET 2.0. It represents the number of unique connection strings that are waiting to be pruned by the garbage collector.

The NumberOfInactiveConnectinPools is also new in ADO.NET 2.0. It is the current number of pools associated with the process or AppDomain that are waiting to be reclaimed because they are idle. This might be a circumstance where their pool timeout, which is controlled by the connection string parameter, default = 10 minutes, has expired and they are waiting for garbage collection.

The NumberOfNonPooledConnections is also new in ADO.NET 2.0. It represents the current number of connections that are not using connection pooling.

The NumberOfPooledConnections was ported from the CLR .NET counters from 1.0. It represents the current number of connections in all pools associated with the process or AppDomain.

The NumberOfReclaimedConnections. This counter is new to ADO.NET 2.0. It represents the number of emancipated connections. Emancipated connections occur when the object that owns the connection goes out of scope. ADO.NET 2.0 reclaims them, when the pool runs out of connections or during normal thread cleanup.

The NumberOfStasisConnections. This counter is also new in ADO.NET 2.0. These would include connections that are enlisted in distributed transactions or are otherwise unavailable.