1. He had this student that his name was Oscar Perez and they would both do the job together.

2. He had this student whose name was Oscar Perez and they would both do the job together.
-----------------------------------------------------------------------------------------------
Which sentence is grammatical?

2 is right