Delete All Database User Accounts for a Given Server Login
Easily and quickly delete all database accounts even if they don't have the same name as server login.
2015-05-05 (first published: 2013-07-18)
6,725 reads
Easily and quickly delete all database accounts even if they don't have the same name as server login.
2015-05-05 (first published: 2013-07-18)
6,725 reads
Find any code objects that interact with a given table/view, or call another given code object.
2015-04-10 (first published: 2013-07-05)
4,611 reads
Script to list out all fragmented indexes for a given database, with options to only view them, reorganize them, or rebuild them in one fell swoop.
2012-05-25 (first published: 2012-05-15)
3,106 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...
When I log into my instance of SQL Server, there are many databases. I'm...
I have read that the collation at the instance level cannot be changed. I...
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