I have come across a strange behaviour in 32bit MS SQL Server 2005 running on 64bit Windows Server 2003. During a query execution, the SQL Server started using 100 % of one CPU and got stuck at
ntoskrnl.exe!IoIs32bitProcess+0x45
ntoskrnl.exe!FsRtlAddBaseMcbEntry+0xa2
...
The query was — perhaps inefficiently — using a view that selected rows from a table that was also used in the select statement. To illustrate, the query’s structure was this:
select
*
from
Table1 t1 inner join
Table2 t2 on t1.table1 = t2.id inner join
View1 v on v.table1 = t2.id
...
where the view View was selecting rows from Table2 and (some other) Table3.
Removing the view fixed the problem and SQL server executed the query without any problems. It could all be a coincidence, but if you ever get to this situation, check your views.
Archive for September, 2008
Strange MS SQL Server 2005 behaviour
Friday, September 26th, 2008Encryption
Tuesday, September 23rd, 2008Data security and encryption usually come hand in hand. Most people think that the more cryptic algorithm you use, the better for your data security. The logic is that if nobody knows what algorithm I’ve used, surely nobody will be able to decrypt the data. This may be true, but only if your algorithm has no weak points. I am now reading an excellent book Number Theory for Computing by Song Yan (ISBN: 978-3-540-43072-8) and all I can say is that there is no way I can design an encryption algorithm that has no weaknesses.
It turns out that much safer approach is to use publicly available algorithm. Presumably, because the encryption algorithm is public, it received a lot of scrutiny from cryptanalysts and that it is safe. This means that the strength of the encryption lies completely in the strength of the key and the key store.
Key stores
PGP Universal Server is an enterprise-level key store application. This means that you — the programmers — can forget about the complexity and security nightmare that is secure storage of the keys. Gross oversimplification is that you can say to the PGP Universal Server “decrypt this data with key called ‘my key’ using algorithm ‘AES-256′”, supply the encrypted message and wait for the open message. Easy! All you have to do is to create JNI wrappers around the PGP Universal Server’s libraries. Keep watching this space, we may just know someone who’s already done all that work!
Season’s end
Sunday, September 21st, 2008New wheels
Sunday, September 21st, 2008I’m starting to think about a new set of wheels for the next season. I will definitely need new wheelset for my time trial bike. So, the new wheels will take tubs rather than clinchers; the front wheel will have 108mm aero rims and the back wheel will be solid and will have Ant+ power meter. I’m thinking about Zipp 1080 front wheel and Zipp 900 disc back wheel.


I’d better start saving now, because these beauties don’t come cheap, but they should improve my times by a few more minutes! You never know, I might win another £50.
SpringSource Application Platform in Action
Saturday, September 20th, 2008I’m sure you know that we’re writing another Spring-related book. We’re taking the advantage of the few months before Spring 3.0 comes out and writing a book on the SpringSource Application Platform. Even though the book is on the Application Platform, we will focus mostly on the dm Server. We are going to cover writing new applications and migrating existing application to the dm Server. After we have shown how to use the dm Server’s features, we’ll show you the impressive tooling and SpringSource Application Management Suite. Finally, in line with Pro Spring 2.5, we will show you how to tune your applications.
Show me the… release date
At this point, the plan is to finish writing in mid January, and if all goes well, the book should hit the bookshelves in March.
We’ll keep you posted!
Base training
Sunday, September 14th, 2008The racing season is over, the nights are drawing in and it isn’t raining as much as it did in the summer. It’s time to do a lot of base training. This means hundreds and thousands of kilometres over the next few months. The aim of the base training is to become much more efficient at fat metabolism; in other words, to be able to give as much power as possible using fat as the energy source. I will be doing low-intensity rides and measuring how much my power output increases.
The ultimate aim of this is to be able to use as much fat as possible during a race. At any moment, I have enough energy in fat for at least 20,000 km of easy riding. During a race to sustain the needed power output, the body uses sugar as main type of energy source. The problem is that even if I fully load my glucose stores (liver and muscles), it will only last for about 30 km. So, if I become more efficient at using fat, I will be able to give full power at 40 km time trial.
OSGi, assemblies and other such animals
Sunday, September 14th, 2008With the RC2 of SpringSource’s dm Server the OSGi development in Java will gain even more momentum. There are two camps of developers: one hates OSGi and the other loves it.
The reasons for hate include steep learning curve, difficulty in migrating existing applications and complexity of deployment. The first two reasons are understandable. Our SpringSource Application Platform in Action book will help with the first one and the dm Server will do an excellent job in making the migration as painless as possible. The third complaint — complexity of deployment — is not so clearly cut. If you currently need to deploy multiple versions of the same service at the same time, chances are that the complexity of your application is far greater than the complexity if equivalent OSGi-based application. In most cases, programmers actually refer to deploying a new version of a particular class or jar. But they do not want the new version to be available at the same time as the old one. Essentially, once the new version is out, the old version is lost. It is the typical update & pray scenario. You can obviously do the same with OSGi bundles. There’s nothing stopping you from updating a bundle whilst keeping its version number. OSGi is not obtrusive at all in this respect!
Assemblies
Similar thing happened to .NET assemblies: the assemblies can include a version number and .NET type identification includes the class name, the assembly and optionally a version number. Most systems use only the simple type identification, without the version number. The users of the .NET Framework have thrown away the versioning control in favour of trivial deployment and risk of problems.
Change of thinking
What we need is a shift in thinking: you can still continue with the big bang deployment, even in the OSGi world. You should, however, try to make full use of the features of the OSGi’s execution environment. This will pave the way towards easily maintainable applications in the future.
Finished!
Sunday, September 7th, 2008I’ve completed the Spud Riley. I think pain and suffering best describes the ride. At times, it felt as if the sole reason for the ride is to cause misery to the riders.
It wasn’t just the climbs, it was the rain, wind and mist. Oh yes, and mud. But we persisted and raised over £100,000 for Christie appeal — a cancer charity in the North West.

Spud Riley
Wednesday, September 3rd, 2008It is that time of the year again: time to do an epic race ride, the Spud Riley. And so I shall be setting off at 8 o’clock on Sunday morning on a 167 km ride with 3000 m of climbs. Luckily, there will be two feed stops, but I’ve stocked up on energy gels (TORQ forest fruits is the best tasting one) to keep me going in between the stops. I will post the ride report on Monday morning!


