Naming conventions and suggestions for MSSQL

Musts

  1. Never prefix your own stored procedures with SP_.
    1. They are / should be reserved for System Procedures stored in the MASTER database.
    2. Your own SP_ procedures will somewhat start slower than any other name, because MSSQL will first search for that procedure in the MASTER database.
  2. When executing a stored procedure always prefix it with the stored procedure owner, usually [dbo]. If not, MSSQL will first look for the procedure for the currently logged on user.

Preferences

  1. Separate the component names with _. ie: abc_xzy_update
  2. Include the name of the primary table in the procedure's name. ie: abc_sales03_update
  3. End the procedure's name with the action performed by the procedure. ie: _select, _insert, _update...
  4. No need to prefix the stored procedure with sp_ or proc_. Almost all DBA tools separate Sprocs, Views, Functions, and Tables.