Configuring OLE-DB Connection Pooling

28 02 2007

Controlling the way in which the OLE-DB connection pooling service components work, is somewhat under-documented in my opinion. Contrast that to the reams of documentation available which describe how connection pooling within .NET managed data providers can be configured.

Until I stumbled across some bits of documentation, I believed that connection pooling in OLE-DB could only be either, enabled or disabled. Happily it turns out that OLE-DB connection pooling is almost as configurable as with managed providers. Sadly though, one has to resort to changing values in the registry, rather than the nice way in which it’s done with managed providers, using connection string parameters.

Controlling the Idle Connection Timeout

[HKEY_CLASSES_ROOT\CLSID\{clsid of oledb provider}\[SPTimeout:0x00]}]

Specific to the OLEDB provider, this DWORD value specifies the length of time (in seconds), that idle connections are held in the connection pool. If not specified, the default value is 60 seconds (for SQLServer). Each time a connection is returned to the pool, it’s timeout period is reset.

Maximum Connection Lifetime

[HKEY_CLASSES_ROOT\CLSID\{2206CDB0-19C1-11D1-89E0-00C04FD7A829\[MaxResLifeTime:0x00]}]

Specific to the MSDAINITIALIZE class, this DWORD value specifies the lifetime limit in seconds, of pooled connection objects. This value effectively controls a connections maximum lifetime, regardless of the connection moving into and out of the pool. When a connection reaches its maximum lifetime, the pool closes the connection, returning it to the Database server. If not specified, the default value is 600 seconds (10 minutes). In a load balanced environment, this setting allows connections on one server to balance out to other servers as old connections expire.

Connection Pooling, Failed Connection Retry Behaviour

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DataAccess\Session Pooling\[Retry Wait:0x00]}]
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\DataAccess\Session Pooling\[ExpBackOff:0x00]}]

These settings control how connection pooling behaves when a Database connection attempt fails.

The “Retry Wait” setting determines the amount of time (in seconds) that the service components wait until attempting to contact the server again. This is a DWORD value and and defaults to 60.

The “ExpBackOff” setting determines the factor by which the service components will increase the wait time between attempts to contact the server. This is a DWORD value and and defaults to 2.

Requirements:

SPTimeout and “Retry Wait” requires MDAC 2.5 or above
MaxResLifeTime requires MDAC 2.7 or above





SonyEricsson P990i

20 02 2007

I loved the old one, before I dropped it in a cup of tea, and blow me, the new one is even better.

The predictive text input is fantastic, not only does it predict words, it predicts words based on word groups you’ve used before.

I can type in longish messages using a few simple button clicks accepting the suggested words.





My Jeep Grand Cherokee Immobilizer

16 02 2007

I’ve had one of these for a couple of years now, and I love it, with the exception of the brain wobblingly annoying vehicle immobilizer.

This is quite a common fault I believe, it’s a crappy, flakey bug ridden piece of so-called technology.

Like most it links with the fuel pump and ignition, turning them off when activated. Unfortunatley, sometimes, when you deactivate it if forgets to turn either/and/or both the ignition and fuel pump back on.

Strangely, it always remembers to turn the central locking back on, so sometimes the ignition is off but the fuel pump is on, sometimes the ignition is on but the fuel pump is off and sometimes the ignition and fuel pump remain off.

Oh yes, and sometimes the vehicle alarm remains on, blaring each time you open the door.

Very very very annoying.

I’ve seen other people solutions to this ranging from disconnecting the immobilizer completely, shorting out some wires within in the drivers door which requires you take the door panel off.

My solution is much simpler, disconnect the battery completely for a minute or so, reconnect, lock using the fob then unlock and viola. Well at least it’s worked for me the last couple of times.