Data centres are large highly secure buildings that hold banks of computers and are the powerhouses behind many online services.
But the concentrated computing power generates heat so powerful that cooling is essential.
Both companies say the problems have now been resolved.
Oracle, a large American database software and technology business, reported overheating problems just before 16:00 BST.
"Following unseasonably high temperatures in the UK south (London) region, two cooler units in the data centre experienced a failure when they were required to operate above their design limits," the company wrote on a status page first spotted by The Register.
"As a result, temperatures in the data centre began to climb, which caused some systems to shut down as a protective measure."
The company said the issue was resolved, in an update posted shortly after 10:00 BST on Wednesday.
As Britain baked, overheating also hit a Google Cloud data centre location in London.
Google Cloud lets other businesses do work on the company's computers.
Just after 18:00 BST, the company reported that "there has been a cooling-related failure in one of our buildings".
In order to prevent damage to machines and an extended outage, the firm said it powered down some of them.
The problem was fixed by 07:00 BST on Wednesday and the company said that only a "small set of our customers" were affected.
Because the data processed can be highly valuable to their customers, data centres are built with many back-ups, including plenty of cooling capacity.
Experts the BBC spoke to on Monday doubted that modern data centres would experience difficulties, so the failures at big, well-resourced, companies like Google will have come as a surprise.
But operators were wary of the unprecedented temperatures.
Paul Hone, of Redcentric, which operates data centres in Harrogate, London, Reading and Cambridge, told the BBC that the firm had put its disaster recovery plan into action on Monday.
Mr Hone added that while data centres are designed to withstand hot weather, the heatwave's temperatures would be at the "upper end of design expectations for a lot of data centre operators".
In the end, for Mr Hone, Tuesday passed without incident.
But additional cooling means additional electricity consumption, which in turn can mean increased carbon emissions.
With climate scientists warning that very hot days will become more frequent, tech firms are exploring greener cooling solutions and computer systems that consume less power and generate less heat.
Microsoft carried out an experiment with an underwater data centre off Orkney in 2020. Part of the attraction was the natural cooling provided by the surrounding seawater.