sp_login_environment is the default procedure called by the login_procedure database option.
It is recommended that you do 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;