Skip Navigation LinksHome > SSW Standards > SSW Rules > Rules To Better SQL Server Databases

What others have to say about us
See what people think about this product I've been putting together Development Guidelines for my employer and in the process have reviewed many published standards (in the .Net arena) from around the world. In each category, the suggestions at SSW are always among the best. See what people think about this product
- Leon Bambrick,
 

Frequently when I'm reviewing a client's SQL Server database design, the in-house developers tell me that "it's a bit of a dog's breakfast." 10 different developers have been working on it for a few years so a lot of the basic defaults have not been changed. Here are some of the typical things that all SQL Server DBAs and Database developers should know. These rules are above and beyond the most basic textbook recommendations of:

Now I don't see a purpose in rewriting applications that work. But - I do see the value in making an application standardised. We all KNOW that standards are a good thing, it's time we were all brave enough to be strict. Here are the standards that we follow...

Do you agree with them all? Are we missing some? Email us your tips, thoughts or arguments. Let us know what you think.

*** Update *** Instead of manually implementing these rules, use SSW SQL Auditor to automatically implement many of them for you. Download it and give it a go.


SSW's Rules to Better SQL Server Databases

1 - 99 General and DBA Rules
  1. Do you measure up-time?
  2. Do you check your SQL Server is up-to-date?
  3. Do you design for change?
  4. Do you script out all changes?
  5. Do you configure all your SQL Server Services to use a Domain Account rather than a local service account?
  6. Do you name your SQL Server Domain Account as 'SQLServerMachineName' so it is easily identified when performing network operations?
  7. Do your SQL Server Services run under non-Administrator accounts?
  8. Do you use Database Mail (not SQL Mail) in SQL 2005?
  9. Do you turn on all the default alerts?
  10. Have you created your own alerts?
  11. Backup - Do you setup a complete Maintenance Plan?
  12. Backup - Do you backup scripts?
  13. Backup - Do you take Restoration seriously?
  14. Backup - Do you have a Restoration Standard?
  15. Are you aware of all the log files?
  16. Do you secure your server by changing the 'defaults'?
  17. Do you turn on security auditing?
  18. Do you increase the Log Size of your Event Viewer?
  19. Do you remove unnecessary permissions on databases?
  20. Do you use Performance Alerts?
  21. Do you make sure you use a consistent Collation server-wide?
  22. Do you create new databases in the default data directory?
  23. Are you aware of compatibility issues between SQL Server 2000 and 2005?
  24. Do you have a general Contact Detail table?
  25. Do you know how to provide best database schema document?
  26. Do you avoid collation errors?

100 - 199 Data Rules

  1. Don't allow NULLs in text fields
  2. Don't allow NULLs in number fields if it has the same meaning as zero
  3. Don't start data in character columns with empty line
  4. Don't start data in character columns with spaces
  5. Use Identities in SQL Server (but don't use Autonumbers in Access)
  6. Don't delete records - just flag them as deleted
  7. Make sure you have valid date data in your database
  8. DateTime fields must be converted to universal time
  9. Do you use 3rd party audit tools to audit data changes?