Einzelnen Beitrag anzeigen

jobo

Registriert seit: 29. Nov 2010
3.072 Beiträge
 
Delphi 2010 Enterprise
 
#6

AW: Benutzer darf sich nur einmal anmelden

  Alt 11. Jun 2022, 22:28
Es gibt einen view namens v$session, der gefühlt 100 Spalten mit Verbindungsinformationen hat. Wahrscheinlich mittlerweile in aktuellen Oracle Versionen 200 Spalten. U.a. kannst Du dort IP Adresse, client und aufrufendes Programm abfragen. Die Startzeit des letzten SQL, des vorletzten, die Ausführungsdauer,..
Mglw. reicht das schon für eine brauchbare Prüfung, kommt sicher auch drauf an, wie sich das Programm verhält, ob es mit Threads / Multi Session arbeitet usw.

Von Oracle selbst gibt es einen Mechnismus dafür. DCD, wahrscheinlich schlanker gelöst, als man es selbst per Tabelle und Updates machen würde.

Zitat:
" Timer Initiated Disconnect or Dead Connection Detection

Timer initiated disconnect, or dead connection detection enables Net8 to identify connections that have been left hanging by the abnormal termination of a client. This feature minimizes the waste of resources by connections that are no longer valid. It also automatically forces a database rollback of uncommitted transactions and locks held by the user of the broken connection.

On a connection with dead connection detection enabled, a small probe packet is sent from server to client at a user-defined interval (usually several minutes). If the connection is invalid, the send operation generates an error and the server process terminates the connection. "
SQLNET.EXPIRE_TIME

https://docs.oracle.com/cd/A81042_01...pts.htm#997825
Gruß, Jo
  Mit Zitat antworten Zitat