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

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 Autoexec a query upon login
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

WJHamel
Aged Yak Warrior

USA
651 Posts

Posted - 12/06/2013 :  11:21:07  Show Profile  Reply with Quote
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
Flowing Fount of Yak Knowledge

USA
1834 Posts

Posted - 12/06/2013 :  11:30:09  Show Profile  Reply with Quote
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

USA
651 Posts

Posted - 12/06/2013 :  11:31:32  Show Profile  Reply with Quote
interesting. thank you.
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000