The main effect of executing the stored procedure as a background task is that output from the login trigger is not written to the client application, but to the Adaptive Server error log file, as are some, but not all, error messages.
Output from print or raiserror messages is prefixed by the words background task message or background task error in the error log. For example, the statements print “Hello!” and raiserror 123456 in a login trigger appear in the Adaptive Server error log as:
(....) background task message: Hello! (....) background task error 123456: This is test message 123456
However, not all output goes to the Adaptive Server error log:
No result sets from select statements (which are normally sent to a client connection) appear anywhere, not even in the Adaptive Server error log. This information disappears.
The following statements execute normally: insert...select and select...into statements, as well as other DML statements which do not ordinarily send a result set to the client application, and DDL statements ordinarily allowed in a stored procedure.