  We consider quantum metrology in noisy environments, where the effect of
noise and decoherence limits the achievable gain in precision by quantum
entanglement. We show that by using tools from quantum error-correction this
limitation can be overcome. This is demonstrated in two scenarios, including a
many-body Hamiltonian with single-qubit dephasing or depolarizing noise, and a
single-body Hamiltonian with transversal noise. In both cases we show that
Heisenberg scaling, and hence a quadratic improvement over the classical case,
can be retained. Moreover, for the case of frequency estimation we find that
the inclusion of error-correction allows, in certain instances, for a finite
optimal interrogation time even in the asymptotic limit.
