This paper derives tight ergodic sum-rate capacity scaling limits for cognitive radio secondary networks under five different communication environments (CoE) for two different network types when secondary users' (SUs) transmission powers are optimally allocated. The network types studied are power-interference limited (PIL) networks and interference limited (IL) networks. In PIL networks, SUs' transmissions are limited by both an average total power constraint and a constraint on the average interference that they cause to primary users (PUs). In IL networks, SUs' transmissions are only limited by an average interference constraint. The capacity scaling results in PIL networks are derived for three different CoEs in which secondary transmitter to secondary base station (STSB) channel gains are Rayleigh distributed while secondary transmitter to primary base station (STPB) channel gains are Rayleigh, Rician or Nakagami distributed. It is shown that secondary network capacity scales according to log log (N) in these three CoEs, where N is the number of SUs. In addition to these three CoEs, two more CoEs are also studied for IL networks: Rician or Nakagami distributed STSB channel gains and Rayleigh distributed STPB channel gains. It is shown that the secondary network capacity scales according to log (N) for all five CoEs in IL networks. This result implies exponential capacity gains in IL networks over PIL networks. The same capacity scaling results are shown to hold even for heterogeneous cognitive radio networks in which different SUs experience statistically different channel conditions. In some cases, our analysis leads to a new notion called effective number of users, which signifies the effective number of users contributing to multiuser diversity in cognitive radio networks. For example, effective number of users is given by K+1/e KN when STSB channel gains are Rayleigh distributed and STPB channel gains are Rician distributed with a Rician factor K.