Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 Autoexec a query upon login

Author  Topic 

WJHamel
Aged Yak Warrior

651 Posts

Posted - 2013-12-06 : 11:21:07
The function of the TSQL query i need to run is convoluted, and not terribly relevant, BUT, is there any way, in general to set any query to "autoexec" upon a user logging in to SSMS?

Bustaz Kool
Master Smack Fu Yak Hacker

1834 Posts

Posted - 2013-12-06 : 11:30:09
There is a Server level trigger that can be set for the LOGIN event. For details ee: ms-help://MS.SQLCC.v10/MS.SQLSVR.v10.en/s10de_4deptrbl/html/2f0ebb2f-de10-482d-9806-1a5de5b312b8.htm

=================================================
No, no, you're not thinking, you're just being logical. -Niels Bohr
Go to Top of Page

WJHamel
Aged Yak Warrior

651 Posts

Posted - 2013-12-06 : 11:31:32
interesting. thank you.
Go to Top of Page
   

- Advertisement -