Undoped and Nb-doped Ba0.7Sr0.3TiO3 (BST) thin films were fabricated by RF magnetron sputtering. The bipolar resistance switching behaviors of both thin films were observed with the stable endurance by DC voltage sweep. Nb doping in BST influenced the defect distribution and improved the uniformity of resistance switching random access memory (ReRAM) properties. The defect distribution was strongly related to the resistance switching properties and the decrease in the grain size caused by Nb doping made the oxygen migration more efficient. The oxygen migration in BST was assisted by Nb dopants which increased the concentration of the non-lattice oxygen in BST layer during ReRAM operation. (C) 2012 American Institute of Physics. [http://dx.doi.org/10.1063/1.4730400]