Não consigo encontrar nada além de uma estrutura de tabela do SQL Server 2017 que lista [RepairLevel] como um int, que no SQL Server 2019 não é, é uma espécie de string, se eu definir como varchar (7000), o mesmo que MessageText então funciona, mas alguém pode me dizer o tipo de dados exato da tabela inteira? Uma fonte oficial seria ótimo.
Até agora eu tenho isso:
CREATE TABLE #errormsgs
(
[Error] int NULL,
[Level] int NULL,
[State] int NULL,
[MessageText] varchar(7000) NULL,
[RepairLevel] varchar(7000) NULL,
[Status] int NULL,
[Dbid] int NULL,
[DbFragId] int NULL,
[ObjectId] int NULL,
[IndexId] int NULL,
[PartitionId] int NULL,
[AllocUnitId] int NULL,
[RidDbId] int NULL,
[RidPruId] int NULL,
[File] int NULL,
[Page] int NULL,
[Slot] int NULL,
[RefDbId] int NULL,
[RefPruId] int NULL,
[RefFile] int NULL,
[RefPage] int NULL,
[RefSlot] int NULL,
[Allocation] int NULL,
)
Para preencher eu uso
dbcc checkdb (DBName) with no_infomsgs,all_errormsgs,tableresults
RepairLevel
estánvarchar(22)
de acordo com oGetSchemaTable
retornado por este script PS. Vejo o mesmo no SQL Server 2012 e versões posteriores.Resultados do SQL 2019:
A
TABLERESULTS
opção não parece estar documentada,DBCC CHECKDB
então use por sua conta e risco.