Ir para conteúdo
Fórum Script Brasil
  • 0

Problema com INDEX


mjstudios

Pergunta

Pessoal o reindexar (DBCC DBREINDEX ('minhaTabela', '', 80)) uma tabela esta apresentando o seguinte erro:

CREATE UNIQUE INDEX terminated because a duplicate key was found for index ID 1

Most significant primary key is '200'.

The statement has been terminated.

Sei que isso foi causado por registro duplicados, mas como posso resolver se não consigo nem listar via select:

Attempt to fetch logical page (1:3137264) in database 'DBName' belongs to object 'outraTabela', not to object 'minhaTabela'.

Connection Broken

Ajuda!

Link para o comentário
Compartilhar em outros sites

3 respostass a esta questão

Posts Recomendados

  • 0

Bom dia,

Há a possibilidade da tabela estar corrompida. Pode ser um mapa de alocação corrompido do índice.

Execute o DBCC CHECKTABLE na segunda tabela 'minhaTabela'.

Execute o DBCC CHECKDB para identificar possíveis corrompimentos no BD (para ver possível extensão do problema).

Link para o comentário
Compartilhar em outros sites

  • 0

Apareceu diversas msg vou postar algumas:

Table error: Object ID 1463832427, index ID 1. Page (1:3131910) is missing a reference from previous page (1:3137254). Possible chain linkage problem.

Server: Msg 8978, Level 16, State 1, Line 3

Table error: Object ID 1463832427, index ID 1. Page (1:3132710) is missing a reference from previous page (1:3137253). Possible chain linkage problem.

Server: Msg 8978, Level 16, State 1, Line 3

Table error: Object ID 1463832427, index ID 1. Page (1:3134431) is missing a reference from previous page (1:3137268). Possible chain linkage problem.

Server: Msg 8935, Level 16, State 1, Line 3

Table error: Object ID 1463832427, index ID 1. The previous link (1:3144922) on page (1:3135491) does not match the previous page (1:3137271) that the parent (1:3131908), slot 117 expects for this page.

Table error: Object ID 1463832427, index ID 1. Page (1:3137249) was not seen in the scan although its parent (1:3131908) and previous (1:3135494) refer to it. Check any previous errors.

Server: Msg 8976, Level 16, State 1, Line 3

Table error: Object ID 1463832427, index ID 1. Page (1:3137250) was not seen in the scan although its parent (1:3131908) and previous (1:3124748) refer to it. Check any previous errors.

Server: Msg 8976, Level 16, State 1, Line 3

Table error: Object ID 1463832427, index ID 1. Page (1:3137251) was not seen in the scan although its parent (1:3131908) and previous (1:3136159) refer to it. Check any previous errors.

Server: Msg 8980, Level 16, State 1, Line 3

Table error: Object ID 1463832427, index ID 1. Index node page (1:3131908), slot 115 refers to child page (1:3137252) and previous child (1:3144922), but they were not encountered.

Server: Msg 2511, Level 16, State 1, Line 3

Table error: Object ID 1463832427, Index ID 2. Keys out of order on page (1:714619), slots 185 and 186.

Server: Msg 2511, Level 16, State 1, Line 3

Table error: Object ID 1463832427, Index ID 2. Keys out of order on page (1:714619), slots 266 and 267.

There are 15721717 rows in 227335 pages for object 'minhaTabela'.

CHECKTABLE found 0 allocation errors and 89 consistency errors in table 'minhaTabela' (object ID 1463832427).

repair_rebuild is the minimum repair level for the errors found by DBCC CHECKTABLE (DBNAME.dbo.minhaTabela ).

Bom dia,

Há a possibilidade da tabela estar corrompida. Pode ser um mapa de alocação corrompido do índice.

Execute o DBCC CHECKTABLE na segunda tabela 'minhaTabela'.

Execute o DBCC CHECKDB para identificar possíveis corrompimentos no BD (para ver possível extensão do problema).

Link para o comentário
Compartilhar em outros sites

  • 0

Bom dia,

Nos erros, o sql identifica o ID do obejto que está dando erro. No caso é o ID 1463832427.

Execute o comando para confirmar o nome da tabela:

select * from sysobejcts where Id=1463832427

Execute o CHECKTABLE para tentar corrigir o erro, utilizando o argumento REPAIR_ALLOW_DATA_LOSS.

link com as explicações:

http://msdn.microsoft.com/pt-br/library/ms174338.aspx

Link para o comentário
Compartilhar em outros sites

Participe da discussão

Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emoticons são permitidos.

×   Seu link foi incorporado automaticamente.   Exibir como um link em vez disso

×   Seu conteúdo anterior foi restaurado.   Limpar Editor

×   Você não pode colar imagens diretamente. Carregar ou inserir imagens do URL.



  • Estatísticas dos Fóruns

    • Tópicos
      152,1k
    • Posts
      651,9k
×
×
  • Criar Novo...