We all know the error log used by SQL Server to audit failed logins by default. But is it good enough? For many scenarios, it isn’t. It’s actually missing a lot of important information. But, worry not, for there are better solutions!Continue reading “Finding the Details Missing from the SQL Server Failed Logins Audit”
Today’s script has something very interesting to do with Heap tables. Specifically, how to turn then into something that’s not a heap. Continue reading for more info…Continue reading “How to Un-Heap Your Heaps?”
On October 7th, I delivered my presentation about Advanced Dynamic Search Queries at the Israeli Data Platform Meetup, at Microsoft Reactor Tel-Aviv!
Many times I happen to find myself in a situation where, as a DBA, I need to write some long and cumbersome code (usually for maintenance purposes). For example: Write a script to copy a bunch of tables from one database to another. Import the tables from one database to another database. Rebuild a bunch of indexes. Update a bunch of statistics. Write scripts for … Continue reading Let SQL Server Write Code for You
Since SQL Server 2005, Microsoft had a nice addition to the common DML statements, UPDATE and DELETE, by allowing the use of the TOP keyword. Well, we’re now in the year 2018 and SQL Server 2019 is just around the corner, and yet unfortunately for many of us, SQL Server still doesn’t support the use of the TOP keyword in direct conjunction with the ORDER … Continue reading Efficiently UPDATE and DELETE using TOP and ORDER BY
How to remove the IDENTITY property from an existing column using T-SQL (without changing the order of the columns or moving the data into a new table) Recently I had a scenario at a client where I needed to remove the IDENTITY property of a column in an existing table. The two common methods to do this were quite problematic and were no good for … Continue reading Remove the IDENTITY property from an existing column