4/22/2011 1:58:28 AM
Amit Bansal -
Whenever I click on 'New Query' in SQL Server Management Studio, I get the New Query Window, but a customized one. See below:
You can see that "Copyright 2011 - Amit Bansal' comes by default whenever I click on New Query. In a recent conference, one of the attendees observed this and asked me how can he customize the new query window. Well here is the trick:
Modify SQLFile.sql which is located in C:\Program Files (x86)\Microsoft SQL Server\100\Tools\Binn\VSShell\Common7\IDE\SqlWorkbenchProjectItems\Sql. And you are done. This path is for 64 bit installations. Just remove the (x86) for 32-bit installations. Or search for the file ;)
Edit the file in any editor (I use Notepad, my fav editor), put any default comment that you want to be there whenever you create a New Query. And you are done !
If you liked this post, do like us on FaceBook at http://www.FaceBook.com/SQLServerGeeks
Have a SQL Server question? Join the fastest growing SQL Server facebook group at: http://www.facebook.com/groups/458103987564477/
Regards, Amit Bansal
http://www.twitter.com/A_Bansal http://www.twitter.com/SQLServerGeeks http://www.amitbansal.net/ Visit my FaceBook page at http://www.facebook.com/AmitRSBansal Contribute on SQLServerGeeks.com: visit http://www.sqlservergeeks.com/default-category/write-for-us
Amit Bansal (Member since: 3/12/2011 4:59:54 PM)
Follow Amit at Twitter @A_Bansal : Amit Bansal is the CTO of eDominer Systems & Peopleware India. He is a consultant, trainer, writer, speaker & evangelist on SQL Server & Business Intelligence. A seasoned speaker; he speaks at major summits and conferences of Microsoft worldwide including TechED, MCT Summits, MSDN & TechNet conferences. Over the last 8 years, he has consulted, trained & mentored more than 6000 IT professionals on SQL Server & Business Intelligence and worked with top notch blue chip companies worldwide including Microsoft, Infosys, Wipro, RBS, HCL, HP, Siemens, IBM, Accenture, etc. He has delivered more than 400 workshops on SQL Server & Business Intelligence. Apart from holding many Microsoft credentials, he is also a Microsoft Most Valuable Professional (MVP) awardee on SQL Server. He is also one of the first Microsoft Certified Trainer in India. Amit has worked with Microsoft in India and US as a Subject Matter Expert in various capacities participating in OD sessions, technical reviewing, etc. He is also a very active community lead in Asia Pacific. Visit www.amitbansal.net to know more. Subscribe to Amit’s blog and be a member of his technical forum at www.SQLServerGeeks.com - an exclusive SQL Server portal. Visit www.peoplewareindia.com for Corporate Training solutions.
FaceBook – http://www.facebook.com/people/Amit-Bansal/525339346
LinkedIn – http://www.linkedin.com/pub/amit-bansal/7/121/755
View Amit Bansal 's profile
Cool tip! Simple yet extravagant!
Good one amit..
handy trick.... thanks Amit.
Good to see many of you liking these tips.. I shall try to post more such tricks/tips. Thanks agin for reading our content at sqlservergeeks.com
Gud One Amit.
I was not aware of this.
Cool one! Thanks and looking forward for more tips like this.
thanks amit I was copy WHOLE HEADER and automate as per your suggession
hi . nice.
but i want 3 line code and my cursor should at last new line.
how can i do it.
let me know.
thank in advanced
Just wanted to say thank you for this - has been invaluable for almost a year. I put my most commonly used tables together in a select, all commented out. Huge shortcut.
I am junior sql dba with one year experince, could you please help me?
when we opene ssms it gives a connection string and we press connect it gets connect, could you help me how it gets connected, is there any file it is checking, or any protocol it is using to check, could you please explain me in detail what exactly is happening when we press connect?
Great tip! Is there a way to do this with SQL Server Studio Manager 2012?
Lee, in SQL Server 2012, this file is at C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn\ManagementStudio\SqlWorkbenchProjectItems\Sql. Enjoy, thanks.
Leave a comment