SrTiO3-based heterostructures have attracted much attention due to the abundant properties compared to single components. Here, we fabricate oxide heterostructure of layed perovskite/perovskite Sr n+1Ti n O3n+1/SrTiO3 and investigate the n value-dependent and thickness-dependent conductivity. X-ray diffraction peaks and reflective high energy electron diffraction indicate good film quality. For films of n=6, the heterostructures are conductive, and the conductivity is better for thicker film. On the contrary, heterostructures with films of n=1, 2, 3, 4, ∞ are insulating. Conductive atomic force microscopy results and surface conductivity tests manifest that the oxygen vacancy induced conductive layer exists near the interface between film and substrate. This work provides feasible method to modulate the transport properties of functional transition metal oxides.