max runtime for xsjob
Has anybody written any code that will prevent an XS job from running past a certain time limit threshold? I'd like to kill my job if it has been running for more than one hour for example.
Pratik Doshi replied
You need to identify the session used by the job. Use table M_CONNECTIONS for that.
Once you identified the session from M_CONNECTIONS use below mentioned query to disconnect the session.
ALTER SYSTEM DISCONNECT SESSION '<connection_id>'
Connection id is from M_CONNECTIONS.