The relative production rate of B0 sand B0mesons is determined with the hadronic decays B0 s→ D− sπ+and B0→ D−K+. The measurement uses data corresponding to 1.0 fb−1of pp collisions at a centre-of-mass energy of √s = 7TeV recorded in the forward region with the LHCb experiment. The ratio of production rates, fs/fd, is measured to be 0.238 ± 0.004 ± 0.015 ± 0.021, where the first uncertainty is statistical, the second systematic, and the third theoretical. This is combined with a previous LHCb measurement to obtain fs/fd= 0.256 ±0.020. The dependence of fs/fdon the transverse momentum and pseudorapidity of the B meson is determined using the decays B0 s→ D− sπ+and B0→ D−π+. There is evidence for a decrease with increasing transverse momentum, whereas the ratio remains constant as a function of pseudorapidity. In addition, the ratio of branching fractions of the decays B0→ D−K+and B0→ D−π+is measured to be 0.0822 ± 0.0011 (stat) ± 0.0025 (syst).