Radiative atomic and electron impact excitation data for O V and O VI ions have been calculated. The radiative atomic data have been calculated with the AUTOSTRUCTURE code. Besides the one-body and the two-body fine structure interactions, the two-body non-fine structure operators of the Breit-Pauli Hamiltonian, namely contact spin-spin, two-body Darwin and orbit-orbit are incorporated in AUTOSTRUCTURE. The scattering problem has been treated in the Breit-Pauli distorted wave approximation using the same code AUTOSTRUCTURE. The O V atomic calculations have been extended from 46 to 92 levels. We have calculated excitation cross-sections for the O V 2s2-2s2p and the O VI 2s-2p transitions at energies near the corresponding excitation threshold regions. We have also calculated collision strengths for transitions from the most important levels for collisional excitation at electron energies up to 120 Ry for O V and up to 140 Ry for O VI. Our results have been compared with the available theoretical/experimental ones and a satisfactory agreement has been found between them.