I Use the mains with the battery disconnected
Although batteries are expensive, my data is more valuable to me than my battery. So, notebook's always got its battery in, desktops are on UPS. (Now UPS batteries make notebook batteries seem positively immortal.)