Autor Tema: Error en indice: sga_detalle_acta  (Leído 324 veces)

0 Usuarios y 1 Visitante están viendo este tema.

guaUnam05

  • General Guarani
  • *
  • Mensajes: 100
    • Ver Perfil
    • Email
  • Institución: Facultad de Cs.Exactas, Qcas. y Naturales - UNaM
  • Nombre y apellido: Maria Daniela Rolon
  • Sistema: Guarani, Araucano, Kolla, Wichi
  • Teléfono laboral: 0376-4428329
  • Utilizo algun sistéma del SIU: Sí
Error en indice: sga_detalle_acta
« on: Julio 27, 2021, 07:42:39 am »
Buenos dias! Tengo una consulta sobre como borrar y recrear indices de una tabla.
Estoy trabajando en la v2.09.3 del G2. Realizo los dbexport y debimport sin inconvenientes, y a menudo al ejecutar el comando update statistics high no me tira ningun error.
En esta oportunidad al ejecutar dicho comando (update statistics high) me tira un error de "Could not check rowids and perform data<->index check"

 El mensaje completo es el sgte.:

Validating indexes for exa2507:dba.sga_detalle_acta...
      Index  249_859
        Index  fragment partition datos in DBspace datos
Could not check rowids and perform data<->index check
Cannot create a temporary operating system file to use in a sort.
      Index in_detac_fecha
        Index  fragment partition datos in DBspace datos
      Index  249_5426
        Index  fragment partition datos in DBspace datos
Could not check rowids and perform data<->index check
Cannot create a temporary operating system file to use in a sort.
      Index  249_5494
        Index  fragment partition datos in DBspace datos
Could not check rowids and perform data<->index check
Cannot create a temporary operating system file to use in a sort.
      Index  249_5631
        Index  fragment partition datos in DBspace datos
Could not check rowids and perform data<->index check
Cannot create a temporary operating system file to use in a sort.
      Index  249_5632
        Index  fragment partition datos in DBspace datos
Please Drop and ReCreate Index  249_859 for exa2507:dba.sga_detalle_acta.
Please Drop and ReCreate Index  249_5426 for exa2507:dba.sga_detalle_acta.
Please Drop and ReCreate Index  249_5494 for exa2507:dba.sga_detalle_acta.
Please Drop and ReCreate Index  249_5631 for exa2507:dba.sga_detalle_acta

Como podria solucionar este problema?

Desde ya muchas gracias!
Daniela Rolón
FCEQyN - UNaM

Alejandro Delú

  • Moderador Global
  • *****
  • Mensajes: 9081
    • Ver Perfil
  • Institución: SIU
  • Nombre y apellido: Alejandro Delú
  • Sistema: Guaraní
Re:Error en indice: sga_detalle_acta
« Respuesta #1 on: Julio 28, 2021, 12:17:49 pm »
Segun el mensaje que reporta el informix, se soluciona borrando y volviendo a crear esos indices.
Son esos 4 indices de la tabla dba.sga_detalle_acta (el tabid debe ser el 249)
249_859
 249_5426
 249_5494
 249_5631


Como no tienen un nombre reconocido, pareciera que esos indices deben estar relacionados con FK de esa tabla. Ya que al crear una fk crea automáticamente un índice.
Fijate a que FK pertenecen esos indices, borra los indices, las fk y volve a crearlas nuevamente.
Código: [Seleccionar]
SELECT b.constrname,a.tabid,b.idxname, part1,part2,part3,part4,part5, part6,part7,part8,part9,part10,part11,part12,part13,part14,part15,part16
        FROM systables a,
     sysconstraints b,
     sysindexes c
        WHERE tabla= 'sga_actas_detalle'
        and a.tabid=b.tabid
--        and constrtype IN ('R',','P','U')
        and b.idxname = c.idxname
        order by b.constrname

2

guaUnam05

  • General Guarani
  • *
  • Mensajes: 100
    • Ver Perfil
    • Email
  • Institución: Facultad de Cs.Exactas, Qcas. y Naturales - UNaM
  • Nombre y apellido: Maria Daniela Rolon
  • Sistema: Guarani, Araucano, Kolla, Wichi
  • Teléfono laboral: 0376-4428329
  • Utilizo algun sistéma del SIU: Sí
Re:Error en indice: sga_detalle_acta
« Respuesta #2 on: Julio 30, 2021, 08:58:36 am »
Buen dia Alejandro! asi es.. borré los indices y los volvi a generar, eso solucionó el problema.

Paso a detallar lo realizado:
*****************************************************************************
--Para buscar las fk e indices asociados de una tabla realizar la siguiente consulta:
******************************************************************************
 SELECT informix.systables.tabname,   
            informix.sysconstraints.constrname,   
            informix.sysconstraints.constrtype,   
            informix.sysconstraints.idxname,   
            informix.sysindexes.idxtype,
            informix.sysreferences.primary,
            informix.sysreferences.delrule,
            (SELECT tabname from systables where tabid = informix.sysreferences.ptabid) as tabla_referenciada
       FROM informix.sysconstraints,   
            informix.systables,   
            OUTER informix.sysindexes,
            OUTER informix.sysreferences
      WHERE ( informix.systables.tabid = informix.sysconstraints.tabid ) and
            ( informix.sysconstraints.idxname = informix.sysindexes.idxname ) and
            ( informix.sysconstraints.constrid = informix.sysreferences.constrid )
      and informix.systables.tabname = 'sga_detalle_acta' 
order by informix.systables.tabname ;

*****************************************************************************
--Borrar y regenerar los indices nuevamente:
*****************************************************************************
--Borré cada indice de la sgte. manera:
ALTER TABLE "dba".sga_detalle_acta  DROP CONSTRAINT "dba".pk_detalle_acta;

--Regeneré cada indice:
ALTER TABLE "dba".sga_detalle_acta
       ADD CONSTRAINT primary key (unidad_academica,tipo_acta,acta,carrera,legajo)
         constraint "dba".pk_detalle_acta

Esto solucionó el problema.
Gracias por responder.
Saludos,
Daniela Rolón
FCEQyN - UNaM