Quote of the week: May 10th 2008
May 10, 2008
“Insanity: doing the same thing over and over again and expecting different results.”
- Albert Einstein
SQL Replication Fun!
May 9, 2008
We use Microsoft SQL Server as the back end for our Retail Management & EPOS software. On most systems we use merge replication configured with pull subscriptions. Recently we’ve had a few instances of the replication mysteriously hanging on a merge - the first sign is usually the client calling to say their system is running very slowly. A quick look will show CPU usage at 100% with the replmerg process appearing to do a lot but actually doing very little! This could happen to one subscription or several at the one time - while remaining subscriptions operate fine.
Symptoms (you may get some or all of these)
- Subscriber machine slow & unresponsive
- ReplMerg.exe process takes 100% CPU time
- Agent process takes considerable CPU time on Publisher
- Replication “hangs” for long period
- Pretty much zero network traffic while it’s “working” away
- Query timeout messages at the subscriber repeating ever so often
- The following errors are found in replmerg.log on the subscriber :-
- Errors at the server include :-
Replprov.dll, 2008/05/07 09:32:57.479, 3964, 16890, S1, ERROR: ErrNo = 0×8004501e, ErrSrc = <null>, ErrType = 8, ErrStr = The merge process was unable to create a new generation at the ‘Subscriber’. Troubleshoot by restarting the synchronization with verbose history logging and specify an output file to which to write.
Replprov.dll, 2008/05/07 09:32:57.760, 3964, 16890, S1, ERROR: ErrNo = 0×80045607, ErrSrc = <null>, ErrType = 8, ErrStr = The Merge Agent was unable to update information about the last synchronization at the Subscriber. Ensure that the subscription exists at the Subscriber, and restart the Merge Agent.
The replication agent has not logged a progress message in 10 minutes. This might indicate an unresponsive agent or high system activity. Verify that records are being replicated to the destination and that connections to the Subscriber, Publisher, and Distributor are still active.
Cause
The cause is a known bug in SQL Server where it gets into an infinite loop when trying to run sp_MSmakegeneration. An update is supposedly due for release in July/August 2008 to resolve this problem - in the meantime a recommended solution is to set generation_leveling_threshold to 0 using the following SQL Code.
update sysmergepublications set generation_leveling_threshold = 0
This has worked for us most times - although sometimes it does seem to get reset back to the default 1000 and eventually will die again.
Other detail
Here’s a quote from the MSDN Forums which explains things a little :-
This basically tells the merge agent how many commands to put into a given generation. This setting coupled with DownloadGenerationsPerBatch will tell the merge agent how much to download at a given time. For example, if DownloadGenerationsPerBatch is set to 1, and generation_leveling_threshold is set to 100, and there are 10 generations to process (totalling 1000 changes), merge agent will sync 1 genreation at a time, and if it fails anywhere along the line, it will restart from the failed generation. This is highly useful in scenarios with unreliable network as it gives the agent a chance to make progress amonst the many retries. By setting it to 0, it will try to sync 1000 changes all at once, and if by the 999th change the network cuts out, merge agent will retry from the beginning all over again.
http://forums.microsoft.com/msdn/showpost.aspx?postid=1655111&siteid=1&sb=0&d=1&at=7&ft=11&tf=0&pageid=3
And some other references on the forums
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1619326&SiteID=1
I’ve discovered one thing over the last year. Writing a blog is difficult! Or rather, consistently writing a blog is difficult. It’s not that I can’t find things to write about … or that I don’t enjoy writing … it’s just nearly impossible to find the time! In the words of my last post “I regret often that I have spoken; never that I have been silent” … not this time!
But more than that it’s increasingly difficult to find the time for lots of things. Mark Evans is on a similar topic here … “So Much to Do, Not Enough Time!“.
Of course I have a time (or should that be life!) consuming job and other organisations I’m involved in, but lots of people have much busier lives than I and yet seem to accomplish more. I’ve read lots of books over the last year about time management, prioritisation etc but the implementation of theory isn’t always easy. What I’d like to know is how the people who run countries or large companies manage to do what needs to be done!? We’re often disenchanted with our politicians & leaders but my goodness these guys must be on top of their task management game in order to do what they do.
We’re increasingly juggling a world where there are just too many things trying to steal our attention: bombarding us with information, and demanding our time by email, SMS, phone, mobile, facebook, twitter etc. Manager Tools dealt specifically with the topic of Email in a podcast a few years ago and identified email as a major cause of interruption in the workplace.
All of this makes it increasingly difficult to actually concentrate on doing useful stuff - the desire to multitask is enormous and it’s so easy to flit between things during the day and end the day having accomplished little. I often find myself having to take a mental grip and focus on one thing at a time.
With a new baby in the house (3 days!) it’s perhaps more on my mind that a 70+ hour work week + my non-work activities just isn’t sustainable. The answer I know in theory is to do less “average stuff” and concentrate on the really “important stuff” - defining what is the important stuff - that’s the difficult bit!
Quote of the week: April 5th 2008
April 6, 2008
“I regret often that I have spoken; never that I have been silent”
- Syrus
Living with the Lenovo ThinkPad T60
April 6, 2008
One of my first blog posts last year was on my new T60 - I was really pretty happy with the purchase - at least after wiping it to get rid of all the pre-installed nonsense and sticking on a nice fresh install of Vista . So after 15 months hard use am I still as happy?
Amazingly the answer is yes - a fairly remarkable achievement given that I normally tire of my new gadgets before a week is out and start looking towards the replacement which will do things better. But the T60 really has delivered - and in fact the only problem which still bugs me slightly is the low screen brightness - something which has been annoying since day one. That and the fact that very occasionally it doesn’t hibernate properly when I close the lid and then my bag turns into an oven as it runs away until the battery dies - I think this one’s fixed by a recent firmware upgrade though.
I’ve used the laptop a lot over the year - done lots of development work on it - and lots of the usual email & web browsing when travelling. It really is the perfect balance for me - substantial enough to use every day - and small enough to make a good travelling partner.
However it has suffered the usual fate of a geek’s laptop and had hundreds of programs installed, uninstalled, upgraded, uninstalled, then reinstalled again! As a result it’s starting to grind a little. Ok .. starting to grind a lot actually …
It was time for a reformat and reinstall! I’ve been putting it off for months due to the sheer hassle of it all - but it had to be done sometime … so I’ve bitten upon the bullet this weekend .. stuck a bit more RAM in it … imaged the old machine off using VMWare Convertor (a way cool tool by the way) … and installed XP SP3 RC1!
As for the XP as opposed to Vista .. I’ll explain why later!
VoIP for your business? Lessons we have learned
March 27, 2008
We use a Voice over IP telephone system at work. This gives us a lot of flexibility - we have 2 main offices and also extensions at home. We can effectively control our system from anywhere - and if I’m working at a client’s site for a couple of days I can even take my office phone and plug it into their network.
We’re using Voipfone as the provider - there was some reliability issues back last year but since then they have proved to be pretty solid. Four lessons learnt early on if you want to use Internet based voice over IP in any kind of professional capacity :-
1. Buy a decent low-contention business grade broadband package. Headline rates don’t mean anything. A £50 per month business grade broadband is better than a £9 one. Period. And a cheap-ass broadband connection will break your heart ….
2. Buy a decent router which understands VoIP/SIP traffic and can prioritise - and if you don’t have in-house IT expertise to configure it find someone who does. Otherwise your calls will get cut up every time someone tries to download or upload a big file. You don’t need to spend a fortune - we’re using an Intertex IX68 which is about £150 or less.
3. Buy decent phones. Cheapo phones will give cheapo quality and reliability. We’ve been using Linksys 941’s which are reasonable. The last two phones are Snom 320’s which seem a bit nicer - albeit a bit more expensive (had some problems getting them to work but that’s a blog article for later!)
4. Have a backup plan. The reliability of ADSL broadband is improving all the time but it still can be a bit shaky at times - and the lack of a proper SLA is still a problem. Make sure you know what you’re going to do when (not if!) it fails. We have some redundancy with multiple office locations - and also have failover to PSTN & Mobiles in an emergency. Depends on your business but we could quite easily operate like this for a few days if we absolutely had too,
Are we happy using internet based VoIP for our business? Yes. The flexibility & ease of expansion is great. For a 7/8 extension phone system across two offices it’s VERY economical. And we can live with the lack of a SLA agreement and potential difficulties with getting problems sorted quickly.
The acid test though - would I install it for a client yet? Truthfully … probably not …
Quote of the week: March 22nd 2008
March 22, 2008
“If it were not for the last minute, nothing would get done”
Famous Quotes - Unknown
Things you didn’t know you could do with Google
February 7, 2008
Like many people Google is my browser home page - it’s where I start almost every Internet search / browse from.
I might be a bit slow of the mark here - it’s possibly common knowledge - but here are a few useful things you can do with the Google search tool.
Calculator
To do some basic arithmetic just type your expression - hit search and Google will return a result.
Or something more advanced,
Units of Measure conversions
Convert gallons to litres, or acres to hectares, or bits to bytes,
Currency conversions
Or do a quick currency conversion,
Or how about a combination,
Pretty handy. Read more at the Google Guide.
Facebook kick off another blogger with no warning ..
January 29, 2008
Once again Facebook demonstrate their finesse by kicking off a high profile blogger. In this case I agree that it’s not the “kicking off” which is the problem - the naming of this account was quite clearly in contravention of their rules - but rather the heavy handed and abrupt method in which they pulled the plug. No warning - just gone!
In a recent Scoble interview with Mark Zuckerberg he expressed the desire to encourage new applications which are less useless (my words not his!) and more functional. But why would anyone trust their data to a company who can restrict your access to your own data, and kill you off without so much as a sniff!
As it stands I wouldn’t be all that bothered if I wasn’t able to poke someone with a carrot - or throw a wardrobe at them! But if I was using this platform for anything other than total trivia I would be starting to get concerned ….


