Estimados,
estoy probando la migración del G2 (V 2.9.4) a G3 (V3.13.1) y me encontré con el error del asunto.
Estuve mirando lo que se sugiere en: http://foro.comunidad.siu.edu.ar/index.php?topic=13131.msg57127
y lo apliqué pero sin éxito.
Copio el log:
2017/10/02 16:08:19 - 04_sga_alumnos - ERROR (version 6.1.0.1-196, build 1 from 2016-04-07 12.08.49 by buildguy) : Ocurrió un error al ejecutar esta entrada de trabajo:
2017/10/02 16:08:19 - 04_sga_alumnos - Couldn’t execute SQL: SELECT * FROM mig.get_script_corrido( 4,‘MATRICULA’) ;
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos - SET search_path = negocio;
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos - ALTER TABLE sga_alumnos DISABLE TRIGGER ALL;
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos - INSERT INTO sga_alumnos(alumno,legajo,persona,propuesta,plan_version,ubicacion,modalidad,cnt_readmisiones,regular,calidad)
2017/10/02 16:08:19 - 04_sga_alumnos - SELECT
2017/10/02 16:08:19 - 04_sga_alumnos - cpa.alumno,
2017/10/02 16:08:19 - 04_sga_alumnos - sa.legajo,
2017/10/02 16:08:19 - 04_sga_alumnos - cpp.persona,
2017/10/02 16:08:19 - 04_sga_alumnos - cppr.propuesta,
2017/10/02 16:08:19 - 04_sga_alumnos - cppv.plan_version,
2017/10/02 16:08:19 - 04_sga_alumnos - cps.ubicacion,
2017/10/02 16:08:19 - 04_sga_alumnos - ‘P’,
2017/10/02 16:08:19 - 04_sga_alumnos - sa.cnt_readmisiones,
2017/10/02 16:08:19 - 04_sga_alumnos - sa.regular,
2017/10/02 16:08:19 - 04_sga_alumnos - CASE
2017/10/02 16:08:19 - 04_sga_alumnos - WHEN sa.calidad = ‘A’ THEN ‘A’
2017/10/02 16:08:19 - 04_sga_alumnos - WHEN sa.calidad = ‘E’ THEN ‘P’
2017/10/02 16:08:19 - 04_sga_alumnos - WHEN sa.calidad = ‘P’ THEN ‘P’
2017/10/02 16:08:19 - 04_sga_alumnos - WHEN sa.calidad = ‘N’ THEN ‘P’
2017/10/02 16:08:19 - 04_sga_alumnos - ELSE ‘P’
2017/10/02 16:08:19 - 04_sga_alumnos - END
2017/10/02 16:08:19 - 04_sga_alumnos - FROM
2017/10/02 16:08:19 - 04_sga_alumnos - mig.sga_alumnos as sa,
2017/10/02 16:08:19 - 04_sga_alumnos - mig._cnv_pk_alumnos as cpa,
2017/10/02 16:08:19 - 04_sga_alumnos - mig._cnv_pk_personas as cpp,
2017/10/02 16:08:19 - 04_sga_alumnos - mig._cnv_pk_propuestas as cppr,
2017/10/02 16:08:19 - 04_sga_alumnos - mig.sga_planes as sp,
2017/10/02 16:08:19 - 04_sga_alumnos - mig._cnv_pk_planes_versiones as cppv,
2017/10/02 16:08:19 - 04_sga_alumnos - mig._cnv_pk_sedes as cps
2017/10/02 16:08:19 - 04_sga_alumnos - WHERE
2017/10/02 16:08:19 - 04_sga_alumnos - cpa.tabla = ‘sga_alumnos’ AND
2017/10/02 16:08:19 - 04_sga_alumnos - sa.unidad_academica = cpa.unidad_academica AND
2017/10/02 16:08:19 - 04_sga_alumnos - sa.carrera = cpa.carrera AND
2017/10/02 16:08:19 - 04_sga_alumnos - sa.legajo = cpa.legajo AND
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos - cpp.unidad_academica = sa.unidad_academica AND
2017/10/02 16:08:19 - 04_sga_alumnos - cpp.nro_inscripcion = sa.nro_inscripcion AND
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos - cppr.unidad_academica = sa.unidad_academica AND
2017/10/02 16:08:19 - 04_sga_alumnos - cppr.carrera = sa.carrera AND
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos - cps.sede = sa.sede AND
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos - sp.unidad_academica = sa.unidad_academica AND
2017/10/02 16:08:19 - 04_sga_alumnos - sp.carrera = sa.carrera AND
2017/10/02 16:08:19 - 04_sga_alumnos - sp.plan = sa.plan AND
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos - cppv.unidad_academica = sp.unidad_academica AND
2017/10/02 16:08:19 - 04_sga_alumnos - cppv.carrera = sp.carrera AND
2017/10/02 16:08:19 - 04_sga_alumnos - cppv.plan_g2 = sp.plan AND
2017/10/02 16:08:19 - 04_sga_alumnos - cppv.version = sp.version_actual
2017/10/02 16:08:19 - 04_sga_alumnos - ;
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos - INSERT INTO sga_alumnos(alumno, persona,propuesta,plan_version,ubicacion,modalidad,cnt_readmisiones,regular,calidad)
2017/10/02 16:08:19 - 04_sga_alumnos - SELECT
2017/10/02 16:08:19 - 04_sga_alumnos - cpa.alumno,
2017/10/02 16:08:19 - 04_sga_alumnos - cpp.persona,
2017/10/02 16:08:19 - 04_sga_alumnos - cppr.propuesta,
2017/10/02 16:08:19 - 04_sga_alumnos - cppv.plan_version,
2017/10/02 16:08:19 - 04_sga_alumnos - mig.get_default(‘ubicacion’)::integer,
2017/10/02 16:08:19 - 04_sga_alumnos - ‘P’,
2017/10/02 16:08:19 - 04_sga_alumnos - 0,
2017/10/02 16:08:19 - 04_sga_alumnos - ‘S’,
2017/10/02 16:08:19 - 04_sga_alumnos - CASE
2017/10/02 16:08:19 - 04_sga_alumnos - WHEN ca.situacion_asp = ‘AC’ THEN ‘A’
2017/10/02 16:08:19 - 04_sga_alumnos - WHEN sit.resultado_asp = ‘R’ THEN ‘P’
2017/10/02 16:08:19 - 04_sga_alumnos - ELSE ‘A’
2017/10/02 16:08:19 - 04_sga_alumnos - END
2017/10/02 16:08:19 - 04_sga_alumnos - FROM
2017/10/02 16:08:19 - 04_sga_alumnos - mig._cnv_pk_alumnos as cpa,
2017/10/02 16:08:19 - 04_sga_alumnos - mig._cnv_pk_propuestas_aspira as mpa,
2017/10/02 16:08:19 - 04_sga_alumnos - mig.sga_carrera_aspira as ca,
2017/10/02 16:08:19 - 04_sga_alumnos - mig.sga_situacion_asp as sit,
2017/10/02 16:08:19 - 04_sga_alumnos - mig._cnv_pk_personas as cpp,
2017/10/02 16:08:19 - 04_sga_alumnos - mig._cnv_pk_propuestas as cppr,
2017/10/02 16:08:19 - 04_sga_alumnos - mig.sga_planes as sp,
2017/10/02 16:08:19 - 04_sga_alumnos - mig._cnv_pk_planes_versiones as cppv
2017/10/02 16:08:19 - 04_sga_alumnos - WHERE
2017/10/02 16:08:19 - 04_sga_alumnos - cpa.tabla = ‘sga_carrera_aspira’ AND
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos - mpa.unidad_academica = cpa.unidad_academica AND
2017/10/02 16:08:19 - 04_sga_alumnos - mpa.carrera = cpa.carrera AND
2017/10/02 16:08:19 - 04_sga_alumnos - mpa.nro_inscripcion = cpa.nro_inscripcion AND
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos - ca.unidad_academica = mpa.unidad_academica AND
2017/10/02 16:08:19 - 04_sga_alumnos - ca.carrera = mpa.carrera AND
2017/10/02 16:08:19 - 04_sga_alumnos - ca.nro_inscripcion = mpa.nro_inscripcion AND
2017/10/02 16:08:19 - 04_sga_alumnos - ca.periodo_inscripcio = mpa.periodo_inscripcio AND
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos - sit.situacion_asp = ca.situacion_asp AND
2017/10/02 16:08:19 - 04_sga_alumnos - ca.situacion_asp = ‘AC’ AND
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos - NOT EXISTS (SELECT alumno FROM sga_alumnos as a WHERE a.propuesta = cppr.propuesta AND a.persona = cpp.persona) AND
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos - cpp.unidad_academica = cpa.unidad_academica AND
2017/10/02 16:08:19 - 04_sga_alumnos - cpp.nro_inscripcion = cpa.nro_inscripcion AND
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos - cppr.unidad_academica = cpa.unidad_academica AND
2017/10/02 16:08:19 - 04_sga_alumnos - cppr.carrera = cpa.carrera AND
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos - sp.unidad_academica = cpa.unidad_academica AND
2017/10/02 16:08:19 - 04_sga_alumnos - sp.carrera = cpa.carrera AND
2017/10/02 16:08:19 - 04_sga_alumnos - sp.estado = ‘V’ AND
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos - cppv.unidad_academica = sp.unidad_academica AND
2017/10/02 16:08:19 - 04_sga_alumnos - cppv.carrera = sp.carrera AND
2017/10/02 16:08:19 - 04_sga_alumnos - cppv.plan_g2 = sp.plan AND
2017/10/02 16:08:19 - 04_sga_alumnos - cppv.version = sp.version_actual
2017/10/02 16:08:19 - 04_sga_alumnos - ;
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos - INSERT INTO sga_alumnos(alumno, persona,propuesta,plan_version,ubicacion,modalidad,cnt_readmisiones,regular,calidad)
2017/10/02 16:08:19 - 04_sga_alumnos - SELECT DISTINCT
2017/10/02 16:08:19 - 04_sga_alumnos - cpa.alumno,
2017/10/02 16:08:19 - 04_sga_alumnos - cpp.persona,
2017/10/02 16:08:19 - 04_sga_alumnos - cppr.propuesta,
2017/10/02 16:08:19 - 04_sga_alumnos - cppv.plan_version,
2017/10/02 16:08:19 - 04_sga_alumnos - mig.get_default(‘ubicacion’)::integer,
2017/10/02 16:08:19 - 04_sga_alumnos - ‘P’,
2017/10/02 16:08:19 - 04_sga_alumnos - 0,
2017/10/02 16:08:19 - 04_sga_alumnos - ‘S’,
2017/10/02 16:08:19 - 04_sga_alumnos - CASE
2017/10/02 16:08:19 - 04_sga_alumnos - WHEN ca.situacion_asp = ‘AC’ THEN ‘A’
2017/10/02 16:08:19 - 04_sga_alumnos - WHEN sit.resultado_asp = ‘R’ THEN ‘P’
2017/10/02 16:08:19 - 04_sga_alumnos - ELSE ‘A’
2017/10/02 16:08:19 - 04_sga_alumnos - END
2017/10/02 16:08:19 - 04_sga_alumnos - FROM
2017/10/02 16:08:19 - 04_sga_alumnos - mig._cnv_pk_alumnos as cpa,
2017/10/02 16:08:19 - 04_sga_alumnos - mig._cnv_pk_propuestas_aspira as mpa,
2017/10/02 16:08:19 - 04_sga_alumnos - mig.sga_carrera_aspira as ca,
2017/10/02 16:08:19 - 04_sga_alumnos - mig.sga_situacion_asp as sit,
2017/10/02 16:08:19 - 04_sga_alumnos - mig._cnv_pk_personas as cpp,
2017/10/02 16:08:19 - 04_sga_alumnos - mig._cnv_pk_propuestas as cppr,
2017/10/02 16:08:19 - 04_sga_alumnos - mig.sga_planes as sp,
2017/10/02 16:08:19 - 04_sga_alumnos - mig._cnv_pk_planes_versiones as cppv
2017/10/02 16:08:19 - 04_sga_alumnos - WHERE
2017/10/02 16:08:19 - 04_sga_alumnos - cpa.tabla = ‘sga_carrera_aspira’ AND
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos - mpa.unidad_academica = cpa.unidad_academica AND
2017/10/02 16:08:19 - 04_sga_alumnos - mpa.carrera = cpa.carrera AND
2017/10/02 16:08:19 - 04_sga_alumnos - mpa.nro_inscripcion = cpa.nro_inscripcion AND
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos - ca.unidad_academica = mpa.unidad_academica AND
2017/10/02 16:08:19 - 04_sga_alumnos - ca.carrera = mpa.carrera AND
2017/10/02 16:08:19 - 04_sga_alumnos - ca.nro_inscripcion = mpa.nro_inscripcion AND
2017/10/02 16:08:19 - 04_sga_alumnos - ca.periodo_inscripcio = mpa.periodo_inscripcio AND
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos - sit.situacion_asp = ca.situacion_asp AND
2017/10/02 16:08:19 - 04_sga_alumnos - sit.resultado_asp = ‘R’ AND
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos - NOT EXISTS (SELECT alumno FROM sga_alumnos as a WHERE a.propuesta = cppr.propuesta AND a.persona = cpp.persona) AND
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos - cpp.unidad_academica = cpa.unidad_academica AND
2017/10/02 16:08:19 - 04_sga_alumnos - cpp.nro_inscripcion = cpa.nro_inscripcion AND
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos - cppr.unidad_academica = cpa.unidad_academica AND
2017/10/02 16:08:19 - 04_sga_alumnos - cppr.carrera = cpa.carrera AND
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos - sp.unidad_academica = cpa.unidad_academica AND
2017/10/02 16:08:19 - 04_sga_alumnos - sp.carrera = cpa.carrera AND
2017/10/02 16:08:19 - 04_sga_alumnos - sp.estado = ‘V’ AND
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos - cppv.unidad_academica = sp.unidad_academica AND
2017/10/02 16:08:19 - 04_sga_alumnos - cppv.carrera = sp.carrera AND
2017/10/02 16:08:19 - 04_sga_alumnos - cppv.plan_g2 = sp.plan AND
2017/10/02 16:08:19 - 04_sga_alumnos - cppv.version = sp.version_actual
2017/10/02 16:08:19 - 04_sga_alumnos - ;
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos - INSERT INTO mdp_configuracion (persona, email, recibe_mail_mensajes)
2017/10/02 16:08:19 - 04_sga_alumnos - SELECT DISTINCT
2017/10/02 16:08:19 - 04_sga_alumnos - alu.persona,
2017/10/02 16:08:19 - 04_sga_alumnos - (SELECT email FROM mdp_personas_contactos as pc
2017/10/02 16:08:19 - 04_sga_alumnos - WHERE pc.persona = alu.persona
2017/10/02 16:08:19 - 04_sga_alumnos - AND pc.email IS NOT NULL
2017/10/02 16:08:19 - 04_sga_alumnos - AND pc.contacto_tipo = ‘MP’
2017/10/02 16:08:19 - 04_sga_alumnos - LIMIT 1
2017/10/02 16:08:19 - 04_sga_alumnos - ),
2017/10/02 16:08:19 - 04_sga_alumnos - 1
2017/10/02 16:08:19 - 04_sga_alumnos - FROM sga_alumnos as alu,
2017/10/02 16:08:19 - 04_sga_alumnos - mig._cnv_pk_alumnos as cnv,
2017/10/02 16:08:19 - 04_sga_alumnos - mig._cnv_pk_personas as mp
2017/10/02 16:08:19 - 04_sga_alumnos - WHERE alu.alumno = cnv.alumno
2017/10/02 16:08:19 - 04_sga_alumnos - AND mp.persona = alu.persona
2017/10/02 16:08:19 - 04_sga_alumnos - AND mp.migrar = 1
2017/10/02 16:08:19 - 04_sga_alumnos - AND alu.persona NOT IN (SELECT persona FROM mdp_configuracion)
2017/10/02 16:08:19 - 04_sga_alumnos - ;
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos - INSERT INTO mdp_personas_tipo_usuario (persona, tipo_usuario)
2017/10/02 16:08:19 - 04_sga_alumnos - SELECT DISTINCT alu.persona, ‘Alumno’
2017/10/02 16:08:19 - 04_sga_alumnos - FROM sga_alumnos as alu,
2017/10/02 16:08:19 - 04_sga_alumnos - mig._cnv_pk_alumnos as cnv,
2017/10/02 16:08:19 - 04_sga_alumnos - mig._cnv_pk_personas as mp
2017/10/02 16:08:19 - 04_sga_alumnos - WHERE alu.alumno = cnv.alumno
2017/10/02 16:08:19 - 04_sga_alumnos - AND mp.persona = alu.persona
2017/10/02 16:08:19 - 04_sga_alumnos - AND mp.migrar = 1
2017/10/02 16:08:19 - 04_sga_alumnos - AND alu.persona NOT IN (SELECT persona FROM mdp_personas_tipo_usuario WHERE tipo_usuario = ‘Alumno’);
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos - SELECT SETVAL(‘sga_alumnos_seq’, (SELECT MAX(alumno) FROM sga_alumnos));
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos - ALTER TABLE sga_alumnos ENABLE TRIGGER ALL;
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos - INSERT INTO mig._app_migracion ( modulo, fecha_generacion, fecha_actualiz, script_corrido )
2017/10/02 16:08:19 - 04_sga_alumnos - VALUES (‘MATRICULA’ , CURRENT_DATE, CURRENT_TIMESTAMP,4 );
2017/10/02 16:08:19 - 04_sga_alumnos -
2017/10/02 16:08:19 - 04_sga_alumnos - ERROR: llave duplicada viola restricción de unicidad «sga_alumnos_alumno_key»
2017/10/02 16:08:19 - 04_sga_alumnos - Detail: Ya existe la llave (alumno)=(19289).