Background Everyone knows that it's a good idea to regularly run integrity checks on your databases (you are doing that right?). What may be less obvious is that it's generally recommended with AlwaysOn Availability Groups to run it on the secondary as well as the primary. That's because, even though it's the same database being... Continue Reading →
Orphaned User After Availability Group Failover
The Problem I encountered an issue lately where one particular service account kept losing access on a development instance. Since the login and user were present I went to one of the usual culprits, orphaned users. I ran the following query, and sure enough the account was orphaned. This is easily fixed using T-SQL: USE... Continue Reading →
Working as a SQL Server DBA from a Mac
In This Article TLDR Macs are a pleasant place to spend 40+ hours in your work week, and totally workable for those with Microsoft-centric jobs. Let me give you a jump start on how to make it work. The Background I'm weird. This is a known fact that I've embraced. My family has two minivans... Continue Reading →
Automate Failover of SQL Server Always On Availability Groups with PowerShell
The Problem One of the initiatives I've been working toward with my team this year is automating as much of our SQL Server patching as possible. Over time our environment has become increasingly complex, and while Microsoft provides some rich GUI utilities for managing Always On Availability Groups, it becomes difficult to use them efficiently... Continue Reading →
Set Database Target Recovery Time with PowerShell
Background My colleague and I were recently looking for ways to improve our production Availabiity Group nodes. These are beefy machines with a large amount of memory, and things like buffer cache scans can be lengthy. In his research, my teammate came across discussions on best practices for the Target Recovery Time setting of databases.... Continue Reading →
Getting Started As A SQL Server Professional
I'll never forget when I first started working with SQL Server. After the initial excitement of diving into something new I launched SSMS and then just sat there looking at a blank query window, with no idea what to do next. I see a lot of questions online regarding how to get started as a... Continue Reading →
SQL Server “Failed to open loopback connection”
TLDR: If you have the SQL Browser Service disabled then you must also have Shared Memory enabled, otherwise SQL Server can't communicate with itself. While setting up a sandbox Always On Availability Group cluster recently I ran into some unexpected behavior. The first sign of problems was that SQL Agent would not start. The service... Continue Reading →
Installing SQL Server Using Desired State Configuration
(Update: I've since discovered that SqlServerDsc has replaced xSQLServer.) One of my growing passions is using PowerShell Desired State Configuration (DSC) to automate all the things. I started out with simple configurations for testing but wanted to dive into more complex\useful situations for my day-to-day DBA life. To be honest, I was intimidated by the... Continue Reading →
Dynamics CRM Install\Import “The SQL Server {sqlserver_name} is unavailable”
My apologies for the significant gap between my last post on our CRM 2016 Upgrade Adventure and this one. My time has been consumed with preparing for go-live, but I've been keeping track of the roadblocks and caveats we encounter as I go so that I can post about them at later dates. One of... Continue Reading →
Dynamics CRM Import Fails on “Upgrade Indexes”
As I mentioned in the last post, I'm taking you through our adventure in upgrading the existing on-premise Dynamics CRM 2011 environment to 2016 (and eventually 2016 cloud). Previously I discussed the first show-stopper error we received, "Must declare the scalar variable “@table”." Following that resolution the import continued past the stage “Metadata xml upgrade: pass... Continue Reading →