Collect SQL Server/Process Information - Quickly
Execute this script to get information on SQL server, databases, processes, memory, buffer, locks, etc.
2011-04-21 (first published: 2009-09-03)
5,618 reads
Execute this script to get information on SQL server, databases, processes, memory, buffer, locks, etc.
2011-04-21 (first published: 2009-09-03)
5,618 reads
Monitoring your SQL Server instances and tracking metrics is an important part of a stable environment. New author Sadequl Hussain brings us a description of his technique for doing this across multiple servers.
2009-07-21
9,847 reads
The main purpose of article is to understand how to monitor group of Linked Sql Servers from a Sql Server.
2009-07-08
2,443 reads
An article from new author Lokesh Gunjugnur that shows how you can set up tracking for database growth on multiple servers and creating custom reports in Excel.
2009-06-02
14,414 reads
Best way to monitor Excel, Access, SQL Linked Servers from SQL 2000
2008-07-11 (first published: 2008-06-03)
1,590 reads
Best way to monitor Excel, Access, SQL Linked Servers from SQL 2005
2011-12-19 (first published: 2008-06-03)
3,285 reads
This select will show the last sql statement for every open session plus many helpfull information.
2012-01-13 (first published: 2008-03-04)
4,179 reads
As a follow up to my first article “Monitoring on a Budget”, here’s how we present the fact data to management using Microsoft Excel.
2008-01-28
5,492 reads
Every extra byte of space you waste in your database causes a performance hit to your application. This article looks at disk space usage and how it affects performance.
2008-01-08
7,011 reads
Have you ever been asked for information you couldn't provide because you didn't have an historical monitoring tool? Try this
2007-11-19
9,144 reads
By Rayis Imayev
(2025-Feb-12) I will jump straight to the problem statement without a "boring" introduction, which, in...
By Steve Jones
I wrote about getting the Redgate Test Data Manager set up in 10 minutes...
I wrote a stream-of-consciousness post a few months ago about what I do in...
WHERE a.ROWID IN (SELECT rid FROM ( SELECT ROWID rid, row_number() OVER (PARTITION BY...
Hi Does anybody know if it is possible to run a backup from a...
I have this table and data:
CREATE TABLE [dbo].[SalesTracking] ( [SalesDate] [datetime] NULL, [SalesPersonID] [int] NULL, [CustomerID] [int] NOT NULL, [PONumber] [varchar] (80) COLLATE SQL_Latin1_General_CP1_CI_AS NULL, [paid] [bit] NULL, [total] int ) ON [PRIMARY] GO CREATE CLUSTERED INDEX [SalesTrackingCDX] ON [dbo].[SalesTracking] ([SalesDate]) ON [PRIMARY] GO INSERT dbo.SalesTracking (SalesDate, SalesPersonID, CustomerID, PONumber, paid, total) VALUES ('2024-03-15 10:45:55.067', 1, 1,'PO965' ,1, 100), ('2023-09-24 10:45:55.067', 1, 2,'PO627' ,1, 200), ('2022-07-02 10:45:55.067', 1, 3,'PO6' ,1, 300), ('2022-11-03 10:45:55.067', 1, 4,'PO283' ,1, 400), ('2022-11-26 10:45:55.067', 1, 5,'PO735' ,1, 500), ('2023-04-28 10:45:55.067', 1, 6,'PO407' ,1, 600), ('2022-09-09 10:45:55.067', 1, 7,'PO484' ,1, 700), ('2024-03-13 10:45:55.067', 1, 8,'PO344' ,1, 700), ('2024-04-24 10:45:55.067', 1, 9,'PO254' ,1, 800), ('2022-06-19 10:45:55.067', 1, 10,'PO344',1, 800) GOWhen I run this query, how many unique values are returned for the SalesRank column?
SELECT st.SalesDate , st.SalesPersonID , st.total , RANK () OVER (PARTITION BY st.SalesPersonID ORDER BY st.total desc) AS SaleRank FROM dbo.SalesTracking AS st;See possible answers