To abort session without PEMON or TDManager in Teradata

The following example helps to abort the session of a user ABCD.

REPLACE FUNCTION AbortSessions
(HostIdIn SMALLINT,
UserNameIn VARCHAR(30),
SessionNoIn INTEGER,
LogoffSessions VARCHAR(1),
UserOverride VARCHAR(1)
)
SELECT AbortSessions (1, 'ABCD', 0, 'Y', 'Y');

-- Logoff/Kill all sessions where the user ABCD is logged on.