Catalyzes the oxidation of the 1,2-dihydro- and 1,6-dihydro- isomeric forms of beta-NAD(P) back to beta-NAD(P)+. Has a preference for 1,2-dihydro-beta-NAD as substrate. May serve to protect primary metabolism dehydrogenases from inhibition by the 1,2-dihydro- and 1,6-dihydro-beta-NAD(P) isomers. 1,2-dihydro-beta-NAD + H(+) + O2 = H2O2 + NAD(+) 1,2-dihydro-beta-NADP + H(+) + O2 = H2O2 + NADP(+) 1,6-dihydro-beta-NADP + H(+) + O2 = H2O2 + NADP(+) 1,6-dihydro-beta-NAD + H(+) + O2 = H2O2 + NAD(+) Belongs to the bacterial renalase family.