The relative abundance of the heavy water isotopologue HDO provides a deeper insight into the atmospheric hydrological cycle. The SCanning Imaging Absorption spectroMeter for Atmospheric CartograpHY (SCIAMACHY) allows for global retrievals of the ratio HDO/H2O in the 2.3 micron wavelength range. However, the spectroscopy of water lines in this region remains a large source of uncertainty for these retrievals. We therefore evaluate and improve the water spectroscopy in the range 4174-4300 cm(-1) and test if this reduces systematic uncertainties in the SCIAMACHY retrievals of HDO/H2O. We use a laboratory spectrum of water vapour to fit line intensity, air broadening and wavelength shift parameters. The improved spectroscopy is tested on a series of ground-based high resolution FTS spectra as well as on SCIAMACHY retrievals of H2O and the ratio HDO/H2O. We find that the improved spectroscopy leads to lower residuals in the FTS spectra compared to HITRAN 2008 and Jenouvrier et al. (2007) spectroscopy, and the retrievals become more robust against changes in the retrieval window. For both the FTS and SCIAMACHY measurements, the retrieved total H2O columns decrease by 2-4% and we find a negative shift of the HDO/H2O ratio, which for SCIAMACHY is partly compensated by changes in the retrieval setup and calibration software. The updated SCIAMACHY HDO/H2O product shows somewhat steeper latitudinal and temporal gradients and a steeper Rayleigh distillation curve, strengthening previous conclusions that current isotope-enabled general circulation models underestimate the variability in the near-surface HDO/H2O ratio.