Metal or oxide electrodes (Pt, Au, Ag, (La, Sr)CoO3) were deposited on single crystals of 0.02 mol% Nb doped SrTiO3 by pulsed laser deposition. Current-voltage and capacitance-voltage responses were measured using three-terminal electrode configuration. Under high oxygen partial pressures, clear rectification behaviors were observed. Diffusion model well explained the current vs. voltage relationship with ideality factors close to unity. The barrier height varied reversibly with oxygen partial pressure, and was almost independent of the electrode materials, which suggested that the Fermi level at the interface was pinned by the surface states. The origin of the surface states was discussed in terms of oxygen adsorption or oxidative formation of metal vacancies around the surface. Chemical interaction between the surface and oxygen and resulting cation rearrangement was concluded to play an important role from the long stabilization time on oxygen partial pressure change. The water vapor pressure dependence of the barrier height was also explained by competitive adsorption of oxygen and water.