Tuesday, May 31, 2011

Naming Conventions.

New Developers come to me often and say "Pinal Steve, what is the BEST way to name all of my objects?". Today I will outline all of the best ways.

Stored Procedures:
You want something that lets you KNOW it's a stored-procedure. So ALWAYS use "sp_" to preface your stored procs! And don't worry about the name being descriptive--just name the proc any old thang. For example, if you needed a stored proc to update a table and then return a value of Success of Not Successful, just name it something like "sp_doStuffToData". People will know what you mean right away.

Tables:
Tables should always use have the TBL_ preface in front of them, just in case there's ANY question when you are looking in Enterprise Manager or Toad. At no times should you EVER use SQL Server Management Studio. It is actually a VIRUS and will harm your computer.

Stay tuned for more updates and you'll thank me later!

Best Layout for SQL Server Disks

Recently, a client asked me how they could save money on their current hardware infrastructure. I said "sure! You have TOO MANY DISKS!"

The best way to cut down on expenses is to put ALL your database files on ONE LUN (if SAN storage) or the C:\ drive of a desktop-class machine running Windows Advanced Server 2000.

MDF, NDF, LDF, fuck it, put'em all on the same drive. This will conserve space and money! And performance will NEVER be better!

You can thank me later !