Archive for the ‘SQLServerPedia Syndication’ Category

“If you could give a DBA just one piece of advice, what would it be?”

John asked 20 successful and experienced SQL Server professionals this exact question. I share my own thoughts with you below and you can find all our answers together inside DBA JumpStart, a unique collection of inspiring content just for SQL Server DBAs. Be sure to get your free copy of DBA JumpStart.

This post is part of the SQL Community Project #DBAJumpStart by John Sansom.

Recently I was asked about the piece of advice I would pass along to a Jr. DBA or someone considering becoming a DBA. I tried to determine what my one piece of advice would be, the one piece above all others that I would pass along. I went back and forth thinking on this for weeks. The idea alone that someone would want my advice is humbling. I considered a number of things that I would pass along both technical and non-technical. I considered my personal pet peeves and if I could change the industry how would I change it? Each consideration I reflected on was based on what I wanted to tell someone and, well, that is what I am doing here. I even thought about what I would say if I was in an elevator at the PASS Summit and I was asked what the one piece of advice would be and I imagined I only had 30 seconds to answer before all of us in the elevator went our separate directions. Eventually I reached a point in my personal reflection where I started to think about the questions I have been asked in the past and I let that direct my answer. So when I am asked, “What is the one piece of advice I would pass along to new or Jr. DBA’s?” I won’t list 50 items making it sound like I just can’t grasp the whole concept of what that ONE thing is….

How can I become a DBA?

This must be the number one question I am asked. I have had this discussion so many times I debate if people are serious when they ask me this question. I have tried to encourage and motivate some of them by suggesting books, websites, even blogs and twitter accounts that they should follow, yet only a few have gone on to become Database Administrators. There are times I start to think I have failed my self-appointment as DBA Ambassador. I looked at my approach a few times and adjusted it thinking I must be answering in the wrong way. Now I am not so sure. I don’t think I have been fair when communicating how much of a commitment becoming a good DBA is (I have never considered myself to be a quick learner so this may just be my impression).

Granted, this collection of my thoughts is not meant to classify everyone who considers becoming a Database Administrator, but is simply a reflection on the most recent discussion I had during lunch at an event I was speaking at. This discussion happened at a table with a handful of people who, like me, were late to lunch and it was obvious a speaker ran late, yet again (that was me).

So the discussions started with the question, “How can I become a DBA?” with follow up questions along the lines of “What pays more, a Developer or an Admin?”, and the question if there is more money in networking.

I want to pause here and mention these are all valid questions. The difficulty I have with writing this post is the tone of this discussion. The obvious tone that I and others at the table received was that of someone who wasn’t all that interested in becoming a DBA because of what we do, but a tone of wanting to be a DBA because of the pay or because some IT magazine said there was room for a lot of growth (again, not a bad reason to choose this field). It would be like determining you wanted to become a church pastor without having the religious belief.

What advice did I pass along or what advice would I would pass along to anyone entering the field? Decide if this is a job or if it is a career – If you’re looking for a job, then you may just want to keep looking. Being a DBA isn’t a job, it is a career…maybe even more than a career. It becomes us. Some of us who are DBA’s fell into this field by accident (no one else wanted to do it) while others of us chose to be a DBA and planned our education to become a DBA. No matter how we became a DBA, the DBA’s that I know of who have succeeded in what they do, treat being a DBA as way more than just a job.

In my opinion, I would describe the difference between a job and a career as:

  • A job is something you do 8 hours a day, five days a week. Sure, sometimes it comes with a little overtime, however, for the most part, the time when you arrive at work and the time you leave work is the same each day. The motivation to go to the job is focused around the money, mostly because that is how one pays the bills. Some may think of a job as a bad thing but it isn’t. Jobs can sustain you while you study for another career. Some may not like the idea of becoming so ingrained with their work. Many people like the idea of leaving work at 5:00 PM each day to know they are making their way home or to school, or on their way to a hobby of some sort. There isn’t anything wrong with wanting a lifestyle like this. I like to think of a job as a light switch, something that can be turned off and on when the time is right.
    • A career is work that you can’t put down, somewhat like a good book. There is something there that draws your attention to it, something that makes you say, “You know what? I am going to skip book club today because I want to figure out why this does what it does.” (Whatever it may be!) A career will leave little traces of itself scattered throughout your life: for example, I sat down the other night to watch a TV show that I find entertaining but as a commercial came on, I found myself starting to concentrate on a design issue I had been working on. Before I knew it, I had an idea. I started up the laptop and thought about making a quick note so I could get back to the show. I did a couple tests and came to realize that not only had I missed my TV show but the next show as well, not to mention it was WAY past my bedtime!
    • Just a few days ago I saw a car accident just outside a local military base. I saw a longtime friend out directing traffic. My friend is over 70 years old and has spent his life working for the safety of the United States in the US Army. The police were already on scene along with the fire department and EMTs. Why was he standing out there even though he is retired? Because this was his career. He knew that by directing traffic he relieved a resource and he knew that resource could then focus on assisting with the rescue efforts or the cleanup. My friend may not have thought about this decision as I have. Why? Because being a first responder isn’t his job. It never was his “job”. At one time he may have been paid to do it actively, but this day he did it because it is just who he is.

The tasks of a DBA are difficult to define precisely. Sure, there are things like backups and restores that fit into the DBA category nicely, but what about performance tuning? Should that be done by whoever developed the code? What about building a data flow or the design? Being a DBA is like being a ‘Jack of all Trades’. There is so much that can impact the stability of the database, anything that touches the database can impact the primary role of the DBA. Aspects that relate to hardware, operating systems and even networking can impact the core responsibilities of the DBA. Throughout my 15 plus years as a DBA, I have worked on all those aspects and more.

If the idea of long nights, early mornings and solving problems while you sit at the dinner table does not appeal to you, don’t worry! It doesn’t to too many of us either but we do it. We do it because we are called to do it. There is a lot of satisfaction of fixing what other people can’t and doing what other people won’t. If all you want is to walk out the door after your shift is over or to turn off the light switch because your work for the day is done, I recommend that you keep looking for work that fits your lifestyle a bit better. Keep in mind also that if you are motivated and driven by recognition, awards or the admiration of everyone at a company, often you will not find those things as a DBA.

If you like the idea of leaving the office at 7:00 AM when the work day is about to begin, knowing that all the faces you see coming in as you walk out of the building are going to have a good work day because you were able to fight through the sleep deprivation, face the errors that caused others to run and hide and that you’ve muscled through the last 12 hours of your 24 hour shift without eating anything, then being a DBA may be right up your alley. When we as DBA’s are doing a good job, no maybe better said as… when we as DBA’s are doing a great job, the database performance is fast just like everyone expects it to be. The database is stable just as everyone expects it to be. After whole SAN storage failure the database is back online ready for business… that is what the organization expects it to be. When a DBA is doing a great job we are meeting expectations and all too often many who are not DBA’s don’t know all the work it takes to meet those expectations.

Advertisements

In 1995 or 1996 I had to make a decision on what direction I wanted to take with my career. I could not have been more than 24 or 25 at the time, but I was working as an Operations Director for a small anti-freeze recycling company in Southern California. Anyhow I was left with a decision, do I learn Oracle or Microsoft SQL Server. The discussion was with a new employer and that is a whole complete different story for another time, however I was making the decision not only for me, but for a company as well because they were looking for my advice and I was going to be the DBA. The decision was made and I started to read books and head to a few training classes. My first task was to create a database, and then import a whole ton of data into it. None of those classes prepared me for one of my first tasks as a DBA outside the basics of installing and creating a database and the table I would need. Don’t get me wrong, I needed those classes and without them I would have had a much more difficult time that I did. If I remember correctly I had 7 books on my shelf that had in it what we know now as books on-line. With these instruction manuals there was a good amount of information that told me how to complete a specific task, but no reference for what was the best way to approach a task. There was only one book I had on my shelf, that had a chapter about moving data around, and it had about a page on an application called BCP (this is all from memory, so don’t hold me to the specifics), or Bulk Copy Program (BCP). I had found my answer.

Here it is some 19 years later and I found myself using BCP again just the other day. I can tell you that I know many DBA’s that are not aware of this tool; it doesn’t come with an awesome looking UI or any UI at all, and doesn’t have the strength of DTS or SSIS as far as manipulating data. But the tool works, and it is fast. Taking some time to think outside the basic parameters, there are some really great uses for BCP, things like archiving data or generating an export for a customer. I want to make sure that inform you that to get the most out of BCP, just like the other features in SQL Server, you need to take into consideration all the downstream effects. Think about indexes, and how those can slow down and insert, or an identity column. If you prepare correctly I can assure you that you will not be disappointed.

A few tips along the way that I learned with BCP, include:

  • Use a format file, if you are having problems creating one, because well they are not very forgiving of mistakes just BCP out the table that you are trying to BCP data into and you can use the BCP out statement to create a format file for you. I can’t tell you how frustrating it use to make me to try to create a format file from scratch and have my package fail because I had a simple mistake.
  • Use batch files to call your BCP IN or BCP OUT statement. This makes it a whole lot easier to ensure that you have all the flags set just the way you want them, in addition you can also add tasks like copy the file or import the file elsewhere to even automate what you doing even more.
  • Native mode is great if you are going from a SQL Server to a SQL Server.
  • If you have mail configured you can even set up a call to send mail in your batch file to notify you when the data copy had completed.
  • Write the errors out to a file, the errors returned with BCP are not always the friendliest.

In the last 19 years that I have been working with BCP it has had some changes, but it is still around and still works like a champ. The changes have been pretty minor and most of them are to keep up with new features that have been added to SQL Server. So if you reach a point where you need to do something in SQL Server, think about all the tools that you have at hand.

I am sure you have heard how important it is to head over to the PASS Summit, I can’t tell you how many lists that I have seen when it comes to the event there are so many things to do and ways to learn. There are events before and after. There are things to do at night, and in the morning. There so many ways to learn, network and even relax and have fun. I have even posted a few lists myself, and with a quick Bing search I am sure you will find some yourself. Here are a few links to get you started, and if you are a first time attendee I cannot recommend enough that you do a bit of reading before you head off to the event, if you do I can promise your investment will pay off.

First Time https://chrisshaw.wordpress.com/2011/09/23/before-the-pass-summit/

Tips – http://www.mssqltips.com/sqlservertip/3070/pass-summit-2013-tips-for-the-trip/

What to Expect – http://sqlblog.com/blogs/rick_heiges/archive/2013/09/26/what-to-expect-at-the-pass-summit-2013.aspx

Check out what others are saying here – http://www.sqlpass.org/summit/2013/Connect/CommunityBlogs.aspx

Now with that being said, most of these require you to be at the summit, but what happens if you can’t. This year I was planning on attending my son’s 21st birthday party. When that went from a party into my son looking at me and saying that all he wanted to do was play some cards with his Dad (that’s me) in Vegas… Well how could I miss that? Then there was this whole thing about starting a new job and worried about taking time off all this around my yearly migration to anywhere away from snow. No matter what I did it looked like I was going to miss the PASS Summit this year.

If you are in a situation like I was, then don’t fret. There is still an option that will allow you to participate. How you may ask… It is called PASStv. I did a session for it last year, and I can tell you that it is a ton of fun. During the normal conference day there will be a live feed where you can attend sessions, watch interviews and participate in the PASS Summit. Worried about SWAG, well they have some contests as well. Are you thinking this will look like another webinar? Not the case, this is a video feed that is live (Last year you could see all the guys wearing Kilts to support WIT, and we are doing it again this year). Don’t miss out, just because you can’t be there in person. Where do you find this live feed?

Start here on Oct. 15th

http://www.sqlpass.org/summit/2013/Home.aspx

So this is where it gets even more exciting for me. Things have started to settle, the trip to Vegas has been moved, work here at Xtivia supports me, and the move that I thought I was going to be doing this fall had to be canceled. In addition it looks like I will get to work with the PASStv staff to help bring the summit to you. I am going to help with interviews, and showing you the viewer all that the PASS Summit has to offer. PASStv has even reassured me that they have a camera filter that will allow for me to be on the live feed without breaking camera’s and monitors. Here is a press release issued by Xtivia about the event.

If you have a question about the event, or even during the event tweet me @SQLShaw. If you give me a little time, I might even be able to track down your favorite speaker and ask them a question or two just for you.

If you are going to be at the summit in a couple weeks, I can’t wait to see you. If you can’t make it, I hope you check out PASStv.

I have been going full bore with my new position at Xtivia. To the point I have about half a dozen new blog posts that I want to do, yet searching for the time to complete them. There has been a lot that has happened over the last couple months and I am looking forward to getting my thoughts down. However before I get to that I don’t want to forget to post a couple events that I am schedule for this month in addition to an event that I did last month that you still have time to see. All these events are free, and just require registration. I hope to post the answers to some of the questions I had during the SQL Server Tune Up webinar.

The first one is the Best Disaster Recovery Solution webinar –

What is the Best Disaster Recovery Solution for your SQL Server?

“It depends, every situation is different.”

DBA’s are often asked to provide a solution to very open ended requirements.  However, the best solution can only be providied if the database professional is getting all of the answers to some critical questions.  This webinar is a comparison into many of the Disaster Recovery options that SQL Server provides.

Chris says, “When I understand the answers to the critical questions, I can better prepare the best solution, not only for the database, but for the business as well.”

As an attendee you will learn how to provide a solid solution that can be built upon.

The second one is my acceptance to speak at the Denver SQL Saturday #190 on Sept. 27th, this year my session is going to be based all on different Interview Tips.


Have you been asked for an interview for that perfect job? The job that you would love to have on a team that you really want to be a part of? It is time to sharpen those interview skills. Every interview is different. During this session we will talk about my observations from many interviews that I have been a part of. There are many examples in this session on how not to present yourself, during an interview. We may laugh at some of the observations, but there are many lessons to learn. Get an inside look at how hiring managers make decisions, and make sure you know what to look for as the candidate. Have you been tasked with conducting an interview? We will complete the session with some tips on how to make sure that you get the information you need to make a good decision.

The last one is the SQL Server Tune Up
webinar –

Chris Shaw, our presenter says, “After I bought my first car I quickly learned that if I did not perform regular scheduled tune ups and maintenance tasks that my car would start to slowly degrade in performance. If neglected completely the car will stop running altogether. In the owner’s manual of your car most likely there is a recommend maintenance section. All this information has been compiled to increase the reliability of your vehicle and extend the life of the vehicle. Tune ups for your SQL Server are no different than tuning up your car.”

SQL Server database hardware, configurations and designs should undergo the same process that will extend the performance and lifetime of the databases and the hardware. Often symptoms such as degrading performance, increased errors or warnings, and concerns about reliability can be solved with regularly scheduled tune ups.

In this webinar we will discuss:

What regularly scheduled maintenance items you should perform.

The importance of regularly scheduled maintenance to include the long term impacts of performing these maintenance items.

Where to start and how to continue with the maintenance when business requirements demand your focus elsewhere.

A quick point to ponder…

As a speaker who travels a lot. I found a recent blog that caused me to pay attention. The point that I find interesting is the complete circle. Let me start from the perspective of a speaker who travels and is married. There are many times where I get to go places that I find interesting, either because of the history, or great opportunities to take photos when I am not working or just because I always wanted to go there. Many times there are places that my wife might like to go, but she rarely does and here is why. If I am working all day and then networking at night that doesn’t leave us a lot of opportunity to do something thing together. Often I will take a couple hours somewhere in the week and go see something. If my wife were with me she would be left with only a few options.

  • Stay in the hotel and do nothing.
  • Come to the event with me and listen to people talk about what she hears me talk about all the time, and yet has no interest in (granted I think she enjoys to watch me speak, but different topic).
  • Wander about a strange place by herself or with people she hasn’t met often (she is not as outgoing as I am, but many people aren’t).

Now granted, this is a choice that we make, and well we know the up’s and downs with it. Here is how this comes back to the topic. Recently a speaker (blog | @gregyounghad an issue with his family at an event. If you want you can read more here. We could talk all about how it could have been handled differently. My point is that many people have seen the post and some have even commented on it. For example a friend and fellow speaker Andy Leonard had this to say.

But this is where I am going to end up going… Look at the comments posted to the blog on Andy’s entry. There is one let’s say 9 or 10 down. It is from an official at the PASS Summit that I often blog about. Not only is the comment a public answer it is a stance, and an apology of sorts. This comment is from someone we as PASS members have elected. It is so easy for people to criticize our officials, yet few of us standup and say thank you. We may even vote and try to get things to be more the way we want it, but that is no guarantee that it is going to happen.

If you think the organization no matter what organization, is doing something that is wrong or could do something better. Make a difference and applaud those changes that you believe are for the better, and encourage changes where you think they should be.

A couple times a year I run into Jason Strate and his wife Sarah. Sarah is often traveling with Jason, she has helped with so many different places not only at the Summit but other events as well. Her work is appreciated and I believe she deserves a huge thank you for the events that she works with. I am sure as an active spouse at the summit she will have a lot of great input. There are so many volunteers that go into making these events that I wanted to make sure I took the time to say thank you…

I am curious as to how other DBA’s handle changes to your environments. Specifically changes to your databases.

Say for example that you have an application that has been designed in house. A development team develops the application, the services and the database changes that are required to support those changes. As an operational or “Production DBA” that is not involved in the development process is held responsible for the performance of not only the SQL Server configuration (mirroring, configurations, and the such) but the hardware and the database (locks, indexing and the such) as well.

Goals of the development team are to develop software to support services or product lines that add to the company’s operations.

Goals of the operational team is to ensure availability and stability while maintaining a level of recovery.

The development team works with the agile development methodology and releases once every couple weeks. The stress point that I find in this scenario is as a “Production DBA” the organization has an expectation level that each of the changes are reviewed and approved before release. The speed of the release cycle creates a window that is a very small point in time for these change reviews. We have attempted to make adjustments as to where in the process the DBA does the actual review itself, even when it is done at different stages of development, any changes that the “Production DBA” has creates a serious delay to the release. The goals of the 2 different teams or roles are different, yet both are aimed to the success of the organization.

There is at least what I believe, an obvious point where the “Production DBA” can be involved from the start of the development task. However, the lines of development and production are then blurred. The development staff would prefer to make the decisions on the architecture without this input.

  1. As a Production DBA, do you review or approve of changes?
  2. As a Production DBA, how involved in each “Story” are you?
  3. Where is the line drawn on who makes what decisions?

I know the question is really vague, and that I have not provided a number of specific pieces of information. I did this because I would like to get a range of answers. Each situation is different, and sure it depends… but it depends on what?

Thanks, for any feedback you provide.

I made a huge mistake that to be honest I am embarrassed to admit to. Yet for some unknown crazy reason I have determined it is ok to blog it. What did I do? I didn’t test a new piece of software before I installed it on a server where it could impact my monitoring tool.

The whole mess started when a company contacted me about testing some new software they had just released about 6 weeks ago. The software is supposed to be an auditing product that will allow you to provide a solution that is somewhat close to the feature sets that are offered with SQL Server. There are some added features that made it somewhat interesting for a test. I installed the product on a server that is not critical for production operations my monitoring server. Within a few hours I started to be alerted to some slow I/O; the good news is that I was able to put one and one together and determine that the Audit product I installed was the cause of the I/O issue.

Finding this behavior completely unacceptable I took actions that I thought would resolve the issue. I uninstalled the product… I should be all good, right? For good measure I sent an email over to the company, I was going to do a product review and I wanted them to know what I was seeing, the email was pretty short and clear.

Do you have any added information on the impact that the tool had on the server? 

I could not say at the time what caused the performance issue exactly, I knew it was the new software because of a couple items, first all the issues stopped the second I removed the tool, and the most telling was the fact that pre software install my SQL Server was running fine, after the install I was looking at 10 second write times.

I received an email back that said:

Hi Chris,

 I have talked to my technical team about this issue. They told me that our tool doesn’t impact server’s performance.

I knew immediately that this was not going to work, there was nothing more to the message and I realized that it is obvious they have not done enough testing. I was going to send them a few emails and see what we could do to reach across the table and see if I could help, but as life goes life got busy. As time went on and I forgot about the problem, that was until last week. I ended up having a different issue that caused me to open my performance tool to see what clues I could gather, this is when I found that my monitoring to was struggling to do anything. I had completely forgot about the Audit tool that I had removed before, I had removed it so why should I even consider it…

One would think that there were some obvious signs that the tool is either not ready for prime time, or does not meet the standards of the tools that I want to use:

  • The tool wanted elevated security access.
  • The supporting documents included all of about 5 pages of screen shots. I asked about this and was told more is coming, however I don’t see them on the site yet.
  • I have never heard of the tool, and had not seen other reviews on it.

Now let’s move a few weeks forward…

Performance issues struck again.

Well, to sum up a couple of really frustrating days not only for myself but for the poor guys that run the support desk for my monitoring tool. We stumbled on to a few things.

First of all the support guys at SQL Sentry thought that we should take a look just to verify that there were not any traces running, easy enough…

SELECT
*
FROM
sys.traces

 

The results had two that I had expected, one was a performance trace that is filtered and expected. The second one was the default trace, but for the life of me I could not figure out what the third one was. I admit my age is starting to reach the point where I can’t remember what I ate for breakfast most days, but I had no clue where or when I created a trace called mytrace.trc. In addition to not knowing the trace it had just started the night before we found it based on the creation date, now granted the server was rebooted. I looked for what I thought could start this trace, then it occurred to me to look for a startup procedure. Found a great post here where I found this quick query.

SELECT
name

FROM
sys.objects

WHERE
type
=
‘P’

AND
OBJECTPROPERTY(object_id,
‘ExecIsStartup’)
= 1

 

And there is was…

The audit tool that I installed did not remove the startup procedures in the database. So when I uninstalled the tool, and more or less considered the issue closed, there were items that were left behind that caused issues weeks later. My point is, be careful on what you install. I tried to do that, but when I determined that I needed to remove the product I found that the same effort the company dedicated to rolling out the product was much more than the effort they used to remove it. I should not have had to learn this lesson the hard way, but we all make mistakes. I can tell you that I will learn from this mistake, and it won’t happen again.