Later edit: Both Uwe Ricken (https://www.linkedin.com/in/uwericken/, https://www.db-berater.de/) and Sascha Lorenz (https://www.linkedin.com/in/saschalorenz/) correctly pointed out that my little inconsisted writing was a tad too inconsistent - first of all, the title itself was NOT highlighting the very point of this blog post: unmatched indexes and how to deal with them by using dynamic SQL. Truth be … Continue reading Wierd tuning trick with dynamic SQL when encountering unmatched indexes
Category: Uncategorized
Stop using variables in stored procedures for no reason
Yes, writing about SQL Server every 10 years will not bring me any medals. I know, I know.Anyway, I am currently checking what is what on a new project and I got to see this in the header of a stored procedure from 10 years ago: "use @variable to suppress 'parameter sniffing'".I will NOT dwelve … Continue reading Stop using variables in stored procedures for no reason
Collecting blocking chain
We've all been there, trying to figure out who's blocking who, who is the most avid blocker. Personally, I was and still am a huge fan of Adam Machanic's (b) sp_WhoIsActive for accomplishing that. But I stumbled upon a nice script from @SQL_Undercover (b|t) which is using sp_BlitzWho stored procedure. For the ones not familiar … Continue reading Collecting blocking chain
Change the PowerBI desktop default language
For whatever reason, I ended up with Romanian as the default language for PowerBI desktop (no regional settings, no browser settings, no nothing would provide a hint to the installer that it should install and set the app to Romanian). This did not help either: https://community.powerbi.com/t5/Service/change-PowerBI-language-menus-to-english-while-maintaining/td-p/4782 I ended up in C:\Program Files\Microsoft Power BI Desktop\bin, … Continue reading Change the PowerBI desktop default language
Remove TDE completely. Really?
I must be getting old, two blog posts in the same year! 🙂 Anyway, I made some additional testing as part of a TDE (Transparent Data Encryption, that is) implementation and I noticed couple of interesting things when you want to remove the TDE completely from the server: When checking sys.databases, tempdb is shown as … Continue reading Remove TDE completely. Really?
To OR or …?
Yeap, a year later, there we go, posting a quick blog again. A colleague of mine skyped me about a query that was running slow. Well, slow means that it ran for 90 seconds, and then it timed out, that is. Here is the little repro of the challenge: I know, I'm too lazy NOT … Continue reading To OR or …?
DATETIME and its surprises
Well, it's about time I write another blog post (with a promise that I'll do it more than once a year). I'm going to start a series of "bad habits to kick" as for me it is important that we all have a common ground on SQL Programming. 1. Consider the following scenario: SET … Continue reading DATETIME and its surprises
Say What? – “Management Studio: must be set in single thread apartment (STA) mode before OLE calls can be made”
Yes, I have another couple of minutes to document this weird message. I was trying to access the database properties for one of our databases. Guess what: I couldn't as there was no owner! Well, the easiest thing to do is to alter the authorization on the database; as you may have guessed it already, … Continue reading Say What? – “Management Studio: must be set in single thread apartment (STA) mode before OLE calls can be made”
Login failed. The login is from an untrusted domain and cannot be used with Windows authentication. Error source: Microsoft OLE DB Provider for SQL Server – revisited
This blog post is waiting for me to have some time for the past couple of months by now. It did bite me back then, and so it did yesterday. "Login failed. The login is from an untrusted domain and cannot be used with Windows authentication. Error source: Microsoft OLE DB Provider for SQL Server" … Continue reading Login failed. The login is from an untrusted domain and cannot be used with Windows authentication. Error source: Microsoft OLE DB Provider for SQL Server – revisited
My mail to SQL Sentry that will win me (yeah, right) a free seat to SQL Skills training!
The amazing guys @SQL Sentry (www.sqlsentry.net) are giving away a chance to win a free seat to SQL Skills Internals and Performance training (check out the details: http://www.sqlsentry.net/sqlskillsimmersion.asp.Of) course, I decided to give it a try, so I wrote to the guys; you can check it below:"Hello there.Now, last night at around 2:30 AM I … Continue reading My mail to SQL Sentry that will win me (yeah, right) a free seat to SQL Skills training!