Book Review – “High Performance SQL Server” by Benjamin Nevarez

There is something about high performance tuning that I find very fascinating. Performance tuning your database server is one of those things that you cannot just pinpoint to a single cause. You must have an overall understanding of how SQL Server internals work to really understand all the areas that you can “tune”, how they all interplay with each other, etc. Without having a grasp on this crucial subject, you will find yourself scratching your head more times than not when learning performance tuning.

Just as it’s important to understand all areas of how SQL Server internals work, it’s equally important to learn it from a reliable, reputable source. It’s easy to fall prey to the endless, unverified posts out on the internet that will do nothing but further add to confusion.

Mr Benjamin Nevarez (bio below) was kind enough to send me a copy of his latest book, High Performance SQL Server. His book is a continuation from his earlier book, “Microsoft SQL Server 2014 Query Tuning & Optimization.”

The goal of this blog is to do a brief review of Mr Benjamin’s latest book and hopefully convince you to add it to your arsenal of “go to” material for SQL Server performance tuning.

High Performance SQL Server by Benjamin Nevarez

High Performance SQL Server by Benjamin Nevarez

The 196 page book is spread over 9 chapters. I will list the chapters below with a brief description of what’s in each:

  1. How SQL Server Works: This chapter is great as it starts from the beginning. The networking protocols used by SQL Server (TCP/IP, Named Pipes, VIA, etc.), ports, SQLOS, Schedulers/Workers, Query Optimization, Joins (Nested Loops, Hash, Merge), and Parallelism are among the wealth of information in this first chapter.
  2. Analyzing Wait Statistics: Introduction to the Waits Performance Methodology. Retrieving wait statistics information via the DMVs and Extended Events.
  3. The Query Store: How the query store can help, using it, performance troubleshooting and live query statistics.
  4. SQL Server Configuration: This chapter talks about statistics updates, tempdb configuration, MAXDOP settings, IFI (instant file initialization), memory configurations, backup compression default, and a whole list of trace flags.
  5. tempdb Troublshooting and Configuration: Structure of a page, different types of pages, tempdb latch contention, using multiple data files, what’s new in SQL Server 2016, and monitoring disk space.
  6. SQL Server In-Memory Technologies: In-Memory OLTP, what’s new in SQL Server 2016 and memory-optimized tables.
  7. Performance Troubleshooting: Performance counters, DMVs and DMFs, and SQL Trace / Extended Events
  8. Indexing: How SQL Server uses indexes, where to use them, clustered/non-clustered/filtered indexes, and index maintenance.
  9. SQL Server Storage: Different storage types, flash based storage, database configuration, database files, fragmentation, VLFs and using tools like Resource Monitor, Diskspd, SQLIOsim and different RAID configurations.

As you can read from the above chapter descriptions, Mr. Nevarez put together a great book that should be part of any database professional’s performance tuning library.

It will definitely be part of mine! :)

About the Author

Benjamin Nevarez (b | t) is a database professional based in Los Angeles, California who specializes in SQL Server query tuning and optimization. He is the author of three books, “High Performance SQL Server”, “SQL Server 2014 Query Tuning & Optimization” and “Inside the SQL Server Query Optimizer” and has also coauthored other books including “SQL Server 2012 Internals.” Benjamin has also been a speaker at many SQL Server conferences and events around the world including the PASS Summit, SQL Server Connections and SQLBits.

Interview – Kendra Little

I decided to start a series of blogs where I interview key people in the SQL Server community. Instead of me asking technical questions, I plan on asking about their outlook on the future, books they read (non-fiction and/or technical),  and their overall thoughts on where technology (mainly SQL Server) is headed. You can find more interviews here.

Next up: Kendra Little (b | t):

Kendra Little
Kendra Little

Mohammad: Where do you see SQL Server technology evolving to 5 years from now? More cloud focused?

Kendra: Over five years time, I think we will see a “normalizing” of many of the more recent advancements we’ve had in the technology. So yes, I think there will be more people using the cloud as those features continue to mature.

But I also think we will have more people using columnstore indexes, and in-memory technologies, which Microsoft has shown they are continuing to invest in. We’ll have more established patterns about where these features are particularly strong, and also more opportunities to be creative with them.

And of course we’ll have more opportunities to make mistakes with them and fix them, too!

Mohammad: Do you ever see the traditional SQL Server DBA role being replaced/eliminated?

Kendra: I did a recent “Dear SQL DBA” podcast episode where I talked about this very issue. So you know I think this is a good question! :)

The only role I see being potentially eliminated within 10 years is the “traditional” DBA who only takes care of backups, maintenance jobs, and user access. That isn’t new: over the last 10 years, it’s been increasingly required that the DBA be a problem solver who communicates well, learns the needs of their customers, and participates in creating solutions. Sometimes those solutions are more infrastructure based, sometimes they are more software based. IT workers in general are increasingly required to learn new technologies and adapt them to solve their customers’ problems, and this requires lots of communication and flexibility.

Your question does say “ever”, though. In the modern world, it is conceivable that someday robots will take over *all* our jobs. If that does happen in our lifetimes, I think database-related jobs will be among the last to go. We do live in interesting times.

Mohammad: What are you most proud of doing/accomplishing for the SQL Server community so far in your career?

Kendra: There’s a couple of different ways one can answer this type of question.

There’s the marketing/resume style answer: I am very proud to have launched a new training site, SQLWorkbooks.com, where I am giving away my initial courses to the community for free. I love that giving away courses is good for my business, to try to make the site become known, and also good for the community, because people can take free courses.

There’s also the personal answer: What do I really *feel* proud of having done for the community? This gets into what has been the most difficult thing for me to overcome.

I am most proud of myself for continuously overcoming the voices in my head that say, “You aren’t attractive enough to make videos” or “Your content isn’t as interesting as ______’s content” or “That isn’t good enough” or “You should be embarrassed by _____” or “You can’t do this on your own.” Almost every time I write a blog post, make a YouTube video, or speak at a free SQLSaturday event, I have to confront and overcome these doubts.

It is true that the more you do something, the easier it gets. But for some of us, we always have to promote positive voices in our head to shout over the negative voices. I haven’t always succeeded at this, but I am most proud of all the times that I have succeeded.

And this is the thing that I would like your readers to know: if you have those worries yourself, you are not alone. And you can help yourself get past them, and YOU can write a blog to help others. Or make YouTube videos. Or speak at your user group or conferences. Or draw pictures, or write songs, or whatever it is you want to do to contribute. And you can really enjoy doing those things.

Mohammad: What non-technical/non-fiction book/s would you recommend? If you only read technical books…what do you recommend?

Kendra: I love to read, but I mostly read mysteries and fiction. I hate most self-help and business books, they just don’t resonate with me.

But recently I love listening to non-fiction podcasts, so I’m going to broaden your question to that. They have more of a narrative than books, and the episode based format works very well for listening while taking a walk.

As a woman running a business by herself, I found great inspiration from the podcast, “Making Oprah” from NPR. It’s the story of how Oprah Winfrey started as a broadcaster and grew her show into a business empire, in a weird and difficult market. The phrase “Stay in your own lane,” which she popularized, is one that helps me channel my creativity and free myself from distractions and doubts. (It’s funny, I was never into her show when it was on television, but this podcast really stuck with me.)

I also recommend the podcast “Reply All” from Gimlet Media. It’s a podcast about technology, and I am always thrilled to see a new episode go live. It teaches me a lot about storytelling, as well as everything from issues in digital rights management to privacy to internet memes.

Mohammad: For someone who’s career focus has been on one aspect of SQL Server (i.e. Database Engine), do you think it would be wise for them to become a “jack of all trades” by starting to learn, SSRS/IS/Azure, etc. or remain focused on their area of expertise? In another words, which would you say is more valuable? mile wide / inch deep or inch wide / mile deep?

Kendra: This reminds me of the controversial question, “Should you do what you love? Or should you pick a job to make money?”

In other words, I think there is a secret aspect to your question: “What would be the motivation for making such a change? Are you bored? Are you more interested in those other things?”

You may have a hard time making a living from doing what you love, if what you love is singing in the shower. But if what you’re interested in is a viable aspect of database technology, and you feel rewarded from doing it: do what gives you a feeling of reward.

If you can find *anything* where you can make a good-enough living, and it keeps your mind engaged in a happy way, and you feel particularly satisfied from that work, do THAT! You have won the lottery in life! Don’t stop and wonder, “Would __some person__ do this?” Seize the opportunity that interests *you*.

As far as I can tell, we get only one life. We each find different things satisfying, so grab the chance that helps you enjoy all those hours that you spend working. Change your course in life when you feel the need. You can re-adjust again, it is *your* life and your story.

And don’t forget to stop working and enjoy your family and the world outside, too! It will make you a better thinker, I promise.

Interview – Adam Machanic

I decided to start a series of blogs where I interview key people in the SQL Server community. Instead of me asking technical questions, I plan on asking about their outlook on the future, books they read (non-fiction and/or technical),  and their overall thoughts on where technology (mainly SQL Server) is headed. You can find more interviews here.

Next up: Adam Machanic (b | t):

Adam Machanic
Adam Machanic

Mohammad: Where do you see SQL Server technology evolving to 5 years from now? More cloud focused?

Adam: Over the next five years there will definitely be a continued push toward the cloud. And this only makes sense; competition will continue to drive down pricing (albeit slowly), and for most companies, at some point it will simply become fiscally unwise to continue with the cycle of managing and replacing a large amount of in-house hardware.

Beyond that–and this is pure conjecture on my part–I’ve recently noticed Microsoft getting more interested in helping with manageability and troubleshooting insight. This probably ties in to its own requirements for managing its SQL Server PAAS offering, but either way the result is a lot of cool enhancements making it into the “box” product. I think, and certainly hope, that we’ll see a lot more in this area. Anything Microsoft can provide to make the product easier to work with will be welcomed by all.

Mohammad: Do you ever see the traditional SQL Server DBA role being replaced/eliminated?

Adam: I think it’s already happening! For me, a “traditional DBA” means a pure ops role: manage the SQL Server instance, HA, DR, and monitoring. Maybe manage the OS, maybe hardware, but oftentimes not even that.

This kind of pure ops DBA is a dinosaur, for two major reasons: evolution of technical processes and expectations in most companies, and evolution of cloud offerings.

The first issue–evolution by companies–has created the demand for technologists to have a broader focus. Think DevOps. The kind of DBAs who were previously able to sit in a dark corner and manage backups of anonymous databases they didn’t even vaguely understand? That kind of behavior simply won’t fly in a nimble organization. DBAs need to be able to contribute to the bottom line–the business–and if they can’t, companies will find someone who can.

As for evolution of the cloud, that creates a few interesting twists on the DBA role, and we need to think about the various forms of cloud offerings. IAAS is a popular choice as a first step or for more complex projects, and I don’t see that going away anytime soon. This is the arena that will require the most in terms of traditional DBA style work. Thinking about database PAAS, there’s not nearly as much need there for a traditional DBA, but a database pro still needs to think through appropriate sizing, setup, and configuration. The big cloud-based threat to the traditional DBA is in fact the evolution of SAAS. As data and application vendors move away from customer-hosted databases and toward on-demand API and web models, there will be fewer and fewer in-house database servers demanding the attention of a lonely backup jockey. Fewer servers and databases means companies will need fewer ops DBAs. But they will need a lot more data integration people. Data professionals as a whole will go nowhere.

Luckily I think there are very few of these “traditional” pure ops DBAs left in the world. People have gotten the message and have ventured into new realms, and most companies no longer hire people who only have ops skills. What is still left that bothers me is the term “DBA” itself. We need a new term, because today’s “data professional” isn’t an “administrator.” Calling yourself a DBA if you’re a data integration specialist is not reflective of your true skills and, given the changing technical landscape, is bad marketing for your personal brand.

Mohammad: What are you most proud of doing/accomplishing for the SQL Server community so far in your career?

Adam: Without a doubt, creation of sp_whoisactive is the best thing I’ve done in my career to date. I rely on it every day, and apparently so do a whole lot of other people. I am constantly getting pinged with questions and comments, and it’s awesome knowing that something I wrote is not only broadly used but also really helping a lot of people do their jobs. I’ll also add that most of the features I’ve put in have been a direct result of user requests–so even though I’m the sole author, it’s really been a community-driven and collaborative project from the start. Really a great highlight for me!

Mohammad: What non-technical/non-fiction book/s would you recommend? If you only read technical books…what do you recommend?

Adam: I actually read very few technical books these days. There is just so much information available in focused short form–article, video, or live presentation–that taking the time to plow through a 1,000 page book no longer seems quite as appealing as it used to.

Books I’d recommend? For fiction I’m a huge fan of David Mitchell. I read “The Bone Clocks” a couple of years ago, and recently picked up “The 1000 Autumns of Jacob De Zoet.” Both novels really captured my attention, and have stuck with me. If I’m still thinking about it a year later, I know it must have been special! On that note, one of my favorite reads in the past five years was Susanna Clarke’s “Jonathan Strange & Mr. Norrell.” A hugely detailed, epic, and fairly dark book that is not only very well written but also intriguingly plotted. That’s another one that really sticks around in my brain.

On the nonfiction end of the spectrum, I’m a bit dull and tend to read books that focus on some element of one of my hobbies–food and/or running. One recent great read was “The Perfect Mile” by Neal Bascomb, which details the stories of three runners who were each (independently) trying to break the four minute mile around the same time in the mid-1950s. Another book I found to be very interesting was “Proof: The Science of Booze” by Adam Rogers. You get to read about booze and call it an intellectual pursuit because it’s science. Not much better than that!

Mohammad: For someone who’s career focus has been on one aspect of SQL Server (i.e. Database Engine), do you think it would be wise for them to become a “jack of all trades” by starting to learn, SSRS/IS/Azure, etc. or remain focused on their area of expertise? In another words, which would you say is more valuable? mile wide / inch deep or inch wide / mile deep?

Adam: There is no right answer here. Everyone has different learning styles and work styles, and some people are more adapted for deep focus than others. Both have their place. But ultimately as technicians we’re shaped by the demands of our work. I happened to get caught up in a major performance tuning project early in my career, and it forced me to become proficient in that area. Had I not taken that job, maybe I would be data visualization specialist, or something totally different, today! I don’t think there’s any benefit in trying to unnecessarily or prematurely go deep or wide in a technical area. Things change too quickly and if you don’t apply something it won’t really stick. You should ideally always be open, alert, and on the lookout for any kind of learning opportunity. In my opinion the best course of action is to find some smart people to work with and put things on autopilot. From there your knowledge will go wherever it needs to go.

Interview – Chrissy LeMaire

I decided to start a series of blogs where I interview key people in the SQL Server community. Instead of me asking technical questions, I plan on asking about their outlook on the future, books they read (non-fiction and/or technical),  and their overall thoughts on where technology (mainly SQL Server) is headed. You can find more interviews here.

Next up: Chrissy LeMaire (b | t):

Chrissy LeMaire
Chrissy LeMaire

Mohammad: Where do you see SQL Server technology evolving to 5 years from now? More cloud focused?

Chrissy: I’m the opposite of a visionary and really have no idea. That being said, five years doesn’t seem very long; I think it’ll take closer to 10 years for to fully realize the cloud thing. Microsoft may be cloud-focused, but the industries I work in are still very on-premises when it comes to Microsoft software.

Mohammad: Do you ever see the traditional SQL Server DBA role being replaced/eliminated?

Chrissy: I have seen a downturn in pure DBA job postings over the past decade, but ultimately, I see the position evolving but not being eliminated. The same question is often posed to SharePoint administrators and I just don’t see them going away either.

Either way, I’ve always considered development as an important part of database administration. Initally, with T-SQL and VBScript and now with T-SQL and PowerShell. I think it’s more important now than ever to ensure that SQL Server database administrators know the dev side, considering the trend towards DevOps.

Mohammad: What are you most proud of doing/accomplishing for the SQL Server community so far in your career?

Chrissy: I’m really proud of how effective my PowerShell advocacy has been.
Last year, just prior to the release of SQL Server 2016, I wrote a blog post titled “Can we get these three SQLPS issues fixed before SQL Server 2016 RTMs?” – and it got a lot of attention from the SQL Server community and Microsoft. Ultimately, with the help of the community and key figures at Microsoft, we did get those three issues resolved for SQL Server 2016’s RTM debut AND we also picked up a dedicated PowerShell engineer for the SQL Server team in the process!

I was just so floored when I was told that the engineer brought on to resolve those three issues ultimately stayed on permanently to work on the SQL Server PowerShell module. Since then, the module has become more stable and many new commands have been added.

In addition, Aaron Nelson and I created a couple Trello boards (PowerShellSSMS) that help Microsoft triage requests for SQL PowerShell and SQL Server Management Studio. It was nothing short of magic to see the Trello board mentioned in Release Notes. Many of the highest voted commands from the community made their way right into the module and that’s such a huge win for everyone.

On a personal front, I’m crazy proud of the PowerShell project I created, dbatools. In the past year, we’ve had nearly 50 contributors to our GitHub repo, which was ultimately moved from my personal GitHub account to an organizational account that now hosts other community projects as well.

For a long time, the SQL community was told that PowerShell was really powerful and that they needed to learn it, but until dbatools, I don’t think there was a project that solidified PowerShell’s potential for us.

I always knew that PowerShell was mind-blowing and wanted to create a project that got people to say either “OH! WOW! Okay! Now I’m going to learn PowerShell not because I have to, but because I want to!” or “Okay, now I see that I can accomplish a lot without even knowing how to program PowerShell. Let’s do this!” dbatools has done both.

Actually, many of my favorite commands in the toolset are often the ones inspired by community blog posts – like Test-DbaVirtualLogFileTest-DbaMaxMemoryExport-DbaExecutionPlan and Get-DbaBackupHistory.

I also love the commands that turn tedious, multi-step processes into single commands like Start-SqlMigrationNew-DbaDatabaseSnapshot or Test-DbaLastBackup. All of these commands make SQL Server administration more accessible and even more fun.

Mohammad: What non-technical/non-fiction book/s would you recommend? If you only read technical books…what do you recommend?

Chrissy: I really enjoy management and negotiation books even though I’ve never wanted to be a manager. Some of the better ones have had really positive impacts on my outlook in life and my faith in people. Here are three that come to mind.
First, Break All the Rules: What the World’s Greatest Managers Do Differently

The 21 Irrefutable Laws of Leadership

Secrets of Power Negotiating

I also think there are some technical books worth mentioning. Neuro Web Design is an older book, but it’s still very interesting, fun and easy to read. It’s kind of a mix of psychology and tech.

Neuro Web Design: What Makes Them Click? 

Also, PowerShell in Action by Bruce Payette is an all-time favorite. It’s very well-written and tells an interesting story. It’s the kind of book I enjoy reading on a Sunday with some coffee and sunshine.

PowerShell in Action

Mohammad: For someone who’s career focus has been on one aspect of SQL Server (i.e. Database Engine), do you think it would be wise for them to become a “jack of all trades” by starting to learn, SSRS/IS/Azure, etc. or remain focused on their area of expertise? In another words, which would you say is more valuable? mile wide / inch deep or inch wide / mile deep?

Chrissy: I think that expertise requires an all-encompassing understanding of technology. So even though I’ve been an OLTP DBA most of my career, I’ve also been a web developer, DNS admin, Linux admin, Active Directory admin, SharePoint admin, VMware admin and so on. Each of those things help me better understand the whole stack and ultimately make me a better DBA.

All-in-all, I think it’s best to be a generalist with a specialty. So I’ll often take a month or three and give myself a project to understand something like SSRS or SSIS. I’m not trying to become an expert, but it’s good to be able to do what I support.

The downside to this is that there will be times that I suck at something I am expected to know and was once really good at. Take database design and T-SQL development, for example. I used to do it all the time, but it’s been awhile and without a refresher, I wouldn’t be as good as I once was. I think that’s natural, however, and I’m happy with what’s currently occupying my brain (PowerShell, PowerShell, PowerShell ;)

Interview – Tim Radney

I decided to start a series of blogs where I interview key people in the SQL Server community. Instead of me asking technical questions, I plan on asking about their outlook on the future, books they read (non-fiction and/or technical),  and their overall thoughts on where technology (mainly SQL Server) is headed. You can find more interviews here.

Next up: Tim Radney (b | t):

Tim Radney
Tim Radney

Mohammad: Where do you see SQL Server technology evolving to 5 years from now? More cloud focused?

Tim: I see the cloud focus still ongoing. Within 5 years, I see more small to mid-size companies embracing Cloud rather than building out their own large datacenters. Analytics will continue to be a strong focus as companies need to trend their data.

Mohammad: Do you ever see the traditional SQL Server DBA role being replaced/eliminated?

Tim: I honestly don’t. In my Azure SQL Database sessions I give, that is a big focus of the talk. Our job as DBAs are even more critical for tuning workloads. Running SQL Server on Azure VMs is no different than on-premises. You still support the instance as well as the databases. With Azure SQL DB, the instance, install, and infrastructure is handled for you, however you are paying for performance. Higher tiers cost more money, tuning those workloads to decrease cost will be very important.

Mohammad: What are you most proud of doing/accomplishing for the SQL Server community so far in your career?

Tim: For me, I think it would be paying it forward and getting others to start speaking and blogging. I have had a number of people tell me that a conversation, a session, or a blog post was a catalyst in getting them started. It is an incredible feeling to know that you had a positive impact on others.

Mohammad: What non-technical/non-fiction book/s would you recommend? If you only read technical books…what do you recommend?

Tim: One of my all-time favorite books is “The Cuckoo’s Egg” by Clifford Stoll. As for a technical book, one of my all-time favorites is the “Trouble Shooting SQL Server – A Guide for the Accidental DBA” by Jonathan Kehayias and Ted Krueger.

Mohammad: For someone who’s career focus has been on one aspect of SQL Server (i.e. Database Engine), do you think it would be wise for them to become a “jack of all trades” by starting to learn, SSRS/IS/Azure, etc. or remain focused on their area of expertise? In another words, which would you say is more valuable? mile wide / inch deep or inch wide / mile deep?

Tim: This one is a hard question. As a consultant, you need to know your area of expertise a mile deep. If your focus is tuning, you need to be able to tune very well. With the data platform being so wide, you can’t know it all very well. It would be very difficult to be a SSAS, SSIS, SSRS, and Database Engine expert, however it is very beneficial for an Engine person to also know some SSRS, and SSIS. If you are the only DBA for a small shop, then you are sort of forced into being a “jack of all trades”, and those types make for great consultants down the road. As for value, I say focus on what you love to do, that is the value. If you hate reporting, try to not do reporting. The financial value of all the roles is good. You need to do what makes you happy.

Interview – Brent Ozar

I decided to start a series of blogs where I interview key people in the SQL Server community. Instead of me asking technical questions, I plan on asking about their outlook on the future, books they read (non-fiction and/or technical),  and their overall thoughts on where technology (mainly SQL Server) is headed.

First up: Brent Ozar (b | t):

Brent Ozar interviewed by Mohammad Darab
Brent Ozar

Mohammad: Where do you see SQL Server technology evolving to 5 years from now? More cloud focused?

Brent: Today, in early 2017, https://www.spotlightessentials.com/world/sql-server shows that the majority of shops are still on SQL 2008/2008R2.

That means in 2022, most shops will be running 2012/2014 – which means Always On Availability Groups will be more widespread, for example. But other than that, I don’t think the world is going to be very different for SQL Server DBAs. A lot of their databases will probably run in the cloud, but for the most part, VMs in the cloud aren’t that different from VMs on-premises.

Sure, Microsoft SQL Server 2022 will look very different than SQL Server 2016 – but it won’t matter, because the vast majority of DBAs aren’t able to simply push cutting edge technology into production.

Mohammad: Do you ever see the traditional SQL Server DBA role being replaced/eliminated?

Brent: I’d like to think that the drudge work we hate (backups, restores, corruption checking, patching) will be abstracted away by cloud providers and better systems administration tools.

But the thing is, I just got out of the Google Cloud Next conference where developers were going wild and crazy about Google Cloud Spanner, Google’s new relational database. Right now, Cloud Spanner doesn’t even offer backups. It’s up to you to roll your own backup solution.

Crazy Google, right? But check out Azure SQL DB, which won’t give you your own backups either. If you want to take your data to another cloud – either for migration or disaster recovery – it’s up to you to figure it out.

The database administrator role is alive and well. Anybody who tells you otherwise isn’t actually doing DBA work in the cloud – they’re just reading magazines.

Mohammad: What are you most proud of doing/accomplishing for the SQL Server community so far in your career?

Brent: Scaling my work. In the morning, I look at the clock and go, “Okay, I have two hours to help people today. How can I help as many people as possible in those two hours?” Everything I do has to help as many people as possible.

The numbers just blow me away:

* 1.9mm people visited BrentOzar.com last year
* 95k email subscribers
* 13k subscribers on YouTube
* 50k person-hours of video consumed in the last year
* 100k podcast downloads
* 500+ Github stars for the First Responder Kit
* 2k members at GroupBy.org, my newest project

Given that I’m doing this in my spare time, I’m really, really proud of the numbers we’ve been able to rack up. We’re making a real difference in a lot of peoples’ lives.

Mohammad: What non-technical/non-fiction book/s would you recommend? If you only read technical books…what do you recommend?

Brent: The Whuffie Factor by Tara Hunt, and The Cluetrain Manifesto (several authors) – these books changed my life. In the old days, big companies spent big money inundating people with advertising, and we just bought what we were told to buy. Today, that’s over, and customers want to have real, genuine conversations. You have to build something awesome that brings customers in the door voluntarily.

50 Management Ideas You Really Need to Know by Edward Russell-Walling – he condenses popular management books into 2-3 page summaries. Gives you a quick overview of a lot of your blind spots.

The Lean Startup by Eric Ries – throw ideas against the wall cheaply and see what sticks. A great related book is The Mom Test by Rob Fitz, which teaches you how to ask better questions about the product you’re considering offering.

Getting to Yes: Negotiating Agreement Without Giving In – it’s a matter of finding common ground and figuring out what both of you need, quickly.

Mohammad: For someone who’s career focus has been on one aspect of SQL Server (i.e. Database Engine), do you think it would be wise for them to become a “jack of all trades” by starting to learn, SSRS/IS/Azure, etc. or remain focused on their area of expertise? In another words, which would you say is more valuable? mile wide / inch deep or inch wide / mile deep?

BrentBuck Woody once told me:
* In an immature market, be a generalist
* In a mature market, be a specialist

That means if you want to work in the SQL Server market, you can be a specialist. If, on the other hand, you wanna work in, say, cloud development like Richie Rump is doing at our shop, he has to be a generalist. In any given day, he’s in half a different tools, working with all kinds of different technologies.

You can make a phenomenal living just diving deeply into the SQL Server engine. I do it, I know lots of other folks who do, and it’s great because there’s a limited number of deep specialist. It’s a great living.

But if you want to step back out and try a new career, brace yourself: you’re going to be competing with a lot of other generalists, and a lot of ’em are willing to work for much less than you are. It’s not easy to make great money as a generalist unless you’re phenomenal at it. (For the record, Richie is phenomenal.)

Google Wifi Review

Wifi routers have always been a pain in the butt for me. I live in a 3-level townhouse and it’s always been a challenge to evenly distribute the internet across all three floors. Over the past 10-15 years, I’ve tried multiple routers. From name brands like the old Linksys WRT54G router and Apple Airport Extreme, to the lesser known Almond+ by Securifi. The Almond+ was actually great when compared to the rest. The setup and wifi reception was great. The only downside was the router was on the third floor, so the internet speed in the basement was horrible. I started to do more research on how to evenly distribute the wifi and came across products like eero, and Google WifiThese products offer a “3 pack” of routers that work together to give you evenly distributed internet reception.

Google Wifi vs eero

I LOVE Amazon Reviews! First, I checked out both the Amazon reviews for the eero and Google Wifi and the reviews for both are amazing. Second, I compared the price; Google Wifi pack of 3 sells for 299.00 and the eero pack of 3 sells for 454.97 (both via Amazon).

Price

It really comes down to whether you have a budget. The eero 3 pack is 155.97 more than the Google Wifi. Is it worth it? To me it wasn’t. I decided to go with Google. If for some reason my internet was not significantly better on all three floors of my house I planned on returning it and trying out the eero.

Google Wifi Review

Amazon shows the product as “out of stock” so I went straight to the Google store. Google has a 14-day return policy, and they sell it for the same price of as Amazon.

The package came 2 days later…

Google Wifi Review 1

Very neat packaging.

Google Wifi Review 2

Three beautiful, slick Google Wifi routers.

Google Wifi Review 3

Not too big.

Google Wifi Review 4

The instructions are literally on a one-sided card. Very easy to setup, Step 1 Plug it, Step 2 Download Google Wifi app and launch it. The Google Wifi app (itunes), was very simple and sleek looking. It didn’t take much to get all the routers up and running.

Google Wifi Review 5

Everything in the package:

  • 3 Wifi Routers
  • 3 power cords
  • 1 ethernet cable
  • 1 instruction card

Final Thoughts and Internet Speed Results

I placed one router on each floor; third floor bedroom/office, mid-level living room and basement. I ran a speedtest before I turned off my old router, installed Google Wifi and ran the speedtest again to compare results. Below is a screenshot of the speedtest results. Starting from the lowest result (11:33 am) going up is the bedroom/office, living room and basement. As you can see, the download speed drops from 53.81 Mbps on the upper level to an ancient 9.23 Mbps in the basement. The next three results are after installing Google Wifi. All three levels of my house are now at 64-65 Mbps.

Google Wifi Review

I created a little excel document for a clearer BEFORE and AFTER view of my internet reception.

Google Wifi Review 2

Bottom line: For 299.00, it’s cheaper than eero and well worth it! The Google Wifi app is pretty amazing with neat features such as “family time”, easy “guest network” creation, ability to change the brightness of the individual router LED lights, etc.

I LOVE the Google Wifi routers!

Stuff and Replace Function in SQL Server : Detailed Description

(This is a guest blog post by Daniel Jones (li | t | fb). Daniel is a SQL Server DBA and contributor at SQL Tech Tips. Having 2 + years of experience in SQL recovery and system infrastructure.)

In SQL Server, STUFF and REPLACE functions are used to replace the characters in a string. Both functions play an important role in Transact-SQL with performing the distinct functionality. In the following section, we are going to discuss about Stuff and Replace function in detail.

STUFF Function in SQL Server

In SQL Server, the STUFF function is utilized to replace the part of the string with some another string. Moreover it can remove the specified length of the characters in the first string and after that, insert the second string into the first string at the starting position.

Syntax of STUFF Function

STUFF ( character_expression , start , length , replaceWith_expression )

Parameters

    • character_expression

This argument can be a constant, variable or may be the column of either binary or character data

    • start

It is an integer value that indicates the location from where to begin the deletion and insertion as well. In case, if start or length parameters may be negative then, it will return a null string. Besides, if start is used longer than the first-character_expression, again null string is returned. It also can be of bigint type.

    • length

Also, it is an integer that denotes the number of characters to remove. If using length longer than the first character_expression, then, deletion happens to the last character within the last character_expression. It could be of type bigint.

    • replaceWith_expression

This attribute represents same as character_expression. Even it may be a variable, constant, or columns of character or binary data. Even this expression can replace length characters from character_expression in the beginning at start

Return Types

In case, if character_expression is one of the supported character data, returns the character type data. Otherwise, gives binary data if character_expression is a single supported binary data types.

Remarks

In the above parameters, if the length or start integer is negative, or if the start position is larger than the length of the primary string, then, returns the null string. Although, returns null value if the starting position is zero. If the length is longer than the first string, it has decided to remove the first character data type in the first string.

Replace Function in SQL Server

As the above function name indicates, the REPLACE function in SQL server allows to replace all the occurrences of a specified string value with another set of the string value.

Syntax of REPLACE Function

REPLACE ( string_expression , string_pattern , string_replacement )

Parameters

    • string_expression

This string expression to be searched. Either it can be of character data or binary data type.

    • string_pattern

It can also be of a binary as well as character data type. In fact, it cannot be an empty string and may not exceed the maximum number of bytes that is suitable on a page.

    • string_replacement

A string_replacement argument can be of any data type either character or binary as well.

Return Types

If one of the input parameters is of nvarchar type then, returns nvarchar value; else, REPLACE gives varchar value.

In addition, if any individual argument is NULL then, returns the NULL value.

Moreover, if string-expression cannot be of type varchar or nvarchar, then, REPLACE function truncates the return range at 8,000 bytes. To provide values larger than 8,000 bytes, even string-expression may be cast explicitly to a greater value data type.

Remarks

REPLACE function performs the comparison of the input, which is based on collation. In a specified collation performing a comparison, also users can use COLLATE to apply collation to the desired input.

Char(zero) is an undefined character in collation and unable to include in REPLACE function.

Conclusion

STUFF and REPLACE are two major SQL Server functions that have discussed in above section. Moreover, to understand the various aspects of both the functions, we have presented the syntax and parameters in detail.

Error 3241 in SQL Server

(This is a guest blog post by Daniel Jones (li | t | fb). Daniel is a SQL Server DBA and contributor at SQL Tech Tips. Having 2 + years of experience in SQL recovery and system infrastructure.)

Microsoft SQL Server Backup Error Code 3241 Restore Headeronly

Sometimes, the users of MS SQL server faced an error when they try to restore SQL database from the backup file in the SQL server. This error is known as SQL server error 3241 and it generates the below-mentioned error message.

Error 3241 SQL Server

Due to this error message, the users cannot restore the data from the backup file into SQL Server database. Therefore, in this post, we are going to discuss the reason for the occurrence of error 3241 and the relevant solutions to resolve the error.

Causes Behind the Occurrence Of the SQL Server Backup Error 3241

There are various reasons behind this error message. Some of them are described as below:

  • When a user of MS SQL Server tries to restore the data from the backup file that was created on the MS SQL Server 2014 to the SQL Server 2008 then the error message arise. This is the main cause behind the occurrence of this error.
  • The SQL error code 3241 may also occur if SQL Backup Agent Service does not have necessary access permission. To restore the database from backup file into the SQL server, the SQL Backup Agent Service should have read permission to access the folder, which contains the backup file.
  • There is also a possibility that the backup file, which was used for restoring the SQL database, is corrupted. The backup file can be corrupted if it was loaded using FTP Text Mode.

Solutions To Resolve the MS SQL Error 3241 Restore Headeronly

In this section, we are going to discuss some solution to troubleshoot the backup error 3241. These solutions are described as follows:

  • Before starting the process to restore a database from the backup file, we should check the version of SQL server. If the version of SQL server is same as that of the version in which the backup file was created then start the restore process, otherwise upgrade the SQL server database to the same or higher version.

Note: By running the command ‘SELECT @@Version’ in the SQL query window, you can check the version of SQL server.

  • There is a need for access permission to restore data from backup file using SQL Backup Agent Service. The user account, which was used to log on the SQL backup Agent service, should be specified while installing SQL server components on the server instance. SQL Backup Agent Service can get a permission to access some specific folder, where a backup file is saved from the sysadmin.
  • If the backup file was corrupted because of uploading using FTP text mode, then again restore the backup file using FTP in binary mode. If this method fails to repair the corrupted backup file then you can also take the help of SQL BAK file recovery, a third-party utility to recover backup file.

Note: To avoid the Microsoft SQL Server error code 3241, the version of SQL server should be same as that of SQL server version in which backup file is created. SQL Backup Agent Service should have necessary access permission to restore data from backup file and backup file should be upload using FTP in binary mode.

Conclusion

When the users try to restore the database from the backup file then sometimes they are unable to do that because of SQL server error 3241. There are various reasons behind the occurrence of this error such as older version of SQL server, backup file is uploaded using FTP binary mode, etc. Therefore, in this post, we have described the causes of the error and the possible solutions to fix the backup error code 3241.

What Should My Salary Be?

What Should My Salary Be?

There are two questions that you just don’t ask people. It can create animosity and can even cause relationships to break. One of those questions is, “how much do you make?”

(If you’re wondering what the other question is, it’s, “Who are you going to vote for?” Not a great idea to get into politics with people.)

At any rate, the problem with asking someone “how much do you make” is not just because that’s a personal/private question. It can create a judgmental atmosphere. Have you ever worked with someone who was less technical than you but somehow you found out how much they were making? And it happened to be more than you? How did you feel? How did your attitude towards that person change once you found out?

That’s why you stay away from that information. The issue arises when negotiating salary. It’s somewhat important to know what your “worth” is. How much should you ask for. Is what I am asking for possibly going to remove me from consideration?

Recently, Brent Ozar published a blog titled, “Tell Us What You Make: The 2017 Data Professional Salary Survey“. In that blog, there was a link to a quick little survey that collected information like salary, location, years of experience, etc. Of course it was all anonymous.

To my surprise, over 2000 people took the survey. Of course, the more people that take the survey, the better the information. But the flip side to that is people can fool around and enter a bunch of garbage. For example, there are a few people making over MILLION dollars as a SQL Server Analyst and Manager (see below)

What Should My Salary Be

Really? 1.45 million? I highly doubt that.

Aside from the “Who Wants to Marry a SQL Server Millionaire Analyst”, there are a couple pieces of information that we can derive from this survey:

  • Having a 4-year college degree does NOT guarantee a higher salary
  • Any one technology (SQL Server vs Oracle vs Amazon) does NOT mean a higher salary
  • Job title does not guarantee a higher salary over another, i.e. DBA vs Analyst vs Engineer
  • Number of years of experience does NOT guarantee a higher salary
  • Certifications do NOT guarantee higher salary

So you might be thinking, “what the heck does guarantee a higher salary?” Well, it depends. It all comes down to what you feel comfortable with? The trap that we should not fall into is comparing ourselves to others based on salary/income. My view is, follow your passion (whatever that is) and learn it inside out. The money will follow. Don’t get greedy and think you can ask for 200k when you just got out of college with zero years of real-world experience. Everything within reason.

Speaking about passion; I love SQL Server and just started playing around with Power BI. I will use the data in this excel document to create some interesting charts/graphs and update this post once I do!

Until then, keep learning!