The RX2000 software every CVS/Pharmacy uses links patient profiles by individual store, and if they want to, by the entire company. Meaning:
If you go into store #1000 in Washington D.C. to fill a script, they can find you if you have filled prescriptions at that store before. If they don't see you, they will add you as a new patient and make a new profile for you. But if you have already filled prescriptions in the past at a CVS/Pharmacy in New York City, New York, it would be possible for the CVS/Pharmacy in D.C. to look you up in their national database and find your profile from NYC, NY, and add your new Rx onto that one to keep it all in one place.
Also, a patient profile on RX2000 software has a spot for 'Notes'. Any Pharmacist, Pharmacy Technician or Pharmacy Service Associate can add anything they want about a particular patient here. Some staff use it inappropriately (they save terms like 'really hot' and 'total bitch' etc), while others use it to flag pateints who have given problems before or to save requests of patients (a legitimate use is when a Pharmacist adds "Allergy to Red Dye #7" or "Prescriptions for this patient only to be picked up by the patient themself, unless the patient specifically states otherwise"). If a patient has a history of abusive behavior towards staff, or has tried to say their count was off of pills, etc that can be added in the Notes section of their patient profile.
Also, some CVS/Pharmacy Pharmacists simply refuse to fill certain prescriptions, or all CII opioid scripts (One Pharmacist I heard about didn't order or fill any CII drugs to avoid the hassle). Sometimes if a person is thought to be a drug-seeker, the pharmacist will tell the Tech or Service Technician to tell the patient we don't have any in stock (especially with high count OxyContin 80mg scripts).
Like another poster said, if your doctor checked the DAW box, or signed above the line that says 'Dispense As Written Only', they can only dispense you brand name medication, which CVS/Pharmacy specifically tries to avoid, so they often do not have brand meds on hand unless a regular customer requests it.
To find out, you could try to find a sympathetic Pharmacy Tech or Service Tech to look in your profile under 'Notes' and tell you, but most likely they won't. Take your business elsewhere if it isn't your doc writing DAW.