Created
November 22, 2016 18:32
-
-
Save BrentOzar/66f52a7b59a3dabf772a376cbf039850 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE DATABASE [Collation_100_CI_AS_KS_WS_SC] | |
CONTAINMENT = NONE | |
ON PRIMARY | |
( NAME = N'Collation_100_CI_AS_KS_WS_SC', FILENAME = N'M:\MSSQL\Data\Collation_100_CI_AS_KS_WS_SC.mdf' , SIZE = 8192KB , FILEGROWTH = 65536KB ) | |
LOG ON | |
( NAME = N'Collation_100_CI_AS_KS_WS_SC_log', FILENAME = N'M:\MSSQL\Data\Collation_100_CI_AS_KS_WS_SC_log.ldf' , SIZE = 8192KB , FILEGROWTH = 65536KB ) | |
COLLATE Latin1_General_100_CS_AS_KS_WS_SC | |
GO | |
sp_BlitzIndex @DatabaseName = 'Collation_100_CI_AS_KS_WS_SC'; | |
/* That above works OK */ | |
USE [Collation_100_CI_AS_KS_WS_SC]; | |
GO | |
CREATE TABLE dbo.Test (ID INT IDENTITY(1,1) PRIMARY KEY CLUSTERED, ComputedID AS CAST(ID AS VARCHAR(100))); | |
GO | |
sp_BlitzIndex @DatabaseName = 'Collation_100_CI_AS_KS_WS_SC'; | |
/* That above works OK too*/ | |
CREATE TABLE dbo.TestPersisted (ID INT IDENTITY(1,1) PRIMARY KEY CLUSTERED, ComputedID AS CAST(ID AS VARCHAR(100)) PERSISTED); | |
GO | |
sp_BlitzIndex @DatabaseName = 'Collation_100_CI_AS_KS_WS_SC'; | |
/* That above works OK too*/ | |
USE master; | |
GO | |
sp_BlitzIndex @DatabaseName = 'Collation_100_CI_AS_KS_WS_SC'; | |
/* Works when you're in master (was worried about it being related to the collation of the database I'm in) */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment