It is quite easily accomplished with use of the Object Catalog Views (sys.*).
It depends how you want to approach this - you can write a full blown procedure to check all these things. I don't have code that will do exactly the above but this should set you on the right track.
For the Primary Key Check, you can find primary keys that don't fit your naming scheme with:
SELECT distinct
i.name AS index_name,
i.object_id
from
sys.indexes i
where
i.is_primary_key = 1
and i.name not like 'PK_%'
It will be a question of using the sys.objects
table to filter for the particular key constraint.
For columns, join through sys.index_columns
and sys.columns
:
SELECT distinct
c.name AS column_name,
i.name AS index_name,
i.object_id
from
sys.indexes i
inner join sys.index_columns ic ON i.object_id = ic.object_id AND i.index_id = ic.index_id
inner join sys.columns c ON ic.object_id = c.object_id AND c.column_id = ic.column_id
As you will want to concatenate column names into one field, you will need to look into FOR XML PATH('')
This information plus careful manipulation of the naming conventions you require should allow you perform these checks.