Using login triggers

NoteSome of the information in this section is from the article “Login Triggers in ASE 12.5”. Copyright 1998–2002, Rob Verschoor/ Sypron B.V.,http://www.sypron.nl/logtrig.html

Login triggers execute a specified stored procedure every time a user logs in. The login trigger is an ordinary stored procedure, except it executes in the background. It is the last step in a successful login process, and sets the application context for the user logging in.

Only the System Security Officer can register a login trigger to users in the server.

To provide a secure environment, the System Administrator must:

  1. Revoke select privilege on the set_appcontext function. The owner of a login trigger must have explicit permission to use set_appcontext, even if the owner has sa_role.

  2. Configure a login trigger from a stored procedure for each user, and register the login trigger to the user.

  3. Provide execute privilege to the login trigger that the user executes.