Is it safe to make a Unique Index the Primary Key? I have a vendor database that I want to use Change Data Tracking against but cannot because none of their tables have Primary Keys defined.  The tables do have Unique Indexes but they are not defined as PK Constraints.  It seems to me that making them Primary Keys would be a safe thing to do (i.e. will not interfere with or change the software operation) given that they are already Unique Indexes.

Can anyone tell me if my understanding is correct or if I am missing something?
No it's not safe.

From a query perspective it might look OK, but if you don't know how the application handles primary keys you shouldn't change that without checking with the vendor first.

You could break their error handling, their future update scripts etc.

Just to give you an example, during a future upgrade they may want to change some tables where you added CDC and they will receive an error. What does your contract say about support in that case?

If you are using a vendor database it's up to them to support it. If you go around making changes you are basically putting your system in a state they never tested so they would (rightfully so) probably tell you you have an unsupported configuration when things go wrong.

We don't know what application or vendor you are talking about, but if it doesn't support customizations you probably shouldn't customize the database without asking them first.