An Indian colleague of mine & I have had this experience before travelling to Dubai from Doha, with no problem for getting the visa on arrival.

Obviously you have to carry both passports.

You also need a return ticket, & a company / sponsor letter as proof of your profession (especially if it is not mentioned in your RP)showing salary details. Without this they will give you a hard time to prove your professional status.

Best of luck !