FUNCTION NotLoggedOn RETURN boolean IS
Dummy varchar2(1);
BEGIN
select 'x' into dummy from dual;
return FALSE;
EXCEPTION
when OTHERS then
if SQLCODE in (-1012, -- Not logged on
-28, -- Your session has been killed
-3114 -- Not connected to ORACLE
) then
return TRUE;
end if;
raise;
END;
[Dica] Função - Testa conexão
- dr_gori
- Moderador
- Mensagens: 5018
- Registrado em: Seg, 03 Mai 2004 3:08 pm
- Localização: Portland, OR USA
- Contato:
Thomas F. G
Você já respondeu a dúvida de alguém hoje?
https://glufke.net/oracle/search.php?search_id=unanswered
Você já respondeu a dúvida de alguém hoje?
https://glufke.net/oracle/search.php?search_id=unanswered
Esta função testa se a conexão está ok!
-
- Informação
-
Quem está online
Usuários navegando neste fórum: Nenhum usuário registrado e 5 visitantes