Determine if BACKUP COMPRESSION is available
This script will determine the SQL Server version and edition in order to find out if BACKUP COMPRESSION is available.
2013-09-25 (first published: 2013-09-10)
923 reads
This script will determine the SQL Server version and edition in order to find out if BACKUP COMPRESSION is available.
2013-09-25 (first published: 2013-09-10)
923 reads
This script is a universal foreach stored procedure. You can loop through everything with the help of if.
2013-09-24 (first published: 2013-09-10)
1,827 reads
Displays the information of the date of the latest backup that was done back to @daysago. When value is -0 it gives you all the backup information. The script also gives information on databases that never have been backed up.
2013-09-20 (first published: 2013-08-30)
1,593 reads
Recently I was asked to find all the Primary keys that are not clustered Indexes in the database. I constructed the below script which will help us to locate the primary keys in the database which are not clustered index.
2013-09-18 (first published: 2013-09-04)
1,935 reads
2013-09-17 (first published: 2013-09-06)
1,471 reads
2013-09-12 (first published: 2013-02-08)
680 reads
2013-09-12 (first published: 2013-02-08)
1,902 reads
Use this script to find all the Foriegn Keys and their details in a database
2013-09-11 (first published: 2013-09-02)
1,430 reads
Script queries backupset & backupmediafamily tables to get latest backup file, then generates script to restore db using backup file and moves files to new locations.
2013-09-10 (first published: 2013-08-28)
1,364 reads
Kill any user processes per database or for the entire server instance.
2013-09-05 (first published: 2013-08-21)
1,529 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