A search for new physics is performed using isolated same-sign dileptons with at least two b-quark jets in the final state. Results are based on a 4.98 fb−1 sample of proton-proton collisions at a centre-of-mass energy of 7 TeV collected by the CMS detector. No excess above the standard model background is observed. Upper limits at 95% confidence level are set on the number of events from non-standard-model sources. These limits are used to set constraints on a number of new physics models. Information on acceptance and efficiencies are also provided so that the results can be used to confront additional models in an approximate way.