Home » SQLQuery
So one day, I needed to quickly check if an identity field in a view in a Microsoft SQL Server was actually unique or not. I was running into weird issues with Entity Framework throwing an error somewhat like this: Store update, insert, or delete statement affected an unexpected number…Continue reading How to form a parameterized SQL query to find duplicates in a table.
This article explains how to perform a very simple and lightweight database connection test for an existing database context. A while ago, I needed to develop a simple API that I can poll from a load balancer to see whether: This simple API would be used for monitoring purposes –…Continue reading How to verify connection to the database in Entity Framework Core?
This article explains how to query and remove duplicate entries from a Microsoft SQL database using T-SQL. The same model works both for Azure Databases (in Azure SQL Query Editor) and databases on MS SQL Server (using SSMS – SQL Server Management Studio). I had to do this a while…Continue reading How to clean up duplicates from MS SQL Database?
Quite often you get the need to simply quickly query all the database sizes on MS SQL Server. Most typically, for me, this need arises when a development machine gets low on disk space, and I need to check if some database’s log size has been growing, or if something…Continue reading Easily querying all the database and log file sizes on SQL Server