Kevin Hill has a top ten functions list for database administrators:
3. DBCC Opentran – log file filling up? Processes blocked and timing out? See if some doofus (hopefully not you) left a transaction open and went to lunch. If you are lucky you can kill it. Unlucky and you find an undistributed replicated transaction.
4. Getdate() – Not sure why, but this winds up in probably 80% of the scripts I write. Not surprisingly, it often brings along it’s little brother, DateDiff.
I’d go with GETUTCDATE() or SYSUTCDATETIME() over GETDATE(); that way, everything gets stored as UTC and you spend less time worrying about time zone or Daylight Savings Time issues.
Valid point, but for newish DBAs, GetDate() is the gateway drug to all date functions 😉
Comments are closed.