Viewing 15 posts - 2,986 through 3,000 (of 7,609 total)
January 28, 2019 at 5:06 pm
Do be sure to update your statistics also, though, esp. when restoring SQL to a different version.
January 28, 2019 at 4:04 pm
It's more common to use SUM(... THEN 1 ELSE 0 END), rather than COUNT, (and clearer, at least to me), so I've done that below.
SELECT
January 28, 2019 at 4:01 pm
You have CREATE USER in the code twice (once IF'd and once not).
IF SUSER_ID('[Domain\IT Developers]') IS NULL
CREATE LOGIN [Domain\IT Developers] FROM WINDOWS WITH...
January 24, 2019 at 10:23 am
January 24, 2019 at 10:10 am
January 24, 2019 at 8:12 am
This is fairly typical of the results I see for a child table. The clus index is ( parent_identity, child_identity ) and the non-clus index is ( child_identity ).
January 23, 2019 at 12:49 pm
January 23, 2019 at 8:18 am
EXEC sp_MSforeachdb '
IF LEN(''?'') = 9 AND RIGHT(''?'', 5) = ''_prod''
BEGIN
USE [?];
IF EXISTS(SELECT 1 FROM sys.columns WHERE object_id =...
January 23, 2019 at 6:59 am
Viewing 15 posts - 2,986 through 3,000 (of 7,609 total)