Virial black hole mass estimates are presented for 12 698 quasars in the redshift interval 0.1 less than or equal to z less than or equal to 2.1, based on modelling of spectra from the Sloan Digital Sky Survey (SDSS) first data release. The black hole masses of the SDSS quasars are found to lie between similar or equal to10(7) M. and an upper limit of similar or equal to3 x 10(9) M., entirely consistent with the largest black hole masses found to date in the local Universe. The estimated Eddington ratios of the broad-line quasars (full width at half-maximum greater than or equal to 2000 km s(-1)) show a clear upper boundary at L-bol/ L-Edd similar or equal to 1, suggesting that the Eddington luminosity is still a relevant physical limit to the accretion rate of luminous broad-line quasars at z less than or equal to 2. By combining the black hole mass distribution of the SDSS quasars with the two degree field (2dF) quasar luminosity function, the number density of active black holes at zsimilar or equal to2 is estimated as a function of mass. In addition, we independently estimate the local black hole mass function for early-type galaxies using the M-bh-sigma and M-bh-L-bulge correlations. Based on the SDSS velocity dispersion function and the Two Micron All Sky Survey (2MASS) K-band luminosity function, both estimates are found to be consistent at the high-mass end (M-bh greater than or equal to 10(8) M.). By comparing the estimated number density of active black holes at zsimilar or equal to2 with the local mass density of dormant black holes, we set lower limits on the quasar lifetimes and find that the majority of black holes with mass greater than or equal to 10(8.5) M. are in place by similar or equal to2.