T-SQL query to get the latest available backup chain
T-SQL query to return the latest available database backup chain (Full, Differential and Log) of individual databases along with their backup size and compressed size.
2019-10-30
12 reads
T-SQL query to return the latest available database backup chain (Full, Differential and Log) of individual databases along with their backup size and compressed size.
2019-10-30
12 reads
T-SQL script to purge all the tables including foreign key references. The script has been made smart enough to use TRUNCATE wherever there is no foreign key reference and...
2019-10-30
20 reads
T-SQL script to purge all the tables including foreign key references. The script has been made smart enough to use TRUNCATE wherever there is no foreign key reference and...
2019-10-30
15 reads
T-SQL query to copy the rows of all the tables from one database to another database only if they have rows in Source DB and exact same Schema in...
2019-10-30
21 reads
T-SQL query to copy the rows of all the tables from one database to another database only if they have rows in Source DB and exact same Schema in...
2019-10-30
20 reads
2019-10-10
39 reads
2019-10-10
14 reads
In this blog post, you will get the query to “Split data into N equal groups” using SQL Server and you will also see the practical implementation of the...
2019-10-10
773 reads
In this blog post, you will get the query to “Split data into N equal groups” using SQL Server and you will also see the practical implementation of the...
2019-10-10
85 reads
WHILE LOOP can be used for batch processing and can be helpful if you are dealing with huge data processing. Recently I did an analytics project where I had...
2019-10-09
25 reads
By Steve Jones
I recently started playing with the MCP Server for SQL Server, which is a...
If you spend your days tuning queries, managing pipelines, or keeping a production database...
I’ve been rebuilding my three-site SQL Server demo lab, and I ran into something...
Has anyone written a wrapper function (or similar) around STRING_AGG() to allow the retrieval...
Putting this here as we're currently on SQL Server 2019 installed on Windows Server...
Comments posted to this topic are about the item Never is Not the Policy
I have added a few indexes to one of my tables in SQL Server 2025:
ALTER TABLE dbo.CustomerContact
ADD CONSTRAINT PK_CustomerContact
PRIMARY KEY (CustomerID);
-- Create index on CustomerEmail
CREATE INDEX IX_CustomerContact_CustomerEmail
ON dbo.CustomerContact (CustomerEmail);
CREATE INDEX IX_CustomerContact_CustomerPhone
ON dbo.CustomerContact (phone);
I then do this to disable one index:
alter index IX_CustomerContact_CustomerPhone on dbo.CustomerContact disableI see this when I check the index status:
I decide to rebuild all indexes with this command:
ALTER INDEX ALL ON dbo.CustomerContact rebuildAfter I do this, what will I see for the index status? See possible answers