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

From the Blogs

Don’t let bad data sneak up on you when and where you least expect it. Ferret out bad data with Melissa Data’s newest Profiling Component for SSIS. Learn how to take control of your data using knowledge-base-driven metadata. The truth shall set you free!...More

Now that we’ve outlined the process to let servers in a SQL Server AlwaysOn Availability Group "talk to each other" by means of setting up linked servers, it’s possible to set up some additional or improved checks on Availability Group Health....More

In my previous post, I provided a high-level outline of the core logic (and rationale behind that logic) that would be needed to set up regular synchronization checks on SQL Server Agent Jobs for servers where AlwaysOn Availability Groups have been deployed. In this post, I’ll walk through the steps--and the code--needed to setup those checks....More