If I get oxycodone from my pain management doctor and my primary gives me oxycodone same kind can anyone tell?

Doctor Shopping. What you are talking about is getting oxycodone from two different doctors. It is illegal. Yes, there are ways to tell.
Only 1 doc! That is doctor shopping and is illegal both you and the doctors could be in serious trouble.
Yes. If your doctor asks the pharmacy, it can be found out. Pharmacies keep careful records (like in jackson trial) getting these prescriptions from multiple providers without your pain mgmt doc's ok can get you dropped as a patient, so is very risky to do. It will be part of your medical record as well. If your primary gives you a prescription, i recommend you not fill it unless your pain doc says ok.