Hi everybody,
I'm not an expert and I can't see the solution to this problem:
I have programmed a set of procedures and events in order to make automatic backups. Before a 'BACKUP statement' I call another procedure, that ensures that my database is valid. Code to create this procedure is as follows:
create procedure BD_Validar (IN caller_event char(100), OUT error int)
begin
declare v1 char(50);
declare v2 char(50);
declare c1 cursor for call sa_validate(check_type = 'index');
declare c2 cursor for call sa_validate (check_type = 'express');
--DEBUG: message 'Index validation' to client;
open c1;
fetch first c1 into v1;
if (v1!='No error detected') then
--DEBUG: message 'Errors detected in index validation' to client;
--Sends a mail to administrators
set error = 1;
close c1;
return error; --No continuamos la ejecución
end if;
--DEBUG: message 'Express validation' to client;
open c2;
fetch first c2 into v2;
if (v2!='No error detected') then
--DEBUG: message 'Errors detected in express validation' to client;
-- Sends a mail to administrators
set error = 1;
close c2;
return error; --No continuamos con la ejecución
end if;
close c1;
close c2;
return error;
end;
I have loaded this procedure in one ASA9 without any problem (and I know it works), but when I try to load it in another PC (same version of ASA 9), Interactive SQL tells me that there is an access infraction or something.
Why can this be happening? Any clue?
Thanks in advanced,
NURYA
I'm not an expert and I can't see the solution to this problem:
I have programmed a set of procedures and events in order to make automatic backups. Before a 'BACKUP statement' I call another procedure, that ensures that my database is valid. Code to create this procedure is as follows:
create procedure BD_Validar (IN caller_event char(100), OUT error int)
begin
declare v1 char(50);
declare v2 char(50);
declare c1 cursor for call sa_validate(check_type = 'index');
declare c2 cursor for call sa_validate (check_type = 'express');
--DEBUG: message 'Index validation' to client;
open c1;
fetch first c1 into v1;
if (v1!='No error detected') then
--DEBUG: message 'Errors detected in index validation' to client;
--Sends a mail to administrators
set error = 1;
close c1;
return error; --No continuamos la ejecución
end if;
--DEBUG: message 'Express validation' to client;
open c2;
fetch first c2 into v2;
if (v2!='No error detected') then
--DEBUG: message 'Errors detected in express validation' to client;
-- Sends a mail to administrators
set error = 1;
close c2;
return error; --No continuamos con la ejecución
end if;
close c1;
close c2;
return error;
end;
I have loaded this procedure in one ASA9 without any problem (and I know it works), but when I try to load it in another PC (same version of ASA 9), Interactive SQL tells me that there is an access infraction or something.
Why can this be happening? Any clue?
Thanks in advanced,
NURYA