Using SQL Alerts to Spot Suspicious Activity in SQL
SQL doesn’t really give us too many tools out of the box to allow us to spot when someone may be up to no good. We can look at...
2023-04-12 (first published: 2023-03-29)
544 reads
SQL doesn’t really give us too many tools out of the box to allow us to spot when someone may be up to no good. We can look at...
2023-04-12 (first published: 2023-03-29)
544 reads
The question of encryption seems to be coming up a lot recently. I’ve had a number of people asking me about how to go about encrypting SQL Server. SQL...
2023-01-25 (first published: 2023-01-17)
440 reads
Here’s a quick one for today and is an issue that had me stumped for a while. It’s not one that I’d come across before and there isn’t really...
2022-11-28 (first published: 2022-11-16)
334 reads
This was an interesting question that I was asked yesterday and something that I’d never really thought of before. Can you delete the top x number of rows based...
2022-09-30 (first published: 2022-09-15)
896 reads
Have you ever had the need to attach a large number of database in one go? There’s no way to attach multiple databases in SSMS or via script, so...
2022-08-24 (first published: 2022-08-15)
294 reads
Sometimes I find remembering where a particular server sends its backups to a nightmare. You might have servers backing up to different locations, you might have different locations for...
2022-06-16
29 reads
Imagine that we’re seeing very heavy load on our SQL server, be it CPU or IO and we need to find out which database is the driver. I’m sure...
2022-05-11 (first published: 2022-05-03)
1,033 reads
I’m going to assume that most people will have at least heard of Brent Ozar’s brilliant First Responder Kit. If you haven’t then you’ve been missing out on some...
2022-02-09
92 reads
Spinlock contention is always a real headache to deal with. I recently saw an issue when spinlock contention on SOS_CACHESTORE was making the server virtually unresponsive. The issue was...
2021-11-15 (first published: 2021-11-03)
302 reads
Here’s an interesting issue that recently came up. We were seeing very high compilations and recompilations on a server to the point that it started causing us some very...
2021-10-29 (first published: 2021-10-19)
330 reads
By Steve Jones
This value is something that I still hear today: our best work is done...
By gbargsley
Have you ever received the dreaded error from SQL Server that the TempDB log...
By Chris Yates
Artificial intelligence is no longer a distant concept. It is here, embedded in the...
Comments posted to this topic are about the item Planning for tomorrow, today -...
We have a BI-application that connects to input tables on a SQL Server 2022...
At work we've been getting better at writing what's known as GitHub Actions (workflows,...
I try to run this code on SQL Server 2022. All the objects exist in the database.
CREATE OR ALTER VIEW OrderShipping AS SELECT cl.CityNameID, cl.CityName, o.OrderID, o.Customer, o.OrderDate, o.CustomerID, o.cityId FROM dbo.CityList AS cl INNER JOIN dbo.[Order] AS o ON o.cityId = cl.CityNameID GO CREATE OR ALTER FUNCTION GetShipCityForOrder ( @OrderID INT ) RETURNS VARCHAR(50) WITH SCHEMABINDING AS BEGIN DECLARE @city VARCHAR(50); SELECT @city = os.CityName FROM dbo.OrderShipping AS os WHERE os.OrderID = @OrderID; RETURN @city; END; goWhat is the result? See possible answers