Category Archives: Uncategorized

Citrix deadlock

Tuning 3rd party databases is not what I’d like to spend time on, but this Citrix database keeps deadlocking on this procedure: chb_Config.chb_UpsertLeases. This was resolved by adding included columns to the index, to avoid a bookmark lookup. CREATE UNIQUE … Continue reading

Quote | Posted on by | Leave a comment

SQL Server Triggers are synchronous

  There was a discussion at my workplace about whether triggers in SQL Server are synchronous or asynchronous.  I set up a test that shows that they are synchronous. A WAITFOR DELAY inside of the trigger causes the original transaction … Continue reading

Posted in Uncategorized | Leave a comment

SQL Server security token error

We had an issue that was bothering us.  Someone could not log into the SQL Server, when they were in a group.  The error message was: “Token-based server access validation failed with an infrastructure error.” We had his password reset, … Continue reading

Posted in Uncategorized | Leave a comment

Temporal tables in SQL Server 2016

Have you noticed the new temporal tables feature in SQL Server 2016? https://msdn.microsoft.com/en-us/library/dn935015.aspx Here is my take on it, for the use case of auditing. Upsides: Must turn off the feature to add a column, then turn it back on. … Continue reading

Posted in Uncategorized | Leave a comment

vWorkspace single use plans

I found that vWorkspace uses a lot of single use plans.  However, SQL Server is good at flushing them out when needed.  vWorkspace is sharing instances with our client databases, so I’d rather it not take up many resources. On one … Continue reading

Posted in Uncategorized | Leave a comment

Find message type owners

When dropping a user from a database, sometimes they own a table or a schema, and you can go drop them.  This had become routine, until I came across a new message today. “The database principal owns a message type … Continue reading

Posted in Uncategorized | Leave a comment

Dynamic Filtered Where-Object in Powershell

Hey all, I had a new challenge to dynamically filter out an object, where the column that is filtered is passed in through a parameter.  Here is what I came up with.  This also shows how we’ve been executing queries … Continue reading

Posted in Uncategorized | Leave a comment