Question I’m trying to make CTE to count blocking sessions on server. Currently I made a function to do so(returns blocking session amount). But still could not write this query with CTE.
CREATE FUNCTION dbo.SESSIONS(@SESSION int) RETURNS INT AS BEGIN DECLARE …
We’ve all been there. You’ve got a query where the JOIN or WHERE predicate is not SARGable. You’ve read about how this can be a problem, and how bad it is for performance.
Alas, you cannot change the query. Sometimes this reason is political, sometimes it’s …
Assume you have configured a transactional replication publisher, which is part of an availability group (AG). Now, you have an asynchronous secondary AG (or mirroring) replica that is offline. Perhaps this is a DR node, and you are doing patching or other …
There’s a lot of advice out there on the internet that suggests that you should not install SSMS on your database servers running SQL Server.
This came up at work recently, where I was asked “Should we install SSMS on our database servers?” and my answer is:
Question A couple years ago we ran into a situation where we were changing the database owner from a DBA's login to sa, and immediately thereafter we received a complaint that the service login (which was NOT the DBA's login) no longer had access to the …
Question I can take databases offline (via GUI) but can't bring them back online. The server details are as follow:
RDBMS: MS SQL 2016 Express Host: Amazon AWS/RDS Free Tier
Details/History of the Problem A few months ago, I created a db instance on Amazon …