Environmental resistance of memory devices must be clarified for putting them into practical use. This should be emphasized in particular for resistance random access memory (ReRAM), which switching mechanism is still unclear, because responses to environmental stresses are closely related to the mechanism. As for the influence of radiation exposure, with increasing density of memory devices, the issue of the generation of soft errors by the radiation, ex. cosmic rays, is becoming more and more serious. So far, soft errors are concerned about only in some semiconductor memories such as SRAM and DRAM, in which stored data are easily inverted by weak current that is generated by incident secondary cosmic rays. On the other hand, there is very little report on reliabilities of ReRAM against exposure to radiation, which might be due to a common belief that ReRAM, which resistive switching is believed to be caused by ion migration, is free from this kind of error. However, if resistive switching of ReRAM is caused by change in the charge state of oxygen vacancies (VO) as proposed by Kamiya et al. [1], soft errors of data inversion might be occurred by charge excitation such as due to ultraviolet irradiation (UV) irradiation. In this paper, we fabricated Pt/NiO/indium tin oxide (ITO) structure, which has transparent ITO electrode, and therefore the irradiation of light to the NiO memory layer became possible. By using this structure, we investigated data retention characteristics against UV irradiation to ReRAM [2]. As a result, soft errors were confirmed to be caused by UV irradiation in both low- and high-resistance states. An analysis of the wavelength dependence of light irradiation on data retention characteristics suggested that electronic excitation from the valence to the conduction band and to the energy level generated due to the introduction of VO caused the errors. Based on a statistically estimated soft error rates, the errors were suggested to be caused by the cohesion and dispersion of VO owing to the generation of electron-hole pairs and valence changes by the ultraviolet irradiation. Therefore, it was suggested that establishing a method to improve resistance to UV irradiation in consideration of the band gap, in-gap states, and the charge state of VO in metal oxides may be a key factor for practical use of ReRAM. The effect of moisture and atmosphere gas on the reliability of ReRAM will also be discussed. [1] K. Kamiya et al., APL 100, 073502 (2012). [2] K. Kimura et al., APL 108, 123501 (2016).