I had this happen at a Hertz location once, and I was quite pleased with how they handled the situation.
When I arrived at the counter, I was told that they were sold out. All the other rental agencies were also sold out.
I had some flexibility and didn't need the car until the next morning. They paid for a cab to my hotel, and said that they would deliver a car to my hotel and leave the keys with the front desk. They also gave me a $100 voucher toward a future rental at any Hertz location.
As promised, the keys were at the front desk the next morning, and they had upgraded from midsize to a near-new SUV. When I returned the car 3 days later, I was told that there was no charge for the rental.
That's service recovery. Well done Hertz ^