Wierd tuning trick with dynamic SQL when encountering unmatched indexes

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

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

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

Create certificate from backup fails on SQL Server 2008

This is so going to bite yer ass if you don't pay attention… As usual, a very quick post: I tried to create (ok, restore) a certificate from the production server to our DR server, so that the automated restores would work. When I ran the script (yes, CREATE CERTIFICATE … FROM FILE […]), I … Continue reading Create certificate from backup fails on SQL Server 2008

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