Category Archives: SQLServerPedia Syndication

T-SQL Tuesday #60 Roundup – Step Right Up

TSQL2sdayWe had a great turnout for this months T-SQL Tuesday Block Party. Coming into this month and knowing that I was hosting, I felt a strong sense of picking a topic that would help others. A topic where sound professionals such as the ones below shared some of their thoughts on the how and the why to learning.

One thing is evident to me in reading these posts. You can be the most senior professional in our industry down to someone who is just attending their first T-SQL Tuesday, but one thing holds true ~ the people.

All right, with that said check out what the party attendees had to say, a special thanks out to each of them, and I would be amiss if I didn’t mention Adam Machanic (B|T) who with this party marked the 60th (5 years). Appreciate the vision you had 5 years ago Adam.

Party attendees:

Aaron Bertrand (B|T) – provides a great synopsis of why experience has helped in learning and tapping into Q and A sites. I liked this approach; was pretty awesome to see him write this and also pretty awesome he took the time to share this for others to read while flying from one conference to another. Much appreciated sir.

Rob Farley (B|T) – provides a twist on how he learns from others by cultivating and developing relationships. One key piece from his post is “listening” what others have to say. I got a lot out of this post.

Kenneth Fisher (B|T) – provides a security gem you will want to read along with some practical examples of tracking down user perms and AD groups.

Russ Thomas (B|T) – provides a nice trick to add to anyone’s arsenal. A simple task that many may not know or have forgotten.

Rob Sewell (B|T) – provides a nice take on the “Problem Step Record”; along with providing some reasons why it may be beneficial to start using it. Another good read.

Tom Roush (B|T) – provides a great blog post on what #sqlhelp can do for you along with what the community is all about. Captured every essence of community.

Jason Brimhall (B|T) – provides some discussion around what he picked up from PASS Summit14 and the use of the debugger; brilliant actually.

Malathi Mahadevan (B|T) – provides insight about learning promotion of work, networking, community involvement. This was a nice take from someone who has been in the trenches of attending PASS Summit for 13 years.

Nancy Daniels (B|T) – first, I think it is awesome that this is Nancy’s first #T-SQL2sday. Second, Nancy has provided steps on how she fixed a patch gone awry on one of her clustered environments. Nice way to step through the issue

Warwick Rudd (B|T) – provides some sound advice and real word examples on how multiple solutions can achieve an outcome. I actually like the comment made regarding PowerShell

Boris Hristov (B|T) – provides a thought provoking post. This one struck home with me as I have done exactly what he mentioned. Achieving the ability to arrive at a solution and deliver it in its most simplistic form so others can understand…..stellar and well said.

Mickey Steuwe (B|T) – provides a real world example of recovering from a transaction log filling up a disk; you won’t believe where the solution came from!

Cathrine Wilhelmsen (B|T) – provides a couple of good examples from some established data professionals around security and notifications. One of the sessions mentioned was one of Argenis Fernandez (B|T) and securing your SQL server. I’ve sat in on that one; stellar post to glean some information from.

Keep rocking guys!!

T-SQL Tuesday #60 Something New Learned

SQL Tuesday

So, here it is. I put the challenge out to discuss something new learned last week. I was fortunate enough to attend the PASS Summit last week in Seattle. While this post will not be my summarization of that trip (that will be another post) I did have several take-a-ways. I sat in some stellar sessions with some renowned speakers.

However, one re-occurring theme kept coming to my mind – the people. Listen, I’ve been through a lot over my 15 years with SQL, and my 3 years actively involved in the community and this past week affirmed something for me. LISTEN to the people.

I place strong value in the sessions I attended; along with that I have to note that face time; one on one time with real people in my industry is about the best form of learning I could ever hope to obtain.

With that learning comes in issues related to both SQL and non SQL attributes. I had so many positive conversations on leadership alone that sparked a new kind of fire within me; one that was not as bright as what my technical fire had been.

Guys, listen. I could write 10 blog posts on how buffer size could help with backups, the need to have always on implemented, or how to tune indexes all day long. The people, better yet the community is where I believe the learning lies within. Out of 5k people last week I ended up meeting a guy that works two blocks from me and we got to discuss the community and what it means to us.

Have you challenged yourself lately? I mean have you really challenged yourself lately in learning something. I don’t care if you are just starting out or the most seasoned vet around; the ability to learn happens everyday and I’m learning that is what separates the exceptional data professional from the data professional.

You see, the exceptional data professional hangs around the community zone at Pass Summit to help others in the community with issue they may have. The exceptional data professional sits down next to you when you are the new kid on the block and encourages you to make the most of your career then tells you some of his/her pitfalls they had that you can avoid, and the exceptional data professional takes you under his/her wing when you ask them for help or assistance.

You don’t have to travel all the way to Seattle to learn; no you have learning opportunities all around you. From SQL Saturday’s to Virtual Chapters on the web but it starts with you. That’s right, you have to be willing to take that first step; get involved and start learning.

I can tell you from experience and the roller coaster ride I’ve been on for the past three years that you will not regret it. Strive for excellence and provide that leadership through service that the community seeks. Yeah, I may be a tad passionate about what I do; you’ll find that kind of trait with others in the community.

So, I’ve challenged myself……..will you?

T-SQL Tuesday #59 – My Hero!

SQL TuesdayIt always amazes me how fast these T-SQL Tuesday block parties come about; it seems like we just finished one and here we are yet again. This month the party is hosted by Tracy McKibben (Blog | Twitter) and the monthly topic that was chosen is “Heroes”.

This topic can be taken in many different directions; this post will be geared toward the SQL environment and what I’ve learned from a professional career standpoint. I’ve been blessed to have had some influential people in my career. One of the first things that crept into my mind was the “My Fab Five” post I did earlier this year. If you haven’t read it I urge you to check that one out as well; after you read this one of course!

I see so many heroes in the SQL Community; ones that aren’t heralded but come in day in and day out and get the job done. The tireless volunteer who keeps going year in and year out and doesn’t complain one time. PASS Summit 2014 is coming up; have you ever thought about how much effort that goes into putting something like that on? So many behind the scenes people who work countless hours – those are the type of heroes that I’d like to pay tribute to.

I would be amiss if I didn’t mention 4 influential people in my own career to date. I think back from both a business, professional, and technical perspective two individuals who deserve a lot of credit in bringing me along are not technical evangelists nor are they knee deep in the SQL Community; but they taught me, in more ways than most, the ropes and expectations of business. Both of these people took a chance on me early in my career and have had a big hand in molding my psych in both the business and technical realm. I have much respect for both of these individuals for the tenacity they bring daily and focus they have instilled in me – Brad Cunningham and Chris Howard. You will not see these guys in the headlines at the PASS Summit, but it is guys like this who allow guys like me and afford guys like me the ability to enhance and further my knowledge on a daily basis.

Piggy backing onto these two guys I’ve had some of the best in the Community take me under their wing so to speak. This doesn’t mean I haven’t approached others in the community nor does it mean that others aren’t helpful, but like the 2 people I mentioned above these 2 people did the same thing. They took a chance on me and allowed me to spread my wings and flourish within the SQL Community. I look up to these two individuals greatly and thanks is not enough for all they’ve done for me ~ Thank You John Sansom (Blog | Twitter) and Chris Shaw (Blog | Twitter) for rolling the dice and taking a chance on me when you didn’t have to.

Heroes –  the SQL Community is full of them. If you are in it for the fame and fortune then you are in it for the wrong reasons. Heroes are found all around us; you don’t have to look far to find them. To the many unsung heroes I thank you for your hard work and dedication for it is all of our efforts on a daily basis that make the SQL Community what it is.

If you are interested in hosting a T-SQL Tuesday party you can contact it’s creator the mighty Adam Machanic (Blog | Twitter) who is a hero in his own right.

heroes

The Question – Why?

whyThe question I get asked a lot by other data professionals at conferences, events, speaking engagements, family, friends, etc. is Why do you do what you do? Why do you put yourself through some of the things that data professionals have to endure at times with the non stop phone calls, system crashes, data breaches? What keeps you coming back for more?

Everyone is different, some may say they like the financial gains that come along with it, some may say they want that notoriety and accolades, and then some may say it is a stepping stone for climbing the ladder to future gains.

For me, being a DBA is a humbling experience. The potential for growth is great and the desire to gain continual knowledge in the skill set is prevalent. With being a data professional comes great responsibility, and it is a career that is not for the faint of heart. You will have late nights, long hours, and frustration on issues but all that molds, makes, and shapes you on your career path.

Grant Fritchey (Blog | Twitter) has one of the best articles, for myself, when he talks about Leadership Through Service. There are a handful of articles that really resonate with me over time and this is one of them. Whether you are in a shop, consultant, etc. you are providing a service and with that comes that word again ~ responsibility.

Opportunities

How can I get involved? This was one of the biggest areas I wish I would have learned earlier on in my career and now speak loudly about. Have you ever seen a new data professional just starting out? If you have then you know what I am talking about – the fire in their eyes and the drive and passion in their voice. That is something that I hope I never lose. I worked 11 years in the industry before really getting involved with community efforts and PASS. So the question remains how can you get involved?

Forums – some of the best opportunities lie within forums themselves. You can find information that you aren’t up to speed on and start studying to find what the answers are thus improving your knowledge gaps. Some of the ones I like to frequent are but not limited to:

  1. SQL Brit Forum
  2. SQL Server Central
  3. Stack Exchange
  4. Red Gate Forum (specializing in database professional products)

Blogging – if you aren’t blogging then you ought to try it. I have found for myself that it is a good learning tool and can be a repository of items learned along the way. As with anything writing takes practice, but be your own person. Once you have started you will wonder why you didn’t start down this venture sooner.

Email – Subscriptions – there are some golden nuggets to be had on email subscriptions from others in the industry. Some ones that would be of importance, but again are not limited to:

  1. PASS News Letter
  2. Paul Randal and the SQL Skills Team
  3. Brent Ozars LTD
  4. MSSQLTips
  5. SQL Server Central

Industry leaders – look at the industry you are in. Within any one industry you will see leaders in the community and our SQL community is no different. I won’t go into to much detail but check out the blog roll section over on the right and side of this site and you will see some renowned leaders. Follow them, see what they have to say, and learn some of there techniques. Somewhere along the way you might just pick up some good habits and practices.

Events – this is something that has greatly helped me over the years. There is a wide arrange of events both free and paid that one can attend. Some of those you don’t even realize are available:

  1. SWUG webinars
  2. SQL Saturday Events (check out my section here for most up to date events or by logging on directly to SQL Saturday’s home page)
  3. PASS Summit
  4. SQL Bits
  5. Dev Connections
  6. Brent Ozars’ weekly webinar

Social Media – what a way to connect with many people at one time. If you haven’t yet check out some of these avenues below:

  1. LinkedIn
  2. Twitter (check out the #SQLServer, #SQLHelp, #SQLCoOp tags)
  3. GoogleGroups
  4. Facebook

The list could go on; these are just a few to mention. In today’s society it is even more prevalent to take advantage of items that are free training yet still exceptional. Why not take advantage?

Speaking – I’ve heard people make the comments that they would never speak or they don’t like getting up in front of people. This is true everyone is different, but what I’ve found in speaking is that it causes you to know and learn your stuff. You can’t get up in front of 100 – 500 people and fake your way around. It has been a tool and a motivator again for learning and gaining knowledge. If you haven’t tried it then maybe try it out on some friends at work then move up to a local user group.

Career

Your career is just that – your career. Own it and make it what you want. I’ve been told all my life I couldn’t do things; from being a 6’0 ft point guard in college to diving into a SQL Technology. Those naysayer’s have proved one thing to me – I like competition and once you’ve challenged me it is game on. I’ve been proving people wrong this long so I’ll keep continuing down that path ~ point here is you take your career by the reigns and make it yours. Don’t let others dissuade you or deter you from your goals.

Mentors

There is nothing wrong with having a mentor. I’ve had some of the best and they have lead and guided me through my SQL journey. Wait a second, just the paragraph above you said be “your own person”. Yes I did, and you should. With that though comes the ability to differentiate and think on your own two feet, that doesn’t negate the fact that having a seasoned mentor who has been in the trenches would not be beneficial. Will you always agree with a mentor – no; but the insight into some of the mistakes made along with knowledge that can be provided is priceless.

To those that have mentored me, and you know who you are, I thank you for it is because of you I am that much further along in my career.

The Why

So back to the infamous question “Why”. I do what I do because I enjoy coming in everyday and being a DBA/Data Professional. I get to work with some of the finest people in the profession and learn from some of the best. I’m not in this game for the notoriety; I enjoy seeing and helping others succeed. Each day presents knew obstacles or hurdles to overcome; while some days are longer than others (as any data professional will tell you) there is a passion there that I have for the SQL Community as a whole and I hope that passion never burns out.

Some people have jobs they go to that they hate and it is just a job and sure you’ll find some data professionals like that. I’m blessed to say that I enjoy what I do on a daily basis and that I enjoy coming into work. There will always be that hunger to learn new things within SQL and the SQL Community and that will continue to be my driving force.

One thing I’ve noticed about the SQL Community is, while a passionate group, and one that sometimes disagrees that is okay because that means we are a healthy community. When I’ve seen someone hurting or needing a hand with a question it is a mere minutes before responses start flowing in. That’s the kind of group we are; dedicated data professionals who for the most part enjoy helping others.

I had a coach who I thought a lot of growing up….one time he told me as I was huffing and puffing at 3:00 a.m. from conditioning drills – “Somewhere, someone is practicing getting better than you. What will it take for you to be motivated?” That has kind of stuck with me. I know right now as I sit here and type this that there will be others that know more about certain topics, but just like basketball did it drives me to get better. Don’t settle.

Conclusion

So, now it is my turn to ask you – instead of why my question to you will be “Why not?”

Are you knew to the SQL game? Good then get involved

Are you a season vet who has been jaded so many times? If so then I ask you to remember back to when you first started out and the fire you had within you to conquer the SQL world. Yeah, you know what I’m talking about – find that fire once again and get involved.

For those that are involved my hats go off to you as coming from experience I know what it takes. I’m proud to be apart of this SQL Community and I plan on being here for a long time or as long as they would have me.

 

 

 

 

C-R-U-D The Basics

C-R-U-D The Basics

What is CRUD? Well, there are a lot of things I can think of when I use the term CRUD; however within the wonderful world of technology CRUD is an acronym that surprisingly enough, when I polled, didn’t really give a straight answer. That really surprised me; so with that said I will walk you through the basics of the concept.

C-reate

The letter “c” stands for create; more specifically inserting some form of data by various methods or means into a repository or holding take. I want to take this down to its simplest form which the below example will depict:

 

Insert

 

Inserting data into the PastHist table is as simple as the T-SQL query; but don’t just limit the thought of creation by this simplest form. You could have data being created through front end apps, SSIS packages, or many other methods.

 

R-ead

Depends on who you ask or talk to. The letter “r” can stand for read or retrieve. A simple retrieve statement can be a Select as below:

 

Select

 

SelectResults

 

What is this he didn’t use a NOLOCK – don’t worry I can save that for another blog post but as you can see in its simplest form retrieving the data out of the table you just inserted into is not that cumbersome.

 

U-pdate

The letter “u” can mean update or modify if you will. Let’s see how easy it is to do a simple update statement below:

Let’s update the name for our record to be John where the id = 1

 

Update

 

UpdateResults

 

As you can see the data has been updated and John is now our data set in the name field column.

 

D-elete

The letter “d” stands for delete or destroy. Below is a simple script to delete the data out of the table:

 

Delete

 

There are some methods I could have used to remove the data; such as Truncate Table but this is not the time or place for me to distinguish between the two. I chose the delete method on the search criteria of id = 1

Results after the deletion:

 

DeleteResults

 

Conclusion

This is breaking down C-R-U-D into its simplest form. Please do not limit your thinking to these very basic simple queries. Expound on it and your thought process on what all C-R-U-D entails. As with anything you find on the internet DO NOT take queries and just execute them blindly on any environment. Doing so makes you assume the risk.

What else are others saying?

I tell you what; check out what my other colleagues have to say on something they learned recently around C-R-U-D:

 

CollaborateImageOn a SQL Collaboration Quest

Four SQL professionals gathered from the four corners of the world to share their SQL knowledge with each other and with their readers: Mickey Stuewe from California, USA, Chris Yates from Kentucky, USA, Julie Koesmarno from Canberra, Australia, and Jeffrey Verheul from Rotterdam, The Netherlands. They invite you to join them on their quest as they ask each other questions and seek out the answers in this collaborative blog series. Along the way, they will also include other SQL professionals to join in the collaboration.

SQL Prompt 6.4 – Get It

SQLPrompt

This guy looks just like me a few weeks ago only one difference…..he has hair!!! Okay seriously though, I felt just like this guy not long ago and the reason for this was due to the fact I have become accustomed to specific tools and utilities that I utilize on a daily basis. Is this a good thing, eh, maybe or maybe not but end of the day I like to be efficient, dynamically nimble (if that is an expression), and in control of what my work entails daily.

Now, leading up to this extraordinary blog post you have to understand something. I’m in a RedGate shop pampered with some very nice utilities at my disposal. One such utility is their SQL Prompt utility.

One of the nice features I like about the utility is the recover tab within SSMS that shows me past history of tabs I had open within SQL. Can I tell you how many times this has come in handy? If that doesn’t meet your fancy then how about the code snippets that you can save and reuse later, or maybe the nice IntelliSense it provides while coding.

This leads me into why I looked like our Data Professional up above…..I recently was without my SQL Prompt and you thought I’d been taken back to the stone ages. I went to type out some code and low and behold nothing, I got NOTHING. No tables popping up; no columns to review…..nothing. After the sheer shock and awe subsided I knew I was in for a long day. Needless to say it didn’t take me long to figure out what went wrong with my prompt and how to get it back.

What’s this mean for you guys who are reading this? Glad you asked.

Red Gate’s new version is out so go check it out. Some of the new enhancements are noted below:

  • Execute current statement
  • Insert semicolons
  • Code highlighting
  • Use object definition case
  • Rename variables and aliases
  • Suggestions improvements
  • Qualify object names improvements
  • Remove square brackets
  • Nullability of columns
  • Choose environments to install to
  • New formatting options
  • New tab history options
  • Improved loading dialog box
  • Support for restricted accounts
  • Various usability improvements
  • Many bug fixes

So download the free trial and test drive it; what do you have to lose? Maybe you’ll like it and maybe you won’t but don’t wait and let time go by when you could be becoming more efficient in your everyday work.

If you use the product already drop me a line; if you don’t use the product then tell me why not.

What I Wish I Had Known Sooner…as a DBA

AttitudeYesterday I took a minute and to review some posts by some Data Professionals and in doing so I came across and article by Erin Stellato. She had been tagged by Mike Walsh who posted an article regarding 4 Attitudes I Wish I Had Earlier as a DBA

At the very end of Erin’s post she mentions “I’m not tagging anyone in this post by name, but if you’re thinking “I wish she had tagged me” then you’ve just been tagged.”

This spawned some thinking yesterday and last night; looking back I see growth, mistakes, resolutions, solutions, and much more that has brought me where I am today.  A lot has transpired; and I still have a lot more left to learn and understand.

Balance 

I have been told throughout the years I do not have an off switch. My mind is constantly running on things that may have occurred throughout the day, solutions to issues that I or someone has experienced recently, answers to forum questions, multiple projects running at the same time, and the list goes on. With that said you have to have some form of balance; I’ve seen many people burn out of the years and it is something that I’ve had to continually work on throughout my own career. Am I there yet – nope; but that’s okay. I’ve come along way in that area and will continue to work on it.

Flexibility

I’m the DBA what I say goes; it’s my way or the highway. Yeah that syndrome will end catastrophically and fast. Being a DBA (or as I like to say Data Professional) you encounter and work with many people from all faucets of business. It is almost a fine art of communication (which can be a point in and of itself), learning how to work together with other teams. Does this mean that you should not stand your ground for your beliefs – nope. What it does mean is that you will always see a gap; there has always been one. The network guys will blame the DBAs, the DBAs will blame the developers and network guys, the developers will blame the DBAs. It’s a constant endless loop.

End of the day, all the groups under the blanket of a company are in the same fight and on the same team regardless of if you are in networking, DBA land, development, phone systems – whatever the case is. We have to find a way to work together for the common good of the company.

Wrote a piece awhile back on bridging that gap

Provide Leadership Through Service

Last year I came across and article that Grant Fritchey wrote around Providing Leadership Through Service. This is something that has really resonated with me more so now to which I wish I would have learned earlier on in my career. Whether you are a contractor, own your own business, or work in a shop full time view your efforts as providing a service to the company you are with.  It will change how you view and reflect on your position; we should be humbled and honored to work within an environment we’ve been handed, but at the same time be bold and provide that leadership that companies so richly desire and seek

Learn To Say “NO”

No is not a bad word; although at times we think it is. Early on in my career I wanted to fix and do everything I could to help people. Don’t get me wrong; I still enjoy helping people. If you don’t learn to say no you will soon spread yourself to thin. This is a constant struggle that I still endure sometimes as I want to help everyone I meet with questions, projects, etc. The growth that I have had over the years has taught me to do the helping more methodical. At times I do have to say no, and that’s okay.

Conclusion

Well there you have it; not very fancy but is from the heart and from a data professional who realizes he will never be perfect but will continue to grow on this SQL journey.

I’m not tagging anyone but offering the same avenue that I was given. If you’d like to blog about what Mike has presented then by all means; give it a go.

Thanks Mike for getting this started; brought back some fond memories for myself.

T-SQL Tuesday #57 – SQL Family and Community

SQL-Tuesday.jpgMaybe it is just me, but these monthly block parties seem to be coming around quicker and quicker as time continues to fly by. My good friend Jeffrey Verheul (Blog | @DefJef) is getting the opportunity to host this month and he wants to know about “SQL Family and the Community”.

If you have been around SQL long enough you will find out that the terms SQL Family and Community are mentioned often. For me, and my experiences, it is a close knit group of data professionals that are willing to share their life experiences, everyday issues, problems solving skills, idea bouncing, and much more. I have been involved with SQL for over 14 years now and only the last 4 years have I been active in the community; not because I didn’t want to, but I was not privy to the magnitude of how far the SQL Family and Community reach is.

It’s no secret for those who know me. I’m sports oriented; having played baseball, football, soccer, and basketball my whole life and then college basketball I’ve been around team oriented methodologies my whole life. That background has it’s pros and cons, but the disciplines and insights I garnered from those experiences has fit nicely with being a Data Professional.

Having those days behind me for the most part (yes I am an avid runner still and do partake in a good game of basketball at times) my team now is the SQL Community.

Pre-Game

Preparing for a big game you have to look at the whole picture. Countless hours of practice, repetition, running play after play goes into a season not to mention conditioning. The camaraderie built during those times with your teammates enables you to trust them on the court. Guess what, being a data professional you have to be all in. To me that means continuous work day in and day out to help hone your skill set, and part of that work has been working with the SQL Community and Family.

The Game

G-A-M-E-T-I-M-E

The day of the game is here and it’s go time. You look at your teammates (SQL Community) and you are in a huddle right before tip off. The opponent is huge, a foot taller than your tallest guy, yet you are determined. This is what you’ve prepared for. Will you rise to the challenge?

  • You will get assists in your career where you were stumped and didn’t have a clue; then someone from the SQL Community will provide you with that spark that enables you to get over the hump.
  • You will grab that rebound when someone, other than you is stumped, and pick that person up when they need help.
  • You will block that shot when a someone is wanting SA rights to your server.

When your number is called to come into the game (becoming active in the SQL Community) will you answer the call? Will you come into the game with an attitude of we got this? Have you prepared?

Outcome of Game

A team is just that; a team. I remember vividly to a point in time when we were in the off season, but conditioning. We had already completed multiple wind sprints and were wrapping up running intervals. Getting to the finish line we looked back and one of our teammates was struggling. He was to the point of running then stopping; did we leave him out there? A resounding NO – the ones that finished ran back out and surrounded our teammate. He was part of our team and no way were we going to let him struggle alone, and hopefully; we could give him the confidence to finish. That to me epitomizes the SQL family and community. Sure we are a finicky bunch at times, frustration occurs, and we don’t always get along. That happens on every team; however at the end of the day we have each others back. We win as a team and lose as a team.

Summary

If you are not active in the SQL Community then you are missing out. It’s time; the horn has sounded and the game is on. Time is ticking down; will you get in the game? A saying that a coach told me a long time ago has stuck with me ~ “Somewhere someone is practicing getting better; what will you be doing?” Let’s make this Community the best we can.

What is T-SQL Tuesday

T-SQL Tuesday is a recurring blog party, that was started by Adam Machanic (Blog | @AdamMachanic). Each month a blog will host the party, and everyone that want’s to can write a blog about a specific subject. If you are interested and have been blogging for a bit drop Adam a line.

SQL Prompt – The Power Within

*Photo by Red Gate

*Photo by Red Gate

Come a little closer; no seriously come on over just a little closer as I don’t want to you to miss this. Can you hear me? Good, listen if you are in this Data Professional game for very long than you will have some “go to” utilities when you need them. Over my 14 year career thus far I’ve accumulated many scripts, procedures, techniques, and vendor related products.

One product that has remained steadfast for me over the past several years is Red Gates’ SQL Prompt. If you are already using this utility than you know what I am talking about; if you haven’t then you are missing out. I’m continuously amazed at some of the options the product contains. A brief overview and you will find the following:

  • IntelliSense-style code completion
  • Customizable code formatting
  • Save code snippets
  • Refactor SQL code
  • Tab History – save, search, and recover tabs in SSMS

Why did I bold Tab History you may ask? Well pull up a chair, sit down, and listen up.

The Setting

Have you ever had one of those mornings where you wished you would have stayed in bed, perhaps one might call it a “do over”. Well that was me not long ago; the day was actually fitting as the rain was pouring, had no umbrella present, and forgot the ole key card to the shop. For the ones that know me also know that I quit drinking coffee a while back. Ha, yes, I usually get the jaw drops for fellow co-workers and beyond; if there ever was a day I needed some then it was that day.

I sit down, fire up the laptop, and off we go. I starting looking at my plate and opening up a script I had saved the previous day; or had I?!?!? I go to my repository and nothing, absolutely nothing. As I mutter the words to myself, you got to be kidding me, I dive further into my folder structure thinking I might have misplaced it. Aha (there will be more coming in a future post about this little word), I know what let’s open SSMS and check the most recent files. I know I saved it the day before and I probably just put it in the wrong place. Wait, what, wait a minute – nothing there either.

Well this day is just off to a great start; isn’t it?

The Power Within

As I stand up and start walking to the break room to clear my head, get back on track, and re-asses the events thus far I remember something. SQL Prompt has a built in feature that might save the day. I come back to my desk and look at the following:

Tab History

Tab History – two words. Who knew that they would be so important on a day that started off bleak. I click on the Tab History and complete a search of the word “local” since I knew what was inside the script:

Info

 

Scrolling down through on SQLQuery7 I found my script I was looking for! Yes, if you heard a loud clasp of thunder or the earth moving some more on it’s axis that was me doing a SQL Happy Dance. This one feature saved my bacon due to deadlines that I had to meet the next day.

While this utility is a nice feature, we need to look at the utility in terms of a broader scope. SQL Prompt offers much more.

  • Allowing the ability to write code more smoothly
  • You can customize your SQL Code formatting rules
  • Affords you the ability to save code snippets and better yet share them across your team
  • Refactors SQL code
  • Exploration of your database (another feature I like)

Conclusion

A data professional is always looking for ways to improve their processes and become more efficient. SQL Prompt is a utility that accomplishes that goal. If you are a seasoned vet of it then great; however if you have never tried it then give it a go. You will be glad you did.

I tell you what; check out what my other colleagues have to say on something they learned recently:

On a SQL Collaboration Quest

Four SQL professionals gathered from the four corners of the world to share their SQL knowledge with each other and with their readers: Mickey Stuewe from California, USA, Chris Yates from Kentucky, USA, Julie Koesmarno from Canberra, Australia, and Jeffrey Verheul from Rotterdam, The Netherlands. They invite you to join them on their quest as they ask each other questions and seek out the answers in this collaborative blog series. Along the way, they will also include other SQL professionals to join in the collaboration.

 

T-SQL Tuesday #56 – Assumptions

SQL-Tuesday.jpgQuestion: “What time is it?”

Answer: “T-SQL Tuesday time”

Question: “What time?”

Answer: “T-SQL Tuesday time”

“I can’t hear you?!?!?!”

That’s right; it’s that time again where we come together for a block party T-SQL Tuesday #56 style; which this month is hosted by Dev Nambi (blog | twitter). Dev has garnered a topic around what assumptions we make in our work environment within the realm of SQL.

The Assumption

One of the biggest assumptions I’ve come into contact in many places is the saying, “I’m only as good as my last backup”. While that is a semi true statement it does leave the process unfinished. Let me explain:

Johnny (picked a name out of the air) is given a task to create a new database and with that he designs his maintenance strategy. Backups fall into that maintenance strategy. The new mechanism to take a backup is put into place and we are set; full backups set to run off hours.

At least this is what a lot of data professionals assume; taking a form of backup is fantastic. This post is not meant to go into the details of how to take a backup but based on the assumption that your backups are good. The second half to the equation is restoring those backups.

What? You mean I need to actually test my backup to see if it works. Yes that is exactly what I mean. I have seen several cases where backups are taken and everyone sleeps at night. Then the business unit decides they want to pull that backup; you go to restore the backup and the file is corrupt.

Summary

Don’t just assume that your backups are ready to go. Take a more proactive approach and test your backups. Granted each shop is different with their own standards and regulations; with that said if someone asked you to restore your backup……could you with confidence?

What Is T-SQL Tuesday

T-SQL Tuesday was created by the mighty Adam Machanic ( Blog | Twitter); if you are interesting in hosting a T-SQL Tuesday party or want to learn more about it check out his blog. Let’s get involved and make our community that much better.