Alter Database Oddities

2016-05-25 0 Comments

Many of you may already know that for SQL Server, an ALTER DATABASE command is not a transacted operation. As MSDN tells us: "The ALTER DATABASE statement must run in autocommit mode (the default transaction management mode) and is not allowed in an explicit or implicit transaction."

I figured this out myself once upon a time. But not from reading documentation. It was after I created a server-level DDL trigger, much like this:


PowerShell And SQL Server: An Interview With Chrissy LaMaire

2016-05-18 0 Comments

SQL Server and PowerShell

PowerShell is a tool I’ve not taken full advantage of. I’ve used it to write a few scripts here and there. As a DBA, I’ve been able to do most tasks with T-SQL and that’s been my preference for a long time. My perspective may be shifting a bit, though. I’m still not writing PowerShell scripts, but I’ve been following a few PowerShell gurus and seeing how they use it and what SQL tasks they use it for.


Deadlock vs Blocking

2016-05-05 0 Comments

Sometimes our end users may not know the difference between a deadlock and blocking. In fact, there are some that may use these two interchangeably, thinking they are the same thing. A quick demonstration is often helpful to show the difference.