Stratigraphy of oxygen isotope anomaly in Ca-Al-rich inclusions (CAIs) in primitive meteorites has been determined by secondary ion mass spectrometry. The results show that the CAIs have experienced multiple heating event in the protoplanetary disk as well as in vacuum. The oxygen isotope anomaly in CAIs was introduced by isotopic exchange reaction between the 16O-rich melt and the surrounding 16O-poor gas during the heating. A proposed energy source for the multiple heating would be flares of active protosun. The proto-CAIs generated near the protosun were launched into the meteorite forming region in the protoplanetary disk by bipolar out flow.