The two-dimensional (2D) relativistic bound states of a spinless particle placed in scalarS(r)and vectorV(r)Cornell potentials (withS(r)>V(r)) are obtained under the influence of external magnetic and Aharonov-Bohm (AB) flux fields using the wave function ansatz method. The relativistic energy eigenvalues and wave functions are found for any arbitrary state with principalnand magneticmquantum numbers. Further, we obtain the eigensolutions in any dimensional spaceDwithout external fields. We also find the relativistic and nonrelativistic bound states for Coulomb, harmonic oscillator, and Kratzer potentials.