The DATEPART function uses the DATEFIRST value when returning the day of the week. Because the DATEFIRST value can differ between regional settings and can be changed, DATEPART can return incorrect results. Here's how to avoid any problems....More
Some refinements to Index_Evaluation_USP make this T-SQL stored procedure more effective and easier to use to identify tables without indexes, indexes that aren't being used, and indexes that aren't being used efficiently....More
Deleting all the records in a database can be tricky when it includes tables with foreign keys. Here's a script you can use if you have ALTER TABLE permission and a stored procedure you can use if you don't....More
Stored procedures, user-defined functions, views, and triggers can fail to execute when the objects they reference have been changed. Here's a tool you can use to detect broken objects before they cause problems....More
An option when creating new AlwaysOn Availability Groups is to specify Backup Preferences.
It’s also something you can easily configure once the Availability Group has been set up as well – by simply right-clicking on the Availability Group and selecting Properties – then navigating into the Backup Preferences tab. ...More
The quest for the Golden Record to achieve a single, accurate and complete version of a customer record is worth the pursuit to attain survivorship. Record matching and consolidation are only the beginning. Melissa Data takes a new approach. Learn how to apply intelligent rules based on reference data to make smarter and better decisions for data cleansing....More
On SQL Servers where Availability Groups (or Mirroring) isn’t in play, I typically recommend keeping a combination of on-box backups along with copying said backups off-box as well. Obviously, keeping databases AND backups on the SAME server is the metaphorical equivalent of putting all of your eggs in one basket – and therefore something you should avoid like the plague....More