POST_LOGIN_PROCEDURE Option

Specifies a login procedure whose result set contains messages that are displayed by the client application immediately after a user successfully logs in.

Allowed Values

String

Default

dbo.sa_post_login_procedure

Scope

Option can be set at the database (PUBLIC) or user level. When set at the database level, the value becomes the default for any new user, but has no impact on existing users. When set at the user level, overrides the PUBLIC value for that user only. No system privilege is required to set option for self. System privilege is required to set at database level or at user level for any user other than self.

Requires the SET ANY SECURITY OPTION system privilege to set this option. Can be set temporary for an individual connection or for the PUBLIC role. Takes effect immediately.

Remarks

The default post login procedure, dbo.sa_post_login_procedure, executes immediately after a user successfully logs in.

If you have the SET ANY SECURITY OPTION system privilege, you can customize the post login actions by creating a new procedure and setting POST_LOGIN_PROCEDURE to call the new procedure. Do not edit dbo.sa_post_login_procedure. The customized post login procedure must be created in every database you use.

The post login procedure supports the client applications Interactive SQL, and Interactive SQL Classic.

Related reference
LOGIN_PROCEDURE Option