TOraSQL & NonBlocking
Posted: Thu 19 Jun 2008 13:21
Hello Core Lab.
I would have one question. I'm using TOraSQL with NonBlocking property set to true. When I call BreakExec method it works nice, except this pl/sql code:
..when I run this code...then call BreakExec, the Thread is still alive
even if I wait a lot of minutes....
don't you know why? Thank you for any idea.
Best Regards,
FT
I would have one question. I'm using TOraSQL with NonBlocking property set to true. When I call BreakExec method it works nice, except this pl/sql code:
..when I run this code...then call BreakExec, the Thread is still alive
even if I wait a lot of minutes....
don't you know why? Thank you for any idea.
Best Regards,
FT
Code: Select all
CREATE OR REPLACE FUNCTION source_audit(a_owner in Varchar) RETURN VARCHAR
/*
Autor: Ivan Sivak
Popis: Test
*/
IS
fCnt INTEGER;
pCnt INTEGER;
gCnt INTEGER;
Pom1 INTEGER;
Pom3 INTEGER;
pF INTEGER;
pP INTEGER;
KOM INTEGER;
S Varchar(64);
A Varchar(128);
CRLF Varchar(2) := CHR(13)||CHR(10);
TAB Varchar(4) := CHR(9);
MEZ Varchar(1) := CHR(32);
CURSOR src_pf_names(saTyp in Varchar) IS
select distinct(NAME) from all_source
where ((owner = a_owner)
and
(Upper(TYPE)=Upper(saTyp)) );
CURSOR src_p_name IS
select distinct(NAME) from all_source
where ((owner = a_owner)
and
(TYPE = 'PACKAGE') );
CURSOR src_pb(p_name in Varchar) IS
select TEXT from all_source where ( (owner = a_owner) and
(TYPE = 'PACKAGE') and
(NAME = p_name)
) ;
BEGIN
dbms_output.enable(20000);
dbms_output.put_line('--Audit databazovych objektu--');
/* -- */
pCnt := 0;
fCnt := 0;
gCnt := 0;
For I in src_pf_names('procedure') loop
S := Lower(Trim(I.NAME));
pCnt := pCnt + 1;
end loop;
For I in src_pf_names('function') loop
S := Lower(Trim(I.NAME));
fCnt := fCnt + 1;
end loop;
For I in src_p_name loop
gCnt := gCnt + 1;
end loop;
dbms_output.put_line('Vysledek:');
dbms_output.put_line('----------');
dbms_output.put_line('Pocet procedur: '||pCnt);
dbms_output.put_line('Pocet funkci: '||fCnt);
dbms_output.put_line('Pocet packages: '||gCnt);
dbms_output.put_line(TAB||'Jmena packages');
For I in src_p_name loop
S := Upper(Trim(I.NAME));
pF := 0;
pP := 0;
For J in src_pb(S) loop
A := Upper(J.TEXT);
KOM := INSTR(A, '--');
if KOM 0 then
pF := pF + 1;
end if;
if Pom3 > 0 then
pP := pP + 1;
end if;
end if;
end loop;
dbms_output.put_line(TAB || S || ' - ' || 'Obsahuje '||pF||' funkce a '||pP||' procedury' );
end loop;
EXCEPTION
WHEN OTHERS THEN
RAISE;
END source_audit;
/