SQL Clone
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in

Code I’d Hate To Live Without: T-SQL Tuesday #104

T-SQL TuesdayIt’s TSQL Tuesday again! This time our respected host is Bert Wagner (b/t). Quick aside, if you haven’t seen his vlogs before take some time and watch a few. They are entertaining, informative and best of all short :). I’m really enjoying the work Bert! Keep on trucking!

Anyway, this time around Bert wants us to post some code that we use that we just can’t live without. That’s a bit hard for me since I’m constantly posting about code I’ve written or enjoy using. So here is my solution (<- pun there, you'll get it in a second), a while back I wrote about using solutions (see? I thought that was rather funny myself.) in SSMS to store the scripts I use on a regular basis. So I thought this time around I would go through and create a list of links to the sources for many of the most useful scripts.


  • Notes are just that. Pieces of scripts, or a series of scripts to remind me of things.
  • Query means that this is something I can open and run without much input. Frequently there are commented out parameters or variations. But in general I can just open and run.
  • SPs These are create scripts for SPs that I use on a regular basis. I keep them here because I work with hundreds of servers and I’m never sure which ones have them and which don’t. Also a lot of times the documentation is at the top of the script.

Creating the solution

Now obviously for the scripts that I’m getting from other people that are being constantly updated I pull them down and replace them every now and again. Others that I write I’ll make changes to as I think of something. I’d like to think why I have most of these is pretty self explanatory. Basically, if I have to do something twice and there might be a third time I’m going to find a script for it. If I don’t find one I’m comfortable with right then I do my best to write my own. Oh, and once I’ve used the script for a while I clean it up and blog it. (In case you hadn’t noticed.)

And last but not least, some of these (the What’s going on & Backup scripts) that I use that most often I pin to a separate tab row.


My name is Kenneth Fisher and I am Senior DBA for a large (multi-national) insurance company. I have been working with databases for over 20 years starting with Clarion and Foxpro. I’ve been working with SQL Server for 12 years but have only really started “studying” the subject for the last 3. I don’t have any real "specialities" but I enjoy trouble shooting and teaching. Thus far I’ve earned by MCITP Database Administrator 2008, MCTS Database Administrator 2005, and MCTS Database Developer 2008. I’m currently studying for my MCITP Database Developer 2008 and should start in on the 2012 exams next year. My blog is at www.sqlstudies.com.


Leave a comment on the original post [sqlstudies.com, opens in a new window]

Loading comments...