Reader small image

You're reading from  SQL Server 2019 Administrator's Guide - Second Edition

Product typeBook
Published inSep 2020
Reading LevelBeginner
PublisherPackt
ISBN-139781789954326
Edition2nd Edition
Languages
Right arrow
Authors (2):
Marek Chmel
Marek Chmel
author image
Marek Chmel

Marek Chmel is a senior CSA at Microsoft, specializing in data and AI. He is a speaker and trainer with more than 15 years' experience. He has been a Data Platform MVP since 2012. He has earned numerous certifications, including Azure Architect, Data Engineer and Scientist Associate, Certified Ethical Hacker, and several eLearnSecurity certifications. Marek earned his master's degree in business and informatics from Nottingham Trent University. He started his career as a trainer for Microsoft Server courses and later worked as SharePoint team lead and principal database administrator. He has authored two books, Hands-On Data Science with SQL Server 2017 and SQL Server 2017 Administrator's Guide.
Read more about Marek Chmel

Vladimír Mužný
Vladimír Mužný
author image
Vladimír Mužný

Vladimír Mužný has been a freelance developer and consultant since 1997. He has been a Data Platform MVP since 2017, and he has earned certifications such as MCSE: Data Management and Analytics and MCT. His first steps with SQL Server were done on version 6.5, and from that time on, he has worked with all following versions of SQL Server. Now Vladimir teaches Microsoft database courses, participates in SQL Server adoption at various companies, and collaborates on projects for production tracking and migrations.
Read more about Vladimír Mužný

View More author details
Right arrow

Chapter 2: Keeping Your SQL Server Environment Healthy

In the first chapter, we saw that SQL Server is a complex software suite consisting of many services that work together. Based on the deployment scenario, we can have even more instances of SQL Server services running on the same host. SQL Server Database Engine is usually a key service in the Enterprise environment because many other applications and tools depend on SQL Server for their primary data storage. It's a crucial task to keep our SQL Server environment healthy, not only with proper maintenance and monitoring but also with proper post-installation configuration. Installation, as we have seen in the first chapter, is not just about configuring many of the settings and keeping the default values. A default configuration might not be ideal for your production environment, and it's important to understand the benefits of any modifications to the default values. The goal of this chapter is to provide the basic post...

Understanding SQL Server patching

Once you install SQL Server, you need to watch for future updates released by Microsoft. You can confirm which updates were installed to your server by checking the build number of the SQL Server deployment. You can find the build number in SQL Server Management Studio (SSMS), as you can see in the following screenshot, or via the SELECT @@VERSION command:

Fig. 2.1 – SQL Server Object Explorer (build version)

The build version of the currently installed SQL Server is 15.0.2070.41. We can parse this version into the following portions:

  • 15–indicates we work with SQL Server 2019
  • 2070.41—4517790 Servicing Update (GDR1) for SQL Server 2019 Release to Manufacturing (RTM)

    Note

    You can find a nice list of updates for all SQL Server versions at http://sqlserverbuilds.blogspot.com/ where you can identify the correct build of your SQL Server.

Based on the data...

Configuring SQL Server environment

Once you have installed your SQL Server and performed the patching to the current patch level required, you need to configure basic settings on the SQL Server and also on the Windows Server itself. There are several settings on the Windows Server that have an impact on your SQL Server's performance and security, and these need to be updated before you put the server into production. The following are the basic options that you need to configure on the operating system:

  • Configuring security rights for your SQL Server account
  • Configuring power settings
  • Configuring firewall rules

Configuring security rights for your SQL Server account

During the installation of the SQL Server, you're choosing an account that will be used to run all SQL Server services. There are quite a few considerations for a proper choice but, in this chapter, we'll focus more on the follow-up configuration. Such an account...

Creating a performance baseline

Baseline refers to the normal or typical state of your SQL Server and environment performance. This baseline is very important to you for numerous reasons, and these are as follows:

  • When you start troubleshooting the server, you need to know how your server will behave toward something odd.
  • You can proactively tune the system if you find a weak spot in the baseline.
  • When you plan to upgrade your server, you know how the load was increasing over time, so you can plan properly.

As a matter of fact, you won't have just one single baseline, but you can create multiple baselines depending on the variable workload. In such a case, you will have a baseline for the following:

  • Business hours
  • Peak usage
  • End of week/month/quarter due to closures; reporting
  • Weekend

Creating a performance baseline and capturing performance information for your server is, hence, a very crucial task and should be deployed to each...

Summary

In this chapter, we have seen how to build a healthy SQL Server environment and how to configure not only the SQL Server but also Windows Server for a stable and secure SQL Server workload. Keeping your server up to date, secure, and monitored is extremely crucial for the stability of applications and your ability to perform any troubleshooting at the SQL Server level.

In the next chapter, we will build on our healthy SQL Server and introduce backup and recovery procedures so that you can understand how to keep your server safe and how to recover from failures.

lock icon
The rest of the chapter is locked
You have been reading a chapter from
SQL Server 2019 Administrator's Guide - Second Edition
Published in: Sep 2020Publisher: PacktISBN-13: 9781789954326
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
undefined
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime

Authors (2)

author image
Marek Chmel

Marek Chmel is a senior CSA at Microsoft, specializing in data and AI. He is a speaker and trainer with more than 15 years' experience. He has been a Data Platform MVP since 2012. He has earned numerous certifications, including Azure Architect, Data Engineer and Scientist Associate, Certified Ethical Hacker, and several eLearnSecurity certifications. Marek earned his master's degree in business and informatics from Nottingham Trent University. He started his career as a trainer for Microsoft Server courses and later worked as SharePoint team lead and principal database administrator. He has authored two books, Hands-On Data Science with SQL Server 2017 and SQL Server 2017 Administrator's Guide.
Read more about Marek Chmel

author image
Vladimír Mužný

Vladimír Mužný has been a freelance developer and consultant since 1997. He has been a Data Platform MVP since 2017, and he has earned certifications such as MCSE: Data Management and Analytics and MCT. His first steps with SQL Server were done on version 6.5, and from that time on, he has worked with all following versions of SQL Server. Now Vladimir teaches Microsoft database courses, participates in SQL Server adoption at various companies, and collaborates on projects for production tracking and migrations.
Read more about Vladimír Mužný