... control 136
Database schema change management 137
Semi- or fully-automated deployment 138
A testing tool 139
A data generation tool 139
How to Test Databases 141
Reverting the database state 141
Simplifying ... countries have to share data and be certain that it can be
compared or aggregated. However, the developer who is creating a database application
will need to be familiar with the standard naming ... database objects is still a chore, and allowances
have to be made for a team to get familiar with the standard, and learn how to review
the work of colleagues. If you can, produce a style guide...
... is a master-slave database replication scheme, where
the master database accepts client updates and a second database acts as a slave and pulls all the
updates from the master.This eliminates ... that declares AdminTool as your Main-
Class and provide that file as an argument to the jar tool. Once it is packaged, you can
run the tool in a similar way using the command line:
java –jar AdminTool.jar ... }
}
The call to the client method domainMetadata() returns a map of metadata entry
names to numeric values.Amazon serves the DomainMetadata operation values from a
cache and not necessarily from a fresh...
... Create any Maintenance Plans… 29
How to Configure Database Mail 30
How to Configure aSQLServer Agent Operator 43
Summary 46
Chapter 3: Getting Started with the Maintenance Plan Wizard 47
Exploiting ... 17
Different Approaches to Database Maintenance 19
Maintenance Plan Wizard 19
Maintenance Plan Designer 21
T -SQL Scripts 22
PowerShell Scripts 24
Core Maintenance Plan Tasks 24
Backup Databases 25
Verify ... of a Database 25
Maintain a Database's Indexes 26
Maintain Index and Column Statistics 26
Remove Older Data from msdb 27
Remove Old Backups 27
What's Outside the Scope of the Maintenance...
... Log) Task 168
An Overview of the Backup Database (Transaction Log) Task 169
When and How Often to Back Up Transaction Logs 171
Configuring the Backup Database (Transaction Log) Task 171
Backing ... Differential Backups 163
Configuring the Back Up Database (Differential) Task 164
Database Selection and Backup Component 164
Creating the Job Schedule 166
Summary 167
Chapter 14: Back Up Database (Transaction ... 209
Update Statistics Task 210
Shrink Database Task 211
Execute SQLServer Agent Job Task 211
Database and Backup Component Selection 151
Backup File Storage 155
Verify backup integrity 157
Set backup...
... 14
Introduction
SQL Server has a reputation as being a simple database application to install, configure, and
maintain. This is a little misleading. SQLServer is a powerful relational database that can
handle ... cases,
organizations have SQLServer instances that are maintained by a part-time DBA, or an
"accidental DBA," who may be a network administrator, developer, accountant, or even an
oce ... inexpensive, means that SQL
Server has become a favorite platform for multiuser applications, and it often appears in
organizations who cannot a ord to have experienced DBAs on their staff. In many cases,...
... how to use the Maintenance Plan Wizard and
Maintenance Plan Designer, but also to offer practical advice on how best to maintain
your databases
• to provide an easy -to- read, tutorial approach to ... Plan Wizard and Designer, is to
cover those critical database maintenance tasks that, as a bare minimum, should be applied
to all databases, to ensure adequate performance and availability. ... based on different needs.
Chapter 1: Why is Database Maintenance Important?
19
Dierent Approaches to Database
Maintenance
There are many different ways that DBAs can choose to perform database...
... your data.
It is critical that any maintenance plan makes provision for the following two types of backup:
• Full database backups – backs up the data in the data (md) file(s) for that database. ... full database backup, and
any transactions that occurred after the full backup will be "rolled forward" to restore the
data toa given point in time, and so minimize any data loss. ... DBA still needs to know T -SQL and
SQL Server internals, as well as SQLServer Management Objects (SMO), and the OS Object
Model (assuming you decide to take advantage of PowerShell's ability...
... Chapter 2: Before you Create any Maintenance Plans…
30
How to Configure Database Mail
While there are a couple of different ways to configure Database Mail, the easiest way is to use
the Database ...
Configuration Task screen, as shown in Figure 2.2.
Chapter 1: Why is Database Maintenance Important?
27
Remove Older Data from msdb
The SQLServer msdb database stores historical data about various ... Database Mail Configuration Wizard from within SSMS. To start this Wizard, navigate to
the Management folder of the appropriate server, right-click on Database Mail, and select
Configure Database Mail,...
... you Create any Maintenance Plans…
32
Assuming that Database Mail has not been turned on for this SQLServer instance, and you
see the above screen, click Yes, and Database Mail will be enabled. ... Chapter 2: Before you Create any Maintenance Plans…
31
Figure 2.2: The Database Mail Configuration Wizard does several different tasks.
To set up Database Mail for use by the Maintenance Wizard, ... to create a Database Mail profile.
A profile is a collection of one or more SMTP accounts that can be used by SQLServerto
send messages. In other words, when SQLServer wants to send a message,...
... additional Database Mail parameters.
The last option in the Database Mail Configuration Wizard allows you to set the values of
specific Database Mail parameters for the profile. Generally, we will leave ...
only one attempt made to send an e-mail. If the SMTP server should be down when an
e-mail is to be sent, and there are no alternative SMTP accounts available, then the e-mail
won't be ... you want to add some robustness to Database Mail, and help ensure
that the mail is delivered should the SMTP server go down for a short time, you can choose
to increase this value toa higher...
... able to enter an
e-mail address directly into the Maintenance Plan. Instead, we configure e-mails to be sent to
an operator.
Chapter 2: Before you Create any Maintenance Plans…
44
An operator ...
operator's name, the operator's contact information, and the operator's availability schedule.
Here's an example: let's say that a company has three DBAs, each working a different ... process.
How to Configure aSQLServer
Agent Operator
When we configure a Maintenance Plan to send an e-mail, created with either the
Maintenance Plan Wizard or the Maintenance Plan Designer, we aren't...
... screen are optional.
Summary
You now have set up Database Mail and at least one operator. Now, when you create a
Maintenance Plan, you can choose to send e-mails to an operator. In the next chapter, ... Maintenance Plan Wizard or Maintenance
Plan Designer provides only the core components of aSQLServer database maintenance
plan. As discussed in Chapter 1, there are additional database maintenance ... aren't any existing Maintenance Plans and that you want to
create a new one.
Chapter 3: Getting Started with the Maintenance Plan Wizard
50
Creating a Maintenance Plan
In this section, I'll...
... have been referring frequently to Maintenance Plan "tasks," but I have
yet to explain what they really are, although I assume you have a general idea of what I have
been talking about. ... get to find out what they are, and what they do. A database
maintenance task is simply a specific activity performed as part of a Maintenance Plan. I will
offer a brief description of these tasks ... this task is very resource intensive, it is critical that you perform it on a
regular basis, to ensure that your databases aren't damaged.
Shrink Database
Never use the Shrink Database task....
... database can grow
very large.
Back Up Database (Full)
The Back Up Database (Full) task executes the BACKUP DATABASE statement and creates
a full backup of the database. You will probably want ... deletes historical data from the msdb database, including
historical data regarding backup and restore, SQLServer Agent and Maintenance Plans.
If you don’t perform this task periodically then, ...
Backup Database (Transaction Log)
The Backup Database (Transaction Log) task executes the BACKUP LOG statement,
and, in most cases, should be part of any Maintenance Plan that uses the Back...
... included in a Maintenance Plan because it is automatically deleted and
recreated every time SQLServer is restarted.
All user databases
Just as a DBA often wants to create a Maintenance Plan that is ... This and other differences between system and
production database maintenance, mean it is common to create separate Maintenance Plans
for each class of databases.
tempdb and Maintenance Plans
tempdb ... option is that
it covers both user and system databases and, if you add any databases at any time, even
after the Maintenance Plan has been created and is in production, they will automatically be...