Disable or rebuild all nonclustered indexes on a table
Can be useful when inserting a lot of data into a table.
2019-02-26 (first published: 2019-02-14)
5,426 reads
Can be useful when inserting a lot of data into a table.
2019-02-26 (first published: 2019-02-14)
5,426 reads
This script features as we can through the CTE Top10FilesWithLargerDiskConsumption the top ten data files that are showing greater consumption of hard drive related data-reading activities.
2019-01-15 (first published: 2019-01-08)
1,112 reads
Collect CPU % for a time period and alert if Average CPU usage is high
2019-01-14 (first published: 2019-01-08)
1,812 reads
Quick check SQL connection and process details with current SQL text
2018-12-06 (first published: 2018-11-27)
1,012 reads
2018-11-30 (first published: 2017-04-01)
1,178 reads
2018-11-29 (first published: 2018-11-23)
490 reads
2018-11-15 (first published: 2018-11-08)
1,623 reads
If you have a SQL Server with a High Availability solution (AlwaysOn Availability Groups, Database Mirroring, etc.), and you also have a bunch of jobs which you need to be run on the Primary server only. You need to be able to "failover" the jobs in case the Primary server is no longer Primary.
2018-11-14 (first published: 2018-11-12)
6,215 reads
Find a string in a stored procedure and replace with powershell
2018-11-13 (first published: 2018-11-06)
1,293 reads
I was using this script to check disk space on individual servers for quite some time. And now since I started to use registered servers for MS SQL, I thought of a little modification to the script.
2018-11-09 (first published: 2018-10-24)
1,192 reads
By Steve Jones
I’ve become an EV guy. I was talking with a friend who was selling...
In a previous post I talked about how we can use T-SQL Snapshot Backups...
By Steve Jones
A bit of a photo dump, but a few fun memories for me from...
Comments posted to this topic are about the item How to connect your SQL...
Comments posted to this topic are about the item Finding the Black Friday Sales...
Earlier this week I had an issue with a Win 8.1 laptop I was...
We are tracking sales for Black Friday today. We have these aggregate values:
CREATE TABLE dbo.BlackFridaySales
(
Product NVARCHAR(50) NOT NULL PRIMARY KEY,
Units INT NOT NULL
);
INSERT INTO dbo.BlackFridaySales (Product, Units)
VALUES (N'55" TV', 900),
(N'Air Fryer', 500),
(N'Noise-Cancel Headphones', 500),
(N'Robot Vacuum', 300);
I'm trying to get a ranking of the sales that would return 1, 2, 2, 3 for the product levels. Which query does this? See possible answers