Setting attributes for a session only

If you need to change any attribute value temporarily for an active session, you can do so using sp_setpsexe.

The change in attributes is valid only for the specified spid and is in effect only for the duration of the session, whether it ends naturally or is terminated. Setting attributes using sp_setpsexe neither alters the definition of the execution class for any other process nor does it apply to the next invocation of the active process on which you use it.

To clear attributes set for a session, use sp_clearpsexe.