Constraints and declarative referential integrity
Database systems have powerful features built right in that can ensure the integrity of data. In this article, Joe Celko discusses keys and constraints.
2021-05-28
Database systems have powerful features built right in that can ensure the integrity of data. In this article, Joe Celko discusses keys and constraints.
2021-05-28
Greg Larsen continues his series and shows how user-defined roles roles can control SQL Server security.
2021-05-24
Organizations have many choices when it comes to databases. In this article, Robert Sheldon explains how to choose between SQL and NoSQL databases.
2021-05-19
In this article we look at using Window Functions in SQL Server, Oracle and PostgreSQL to see the differences and similarities of the syntax.
2021-04-19
This month, to mark the 20th anniversary of BrentOzar.com, Brent steps back and looks at the big picture.
2021-04-06
There are certain checks that need to be done after a database migration is complete. One good example of this is the check that a migration script, such as one that merges changes from a branch into main, doesn't cause 'invalid objects' (a.k.a. 'missing references') in your databases. I'll show you how to run this check, using sp_RefreshSQLModule, and incorporate it into a Flyway "after" migration script.
2021-03-25
In this article we walk through how to connect to Azure SQL Database using Azure Active Directory authentication along with multi-factor authentication.
2021-03-19
Phil Factor provides SQL routines to extract data from and load data into a SQL Server database, using BCP, and then a PowerShell automation script that uses Flyway to automatically build a database, from scratch and then fill it with data, ready for testing.
2021-03-10
Learn how to setup and use Azure SQL Data Sync to synchronize and replicate data from various locations including Azure SQL Database, cloud and on-premises databases.
2021-03-02
There's just 1 week left until the Redgate Summit: The Future of Database DevOps. Check out this blogpost for what's in store, spoilers from our speakers on what they're most excited to share on the day, and why you should attend.
2021-02-09
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