ASA SQL Reference
System Procedures and Functions
System and catalog stored procedures
Sets connection options when users log in.
sp_login_environment
None
None
LOGIN_PROCEDURE option [database]
sp_login_environment is the default procedure called by the LOGIN_PROCEDURE database option.
It is recommended that you not edit this procedure. Instead, to change the login environment, set the LOGIN_PROCEDURE option to point to a different procedure.
Here is the text of the sp_login_environment procedure:
CREATE PROCEDURE dbo.sp_login_environment() BEGIN IF connection_property('CommProtocol')='TDS' THEN CALL dbo.sp_tsql_environment() END IF END