When multiple sessions insert into the same table, and something unique is there (uq index, uq constraint), a “duplicate key” error (2601, 2627) occurs from time to time, almost inevitable. If your app is affected with intermittent “duplicate key” surprises, please read on – we will scrutinize on how to avoid that error. If you are in a hurry – go for the summary at the bottom. (more…)
EVERYBODY should read this!
Whether you have a big database that needs speed, or other valuable data like documents or just personal pictures you do not want to lose when disk fails (disks DO fail without notice, just a matter of moment), you should read this post.
There is a hidden gem in Windows OS you can leverage for free. Just not many people know about it and how big value can it bring to you. Read on and watch the demo in video.
There are thousands of indicators (Perfmon Counters, system views, …) one can track to monitor SQL Server, but not all of them are relevant. If I need to pick one, that would be “Processes Blocked”. (more…)
While ago I wrote SSMS Addin called SQL XDetails. It was not updated long time because GUI integration with new SSMS versions were different every time and too much for my poor csharp knowledge. I am a DB guy after all. There are very good news – I wrote a procedure to replace the XDetails Add-in!
In 2 days, 11th of May, I speak in Helsinki, Finland about SQL Server Magic. The country with the best education in the world, thinking out of the box, plus very nice nature and the best air quality. I am very happy to meet people there.
In less than two weeks I will speak at SQL Saturday conference in Stockholm, Sweden. I am very excited to meet people there and see at least a glimpse of their culture and way of thinking.
Your SQL Server may be slow for a peculiar reason: a run-away query that pushes-out all other queries from the plan cache, like a huge wave. So called “tsunami query“. Tsunami query wipes other plans from the cache and makes your SQL running slow. Creating tsunami query is easy and usually not intentional: a developer concatenates values in SQL command string. As it “works on my machine”, it easily slips to production (nobody tests for this, right?), and the monster is loose! (more…)
You might have lot of virtual machines (VM) for Dev and Test environments. And a storage with huge amount of space to fit all databases. What are the options? Probably the best for performance would be to connect to storage’s LUNs directly from the guest OS (windows iSCSI Initiator). But if you want something much much simpler and still efficient, read on…
Docker is perfect for launching DEV and TEST SQL Server environments, when you need many independent SQL instances, or ability to run and stop instances in seconds, only when you need them. Launched from one common image (1GB in size), all SQL instances “containers” share that common image, spending almost no additional space, expect for databases you add. That means super-low disk space consumption. Also memory (RAM) of the host is shared, used as needed by every instance and without RAM footprint of OS and apps we have in classic VMs. Therefore, much more SQL instances fit into same amount of RAM. One can launch different SQL Editions from the same image within seconds. It is demonstrated in the video.
You developed a new TSQL code and want to check is there a slow SQL statement inside and which is it? Or you debug the code and want to know which statement throws error, maybe inside of a trigger or calculated field which calls a function that fails and is not immediately visible what is happening? Or you test application on QA environment, and want to check for SQL errors or slow statements to return them back to dev for correction before problems hit production? Then read on…