What is the average day of a DBA? (Part 2 of 4)

Steve Jones has asked for some folks in the community to talk about what it’s like to work in our field across four posts. So how do I talk about my job across four job posts? If you didn’t read part 1, you can click here to read about what the day to day is like.

My four series post is structured as:

  1. Day to day, what is normal? What are 95% of my experiences?
  2. Best days ever, these are the highlights.
  3. Worst days ever, these don’t happen all of the time and this is what nightmares are made out of.
  4. Weird days, Brent Ozar said it best when he said Database Administration is weird.

The best days ever for a DBA.

I should preface that you should have some passion or interest in technology if you are getting into IT. You can find some jobs where the duties and technology will never change. It will be the same forever, typically those are places that move slowly and they don’t need to innovate. These sites just need to keep their service afloat. Those are not the most common for IT, but those places do exist.

I wanted to bring that up because you are probably going to have to keep learning. Would you make your primary doctor someone who graduated 40 years ago and hasn’t learned anything new since then? Why would you hire a DBA then that hasn’t learned anything new or progressed either?

Some employers grant time to help their people grow during business hours, but this is not consistent. So when you find an employer that does allow this, consider this a perk. If you don’t have that perk, you may consider using a percentage of your own time to study and learn. (You may consider this even if you do have that perk!)

Most days are average and you do roughly the same rotation of tasks over a period of time. If you enjoy that type of work, then every day is going to be a pretty good day. It can get dull, but that’s why you have better than average days and also worse than average days.

The best days for me are when: I get to learn, I receive that “aha!” moment, or I get to interface with other knowledgeable professionals.

As I prefaced, not every employer grants you dedicated time to learn. So when an employer does allocate a few hours a month for me to learn or create something to learn that will better the company, those days are awesome.

The most recent and interesting project was to figure out a beneficial way to incorporate Change Tracking. One of my favorite past projects was to learn how Transactional Replication works and create a new database as a service offering from that. Most of these projects are given with light direction. I’m given the end goal and I need to get us from A to B in the most reliable and practical way possible. If that means I need to do some research into various technologies / methods, then I may do so. Getting to really dig in with research and creative approaches is an incredibly satisfying and fun experience. To be able to architect a solution from start to finish is a huge task, but it’s one of those things I love to do.

A lot of projects, including research projects or proof of concepts, usually provide that “aha!” moment. It’s that point when you solve that puzzle that you have banged your head on the wall for days. Suddenly everything seems obvious, that tedious problem that’s given you some anxiety instantly melts. You feel dumb that you didn’t see the path to get here sooner, but you also feel emboldened by the fact that YOU solved that problem.

Those moments are typically the kinds of things I’ll list on my resume. Such as when I realized that some slight adjustments to our Data Warehouse brought our load times from 16 hours to 4 hours or when we reduced 10,000 daily deadlocks down to 0.

I’m not sure how most people get those moments, but I tend to have them when I’m doing something completely different. I’ll do all of my research and testing, but usually the solution doesn’t come immediately during those periods of time.

You have questions you can google:

How do I SUM and GROUP BY?

Then you have questions you can’t google:

What would be the impact of doing a SUM and GROUP BY on my production system?

It’s those questions where you need to apply research and practice to create your own dots to connect. Sort of like putting together a map and at the end of the map you’ll find the treasure.

It’s when I’m running, going to bed, showering, or biking to work where out of seemingly nowhere… an idea strikes! You’ll have times where you are too close to the problem to see around it and find the solution. Sometimes you just need to take a step back and think about things, sometimes those things will piece themselves together for you.

I’m also the kind of person who obsesses over problems. If I can’t figure something out at work, it’s going to linger in the back of my mind until I know the answer. Or if I have an interview or a colleague asks me a question I don’t know the answer to, I can’t rest until I know that answer.

Other signs of a good day is when you are working with people who know more than you do. When I worked at Solarwinds, there was no end of tenured DBA’s who were knowledgeable. Every time we chatted about things, I felt like I learned 20 different topics. My time there was definitely an exponential burst of learning, but this goes back into what I mentioned earlier. You should have some passion for technology, because it’s that curiosity to learn and grow that is going to help you build your career.

To end on the “best day ever” piece, here were a few great and memorable (but not typical) moments I’ve experienced in IT:

  1.      When we created a Christmas tree out of Windows Server 2000 cd’s.
  2.      Flying to San Jose, CA to give a presentation and work the booth at SQL Saturday.
  3.      Driving with the team down to a SQL Server 2012 announcement and features party.

 

What is the average day of a DBA? (Part 1 of 4)

Steve Jones has asked for some folks in the community to talk about what it’s like to work in our field across four posts. So how do I talk about what it’s like in four different ways?

I figured I’ll structure my four post series as:

1. Day to day, what is normal? What are 95% of my experiences?
2. Best days ever, these are the highlights.
3. Worst days ever, these don’t happen all of the time and this is what nightmares are made out of.
4. Weird days, Brent Ozar said it best when he said Database Administration is weird.

Today is the “day to day” aspect of my job! And how appropriate when returning back from a quick break over this holiday Wednesday to a normal Thursday.

The day to day as a DBA

I like to roll into the office a few minutes early, I gather my caffeine, water, and situate my desk. I’ll go through my inbox or chat system right afterwards. I want to see if I have any alerts, read through reports that give me key metrics on performances, and see if there are requests from people who may need assistance.

I’ll log into our monitoring systems afterwards to check things out but it typically is pretty sparse. I configured alerts so I don’t have to be the watcher, but it’s nice to get a view of what’s going on anyway, it’s almost like a window into what things my database is doing.

At this point, I’ll bring up three lists. I keep a spreadsheet that tracks my time worked, a notepad of the tasks I am completing and when I completed them, and a notepad of tasks I need to do. That “need to do list” is broken down by nice to have’s, important things, or even just daily reminders. I like to refresh this list in the morning after coming in and in the evening before leaving the office.

I’ve scripted and automated a lot of my job, the pieces I have not scripted I focus on automating. Things should alert me at thresholds indicating there could be a problem in the future and things should alert me when there are problems. The idea though is to be proactive and not reactive and to always be on top of what’s going on. Every time something happens, I wonder to myself “How can I prevent this / alert myself on this / automate this task?”

From there I get a ton of adhoc requests throughout the day. Once a week or a few times a week, I may get assigned a relatively major project. Projects have that hurry up and wait feel, you’ll sprint really hard to get things done. Once you are finished, you’ll wait days, weeks, or sometimes even years before more pieces come into play and you have to pick up where you left off.

When I’m not fighting the backlog of items to do, working on a project, or an adhoc request; I’m working on figuring out where we are not performing best practices. Are we tuning indexes regularly and analyzing them? Are we performing random backup checks? Are all backups succeeding? What are our major queries that need tuning? The important thing to take away from this time is that there is no direction here. No one is asking me to go do these things or figure out if we should be doing them. These are practices and skills you pick up the longer you work in this field. You should always be proactively assessing your work situation to improve things for your employer.

Some other things I do is I read. I read a minimum of three blog posts a day which takes about ~10 minutes altogether. If I can learn three new things every day, that is a great day. I’ve worked in database for over seven years, which means I have learned at least 7,665 different things. It’s probably a lot higher than that, but the point is to illustrate that over time that cumulative knowledge adds up.

When I take my lunch or breaks, I’ll look at Reddit or StackOverflow and try to help people with questions. This gives me an even more broad view of the world and problems I would have never even thought about AND it gives you the ability to think critically about solving those problems while seeing how others go about the same process.

I have a few meetings a week, I try to keep meetings short and to the point. If I don’t have any actionable items from meetings or people don’t need to ask me questions in meetings, then I find they are not worth going to unless the knowledge to be obtained from the meeting is helpful. These meetings typically range from change request meetings, team scrum meetings, or project update meetings.

In the event I find some “spare time”, I’ll go back to the point I made earlier of always trying to improve things for your employer. I’ll work on proof of concepts and their implementations, usually learning along the way to solve problems that the employer maybe hasn’t considered or hasn’t had the resources to resolve previously.

After I get home, I’ll try to write / read / watch / practice / study SQL for 30 minutes to an hour. Over the course of a week, I’ll usually get 2-5 hours of self education in and I log that self-education in my spreadsheet so I can track how and what I’m learning.

That’s what my typical day is, I’ve mostly aggregated my experiences across my four jobs and this is what it feels like most of the time to me. Every job is different, but at its core for DBA, you know what a DBA is and does and that work has a ton of similarities. Some employers may have something weird going on, another may do things a little differently, perhaps there’s a totally different technology stack! At the end of the day though, I can roll those jobs up into similar core functions. If I had to give you a high overview of what it looks like day to day though, it would be:

1. Being proactive to problems.
2. Being reliable and responsive to users.
3. Learning and growing your skill set.
4. Using your education and skill set to better the environment for your employer. (Because how can you do something better if you haven’t learned how to do it better yet? That’s why this is #4 instead of #3.)

Edit 2018-07-06:

I wanted to fill in a few points that were made by Steve in the comments and I wanted to touch on two other topics. One topic I mentioned briefly was stating that I found the core work to be the same from shop to shop. This is primarily because I focus on job listings where they need someone who can do everything well, but they do not need to be an industry expert in any given task to succeed. The position does not yield itself to requiring a niche skill but it needs more jack of all trades skills with databases. (However, I would say my personal niche and expertise lies in performance tuning and making things go fast.) I will post the last two descriptions of my job that were sent to me when I applied, so you can see how the job looked on the outside before getting the insider info on the day to day.

Senior SQL General Specialist

Senior Data Engineer

The other topic I completely forgot to mention was “documentation“. It feels like most people never create documentation and even if they do, no one will ever read it. I personally believe creating: (1) documentation, (2) training, and (3) knowledge hand offs; are necessary to complete a task or project. It’s part of the whole “senior data professional package”. I’ll come in and fix your problems and document it so you can have a sustainable and scalable process that can be supported by future employees. If you wanted to see what I would suggest for a bare minimum for documentation, you can see my blog post “Skill Showcase” where I created a quick project and documented it.

Onto comments!

When do you check alerts?

Ideally when I create alerts, I work hard on adjusting them so you don’t hear noise. Too many alerts when things aren’t actionable is not a good idea, it becomes easy to overlook real incidents. Likewise, if you don’t get an alert when things have gone south, that’s equally terrible. It’s forever a battle with tuning the alert thresholds to trigger exactly when necessary with as few notifications as needed.

When I set those thresholds on a new alert, I like to be liberal with the wiggle room. I prefer to get more alerts than necessary to start and dial it back until I know it’s definitively alerting every time there is a problem but it’s not firing so often that I stop checking the alerts. Some alerts are pretty simple, disk space is one where you can easily set a threshold based on company policy and performance expectations. Other alerts like blocking, locking, long running queries, etc., are more difficult to narrow down.

Over time as you work in the environment and gain business knowledge of how things function, you’ll understand more about how everything links and interacts. Every environment is relative, but the philosophy behind how you approach the problems is typically static or expanded with new technology. Your company should have guidelines and expectations for what defines a successful and healthy database. If they don’t, then you could help them write it! Setting the expectations based on the business needs to function and grow is not trivial and it’s a task that should involve most, if not all department heads in the company who have a stake in the database or the data. (That doesn’t mean that they should all dictate what the policy is, but they should voice their needs and concerns so the CEO / CIO / IT Director can make educated decisions.)

What do you look for when checking alerts? Or what’s an example of things to ignore or take action on?

With that baseline of knowing what is and is not acceptable, you can create procedures and processes that drive success in the business. Policy should be driving the changes you make and the goals you work towards, which brings me back full circle to the philosophy standpoint that is inherent in most jobs. Establish a baseline, measure where you are, measure again later to find out where you are afterwards. How you measure, when you measure, and how you establish a baseline are variables that will change and will depend greatly on the circumstance.

(Baseline)(Current Performance) = (Success Results, determines if actionable items are necessary.)

(Current Performance) (Past Performance) = (Progress, determines actionable items to increase performance.)

Using the formulas above, let’s look at two scenarios.

Scenario 1: You want to tune an alert. It should not create so much noise that we ignore the alert but it needs to alert when there is a problem.

(Baseline [100% notification when an error occurs, no more than 5 noise messages during the day])(Current Performance [We have missed 1/10 alerts and we receive no noise emails]) = (Success Results [Failed response to the 1/10 alerts. Requires action.])

(Current Performance [9/10 alerts alerted, no noise emails])(Past Performance [10/10 alerts alerted, but 100+ extra email notifications]) = (Progress [We are down noise but up missed alerts, go back and tune or create a new solution to limit noise.])

Scenario 2: You track run time in your environment and users are reporting the application has been functioning slowly lately when searching for a value.

(Baseline [Query runs for 5 seconds])–  (Current Performance [Query is executing for 10 seconds]) = (Success Results [Query is beyond expected run time, it needs to be tuned.])

(Current Performance [10 seconds for run time, analyze where the SQL is taking 5 additional seconds per run. Compare current resources, plans, wait types, etc. used to the past stats.])(Past Performance [5 seconds for run time. You can use these stats to compare to the new stats and see what has changed and where the new time has been added on.]) = (Progress [Query regression, comparing the differences between the two pieces of information will help you decide the cause and actionable items.])

As for what I specifically look for when creating alerts, it really varies based on the needs of the company but it boils down to things I am responsible for. If I am responsible for said thing, I need to know if its status changes or begins to change to an actionable point. I want to prevent problems and catch anything that may be a budding problem. This saves me the headache later and it’s a win/win for your employer.

What’s it like to tune a server?

I often like to compare tuning to a Rubik’s cube. When you look at a different side of the puzzle, things are related but it looks differently from the other sides. Every time you turn the pieces and create a new view, you get closer to solving the puzzle.

Looking at wait stats, query plans, extended events, event viewer, perfmon, and using so many different tools is that feeling. I look at one thing and it gives me enough information to create a new hypothesis which in turn gets tested. I’m continually moving those puzzle pieces and looking at it from different angles to eventually complete the puzzle.

The more you tune, the more logical and step by step it becomes. There are so many variables and paths to take when analyzing that the knowledge becomes second nature, just like a Rubik’s cube. You learned the algebra and patterns behind the cube and you don’t solve it / don’t have to solve it the exact same way twice. This is true for SQL as well. I always try to look at what I have, where I need to be, and work on that puzzle piece until it accomplishes what you set out to make it do.

And once more, just like that puzzle… it’s extremely satisfying when you figure it out. If you like solving puzzles that is, I know some folks who find that frustrating.

How do you find queries to tune and what have you done with one?

This goes in hand with the policy I mentioned earlier. With my jack of all trades scenarios, I usually rely on my query regression alerts telling me when things have begun to change based on how long it used to take and how long it takes now; on a rolling average but compared to historical patterns. This is what typically indicates things could be a problem.

When I don’t see something that is a growing problem, I’ll look to wait types and run times in cache and DMV’s to help me figure out what’s going on. I like to find queries that have generated the most wait time in their history, because if I take 1 second off a query that executes a million times a day, that’s 1 million seconds I just shaved off that workload. Even if that query only took 2 seconds and was fast before, that adds up really quickly and extends the life of your hardware. So if I’m not going after a specific goal because there’s a known or growing problem, I’ll look for what will give me the biggest bang for my buck.

What is an example of a request you would get day to day?

The requests will vary, but it could be summarized as:

  1. I need X report for Y things by Z day.
  2. Can you help me login to X server?
  3. Why is server Z doing thing T?
  4. I need help with X query, it…
    1. Does not do what is expected.
    2. Is too slow.
    3. Accidentally ran a DML statement without a where clause.
  5. Can you check on X alert I saw?

Most of the time it’s regarding help with specific queries, reports, or servers. The other 1% time it is probably the initiative and beginning request to a larger project.

For time, have you tried toggl? https://toggl.com/

I have looked at it before. Cathrine Wilhelmsen made an excellent post regarding online data tools and included Toggl in that list. I’m giving it a try out for a few days to see how I like it now.

My study guide to the 70-762: Developing SQL Databases

I couldn’t find a spreadsheet that would help track the topics, ETA, and other notes online, so I decided to compile all of my resources into a singular spreadsheet to help me keep track of studying and to help the community for those taking the 70-762. You can copy / make a copy of this and track yourself.

Spreadsheet here!

The tab Topic Resources has been taken from Daniel Calbimonte and his post on MSSQLTips. Huge thanks to him for taking the time to compile all of those resources on those topics!

In the Additional Resources, I’ve listed out links to things I thought are incredibly beneficial to my studying of the 70-762. This also lists out a Time to Study table where you can average how many hours of studying you plan to do on certain days of the week and then it gives you an estimate of the hours necessary to study based on what you estimate each topic will take you to learn. I’ve already filled in the hours for an estimated optimistic and pessimistic goal, as you fill in the actual hours worked you’ll notice it will adjust for actual time spent instead of only estimated time.

The Topic and Hours page lists out the topics as per the test page from Microsoft and breaks it out into a table that you can track hours you spend in each topic. This gives you a manageable approach to figuring out how much time this will take you to complete. I’ve filled in my own estimate of the optimistic and pessimistic guidelines, so feel free to adjust this as you need to match your own knowledge. I figured I would want at least 30 minutes to a hour on each topic even if it’s a brief overview just to refresh myself.

The last page is the planner. This is where I keep track of the date I studied, the high / mid / detail level topics I worked on, the amount of time I worked on it, and there are two extra fields. One for notes if there is something I need to come back to or perhaps I found some additional resources I want to touch base on later. And then there’s the Other Topic column. I’m still reading through the Internal Pros book, so when I log time it’s specific to reading that book rather than any of the categories I’ve listed. I decided when I begin working on the 70-762 study guide I’ll begin filling in time on the topics and making sure I understand the topics to meet the detailed level of the topics listed by Microsoft. This will make for an interesting PowerBI graph later to see how my time was spent studying. Maybe I can use that data to study more efficiently for 70-767!

Happy studying and see you on the other side!

Passed the 70-761 exam, Querying with Transact-SQL!

Hurray, I passed 70-761! That means you can too!

I just thought I’d share briefly how I passed the exam. As a note, the below is how I studied and what I studied, it may or may not be what was on the exam as they change the exams and I cannot discuss what was on the exam directly. Nor can I answer any specifics to the exam, you can find all of this information on Microsoft’s website. I am going to share however, how I got to the point to where I felt comfortable taking and then passing the exam.

I thought the 70-761 was hard but fair, it was both easier and more difficult than I expected it to be. There were three key aspects for me that I’ll apply for the 70-762 exam that helped me to succeed. Figuring out when to schedule the exam, how to study for the exam, and how I should think and answer the questions during the exam.

To schedule the exam, I broke out every topic covered in the description of the test and decided between the things I needed to learn, review, and skip. I then also broke down how much reading and how long each reading session would take. I gave myself an estimated time period for each of the topics I had to learn/review and kept a notebook tracker with the topics, days until the test, and how much reading was left. Based on how much time I thought it would take to learn, I allocated myself 30 minutes of time to study per day and divided by total time I thought I would spend studying by that, and scheduled the test out that many days. Some days I was able to study for 30 minutes while some days I couldn’t study at all. Other days like weekends, I could double down and put in a few hours at once. I would also record what I studied on what day with what resource and about how many hours I put into it.

Scheduling the exam got the fire under my rump to get me moving and motivation. If I didn’t spend the time studying, I’d walk out humiliated and short $160 with a longing regret of what I could have accomplished. So by finding the amount of time I needed and allocating that time for myself to study, I scheduled the exam for 50 days out for 2018-12-08! By actually scheduling the test, I was no longer able to procrastinate, it was now a priority.

On the same page of studying, make sure to study smart. Don’t spend two hours watching videos on joins when you have that down. Spend the time on things you are either unsure of or don’t understand. Topics that you are 100% sturdy on may not be bad to do a brief review to see if you missed anything, but I wouldn’t dedicate more time than reading a chapter in the 70-761 study guide.

For study material, I read the entire 70-461 exam prep book and then read specific sections in the 70-761 exam prep book. Especially on the XML / JSON / Temporal tables, I had heard you need to focus heavily on this from other forums. One note I’ve read is that Microsoft likes to really drill you on things that were new to the version of SQL you are testing for. So I focused heavily on studying things that were new from 2014 to 2016. I read most of and skimmed some chapters in the book T-SQL Fundamentals.

I used additional resources from Cathrine’s website  and MS SQL Tips . I reviewed the XML stairway series  on SQL Central and also watched every video that is recommended on the links I am providing.

JSON and Temporal tables were hard to find good resources for. I ended up reading the entirety of the MSDN tech notes on Temporal tables. I found learning XML and JSON the easiest by practicing problems I’d think of in Adventureworks, otherwise only reading the material did not stick as well. Anything I haven’t used regularly I made sure to read on, watch videos, and practice. I would also search stack overflow for problems associated to topics I wasn’t clear on and try to solve them or at least read up on them. If you aren’t feeling overly confident in an area, try looking for another online resource. If you can find sites that can test your knowledge in areas, that is a fantastic approach to realizing what areas you are lacking in information. Being able to explain something to someone is also a good indicator of how well you understand something.

I would also listen to podcasts and videos while running each morning, but I honestly don’t think that helped much for the test. For topics I found the hardest, I’d start by reading the prep chapter in the exam book. Then I’d look for some reputable and good videos on the topics, read an additional online blog or two, and then I would create practice problems. If I still felt unsure, I’d look for a podcast on the topic to listen to loosely during a free time like driving or running, and then I would also look for flash cards and quizzes online. The most beneficial study tool was using technology day in and day out, otherwise the 70-461 and 70-761 exam books were my bread and butter. Quizzes and flashcards helped me a lot to identify the areas I needed to focus on learning again.

Everyone else has said this about the test but I’ll say it too.

Use your test taking abilities.

If you can go back to a question that is taking you a long time, mark it for review and continue with the test and go back to it at the end. I used every second of the 2 1/2 hours of the exam. I don’t know if having more time would have necessarily changed my score, but I feel 30 more min would have made me felt more comfortable and less rushed.

If you can narrow down the answers you have to pick from, do that at the very least even if you are stumped by the question. From the narrowed down answers you can at least guess.

Don’t leave any answer blank and try to answer them all.

If I were to do it again, I’d probably do more flashcards on definitions of terms in my studying and will try that for 70-762. If I were really uncertain, I’d probably take the official pre-test. I would recommend the 70-461 book just because there is so much good information inside of it, I only bought the 70-761 because it had JSON and Temporal Tables. I’d suggest you could go with the 70-761 + T-SQL Fundamentals instead of the 70-461; or you can go with the 70-461 and the Temporal Tables section in the T-SQL Fundamentals while also adding some supplemental JSON training since that is lacking in the 461 exam book. My test will probably not be the same as you will have and you need to look over the content you can be tested on via the Microsoft site for the cert. Good luck and I’ll see you on the other side of 70-762 shortly!

My favorite resources:

https://www.cathrinewilhelmsen.net/2015/01/28/preparing-for-and-taking-exam-70-461-querying-microsoft-sql-server-2012/

https://www.mssqltips.com/sqlservertip/4644/sql-server-exam-70761-study-material-for-querying-data-with-transactsql/

https://www.amazon.com/T-SQL-Fundamentals-3rd-Itzik-Ben-Gan/dp/150930200X

https://www.amazon.com/Training-70-461-Querying-Microsoft-Server/dp/0735666059/ref=sr_1_1?ie=UTF8&qid=1513628070&sr=8-1&keywords=70%3D461

https://www.amazon.com/Exam-70-761-Querying-Data-Transact-SQL/dp/1509304339/ref=sr_1_1?s=books&ie=UTF8&qid=1513628083&sr=1-1&keywords=70-761

http://www.accelerated-ideas.com/70761-practice-test-questions.aspx#.WeeTWVtSypo

https://www.mssqltips.com/sqlservertip/4015/introducing-json-for-sql-server-2016/

https://www.mssqltips.com/sqlservertip/4073/sql-server-2016-advanced-json-techniques--part-1/

https://docs.microsoft.com/en-us/sql/relational-databases/json/json-data-sql-server

https://www.mssqltips.com/sqlservertip/3680/introduction-to-sql-server-2016-temporal-tables/

https://docs.microsoft.com/en-us/sql/t-sql/queries/select-group-by-transact-sql

https://www.mssqltips.com/sqlservertip/1958/sql-server-cross-apply-and-outer-apply/