You are on page 1of 19

The Essential DBA

Playbook for Optimized


SQL Server Management
Assess your SQL Server environment, establish effective backup and recovery, and maintain
SQL Server management optimization

The Essential DBA Playbook for Optimized SQL Server Management

Table of contents
Chapter 1

Assessing Your SQL Server Environment


Chapter 2

Establishing Effective Backup and Recovery

Chapter 3

Ongoing SQL Server Management Optimization

II

11

2015 Dell. All rights reserved. | Share:

The Essential DBA Playbook for Optimized SQL Server Management

Abstract
Whether youre taking a position as a DBA at a new company or youve been
with your current company for years, you may be facing the same challenge:
not having the optimal hardware, software, workflow or culture you need to
run a smooth environment. In fact, its often quite the opposite: the department
may have poor security practices, nonexistent disaster recovery plans, poor
documentation and substandard hardware or network configuration. Then
there are the cultural or organizational challenges: poor management, underresourced departments or poorly thought-out processes.
While it would be impractical to formulate a strategy for every possible situation,
you can put in place a handful of strategies to overcome panic and methodically
focus on issues within your control. The Essential DBA Playbook for Optimized
SQL Server Management explains how, in three chapters:
Chapter 1: Assessing Your SQL Server Environment The first step is to

assess the SQL Server environment. An initial database infrastructure status


check is necessary for sustained, optimized database management.
Chapter 2: Establishing Effective Backup and Recovery The next step is to
establish effective backup and recovery, keeping in mind high availability and
disaster recovery best practices.
Chapter 3: Ongoing SQL Server Management Optimization Finally, you
need to maintain your optimization efforts by communicating effectively,
stabilizing the environment and taking advantage of automation.
This e-book covers assessing your SQL Server environment.

III

2015 Dell. All rights reserved. | Share:

Chapter 1

Assessing Your
SQL Server
Environment

2015 Dell. All rights reserved.

Introduction
Too many SQL Server DBAs are stuck in
firefighting mode, forced to focus their
attention on the latest problem that pops up,
regardless of its true severity. Without a triage
framework for sorting database issues, youll
be stuck in this state of perpetual near-panic
and youll be more likely to compound or misevaluate problems.
To avoid this problem, whenever you take on any new
database management assignment, begin by assessing the
overall condition of the SQL Server environment. Its time for
some rapid battlefield analysis. Take a deep breath and start
organizing your efforts along the following steps:
1. Take inventory.
2. Catalog issues by severity.
3. Identify required resources.
4. Assess security measures for protecting information and
the environment.

2015 Dell. All rights reserved. | Share:

The Essential DBA Playbook for Optimized SQL Server Management


Step 1.

Step 2.

Take inventory

Catalog issues by severity

How many instances and databases in the enterprise are you managing? An upto-date inventory of the hardware and systems in your purview is critical. This
helps define your field of battle.

Now its time to determine the severity of issues and assign priorities. Analyze
your environment with the big three resources in mind: disk I/O, memory and
CPU. The capacity and performance of these resources will delineate what you
can and cannot do in terms of optimizing SQL Server performance.

Armed with your wider view of the battlefield,


you can start to categorize and prioritize
problem areas.

Identify and prioritize the most critical handful of issues in terms of environment
performance, security or (in extreme cases) viability. It will help you if you think
of database performance through the lens of the business rather than as a purely
technological issue.

Things you need to know:


The total inventory of the databases on your network and the amount of data
they contain
Database history, including installation and creation dates
Which SQL Server versions and service packs are deployed
Server, instance and operating system names
Who your end users are
Which databases are being backed up and how frequently and which
databases arent being backed up at all
The retention periods for backups

Identify and prioritize the most critical


handful of issues in terms of environment
performance, security or viability.
Once your systems are ranked in order of importance, rank them again in order
of the severity of issues. For help, use SQL Servers error management system,
which assigns severity levels from zero to 24, from mere informational messages
to existential threats.

This information becomes the battlefield map on which you will locate and
evaluate your trouble spots. Armed with your wider view of the battlefield, you
can start to categorize and prioritize problem areas.

2015 Dell. All rights reserved. | Share:

The Essential DBA Playbook for Optimized SQL Server Management


Step 3.

Step 4.

Identify required resources

Assess security measures

Once youve captured tactical data and prioritized which issues represent the
biggest and most immediate threats to business operations, you need to identify
which resources are required to stabilize the SQL Server environment in the
short term. Possible resources include technical expertise, software tools, server
capacity and backup storage. Ask questions like the following:
If backups or database performance are an issue, what steps can be taken and
roughly when can a long-term fix be identified?
Is the environment sufficiently secure to protect information?
If additional resources are not available, what can you do with existing
resources?
Does the organization understand the risk?

While performance and availability will naturally be front-of-mind during the first
stages of triage, youll also need to assess security liabilities, even though some
may represent middle- or long-term threats. Be sure to keep the following best
practices in mind:

The easiest way to proceed is to identify issues you can fix with the hardware
you have on hand, and then categorize the resources you need to add, such as a
solid-state drive, another disk cabinet for a SAN or extra CPUs.
Once youve identified resource demands, communicate those needs to your
superior and appropriate colleagues. We discuss communication strategy in more
detail in chapter 3, but at a minimum, its important to convey a few key points:
Issues that you have identified, prioritized and justified with actionable
information your interpretation of relevant data, tailored to your internal
audience
The impact to the business if these issues are not addressed
Which issues you can address with resources at hand, and which will require
additional resources
Your triage report should show that you have methodically assessed the
situation and its importance. Most SQL Server databases have problems, but not
all DBAs have a plan of action. Address issues and take a proactive approach
to long-term improvement by alerting managers to both the problems and
potential solutions at once, constructively.

While performance and availability will


naturally be front-of-mind during the first
stages of triage, youll also need to assess
security liabilities.
Review user access, permissions and passwords.
When creating database objects, you must grant permissions to make those
objects accessible to users. Every securable object has permissions that can be
granted to, or revoked from, a principal using permission statements. Granting
permissions to roles, rather than to users, simplifies security administration. The
permission set designated by a given role is inherited by all members of that role.
It is far easier to add or remove users from a role than it is to create separate
permission sets for each individual user. Roles can be nested; however, too
many levels of nesting can degrade performance.

Find and document compliance liabilities.


Log management for security compliance in SQL Server can be complicated.
Suggestions come from all directions, including vendors, auditors and lawyers.
As a DBA, its your job to determine whats reasonable based on risk. Depending
on your organization, industry and country, your company may have stringent
compliance requirements. For example, for the Health Insurance Portability
and Accountability Act (HIPAA) for patient health data, or the Payment Card
Industry Data Security Standard (PCI DSS) for credit card and transactional data.

2015 Dell. All rights reserved. | Share:

The Essential DBA Playbook for Optimized SQL Server Management


You can use SQL Servers auditing functionality to find
and document areas of concern, thereby lessening your
companys potential regulatory exposure. Regardless of the
governing body, a big part of compliance initiatives is to
monitor activity related to sensitive information and to keep
good records.

Institute a code freeze during triage


steps.
Until youve had time to find and remediate major
performance and security liabilities, introducing new code
into an environment is a no-go.

Conclusion
The first step in optimizing database management is to
carefully assess the SQL Server environment. By taking
the four steps detailed here taking inventory, cataloging
issues, identifying resources and assessing security you
will have the initial database infrastructure status information
you need to move on to chapter 2 of the playbook, which
explains best practices for effective backup and recovery.

2015 Dell. All rights reserved. | Share:

Chapter 2

Establishing
Effective
Backup and
Recovery

2015 Dell. All rights reserved.

The Essential DBA Playbook for Optimized SQL Server Management

Introduction
In chapter 1 of the playbook, you learned how
Page
title
to assess your
SQL Server environment. Now

its time to goes


ensurehere
your organization has the
Subhead
backup and recovery it needs to minimize both
Body copy. Lorem ipsum dolor sit amet, consectetur
data
losselit.
and
downtime.
adipiscing
In ac
blandit erat. Mauris facilisis
mollis odio et ullamcorper. Curabitur ultrices
venenatis
Many
DBAs
auctor.
make Maecenas
the mistake
molestie,
of thinking
metus
that because they
eget pulvinar
have
high availability
faucibus,
(HA),
metus
a backup
dui varius
and felis,
recovery
quis strategy is
sollicitudin nibh
unnecessary.
However,
mauris the
quispossibility
lacus. Nam
offeugiat
data loss is a risk even
posuere
in
HA scenarios.
quam non.
Moreover, end-user downtime will surely
attract unwanted attention. Therefore, its critical to have a
disaster

Bullets.
recovery
Lorem ipsum
(DR) strategy
dolor siteven
amet,
if you
consectetur
have high availability.
adipiscing elit. In ac blandit erat. Mauris facilisis
This
mollis
chapter
odioexplains
et ullamcorper.
four keyCurabitur
best practices
ultrices
for effective
backup and recovery:
1. Understand

Bullets. Lorem
theipsum
differences
dolor sit
between
amet, consectetur
high availability and
adipiscing
disaster
recovery.
elit. In ac blandit erat. Mauris facilisis
Understand
mollis odio et
your
ullamcorper.
options forCurabitur
high availability
ultrices in SQL Server.
Establish both a backup strategy and a recovery strategy.
Build a disaster recovery strategy for the long term.

2015 Dell. All rights reserved. | Share:

The Essential DBA Playbook for Optimized SQL Server Management

Understand the differences


between high availability
and disaster recovery.

Understand your options


for high availability in SQL
Server.

As noted earlier, high availability and disaster recovery are not synonymous:
High availability is the measurement of a systems ability to remain accessible
in the event of a system component failure. Generally, HA is implemented by
building in multiple levels of fault tolerance into a system.
Disaster recovery is the process by which a system is restored to a previous
acceptable state, after a natural or man-made disaster. With DR, there can be
a significant loss of service while the DR plan is executed and the environment
is restored.

High availability tools and functionality built into SQL Server are designed to
ensure uptime. Here are a few options to consider:
AlwaysOn Failover Cluster Instances AlwaysOn Failover Cluster Instances
provides server-instance level redundancy. It uses Windows Server Failover
Clustering (WSFC) to provide local high availability through redundancy. A
failover cluster instance (FCI) is a single instance of SQL Server that is installed
across WSFC nodes and, possibly, across multiple subnets. On the network,
an FCI appears as an instance of SQL Server running on a single computer, but
the FCI provides failover from one WSFC node to another if the current node
becomes unavailable.
AlwaysOn Availability Groups This enterprise-level high-availability solution
was introduced in SQL Server 2012 to enable you to maximize availability for
one or more user databases. It requires that the SQL Server instances reside
on WSFC nodes without all the extra hardware typically associated with
clustering, such as shared storage.
Database mirroring Database mirroring maintains a single standby
database, or mirror database, of the production (principal) database. This
approach increases the availability of a SQL Server database by supporting
almost instantaneous failover, and also improves data protection.
Log shipping Like AlwaysOn Availability Groups and database mirroring,
log shipping functions at the database level. It is an automated backup and
restore process that allows you to create an additional copy of your database
for failover. You can use log shipping to maintain one or more warm standby
databases (secondary databases) for a single production database (the
primary database).

In short, HA is about maintaining service, and DR is about retaining data.

High availability is about maintaining service,


and disaster recovery is about retaining data.
It is imperative that both HA and DR strategies be driven by business requirements.
Therefore, they should address non-functional requirements such as:
Performance
System availability
Fault tolerance
Data retention
Business continuity
User experience
For HA, determine any service-level agreements (SLAs) expected of your system.
For DR, use measurable characteristics, such as a recovery time objective (RTO)
and a recovery point objective (RPO).

2015 Dell. All rights reserved. | Share:

The Essential DBA Playbook for Optimized SQL Server Management

Establish both a backup


strategy and a recovery
strategy.
Not surprisingly, backup and recovery go hand and hand. There is no way to
simply implement a recovery strategy without first assessing backup processes.
Backups are instrumental to protecting critical data and giving you the ability
to execute point-in-time recovery for the data in your environment. If data was
maliciously or inadvertently deleted from a table, no amount of failovers on a
cluster is going to bring that data back once the change was committed. As the
old IT adage states: A DBA is only as good as their last backup.
In chapter 1 of the playbook, you took inventory of your environment, including
which databases are being backed up, how frequently those backups are taken
and the retention periods for backups as well as which SQL Servers arent
being backed up at all.
If you do identify servers that are not currently backed up, you may need some
backup of your own:
Engage your managers and explicitly declare a backup gap as a major problem.
Investigate whether there may be a valid reason for databases not being backed
up and suggest a minimum level of protection (according to your tolerance).
Follow up with the owners of the databases to determine their RTOs and
RPOs.

Build a disaster recovery


strategy for the long term.
Use transaction log backups.
Without transaction log backups, it is impossible to restore your data to a specific
point in time. Although managing transaction logs is costly both in terms of the
operational costs of your time and the capital expenditure on additional on-site
and off-site storage its likely your business cannot afford data loss.
As a guardian of the organizations data, work to specify RPOs for your business.
Many organizations schedule transaction log backups every 1530 minutes; this
baseline is a good starting point for your own conversations, during which you
should stress the RPO is akin to data loss.

Create a reliable restore process.


Restore processes need to be seamless and automated. The best way to
ensure effective restoration is to test and document processes continually until
everybody in the department who may be called upon to do so can perform the
required tasks. Great care should be taken to update the restore process on a
frequent basis so that your RTOs can either be adhered to or altered if required.
In many cases, RTOs can be significantly reduced by employing third-party
solutions that reduce backup and restore times using advanced compression
algorithms. Some tools also offer object-level restores, which let you avoid
restoring your entire database if a single table was destroyed.

With this information and support, implement the agreed-upon SLAs. Regularly
test a range of scenarios to ensure that your data can be restored within the
expected time periods and SLAs.

2015 Dell. All rights reserved. | Share:

The Essential DBA Playbook for Optimized SQL Server Management

Conclusion
Establishing effective backup and recovery is critical in any
environment. By carefully assessing your environment as
detailed in chapter 1 of the playbook and then following
the best practices for backup and recovery you just
learned, you will have a SQL Server environment that is
more reliable and easier to manage. In the third and final
chapter of the playbook, well cover how you can continue
to optimize SQL Server management by establishing
effective communication, stabilizing the environment and
taking advantage of automation.

10

2015 Dell. All rights reserved. | Share:

Chapter 3

Ongoing
SQL Server
Management
Optimization

11

2015 Dell. All rights reserved.

The Essential DBA Playbook for Optimized SQL Server Management

Introduction
Once you have assessed your SQL Server
Page
environmenttitle
and established effective backup

and recovery,
youhere
need to consider how to
Subhead
goes
maintain SQL Server management optimization
Body copy. Lorem ipsum dolor sit amet, consectetur
going
forward.
This chapter
explains
adipiscing
elit. In ac blandit
erat. Mauris
facilisis several
best practices
that will
help you
going forward:
mollis
odio et ullamcorper.
Curabitur
ultrices
venenatis auctor. Maecenas molestie, metus
eget

Communicate
pulvinar faucibus,
proactively
metusacross
dui varius
the organization.
felis, quis
sollicitudin

Graduatenibh
frommauris
reactive
quis
mode
lacus.
into
Nam
proactive
feugiatmode.
posuere

Take advantage
quam non.
of automation.
Bullets. Lorem ipsum dolor sit amet, consectetur

adipiscing elit. In ac blandit erat. Mauris facilisis


mollis odio et ullamcorper. Curabitur ultrices
1. Bullets. Lorem ipsum dolor sit amet, consectetur

adipiscing elit. In ac blandit erat. Mauris facilisis


mollis odio et ullamcorper. Curabitur ultrices

12

2015 Dell. All rights reserved. | Share:

The Essential DBA Playbook for Optimized SQL Server Management

Communicate
proactively across
the organization.
Proactive communication is a critical skill for any
successful DBA. As you work to establish and maintain
an optimal SQL Server environment, youll need to
have discussions with appropriate parties within your
department, including both your manager and peers, as
well as with key extra-departmental players whose needs
have a large bearing on your work. Best practices for
proactive communication include:
Establish good relationships with developers and
management Capture and discuss key performance
issues and events for your team.
Gain credibility Demonstrate awareness of problems
and share what you intend to do about them.
Establish transparency and accountability Become
a conduit of relevant information for management and
colleagues, keeping them abreast of the health, status
and ongoing priorities in managing the environment.
Report on both problems and solutions Keep a
standardized report in which you update stakeholders
on the status and next steps of key issues to show that
youre bringing constructive solutions along with the bad
news. This is a career-enhancing trait that you need to
make a part of your daily routine. In addition to enhancing
transparency and accountability, these reports also build
in some protection for you in case a major potential
problem that you flagged and which required attention or
resources from others went unheeded.

13

2015 Dell. All rights reserved. | Share:

The Essential DBA Playbook for Optimized SQL Server Management

Page title

Graduate from reactive


mode into proactive mode.

Define goal

Subhead goes here


Body
copy.
Lorem ipsumcandidates
dolor sit amet, consectetur
Identity
improvement
adipiscing elit. In ac blandit erat. Mauris facilisis
mollis odio et ullamcorper. Curabitur ultrices
venenatis auctor. Maecenas molestie, metus
Prioritize candidates
eget pulvinar faucibus, metus dui varius felis, quis
sollicitudin nibh mauris quis lacus. Nam feugiat
posuere quam non.
Identify metrics to track

In chapters 1 and 2 of the playbook, you ensured that your environments most
immediate threats have been addressed and that your data is recoverable within
acceptable parameters. Its now time to look ahead and introduce stability and
visibility into your environment. This is your opportunity to switch from reactive
to proactive mode by tuning your environment to prevent problems in advance.

Bullets. Lorem ipsum dolor sit amet, consectetur

A baseline and benchmark methodology


helps you spot problems and engage in a
process of continuous improvement.

adipiscing elit. In ac blandit erat. Mauris facilisis


Create
update
baseline Curabitur ultrices
mollis or
odio
et ullamcorper.
1. Bullets. Lorem ipsum dolor sit amet, consectetur

adipiscing
elit. In ac blandit erat. Mauris facilisis
Review
a candidate
mollis odio et ullamcorper. Curabitur ultrices
Change component
(non-production)

Introduce baselining and benchmarking


methodology.

Run workload

A baseline and benchmark methodology helps you spot problems and engage in
a process of continuous improvement. Figure 1 shows the basic steps.

Benchmark performance

Reset to base state

No

Improvement?
Yes

Our white paper, Ten Tips for Optimizing SQL Server Performance, provides a
methodical approach for:
Determining goals
Tracking and analyzing data
Creating a cycle of improvement that keeps you ahead of major performance
problems
The paper also includes many other helpful tips for tuning and optimizing your
environment so you can help ensure that your initial triage efforts have set the
stage for longer-term performance and stability.

Deploy to production

Figure 1. The basic steps in a baselining and benchmarking methodology

14

2015 Dell. All rights reserved. | Share:

The Essential DBA Playbook for Optimized SQL Server Management


Follow best practices for deploying code.
Youll want to further protect your gains by instituting best practices around
introducing new code into the environment. Many DBAs face constant requests
to push out code from various points in the organization, which results in adhoc deployments that not only cause a great deal of stress, but also introduce
security and performance risks.
Part of the solution lies in developing a standard process for reviewing and
scheduling code deployment requests. Working with developers and other
colleagues to craft this process might take some doing be sure to take
advantage of the best practices for proactive communication outlined earlier.
Every organization has its unique demands and working culture, but any good
code deployment protocol will include the following components:
Formal review
A defined testing step, in a testing environment
A step for discussing and tweaking problematic code
Guidelines about when a rollback will be instituted and how it will be
performed

Take advantage of
automation.

As you transition from reactive to proactive


strategies, automation will become a
necessity.
Automating your monitoring with a third-party tool is the best way to gain
a consistent and guaranteed level of analysis across your entire SQL Server
estate. No two SQL Server professionals would write the same code or look in
the same place to solve a given problem, but consistency and reliability are the
cornerstones for every DBA. You need a tool that you can rely on to perform the
same every time, 24x7x365.

Conclusion

Stabilizing your environment also means stabilizing your routine; as you


transition from reactive to proactive strategies, automation will become a
necessity. As a bonus, automation will also give you the time you need to
engage with your organization, tackle problems like ensuring your system can
scale with the business and become a rock-star DBA.

15

Any task that is repeatable is a candidate for automation. As you identify ways
to move from being a firefighter to the guardian of an environment that breezes
along, start looking for tasks that can be run automatically and for tools that can
help deliver that automation.

Inheriting an environment that you didnt have the luxury of building can present
you with some highly stressful challenges, but solving those challenges can
be equally satisfying. By following the best practices in this playbook, you can
optimize your SQL Server environment and get out of firefighting mode and
hopefully enjoy some of your evenings and weekends after youve taken the reins.

2015 Dell. All rights reserved. | Share:

2015 Dell, Inc. ALL RIGHTS RESERVED. This document contains proprietary information
protected by copyright. No part of this document may be reproduced or transmitted in any
form or by any means, electronic or mechanical, including photocopying and recording for
any purpose without the written permission of Dell, Inc. (Dell).

About Dell

Dell, Dell Software, the Dell Software logo and productsas identified in this document
are registered trademarks of Dell, Inc. in the U.S.A. and/or other countries. All other
trademarks and registered trademarks are property of their respective owners.

If you have any questions regarding your potential use of


this material, contact:

The information in this document is provided in connection with Dell products. No


license, express or implied, by estoppel or otherwise, to any intellectual property right is
granted by this document or in connection with the sale of Dell products. EXCEPT AS SET
FORTH IN DELLS TERMS AND CONDITIONS AS SPECIFIED IN THE LICENSE AGREEMENT
FOR THIS PRODUCT, DELL ASSUMES NO LIABILITY WHATSOEVER AND DISCLAIMS
ANY EXPRESS, IMPLIED OR STATUTORY WARRANTY RELATING TO ITS PRODUCTS
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTY OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. IN NO EVENT SHALL
DELL BE LIABLE FOR ANY DIRECT, INDIRECT, CONSEQUENTIAL, PUNITIVE, SPECIAL OR
INCIDENTAL DAMAGES (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF
PROFITS, BUSINESS INTERRUPTION OR LOSS OF INFORMATION) ARISING OUT OF THE
USE OR INABILITY TO USE THIS DOCUMENT, EVEN IF DELL HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES. Dell makes no representations or warranties with respect
to the accuracy or completeness of the contents of this document and reserves the right to
make changes to specifications and product descriptions at any time without notice. Dell
does not make any commitment to update the information contained in this document.

Ebook-PlaybookforOptimizedSQLServerMgmt-FullVersion-US-GM-25498

Dell Inc. (NASDAQ: DELL) listens to customers and delivers worldwide innovative
technology, business solutions and services they trust and value. For more information,
visit www.Dell.com.

Dell Software
5 Polaris Way
Aliso Viejo, CA 92656
www.Dell.com
Refer to our Web site for regional and international office information.

You might also like