sp_spaceused rewritten as one query (no cursors)
Query that simulates running sp_spaceused on every applicable object in a database and gathering it all into a single result set.
2016-05-10 (first published: 2013-06-03)
2,262 reads
Query that simulates running sp_spaceused on every applicable object in a database and gathering it all into a single result set.
2016-05-10 (first published: 2013-06-03)
2,262 reads
A set of queries which attempt to gather as much security-related information on a single database as possible.
2015-10-30 (first published: 2013-10-24)
5,597 reads
A set of queries which attempt to gather as much security-related information on a server instance as possible.
2013-11-06 (first published: 2013-10-24)
3,104 reads
Loads temporary stored procs that assist in running and monitoring server-side tracing.
2012-03-12 (first published: 2012-02-21)
1,089 reads
Here’s a way to centralize management, rotate secrets conveniently without downtime, automate synchronization and...
This may or may not be helpful in the long term, but since I’m...
By Steve Jones
“I’m sick of hearing about Red Gate.” The first article in the book has...
Comments posted to this topic are about the item Dynamic T-SQL Script Parameterization Using...
I have read that the collation at the instance level cannot be changed. I...
hi our on prem STD implementation of SSAS currently occupies about 3.6 gig of...
In SQL Server 2022, I run this code:
CREATE SEQUENCE myseqtest START WITH 1 INCREMENT BY 1; GO CREATE TABLE NewMonthSales (SaleID INT , SecondID int , saleyear INT , salemonth TINYINT , currSales NUMERIC(10, 2)); GO INSERT dbo.NewMonthSales (SaleID, SecondID, saleyear, salemonth, currSales) SELECT NEXT VALUE FOR myseqtest , NEXT VALUE FOR myseqtest , ms.saleyear , ms.salemonth , ms.currMonthSales FROM dbo.MonthSales AS ms; GO SELECT * FROM dbo.NewMonthSales AS nmsAssume the dbo.MonthSales table exists. If I run this, what happens? See possible answers