Triggers

Sabes tengo un triggers que no me compila, no se que hacer, lo reviso y no encuentro el error quiera enviartelo para que solo mires el codigo si esta bien escrito muchas gracias
TRIGGER "SONDAJES".mod_t_lycumo
AFTER INSERT OR UPDATE OR DELETE
ON T_LYCUMO
FOR EACH ROW
DECLARE
CURSOR lista_sonda (cyac NUMBER,clab CHAR) IS
SELECT *
FROM t_identi
WHERE yacimiento=cyac
AND codlabor=clab
ORDER BY CODLABOR;
CURSOR lista_trayec(cyac NUMBER, clab CHAR) IS
SELECT *
FROM t_trayec
WHERE (yacimiento = cyac ) AND
(codlabor = clab);
CURSOR lista_lycumo(cyac NUMBER, clab CHAR, metini NUMBER, metfin NUMBER) IS
SELECT *
FROM t_lycumo
WHERE (yacimiento = cyac ) AND
(codlabor = clab) AND
(metfinal>metini AND metfinal<=metfin);
l_s lista_sonda%ROWTYPE;
l_t lista_trayec%ROWTYPE;
l_cu lista_lycumo%ROWTYPE;
metini NUMBER;
metfin NUMBER;
metant NUMBER;
x0 NUMBER;
y0 NUMBER;
z0 NUMBER;
x1 NUMBER;
y1 NUMBER;
z1 NUMBER;
xm NUMBER;
ym NUMBER;
zm NUMBER;
rumb NUMBER;
incl NUMBER;
codigo_yac NUMBER;
codigo_labor VARCHAR2(8);
gr NUMBER;
ind NUMBER;
BEGIN
if (inserting) then
codigo_yac:=:new.yacimiento;
codigo_labor:=:new.codlabor;
end if;
if (updating) then
codigo_yac:=:new.yacimiento;
codigo_labor:=:new.codlabor;
DELETE FROM L_LYCUMO_COORD
WHERE yacimiento=:new.yacimiento AND codlabor=:new.codlabor;
end if;
if (deleting) then
codigo_yac:=:old.yacimiento;
codigo_labor:=:old.codlabor;
DELETE FROM L_LYCUMO_COORD
WHERE yacimiento=:old.yacimiento AND codlabor=:old.codlabor;
end if;
/*INICIO*/
gr:=3.14159265359/180.0;
OPEN lista_sonda(codigo_yac,codigo_labor);
LOOP
FETCH lista_sonda INTO l_s;
EXIT WHEN lista_sonda%NOTFOUND;
metini:=0;
x0:=l_s.longitud;
y0:=l_s.latitud;
z0:=l_s.cota;
OPEN lista_trayec(l_s.yacimiento,l_s.codlabor);
LOOP
FETCH lista_trayec INTO l_t;
EXIT WHEN lista_trayec%NOTFOUND;
metfin:=l_t.metfinal;
IF metfin>0 THEN
rumb:=gr*(l_t.azigrd+l_t.azimin/60+l_t.aziseg/3600);
IF l_t.incgrd>0 THEN
incl:=gr*(l_t.incgrd+l_t.incmin/60+l_t.incseg/3600);
ELSE
incl:=gr*(l_t.incgrd-l_t.incmin/60-l_t.incseg/3600);
END IF;
metant:=metini;
ind:=0;
OPEN lista_lycumo(l_t.yacimiento,l_t.codlabor,metini,metfin);
LOOP
FETCH lista_lycumo INTO l_cu;
EXIT WHEN lista_lycumo%NOTFOUND;
xm:=x0+(l_cu.metfinal+metant)/2*sin(rumb)*cos(incl);
ym:=y0+(l_cu.metfinal+metant)/2*cos(rumb)*cos(incl);
zm:=z0+(l_cu.metfinal+metant)/2*sin(incl);
INSERT INTO L_LYCUMO_COORD VALUES (l_s.yacimiento,l_s.codlabor,xm,ym,zm);
metant:=l_cu.metfinal;
ind:=1;
END LOOP;
CLOSE lista_lycumo;
x1:=x0+metfin*sin(rumb)*cos(incl);
y1:=y0+metfin*cos(rumb)*cos(incl);
z1:=z0+metfin*sin(incl);
IF ind<1 THEN
xm:=(x0+x1)/2;
ym:=(y0+y1)/2;
zm:=(z0+z1)/2;
INSERT INTO L_LYCUMO_COORD VALUES (l_s.yacimiento,l_s.codlabor,xm,ym,zm);
END IF;
x0:=x1;
y0:=y1;
z0:=z1;
END IF;
metini:=metfin;
END LOOP;
CLOSE lista_trayec;
commit;
END LOOP;
CLOSE lista_sonda;
/*FIN*/
end mod_t_lycumo;

1 Respuesta

Respuesta
1
¿El complilador te arroja la linea y error me los puedes mandar?
Hola, estes el error que envia, espero que sirba de algo gracias Soledad
error
ORA-00600: código de error interno, argumentos: [17113], [0x000000000], [], [], [], [], [], []
Parece ser un problema de upgrate del ORACLE me das la version del manejador
es la version 8i de oracle
What is an ORA-600 Internal Error?
ORA-600 errors are raised from the kernel code of the Oracle RDBMS software when an internal inconsistency is detected or an unexpected condition is met. This situation is not necessarily a bug as it might be caused by problems with the Operating System, lack of resources, hardware failures, etc.
With the ORA-600 error comes a list of arguments in square brackets. The first of these arguments tells us from where in the code the error was caught and thus is the key information in identifying the problem. This argument is either a number or a character string. The remaining arguments are used to supply further information eg. values of internal variables etc.
Whenever an ORA-600 error is raised a trace file is generated in either USER_DUMP_DEST or BACKGROUND_DUMP_DEST depending on whether the error was caught in a user or a background process. The error is also written in the alert log and so is the name of the trace file. The trace file contains vital information about what led to the error condition.
Por favor enviame el trace file y la seccion del alert.log dende aparce el error al siguiente correo
[email protected]
Soledad te hago las siguientes recomendaciones para que las consideres,
En primer lugar en el metalink la descripcion del error no ha sido tratada con anterioridad por lo que se debe habrir un TAR para iniciar la evaluacion del código de error interno, del argumento 17113 para esto te dan una serie de recomendaciones en: http://metalink.oracle.com/metalink/plsql/showdoc?db=Not&id=146581.1
Si no tienes una cuenta con metalink no te sirve de nada esta recomendacion.
Sie este fuese el caso te sugiero que segmentes el procedure y simplifique el proceso donde falle ya que el error describe que se esta tratando de ejecutar algun proceso que el sistema no soporta, asi de esta manera solucionarias eventualmente el problema.

Añade tu respuesta

Haz clic para o

Más respuestas relacionadas