title: Tool for validating SQL Server database schema
body: <p>Are there any tools available for validating a database schema against a set of design rules, naming conventions, etc.</p>
  
  <p>I'm not talking about comparing one database to another (as covered by <a href="https://stackoverflow.com/questions/165401/how-to-comparevalidate-sql-schema">this question</a>).</p>
  
  <p>I want to be able to say "What in this database doesn't meet this set of rules". </p>
  
  <p>Some examples of the type of rules I'm talking about would be like:<br>
  - Primary key fields should be the first in the table.<br>
  - Foreign keys should have an index on that field.<br>
  - Field names ending 'xxx' should be of a certain type.<br>
  - Fields with a constraint limiting it it certain values it should have a default.</p>
  
  <p>I've written a bunch of scripts to do this in the past and was wondering if there was something generic available.</p>
  
  <p>Ideally I'd like something for SQL Server, but if you're aware of something for other databases it may be useful to know about them too.</p>