TSM Cli - TDP For SQL - Backing Up Microsoft SQL Server With IBM Tivoli Storage Manager - Sg246148
TSM Cli - TDP For SQL - Backing Up Microsoft SQL Server With IBM Tivoli Storage Manager - Sg246148
Backing up Microsoft
SQL Server with IBM
Tivoli Storage Manager
Strategic planning and implementation
considerations for effective backup
Marcia Kubo
Carlos Eduardo Abramo Pinto
ibm.com/redbooks
Draft Document for Review April 30, 2008 1:21 pm 6148edno.fm
May 2008
SG24-6148-01
6148edno.fm Draft Document for Review April 30, 2008 1:21 pm
Note: Before using this information and the product it supports, read the information in
“Notices” on page ix.
This edition applies to IBM Tivoli Storage Manager, IBM Tivoli Storage Manager for Databases
Data Protection for SQL Server, and IBM Tivoli Storage Manager for Advanced Copy Services.
Contents
Notices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix
Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . x
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
The team that wrote this book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xi
Become a published author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
Comments welcome. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xiii
Summary of changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv
May 2008, First Edition. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xv
Chapter 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1 Tivoli Storage Manager overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.1.1 IBM Tivoli Storage Manager components . . . . . . . . . . . . . . . . . . . . . . 3
1.1.2 IBM Tivoli Storage Manager for Copy Services overview . . . . . . . . . . 6
1.1.3 Data Protection for SQL Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.2 Snapshots . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.2.1 Snapshot overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.2.2 Copy-on-write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.2.3 Redirect-on-write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.2.4 Split mirror. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.2.5 Copy-on-write with background copy . . . . . . . . . . . . . . . . . . . . . . . . 12
1.2.6 IBM FlashCopy . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.3 Volume Shadow Copy Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1.3.1 Methods for creating shadow copies. . . . . . . . . . . . . . . . . . . . . . . . . 13
1.3.2 The VSS model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.3.3 The VSS architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
1.3.4 How shadow copies are created . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
1.3.5 Shadow copy types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
1.4 The Microsoft Virtual Disk Service . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
1.5 VSS Service with Tivoli Storage Manager. . . . . . . . . . . . . . . . . . . . . . . . . 20
1.6 Integration between Data Protection and SQL Server . . . . . . . . . . . . . . . 22
1.6.1 Data Protection for SQL Server backup methods . . . . . . . . . . . . . . . 22
1.6.2 SQL Server backup types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
1.6.3 Data Protection for SQL Server restore methods . . . . . . . . . . . . . . . 28
1.6.4 SQL Server restore types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
Contents v
6148TOC.fm Draft Document for Review April 30, 2008 1:21 pm
Contents vii
6148TOC.fm Draft Document for Review April 30, 2008 1:21 pm
Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
viii Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148spec.fm
Notices
This information was developed for products and services offered in the U.S.A.
IBM may not offer the products, services, or features discussed in this document in other countries. Consult
your local IBM representative for information on the products and services currently available in your area.
Any reference to an IBM product, program, or service is not intended to state or imply that only that IBM
product, program, or service may be used. Any functionally equivalent product, program, or service that
does not infringe any IBM intellectual property right may be used instead. However, it is the user's
responsibility to evaluate and verify the operation of any non-IBM product, program, or service.
IBM may have patents or pending patent applications covering subject matter described in this document.
The furnishing of this document does not give you any license to these patents. You can send license
inquiries, in writing, to:
IBM Director of Licensing, IBM Corporation, North Castle Drive, Armonk, NY 10504-1785 U.S.A.
The following paragraph does not apply to the United Kingdom or any other country where such
provisions are inconsistent with local law: INTERNATIONAL BUSINESS MACHINES CORPORATION
PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR
IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF NON-INFRINGEMENT,
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer
of express or implied warranties in certain transactions, therefore, this statement may not apply to you.
This information could include technical inaccuracies or typographical errors. Changes are periodically made
to the information herein; these changes will be incorporated in new editions of the publication. IBM may
make improvements and/or changes in the product(s) and/or the program(s) described in this publication at
any time without notice.
Any references in this information to non-IBM Web sites are provided for convenience only and do not in any
manner serve as an endorsement of those Web sites. The materials at those Web sites are not part of the
materials for this IBM product and use of those Web sites is at your own risk.
IBM may use or distribute any of the information you supply in any way it believes appropriate without
incurring any obligation to you.
Information concerning non-IBM products was obtained from the suppliers of those products, their published
announcements or other publicly available sources. IBM has not tested those products and cannot confirm
the accuracy of performance, compatibility or any other claims related to non-IBM products. Questions on
the capabilities of non-IBM products should be addressed to the suppliers of those products.
This information contains examples of data and reports used in daily business operations. To illustrate them
as completely as possible, the examples include the names of individuals, companies, brands, and products.
All of these names are fictitious and any similarity to the names and addresses used by an actual business
enterprise is entirely coincidental.
COPYRIGHT LICENSE:
This information contains sample application programs in source language, which illustrate programming
techniques on various operating platforms. You may copy, modify, and distribute these sample programs in
any form without payment to IBM, for the purposes of developing, using, marketing or distributing application
programs conforming to the application programming interface for the operating platform for which the
sample programs are written. These examples have not been thoroughly tested under all conditions. IBM,
therefore, cannot guarantee or imply reliability, serviceability, or function of these programs.
Trademarks
IBM, the IBM logo, and ibm.com are trademarks or registered trademarks of International Business
Machines Corporation in the United States, other countries, or both. These and other IBM trademarked
terms are marked on their first occurrence in this information with the appropriate symbol (® or ™),
indicating US registered or common law trademarks owned by IBM at the time this information was
published. Such trademarks may also be registered or common law trademarks in other countries. A current
list of IBM trademarks is available on the Web at http://www.ibm.com/legal/copytrade.shtml
The following terms are trademarks of the International Business Machines Corporation in the United States,
other countries, or both:
mySAP, SAP, and SAP logos are trademarks or registered trademarks of SAP AG in Germany and in several
other countries.
Oracle, JD Edwards, PeopleSoft, Siebel, and TopLink are registered trademarks of Oracle Corporation
and/or its affiliates.
Snapshot, Network Appliance, WAFL, SnapDrive, Data ONTAP, NetApp, and the Network Appliance logo are
trademarks or registered trademarks of Network Appliance, Inc. in the U.S. and other countries.
ITIL is a registered trademark, and a registered community trademark of the Office of Government
Commerce, and is registered in the U.S. Patent and Trademark Office.
AMD, the AMD Arrow logo, and combinations thereof, are trademarks of Advanced Micro Devices, Inc.
Solaris, and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other
countries, or both.
Active Directory, Microsoft, SharePoint, SQL Server, Windows NT, Windows Server, Windows, and the
Windows logo are trademarks of Microsoft Corporation in the United States, other countries, or both.
Intel, Pentium, Intel logo, Intel Inside logo, and Intel Centrino logo are trademarks or registered trademarks
of Intel Corporation or its subsidiaries in the United States, other countries, or both.
UNIX is a registered trademark of The Open Group in the United States and other countries.
Linux is a trademark of Linus Torvalds in the United States, other countries, or both.
Other company, product, or service names may be trademarks or service marks of others.
Preface
This IBM® Redbooks® publication describes how to plan, install, and implement
backup and restore for Microsoft® SQL Server® using Tivoli® Storage Manager
products. The book is aimed for Tivoli Storage Manager professionals who are
responsible for the backup and restore of an Microsoft SQL Server installation
using Tivoli Storage Manager.
Marcia Kubo is an IT Presales Support Specialist, in Brazil. She has more than
nine years of experience in the IT field and Tivoli Storage Manager product
portifolio, starting with ADSM 3.1. Her expertise includes AIX®, IBM System p™,
IBM disk and tape. She has been working for IBM since 2004. She is an ITIL®
Certified, TotalStorage® Productivity Center V3.1 Certified, IBM Certified
Deployment Professional: Tivoli Storage Manager V5.3 and 5.4, and an IBM
Certified Advanced Technical Expert for AIX version V4. She has a degree in
System Analysis from FATEC-SP, São Paulo. She was an author of Deployment
Guide Series: Tivoli Continuous Data Protection for Files V3.1, SG24-7423 and
Deployment Guide Series: IBM Tivoli Storage Manager Version 5.4, SG24-7379
xii Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148pref.fm
Your efforts will help increase product acceptance and customer satisfaction. As
a bonus, you will develop a network of contacts in IBM development labs, and
increase your productivity and marketability.
Find out more about the residency program, browse the residency index, and
apply online at:
ibm.com/redbooks/residencies.html
Comments welcome
Your comments are important to us!
Preface xiii
6148pref.fm Draft Document for Review April 30, 2008 1:21 pm
xiv Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148chang.fm
Summary of changes
This section describes the technical changes made in this edition of the book and
in previous editions. This edition may also include minor corrections and editorial
changes that are not identified.
Summary of Changes
for SG24-6148-01
for Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
as created or updated on April 30, 2008.
xvi Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-1-intro.fm
Chapter 1. Introduction
In this chapter we provide you with an overview of IBM Tivoli Storage Manager
Data Protection for SQL Server, as well as the associated technologies such as
the Volume Shadow Copy Service (VSS), Virtual Disk Services (VDS), and
snapshot techniques.
IBM Tivoli Storage Manager protects an organization’s data against failures and
other errors by storing backup and archive copies of data in offline storage.
IBM Tivoli Storage Manager enables you to protect your organization’s data from
failures and other errors by storing backup, archive, space management and
bare-metal restore data, as well as compliance and disaster data in a hierarchy
offline storage. IBM Tivoli Storage Manager is available in three editions;
Express, Basic Edition, and Extended Edition and there are other optional
modules to enhance the backup solution.
You can see a briefly description of IBM Tivoli Storage Manager family products
in Appendix A, “Tivoli Storage Manager family of products” on page 233. More
detailed information on Tivoli Storage Management and other additional products
can be found in IBM Tivoli Storage Management Concepts, SG24-4877.
Server Products
Entry-level backup and recovery
+
IBM Tivoli Storage IBM System
Manager Extended Edition Storage Archive
IBM Tivoli Storage Manager
Manager Disaster Recovery Planning and Recovery Compliance with
regulatory requirements
Client Products
Basic Business
Basic Protection Real Time File Protection LAN-Free Backup application protection
IBM IBM
Standard
Continuous Tivoli Storage
Backup-archive DB2 and Informix
Data Protection Manager
client
for Files for SAN
Complete
Business Application Protection Advanced Replication HSM
system recovery
IBM Tivoli Storage IBM Tivoli Storage IBM Tivoli Storage
IBM Tivoli Storage IBM Tivoli Storage
Manager for Manager for Manager for
Manager for Manager for
Mail (MS Exchange Databases (Oracle / System Backup and
Copy Services Space Management
/ Notes) MS SQL) Recovery
IBM Tivoli Storage
IBM Tivoli Storage IBM Tivoli Storage IBM Tivoli Storage
Manager for Cristie Bare
Manager for Manager for Manager HSM for
Advanced Copy Machine Recovery
ERP MS Share Point Windows
Services
You can use IBM Tivoli Storage Manager products family to perform an online,
consistent and centralized backups of your SQL Server database, avoiding
downtime, protect vital enterprise data infrastructure and minimize operation
costs.
Chapter 1. Introduction 3
6148ch-1-intro.fm Draft Document for Review April 30, 2008 1:21 pm
System security
Policy Domain
Active Policy Set
Integrated Solution
TSM Web UI Console Managem ent
Class
Backup
Local Area Network Scheduler Copy
10
9
11
12
1
2
3
Group
8 4
7 5
Log
6
Archive
10
11
12
1
2
3
Copy
Group
9
8 4
7 5
6
Scheduler
Database
Servers, Clients,
Application systems
Storage Area Network
Storage
Repository
Storage Manager client and server. Data can be recovered to the same client
machine that initially transferred it, or to another client with a compatible file
system format.
The IBM Tivoli Storage Manager client basically consists of the software
component and a customization file. The customization file, called the client
options file, specifies client/server communications parameters and other IBM
Tivoli Storage Manager client settings. Client communications parameters must
agree with those specified in the server options file. The client options is located
in the client directory and can be modified using a text editor. The client graphical
interface also provides a wizard for editing this file. IBM Tivoli Storage Manager
provides the following types of clients:
Backup-archive client
The backup-archive client provides standard IBM Tivoli Storage Manager
client function, which includes four operations: backup, restore, archive and
retrieve. These operations can be performed manually from the client
machine or remotely using a web-based interface. Backup and archive
operations can also be scheduled to run automatically.
Data Protection client
Data Protection client, also called and application client, allows for the backup
and restoration of data used by various business applications. Data
Protection receives backup and restore requests from the business
application and translates them for IBM Tivoli Storage Manager server
processing. Backup and restore processing can be done while the business
application is online.
Space Manager client
The Tivoli Space Manager client, also called Hierarchical Storage Manager
(HSM), transparently migrates data from the client hard drive to IBM Tivoli
Storage Manager server-managed storage. When the migrated data is
accessed through the client file system, it it transparently recalled back onto
the local disk. The migration and management of files is controlled by policy
defined to the IBM Tivoli Storage Manager server. End users can also
explicitly migrate and recall data. HSM client functions is fully integrated with
IBM Tivoli Storage Manager operational backup and client functions.
Application Programming Interface client
The Application Programming Interface (API) client allows you to create
custom IBM Tivoli Storage Manager implementations. The API client can be
used to integrate business applications, such as databases or groupware, into
a IBM Tivoli Storage Manager environment.
Chapter 1. Introduction 5
6148ch-1-intro.fm Draft Document for Review April 30, 2008 1:21 pm
Implement high efficiency backup and restore processess for your critical
business applications with little impact on production performance.IBM Tivoli
Storage Manager for Copy Services provides:
Enhanced backup and recovery features that are integrated with existing
Microsoft SQL Server backup and restore capabilities
Delivers fast backup with minimal impact on your prodution SQL Server with a
variety of snapshot providers
Provides near instant restoration of SQL Server databases from a shadow
copy image to the production volumes
Features policy-based management of multiple local backup versions so that
recovery for multiple versions is easy
Improves availability and performance of production database servers with
offloaded moviment
Integrates snapshot capabilities with IBM Tivoli Storage Manager and its data
protection component for Microsoft SQL Server
The only operating supported is Windows
There are two installable modules included in the package IBM Tivoli Storage
Manager for Copy Services. Once installed, these modules enable certain menu
options in the Data Protection for SQL GUI which are otherwise unavailable.
These modules, Microsoft SQL VSS Integration Module and Hardware Devices
Snapshot™ Integration Module.
Data Protection for SQL Server helps protect and manage SQL Server data by
making it easy to:
Back up any SQL database to any Tivoli Storage Manager Server.
Perform full and transaction log backups and restores of SQL databases.
Perform backups with an expanded range of options such as differential, file,
and group operations.
Perform operations from multiple SQL Server instances on the same machine
as Data Protection for SQL. You can access only one SQL Server per
execution of Data Protection for SQL Server from either the command line or
GUI.
Automated scheduled backups.
Perform expanded restore operations on backup objects such as relocating,
restoring to named marks, and partially restoring full backups.
Restore database backups to a different SQL Server. Data Protection for SQL
Server can restore database backups that were performed on either 32-bit or
64-bit versions of SQL Server. Refer to Microsoft documentation on what
combinations are supported by Microsoft.
Retain with a backup the information needed to recreate or move SQL
databases or files, such as sort order, code page, and Unicode information, or
file group and file logical and physical names. The meta object information is
retained on the IBM Tivoli Storage Manager separately from the backup data
objects.
Inactivate all active Legacy objects, all objects of a particular backup type, or
specific objects.
Inactivate Legacy backup objects older than a specified number of days.
Set automatic expiration of backup objects based on version limit and
retention period.
Query any local SQL Server or any connected Tivoli Storage Manager Server
for database, status, and configuration information.
Chapter 1. Introduction 7
6148ch-1-intro.fm Draft Document for Review April 30, 2008 1:21 pm
Monitor results through the Data Protection for SQL Server activity log and
automatically prune the activity log.
Set Tivoli Storage Manager connection information options to IBM Tivoli
Storage Manager Servers.
Set IBM Tivoli Storage Manager security and performance options.
Participate in MSCS and fail-over clusters and VCS failover clusters.
Set Tivoli Storage Manager security and performance options.
Apply fail-over clustering (for maintenance or restoring the master database)
without unclustering.
Apply fail-over clustering (for maintenance or restoring the master database)
without unclustering.
Globalization support.
Data Protection for SQL operations use the IBM Tivoli Storage Manager API to
communicate with the IBM Tivoli Storage Manager server, and use the SQL
Server API to communicate with the SQL Server.
When IBM Tivoli Storage Manager for Copy Services is installed together with
Data Protection for SQL, you can also perfom online snapshot backups to local
shadow volumes, using VSS. These snapshot backups can be retained on the
local shadow volumes, and also backed up to IBM Tivoli Storage Manager server
storage.
To reduce the overhead of backup operations on the SQL Server, you can
choose to have the backup to IBM Tivoli Storage Manager performed by another
server with access to the shadow volumes from either local snapshots volumes,
or from IBM Tivoli Storage Manager server storage.
Data Protection for SQL Server supports Microsoft SQL 2000 and 2005 on
Windows 32-bit and 64-bit environments.
Veritas Cluster Server (VCS) support
Data Protection for SQL Server supports SQL Server running in a VCS
environment. For Windows 2003, Data Protection for SQL Server uses the
Active Directory® to support fail-over clustering.
Off-loaded backup
Perform a VSS Backup to IBM Tivoli Storage Manager server using an
alternate machine instead of a production machine.
Restore VSS
Restore VSS Backups that reside on IBM Tivoli Storage Manager server
storage to their original location.
VSS fast restore
Restore VSS backups that reside on local shadow volumes using file-level
copy mechanisms.
VSS instant restore
Restore VSS backups that reside on local shadow volumes using
hardware-assisted volume-level copy mechanisms.
Server policy
IBM Tivoli Storage Manager policy-based management of VSS snapshot
backups.
1.2 Snapshots
Snapshot is a common industry term which means the ability to record the data
stored on a storage device at any given moment and preserve that snapshot as a
way to perform backup, restore, data mining or even testing.
Chapter 1. Introduction 9
6148ch-1-intro.fm Draft Document for Review April 30, 2008 1:21 pm
1.2.2 Copy-on-write
In the copy-on-write method, a snapshot of a storage volume is created using
pre-designated space for the snapshot. When the snapshot is first created, only
the metadata about where the original data is stored is copied. No physical copy
of the data is done at the time the snapshot is created. Therefore, the creation of
the snapshot is almost instantaneous.
The snapshot copy then tracks the changing blocks on the original volume as
writes to the original volume are performed. The original data that is being written
to is copied into the designated volume that is set aside for the snapshot before
original data is overwritten, hence the name copy-on-write.
Before a source block can be written to, the copy-on-write method copies the
original data block to the snapshot storage. This keeps the snapshot data
consistent with the exact time the snapshot was taken. Read requests to the
snapshot volume of unchanged data blocks are redirected to the original volume,
while read requests to data blocks that have been changed are directed to the
“copied” blocks in the snapshot. The snapshot contains the metadata that
describes the data blocks that have changed since the snapshot was first
created. Note that original data blocks are copied only once into the snapshot
storage, when the first write request is received.
IBM FlashCopy® (NOCOPY), AIX JFS2 snapshot, IBM General Parallel File
System™ snapshot, Linux Logical Volume Manager, and IBM Tivoli Storage
Manager Logical Volume Snapshot Agent (LVSA) are all based on copy-on-write.
1.2.3 Redirect-on-write
The redirect-on-write method is quite similar to copy-on-write, without the double
write penalty. With redirect-on-write, new writes to the original volume are
redirected to another location set aside for snapshot.
The advantage of redirecting the write is that only one write takes place, while
with copy-on-write, two writes occur (one to copy the original data onto the
storage space, and the other to copy the changed data). However, with
redirect-on-write, the original copy contains the point-in-time data (that is,
snapshot), and the changed data reside on the snapshot storage. When a
snapshot is deleted, the data from the snapshot storage must be reconciled back
into the original volume.
Chapter 1. Introduction 11
6148ch-1-intro.fm Draft Document for Review April 30, 2008 1:21 pm
As a result of the FlashCopy, either all physical blocks from the source volumes
are copied (full copy) or, when using the nocopy option, only those parts which
change in the source data since the FlashCopy has been established. Currently,
the target volumes needs to ve the same size or bigger that the source volume
whenever FlashCopy is used to flash a whole volume.
Typically, large applications such as databases have their data spread across
serveral volumes and their volumes should all be FlashCopied at exactly the
same point-in-time. FlashCopy offers Consistency Groups, which allows multiple
volumes to be FlashCopied at exactly the same instance.
Incremental FlashCopy tracks changes made to the source and target volumes
when the FlashCopy relationships are established. This provides the capability to
refresh a logical unit (LUN) or volume to the source or target's point-in-time
content using only the changed data. The refresh can occur in either direction,
and it offers improved flexibility and faster FlashCopy completion times.
This incremental FlashCopy option can be used to efficiently create frequent and
faster backups and restore without the penalty of having to copy entire content of
the volume. This is shown in Figure 1-3 on page 13.
Source Target
FlashCopy command issued
Several features in Windows Server 2003 already use the Volume Shadow Copy
Service, such as Shadow Copies for Shared Folders and Backup.
Chapter 1. Introduction 13
6148ch-1-intro.fm Draft Document for Review April 30, 2008 1:21 pm
The full copy is usually achieved using a hardware provider (see “Provider” on
page 16).
Multivolume backup
A shadow copy set is a collection of shadow copies. VSS supports these sets
across multiple types of disk volumes from different vendors. All shadow copies
in a shadow copy set will be created with the same time stamp and will present
the same disk state.
Requestor
Volume Shadow
Writers
Copy Service
Apps
I/O
System Software Hardware
Provider Provider Provider
Chapter 1. Introduction 15
6148ch-1-intro.fm Draft Document for Review April 30, 2008 1:21 pm
Requestor
The requestor is a management application that invokes VSS in order to create
and manage shadow copy sets of one or more volumes. This role is typically
used to implement other functionalities like backup, restore, and disk mirroring
operations.
Writer
The writer is an application or Windows Service that manages its I/O operations
with VSS shadow copy and shadow copy-related operations, ensuring the data
contained on the shadow copied volume is in a consistent state.
Provider
The VSS provider is a component that creates and maintains the shadow copies.
A VSS provider is provided either by a storage vendor for their particular storage
systems (hardware provider) or by a software vendor (software provider). A
special case of a software provider is the Microsoft Windows System Provider,
which is implemented in Windows 2003. This is known as the system software
provider.
A software provider, including the Windows native system software provider, can
be used with storage systems that do not have their own hardware provider.
If you have a hardware provider available for your disk system, we recommend
that you use this, since the work of actually making the snapshot is performed by
the disk system itself. A software provider (including the system software
provider), by comparison, must do all the work in software on the actual SQL
server. If you are using the Windows system software provider, this uses
copy-on-write. Therefore, there is significant performance overhead to using a
software provider.
However, you should balance this against the ease of setup - using a hardware
provider requires more initial configuration than a software provider. We provide
additional guidance for selecting which provider to use in “VSS provider” on page
12.
The Volume Shadow Copy Service selects the provider using the following order:
Hardware provider
Software provider
System software provider
That is, VSS looks first for a hardware provider that supports the disk system and
uses it. If no hardware provider is found, a software provider will be used, if
available. If there is no other provider, then the Microsoft system software
provider will be used.
Source volume
A source volume is a disk volume containing data to be shadow copied.
Chapter 1. Introduction 17
6148ch-1-intro.fm Draft Document for Review April 30, 2008 1:21 pm
1
4 2
Volume Copy Shadow
Requestor 5 Service 7 Writers
8 8
Apps
6
3 I/O
Software Hardware
Provider Provider
6 6
8. The VSS queries the writers to confirm that write I/Os were successfully
suspended while the shadow copy was created. If the writes were not
successfully suspended (meaning that the shadow copy data is potentially
inconsistent), the shadow copy is deleted and the requestor is notified. The
requestor can retry the process (go back to step 1) or notify the administrator
to retry at a later time. If the copy is successful, the VSS gives the location
information for the shadow copy back to the requestor.
VDS is a set of APIs that provides a single interface for multivendor storage
management. Each hardware vendor develops its own VDS hardware provider in
order to translate the general purpose VDS APIs into their specific hardware
instructions.
VDS is part of Microsoft’s Storage Services - the other two components are
Remote Storage and Removable Storage.
Chapter 1. Introduction 19
6148ch-1-intro.fm Draft Document for Review April 30, 2008 1:21 pm
The built-in VDS software providers that manage disks and volumes at the
operating system level.
Hardware providers supplied by the hardware vendor that manage their
specific hardware.
The Virtual Disk Service is used for managing LUNs on hardware storage
devices; managing disks and volumes; and managing end-to-end storage
operations
Storage
Command MMC / Disk Backoffice Management
line utilities Management applications Applications
Software
providers: Hardware
Basic
Basic disks
disks providers
Dynamic
Dynamic disks
disks
Tivoli Storage Manager for Copy Services integrates with VSS and any
supported disk storage system in order to easily exploit the snapshot on the
hardware side and manage the LUN allocation.
Data Protection for SQL, with the understanding that VSS backup requires the
additional module Tivoli Storage Manager for Copy Services.
The VSS Service manages and directs three VSS software applications that are
used during VSS operations.
VSS Writer
The VSS Writer is the Microsoft SQL Server. It is installed with the SQL
Server 2005 software and requires no configuration.
VSS Requestor
The VSS Requestor is the IBM Tivoli Storage Manager backup-archive client.
The requestor communicates with the VSS to access the SQL Server data.
Data Protection for SQL servers as the front end for VSS backup; that is, is
the user interface for initiating backup and restore operations; however it
communicates with the backup-archive client as VSS requestor to actually
perform the backup and restore
VSS Provider
The VSS provider manages the volumes where the SQL data resides and
performs the actual snapshot copy. You can use either VSS software provider
(including the Windows system provider), or a hardware provider with Data
Protection for SQL. You will need to configure the provider according to the
vendor’s specific instructions.
Configuration requirements are based upon the type of VSS provider used.
Some VSS providers are more complex to set up initially, but subsequently
provide more powerfull funcionality and can also decrease the overhead on
the SQL Server.
Follow some guidelines to choose which VSS provider meets the needs for
SQL Server backup:
– If you are using the standard Windows System provider, very little initial
configuration is required. This is the quickest and simplest way to set up
Data Protection for SQL for VSS backups. However, the copy-on-write
snapshots are then maintained within the production SQL Server, which
will impose an additional overhead.
– If you are using a VSS software provider, consult the documentation
provided with your VSS software provider.
– If your SQL databases are configured on a disk storage subsystem and
you plan to perfom off-loaded backups or full-copy snapshot backups, you
must install a VSS hardware provider.
– VSS Instant Restores are only supported by IBM System Storage™ SAN
Volume Controller, DS6000™, and DS8000™ storage subsystems, in
association with the VSS hardware provider. Therefore, you must install
Chapter 1. Introduction 21
6148ch-1-intro.fm Draft Document for Review April 30, 2008 1:21 pm
and configure IBM TotalStorage Support for Microsoft Virtual Disk and
Volume Shadow Copy Services as your VSS hardware provider in order to
perform VSS Instant Restores.
Data Protection for SQL Server has both a GUI and command line interface
available.
Legacy backup
A legacy backup is a specialized API backup that functions with the SQL Server
storage engine, as show in Figure 1-7. This is the type of backup provided by
previous releases of Data Protection for SQL.
Tivoli
Data Storage
SQL API SQL API TSM
Protection Manager
Server
for SQL Server
A legacy backup creates a copy of all or part of an SQL database onto Tivoli
Storage Manager storage media. Data Protection for SQL Server provides
selection mechanisms and the logic that are required to backup and restore SQL
data.
When you initiate a legacy backup operation, Data Protection for SQL executes
the following steps:
1. Starts a session with the server using the API IBM Tivoli Storage Managerand
information contained in a client options file.
2. Starts a sessions with the SQL Server using internal Microsoft interface,
known as SQL-DMO (Distributed Management Objects).
3. Instructs the SQL Server using the Microsoft SQL-VDI (Virtual Device
Interface) to begin a backup of the selected database objects.
4. Receives data from the SQL Server and sends it to the Tivoli Storage
Manager server.
5. Ends the TSM Server and SQL Server sessions.
Note: When a backup is performed, Data Protection for SQL Server records
information about the SQL Server and database. This information is available
for query and restore operations. The information about the names and sizes
of the database file groups and files is stored along with the database data, as
sub-object. This sub-object is referred to as meta data. You will need ths
sub-object when you need information about individual database file groups
and files.
Chapter 1. Introduction 23
6148ch-1-intro.fm Draft Document for Review April 30, 2008 1:21 pm
VSS backup
A VSS backup uses Microsoft Volume Shadow Copy Service technology to
produce an online snapshot (point-in-time consistent copy) of SQL data that can
be stored on local shadow volumes or on Tivoli Storage Manager server storage.
A VSS backup means the SQL server is not in “backup mode” for an extended
period of time because the length of time to perform the snapshot is usually
measured in seconds and not hours. In addition, a VSS backup allows a
snapshot of large amounts of data at the same time since the snapshot works at
the volume level. VSS backups requires IBM Tivoli Storage Manager for Copy
Services to be installed, in addition to Data Protection for SQL and the IBM Tivoli
Storage Manager backup/archive client. You can optionally have an alternate
machine to move the data to the IBM Tivoli Storage Manager server, an
off-loaded backup.
Tivoli
Tivoli Storage
Storage
Manager
Manager BABA client
client
Data
Data Protection
Protection for
for (remote)
(remote)
SQL
SQL
Snapshot
Snapshot
(Target
(Target
volumes)
volumes)
Tivoli
Tivoli Storage Manager
Manager
for
for Copy Services
Services
Local
Tivoli
Tivoli Storage
Storage Manager
Manager
DSMAgent
BA
BA client
client (local)
(local)
Tivoli Storage
Manager Server
Optionally, VSS backups can be stored locally on VSS shadow volumes that are
directly accessible by the SQL system, as long as sufficient space is available for
the snapshot. Local VSS shadow backups are fast because data is not
transferred to Tivoli Storage Manager server storage. Restoring these backups is
also fast because the SQL data is not transferred from Tivoli Storage Manager
server storage over the network.
back up and manage the VSS snapshot on an external storage manager (for
example, IBM Tivoli Storage Manager). When this function is selected, then after
the snapshot is made, IBM Tivoli Storage Manager is automatically invoked to
store the snapshot. In this way, we can establish two uses for VSS backup: as a
backup in itself, so that multiple shadow copy generations can potencially be kept
online for rapid restore (backup to local), and as means for extra backups to an
external media (backup to IBM Tivoli Storage Manager), so that the database
can be restored even if the disk system containing the original database and the
shadow copies fails. When a Data Protection for SQL backup is started, you must
specify the backup destination: to local, IBM Tivoli Storage Manager, or both.
Note: VSS Backups are only available on SQL Server 2005 on Windows
Server 2003.
Chapter 1. Introduction 25
6148ch-1-intro.fm Draft Document for Review April 30, 2008 1:21 pm
A full database backup backs up an entire SQL Server database and the
portion of the transaction log necessary to provide a consistent database
state. With both full and differential backups, the copy includes enough
information from any associated transaction logs to make a backup consistent
with itself. The portion of the log included contains only the transactions that
occured from the beginning of the backup until its completion. This backup
type are supported by legacy and VSS backup method.
Note: You do not have to do an actual full backup to constitute the equivalent
of a full backup. Backing up all the groups or files in a database as well as its
log is recognized as a full backup by the SQL Server. A base backup may be
full, group, file or set backup
Differential backup
A differential backup backs up only the data pages in a SQL Server database
changed since the last full backup, as well as a portion of the transaction log.
This is equivalent to an incremental backup on the Tivoli Storage Manager
Backup-Archive Client. This backup type are supported by legacy VSS
backup method only.
Log backup
A log backup backs up only the contents of an SQL Server database
transaction log since the last successful log backup. Before doing the first log
backup, you must have done a full backup or its equivalent first. Log backups
normally follow full backups. The portion of the log included in full and
differential backups is not equivalent to a log backup. Additionally, in full and
differential backups, the log is not truncated as it is during a log backup.
However, a log backup following a full or differential backup will include the
same transactions as a full or differential. Log backups are not cumulative -
they must be applied in turn against a base backup and in the correct order.
This backup type are supported by legacy VSS backup method only.
Tail-log backup
A tail-log backup is a transaction log backup that includes the portion of the
log that has not previously been backed up. The tail-log backup is commonly
used when the database is damaged, or becomes inaccessible, but the
transaction log file is undamaged. This backup type is supported by Data
Protection for SQL Server.
File backup
A file backup backs up only the contents of a specified SQL Server logical file.
This can ease the scheduling for backing up very large databases by allowing
you to back up different sets of files during different scheduled backups. File,
group, and set backups must be followed by a log backup, but a full is not
required. This backup type are supported by legacy VSS backup method only.
Group backup
A group backup backs up only the contents of a specified SQL Server file
group. This allows you to back up just the set of database tables and indexes
within a specific group of files. This backup type are supported by legacy VSS
backup method only.
Set backup
A set backup backs up the contents of specified SQL Server file groups and
files as a unit. This backup type are supported by legacy VSS backup method
only.
Copy-only backup
Sometimes it is necessary to back up a SQL Server database without
affecting the sequence of conventional SQL Server backups, for example, to
transfer a database from production to development environments. To
address this scenario, SQL 2005 introduces the copy-only backup. A
copy-only backup is a backup that does not affect the overall backup and
recovery routines for the database. There are two types of copy-only backups:
– Copy-only full backups - available in all recovery models
– Copy-only log backups - available in full recovery and bulk-logged models
A copy-only full backup cannot be used as a base or differential backup, and
does not affect differential backups. A copy-only log backup does not change
the transaction log sequence, consequently it does not affect the database
transaction log chain. A copy-only backup never truncates the transaction log.
This backup type is not supported by Data Protection for SQL Server. If you
plan to use this feature, you must use SQL Server tools to perform the
backup.
Offline backup
In some situations you may want to perform an offline copy of your SQL
Server database files. To do this, you can stop the SQL Server instance, and,
using operating system tools or backup tools, such as the Tivoli Storage
Manager Backup-Archive Client for Windows, copy all the related files to the
SQL Server database, and then re-start the SQL Server instance.
This type of backup is beyond the scope of this book. For more information,
see the SQL Server documentation.
Chapter 1. Introduction 27
6148ch-1-intro.fm Draft Document for Review April 30, 2008 1:21 pm
Legacy restore
A Data Protection for SQL Server legacy restore obtains backup copies of all or
part of one or more SQL databases and returns them to the SQL Server.
VSS restore
A VSS restore restores VSS backups (SQL database files and log files) that
reside on Tivoli Storage Manager server storage to their original location.
The key component of completing a VSS instant restore is the speed with which
the application can become operational with the data that resides on local
shadow volumes. Be aware that even though the data is restored relatively
quickly, the transaction logs must still be replayed after the restore and therefore,
the time of recovery for the application can increase.
A VSS instant restore requires that all of the source data resides on a supported
storage subsystem supported by the VSS instant restore. If part of the data being
restored (including the log files) resides on a local disk, a VSS instant restore of
this data is not possible. In this situation, a VSS fast restore is performed. At the
time of writing, IBM System Storage SAN Volume Controller, DS8000, and
DS6000 support VSS instant restore.
Chapter 1. Introduction 29
6148ch-1-intro.fm Draft Document for Review April 30, 2008 1:21 pm
A file restore restores just the file backup objects needed from a full backup,
file group backup, a file backup, or a set for specified SQL databases.
Group restore
A group restore restore just the group backup objects needed from a full
backup, file group, a file backup, or a set backup for specified SQL databases.
Set restore
A set restore Data Protection for SQL Server restores only set backup objects
for specified SQL databases.
Further Data Protection for SQL Server restore functions include the following:
Restore a backup using the same number of data stripes used to create the
backup, or fewer stripes for SQL Server 2000 and 2005.
Restore with no recovery until the last restore with recovery.
Restore from any available backup version created by Data Protection for
SQL Server V5.5.0, V5.2.1, V5.1.5, or V2.2.
Replace an existing database with the restored database (or replace by
relocating the restored database).
Restore to a different SQL Server or to a standby SQL Server.
Automatically restore all backup objects needed to make a restore complete
by using smart selection in the GUI.
Windows 2003 x86a Any VSS provider that is Microsoft SQL VSS
Windows 2003 x64b SQL Server 2005c supported by Microsoft Integration Module
rules for VSS providers Version 5.5.0
a. Windows Server 2003 x86: Standard, Enterprise, or DataCenter Edition. All versions must be at
Service Pack 1 (or later). Windows Server 2003 R2: Standard, Enterprise, or DataCenter Edition
b. The Microsoft SQL VSS Integration Module is dependent upon the base Data Protection for SQL
product and must be installed to perform any VSS operations
c. SQL Server 2005 Standard or Enterprise Edition
Table 2-3 Minimum software and operating system requirements for VSS Off-loaded Backup
Operating system SQL Server VSS Provider TSM for Copy Services
Windows 2003 x86a SQL Server 2005c Any VSS provider that Microsoft SQL VSS
Windows 2003 x64b supports transportable Integration Module Version
shadow copies d 5.5.0 e
a. Windows Server 2003 x86: Standard, Enterprise, or DataCenter Edition. All versions must be at
Service Pack 1 (or later). Windows Server 2003 R2: Standard, Enterprise, or DataCenter Edition
b. Windows Server 2003 x64 Standard, Enterprise, or DataCenter x64 Edition. Windows Server 2003
x64 R2: Standard, Enterprise, or DataCenter x64 Edition.
c. SQL Server 2005 Standard or Enterprise Edition
d. The VSS hardware provider must be installed on both machines that are involved in an Off-loaded
backup
e. The Microsoft SQL VSS Integration Module is dependent upon the base Data Protection for SQL
product and must be installed to perform any VSS operations.
Table 2-4 Minimum software and operating system requirements for VSS Instant Restore operations
Operating system SQL Server VSS Provider TSM for Copy Services
Note: Data Protection for SQL VSS operations are available on any hardware
that supports Microsoft VSS requirements. Refer to your VSS provider
documentation for required levels. The following list identifies some hardware
storage subsystems that were tested with Data Protection for SQL VSS
operations:
IBM TotalStorage DS6000 and a machine with a processor supported by
DS6000 with IBM Common Interface Model (CIM) Agent for DS Open API.
IBM TotalStorage DS8000 and a machine with a processor supported by
DS8000 with IBM Common Interface Model (CIM) Agent for DS Open API.
IBM TotalStorage N3700 with Network Appliance™ (NetApp) SnapDrive
Version 3.2 (or later).
NetApp fabric-attached storage (NAS) system with NetApp SnapDrive
Version 3.2 (or later).
IBM TotalStorage SAN Volume Controller Version 2.1.x (or later) or Version
3.1.x.
Contact your hardware storage subsystem vendor for exact details of their
support of VSS operations.
Table 2-5 Hardware requirements for Legacy or VSS Backup and Restore operations
Architecture Hardware description Disk Space RAM
Table 2-6 Minimum hardware requirements for VSS off-loaded backup operations
Architecture Hardware description Disk Space RAM
Table 2-7 Minimum hardware requirements for VSS Instant Restore operations
Architecture Hardware description Disk Space RAM
32-bit or x64 One of the following: See disk storage See disk storage
IBM TotalStorage DS6000 disk subsystem subsystem
storage subsystem3 a documentation documentation
IBM TotalStorage DS8000 disk
storage subsystem3 a
IBM TotalStorage SAN Volume
Controller Version 2.1.x (or later)
IBM TotalStorage SAN Volume
Controller Version 3.1.x
a. IBM TotalStorage DS6000 and DS8000 disk storage subsystems require IBM TotalStorage VSS
Hardware Provider Version 2.4.2 (or later).
http://www-03.ibm.com/servers/storage
A Tivoli Storage Manager backup operation stores the backed up data on Tivoli
Storage Manager server storage. Although this type of backup typically takes
Sufficient local storage space must be available on local shadow volumes for a
VSS backup strategy to be successful. Make sure there is enough available
storage space assigned to the volumes to accommodate your Data Protection for
SQL backup operations. Environment and storage resources also impact how
many backup versions are maintained on local shadow volumes (for VSS Fast
Restore and VSS Instant Restore) and how many backup versions are
maintained on Tivoli Storage Manager server (VSS Restore and longer term
storage). It is recommended that different sets of policies be created for backups
to both local shadow volumes and to Tivoli Storage Manager server storage. If
you are using a VSS provider other than the Windows VSS System Provider,
make sure to review the documentation for that specific VSS provider.
When performing a Data Protection for SQL VSS backup (non-offloaded) with
backup destination as Tivoli Storage Manager Server, and the SQL Server data
resides on SAN Volume Controller (SVC) disks, and the IBM System Storage
VSS Hardware Provider is being used, in some isolated cases the SVC LUNs
remain mapped to the Windows host even though the VSS backup is complete.
To work around this issue, you can use a backup destination other than TSM
(BOTH or LOCAL). You can also manually unmap the volumes attached to the
Windows host to work around this issue.
When performing two Data Protection for SQL VSS backups, back to back, and
the SQL Server data resides on SAN Volume Controller (SVC) disks, if the
volumes are large and/or the SVC background copy rate is set a low number, it
may appear that the second VSS backup is hanging. In fact, it is waiting for the
SVC background copy of the first backup to complete before proceeding with the
second backup. SVC will not allow two background copies of the same volume to
occur at the same time. There is no indication that the second backup is waiting
for the first SVC background copy to complete. You may also see timeouts errors
if the previous SVC background copy takes too long. To work around this issue,
schedule your VSS backups far enough apart to accommodate this situation. You
can also try increasing the copyrate of the SVC background copy.
volumes. When the limitations in the SnapDrive are addressed by NetApp, Data
Protection for SQL VSS operations can be fully utilized.
SQL Server
N-series VSSstorage configuration for NetApp NAS series or IBM
operations
If you plan to perform VSS backups with backup destination set to LOCAL,
please check your setup to ensure that following requirements are met.
The NAS filers LUNs used by a database must be fully dedicated to the
database. The Microsoft SQL Server databases can not share LUNs.
A NAS filer LUN used by the SQL databases must be the only LUN on the
filer volume. For example, if SQL uses four LUNs, there must be four
corresponding filer volumes, each volume containing one LUN.
Guidelines
N-series for VSS Backup operations for NetApp NAS series or IBM
If you plan to perform VSS backups with backup destination set to LOCAL, these
backups must adhere to the following guidelines.
VSS backups with backup destination set to Local must be bound to a
management class that has verExists=1.
VSS backups with backup destination set to Local can either be of type full or
copy. You can not mix local backups of type full and copy.
VSS backups with backup destination set to TSM can be full or copy. There
are no restrictions on Tivoli Storage Manager backups.
When performing VSS backups, you must ensure that previous backup has
finished completely before starting a new backup. Any overlap of backups can
result in undesirable side-effects on the Microsoft SQL Server, the VSS
service, and, the NAS filer.
Sample
N-seriesVSS Backup procedure for NetApp FAS series or IBM
Taking above considerations into account, the following section describes a
sample backup procedure that could be used to perform VSS backups utilizing
both Tivoli Storage Manager and LOCAL backup destinations in an optimal
manner. Note that the following assumptions apply to this sample backup
procedure:
The configuration requirements stated above are met.
The VSS backup to Tivoli Storage Manager takes one hour to complete.
The VSS backup to LOCAL takes five minutes to complete.
Daily VSS full backups to Tivoli Storage Manager storage by one of the
following two methods:
– Specify backupdestination set to BOTH at 12am. Note that this will create
a 12am backup to local. Therefore, no separate 12am backup to local is
required.
– Full offloaded-backup at 1am. Note that no VSS local backup will be
available to restore from between 1am and 4am when next VSS backup to
local will take place.
Perform weekly VSS-copy backups to Tivoli Storage Manager (offloaded
backup) 5am
Perform weekly legacy full backups (or as needed).
In this section we discuss technical aspects and considerations for SQL Server
backup. For a Tivoli Storage Manager administrator working with SQL Server
databases, it is crucial to understand what backup options SQL Server offers, the
requirements for each one, and how to implement these to satisfy the business
requirements for each environment.
database backup will suffice, and, for the second database, a comprehensive
strategy should be designed to achieve the recovery requirements.
The answers to these questions will help to determine the backup strategy.
Non-critical databases may have simple backups that can restore the database
to the night before, or might not even be backed up, if they can be easily
recreated from other sources. Critical databases will have more complex
backups in order to facilitate restore to a desired point in time, and minimize the
restore period.
In the next sections we discuss backup strategies and the options provided by
SQL Server and Data Protection for SQL Server to backup a database.
Note: A further discussion about SQL Server database recovery models can
be found in Appendix B, “Microsoft SQL Server overview for Tivoli Storage
Manager administrators” on page 251.
If the database is lost or damaged, you will either restore the database from a
previous backup and lose all updates since the backup, or recreate the database
from a different source.
Note: By default, the system databases master, msdb and tempdb use simple
recovery model. You cannot change the recovery model for the tempdb
database. For the master database, for backward compatibility with earlier
versions of SQL Server, you can change the recovery model to full or
bulk-logged; however, you cannot backup the transaction log for the master
database, so this change will have no pratical results.
If your database is lost or damaged, you will restore the database from a
previous backup and then apply all transaction log backups generated since then
up to the point of failure.
For databases using full recovery model or bulk-logged recovery model, you can
start backing up the database transaction log immediately after the first full
database backup. Then, regularly perform transaction log backups to not only
enable truncation of the transaction log files but also to minimize work-loss
exposure. The more frequently you back up the transaction log files, the smaller
will be your exposure to work-loss failures and your transaction log files.
Note: Certain commands in SQL Server, such as the BACKUP LOG with the
TRUNCATE_ONLY option, truncate the log and break the log chain sequence,
causing the database to stay vulnerable to media failure until the next
execution of a full or differential database backup. It is strongly recommended
to only use these commands if you fully understand the resulting impacts.
The more simple backup strategy you use, the more simple is your restore
process. At the same time, the more simple backup strategy results in more
limitations, considering both storage utilization and the restore operation.
The more complex backup strategy you use, the more work must be done when
setting up the scheduled backups. At the same time, the more complex backup
strategy gives you more options, considering both storage utilization and the
restore operation.
Some commonly used strategies are discussed in next sections, as well the
restore steps for each of them. Pratical examples of backup and restore routines
can be found in Chapter 4, “Data Protection for SQL Server backup” on page 121
and Chapter 5, “Data Protection for SQL Server restore” on page 171
respectively.
The restore process is most efficient because only the most recent full backup
needs to be restored.
The restore operation involves restore the most recent full backup and the
transaction logs since them.
Sunday Monday
Note: You can do a point-in-time restore to a specific date and time using
transaction log backups.
The restore operation involves restore the most recent full backup and the last
differential backup after the full backup.
The difference between this strategy and the full plus differential backup is the
transaction log files backup. For a database using simple recovery model the
previous strategy is suitable, however, for production databases using full or
bulk-logged recovery models this strategy is the recommended option.
Figure 2-4 on page 47 illustrates a full plus differential plus log backup strategy.
Monday Tuesday
File 1 File 2
• Complex to manage
Table 2-8 Backup strategy characteristics using VSS and legacy backups together
Strategy characteristics Legacy backup only Legacy backup plus VSS
backup
Available backup types Full (1 per week) Legacy Full (1 per week)
Incr (4 per day) VSS Full (1 per day)
Table 2-9 Supported backup strategies for each database recovery model
Backup Strategy Simple recovery Bulk-logged Full recovery
model recovery model model
Note: When you implement a full backup only or a full plus differential backup
strategies and the database is using either full or bulk-logged database
recovery models, the transaction log may grown indefinitely, eventually filling
up all available disk space and hanging SQL Server.
If you plan to use these backup strategies without using transaction log
backups, we recommend you to configure the database recovery model to
simple.
We recommend that you do backups of the system databases daily, since they
are unlikely to become large enough to consume a significant ammount of
resources during the backup operation. The same recommendation applies to
the distribution database in replicate SQL Server environments.
You cannot back up the tempdb database. It is re-created each time the SQL
Server is started.
We recommend you to use the option to backup storage pool in IBM Tivoli
Storage Manager. The storage pool can be a group of disk volumes, tape
volumes, or optical volumes. You have two types of storage pool in IBM Tivoli
Storage Manager server, primary storage pool and copy storage pool. The
primary storage pool is used to storage backed information of your SQL Server
environment, and copy storage pool is a copy of your primary storage pool to
improve data availability. You can simultaneously write data to a primary storage
pool and one or more copy storage pools. You can use this feature in IBM Tivoli
Storage Manager, instead of SQL Server mirrored backup media sets.
For more information about Tivoli Storage Manager copy storage pools, refer to
the appropriate Tivoli Storage Manager Administrator Guide for the platform that
you are using.
The master and msdb system databases in all SQL Server instances. To
reduce replication inconsistency risks, it is recommended to back up these
databases at same time as the relevant replication database in the
appropriate node - the publication, the distribution or the subscription.
For each type, the backup and restore strategies differ. Data Protection for SQL
Server can be used to protect a replicated SQL Server environment.
A full discussion about the requirements for each replication strategy type is
beyound the scope of this book. For further documentation, refer to the SQL
Server documentation, or se:
http://technet.microsoft.com/en-us/library/ms151152.aspx
This technique is called warm backup, or stand by database, because the backup
database receives continuously application of the transaction logs, reducing the
database downtime in case of problems.
When SQL Server log shipping is in place, the backup jobs are done by SQL
Server backup jobs. It also requires that transaction log files backups are
performed only to disk devices, not allowing tape devices utilization.
If you need the log shipping (or stand by databases) capabilities in your
environment, we recommend you to use Tivoli Storage Manager tools instead of
log shipping. You can achieve log shipping functionality simply utilizing Tivoli
Storage Manager Scheduler to periodically restores transaction log backups on
the secondary databases.
If you prefer to use log shipping tools, you can use Tivoli Storage Manager tools
to protect the database in the following way:
Disable automatic transaction log backup files exclusion log shipping task.
Use Tivoli Storage Manager backup-archive tools to back up the transaction
log backup files on the primary database. You can exclude the transaction log
backup files from disk after ensure they are already applied to all secondary
databases, and also backed up by Tivoli Storage Manager.
Perform full or diferential database backups using Data Protection for SQL
Server or SQL Server tools. If you use SQL Server tools, also back up the
generated files using Tivoli Storage Manager backup-archive tools.
These backups can be generated from the primary or secondary databases,
but keep in mind that if the backups are generated from the secondary
database you can not include all recent changes in the primary database due
to out-of-sync delays between primary and secondary databases.
Never use Data Protection transaction log backups against a database
involved in the log shipping.
In a restore operation, you will need to restore the last full or diferential backup,
and then manually apply the transaction log files backed up by Tivoli Storage
Manager backup-archive tool.
nodes at same time before it returns to the client, while in asynchronous mode
the mirror server can do a delayed commit.
The mirror database is created by restoring backups from the principal database
on the mirror server. However, after a database mirroring section is active, you
have the following restrictions:
Backup and restore operations on the mirror database are not allowed
Restore of the principal database is not allowed while mirroring is active.
Backup of the principal database is allowed since you do not use
NORECOVERY option on the transaction log backups.
You can use Data Protection for SQL Server to create the mirror database, and
also to back up the principal database as any other user database.
You can still backing up the source database. However, you cannot restore the
source database; in order to restore the source database, you must drop the
database snapshots associated to the source database. You cannot also back up
or restore database snapshots.
Data Protection for SQL can be used to back up the source database snapshot.
Here we discuss these components, and how can you use Tivoli Storage
Management to protect them.
Analysis Services
While sharing the same nomenclature, SQL Server databases and Analysis
Services databases have completely different usages and attributes. An SQL
Server database is used mainly to store relational data, and it is managed by the
SQL Server Database Engine. The Analysis Services database is used to store
OLAP metadata, such as cubes and dimensions, and not the transactional data
itself. Analysis Services databases are stored in operating system files, and are
accessed by the Analysis Services application.
To backup the Analysis Services database, you must use SQL Server tools, such
as SQL Server Management Studio. When you perform a backup operation, it
will check all required files that need to be backed up, and then will generate
package of these files into a single file.
Note: In SQL Server 2000, it was necessary to backup the Analysis Services
data directly from the operating system files - also known as a raw backup. In
SQL Server 2005, although possible, this is not recommended by Microsoft.
You can automate Analysis Services backup execution using scripts, and then
use the Tivoli Storage Manager backup-archive client for Windows to back up the
packaged file to the Tivoli Storage Manager server. By doing this, you can
maintain multiple versions of Analysis Services backups. Data Protection for SQL
Server does not back up Analysis Services databases.
Analysis Services backup and restore are beyond the scope of this book. For
more information about Analysis Services backup and restore strategies, see:
http://www.microsoft.com/technet/prodtechnol/sql/2005/bkupssas.mspx
Reporting Services
There are a number of components to Reporting Services which require backup:
Reporting Services Databases
Reporting Services stores its application data in two SQL Server databases:
reportserver, which uses full recovery model, and reportservertempdb, which
uses simple recovery model. Data Protection for SQL Server can back up
these databases, similar to any other SQL Server user database.
Encryption keys
To backup and restore Reporting Services encryption keys you must use SQL
Server tools. After you generate a backup file for the encryption key, you can
use the Tivoli Storage Manager backup-archive client for Windows to back up
this file.
Reporting Services Web sites
Reporting Services uses Internet Information Services (IIS) as the Web
server for its pages. You can use IIS backup tools to back up the Reporting
Services Web sites.
Configuration Files and Data Files
Reporting Services creates several configuration files to store application
settings. Reporting Services also creates several operating system files to
store its components, such as report definition files, report model files, shared
data source files, for example. You can use the Tivoli Storage Manager
backup-archive client for Windows to back up these files.
Reporting Services backup and restore are beyond the scope of this book. For
more information about Reporting Services backup and restore, see:
http://technet.microsoft.com/en-us/library/ms155814.aspx
Integration Services
SQL Server 2005 Integration Services (SSIS) packages are commonly stored in
the msdb database; however, they can also be stored in operating system files. A
regular backup of the msdb database will protect your packages stored in the
database, while you can use the Tivoli Storage Manager backup-archive client for
Windows to back up the packages stored outside the database.
Notification Services
Notification Services stores its data and configuration in databases and operating
system files. You can back up the notification services databases similar to any
other regular user database using Data Protection for SQL Server. To back up
the operating system files, you can use the Tivoli Storage Manager
backup-archive client for Windows.
Notification Services backup and restore are beyond the scope of this book. For
more information about Notification Services backup and restore, see:
http://technet.microsoft.com/en-us/library/ms166456.aspx
The Tivoli Storage Manager server recognizes Data Protection for SQL as a
node. Data that is backed up to Tivoli Storage Manager storage from this Data
Protection for SQL node is stored and managed according to settings specified
for Tivoli Storage Manager server policy items. Tivoli Storage Manager policy can
manage the VSS Backups that are placed on local shadow volumes as well as in
Tivoli Storage Manager server storage pools. The Tivoli Storage Manager server
is responsible for managing VSS Backups, whether the backup is stored on local
shadow volumes or on the Tivoli Storage Manager server. Be aware that while a
VSS snapshot (created for back up to Tivoli Storage Manager server storage) is
deleted after the backup completes, a VSS snapshot (created for back up to local
shadow volumes) remains active until the backup version is expired according to
the policy settings for VSS Backups on local shadow volumes.
Make sure the following policy items are defined with the recommended settings:
Domain
Create a policy domain on the Tivoli Storage Manager server to be used
exclusively for Data Protection for SQL backups.
Policy Set
Policy sets contain management classes (which contain copy groups) that
determine the rules by which Data Protection for SQL backups are performed
and managed. Define the policy set to the policy domain to which Data
Protection for SQL backups belong. Note that the policy set must be activated
and only one policy set can be active in the policy domain.
Management Class
Define a management class for backups residing on local shadow volumes
and a management class for backups residing on Tivoli Storage Manager
server storage. Different management classes provide the opportunity for
specialized policies for each storage destination.
Be aware that since Legacy backups on IBM Tivoli Storage Manager server
storage, VSS Backups on IBM Tivoli Storage Manager server storage and
VSS Backups on local shadow volumes all have different IBM Tivoli Storage
Manager server naming and therefore, can each have their own management
class, it is possiblle to have three active backups of the same database. Make
sure your backup strategy is planned and well-defined before defining
management classes.
On legacy backup only, you need to take care about metadata considerations.
The management classes for Data Protection for SQL meta data should be
identical to the corresponding management classes for database data except
that th meta data management classes should not allow migration to
removable media. If any Data Protection for SQL meta data is on removable
media, queries may require media mounts, and backups or restores may
require additional media mounts.
Data objects and their associated meta objects should have the same version
limits and retention values. However, because meta objects may need to be
restored as a result of Data Protection for SQL query, you may want to
consider storing meta objects in a disk-only storage pool so that a media
mount is not necessary to resolve the query. To do this you can either:
– Define a separate management class with a Copy Destination pointing to
a disk pool that does not have any removable media in its hierarchy.
– Bind all meta objects to that management class using an include
statement in the Data Protection for SQL options file. Alternatively, you can
choose to use the same management class (and storage pools) for both
meta and data objects if you rarely need the meta objects, or need them
only immediately preceding a restore when a volume mount is required
anyway. In many cases, you can also obtain the meta object information
from SQL Server as recorded in its msdb database.
Copy group
Define the copy group as a backup copy group and not an archive copy group.
Since Data Protection for SQL stores all objects as backup objects on Tivoli
Storage Manager in backup storage pools, an archive copy group is not
required, although an archive copy group can exist. The following backup
copy group parameters significantly influence your backup policy:
– VERExists: Determines the maximum number of SQL Server database
backup versions to retain for databases that exist on the Data Protection
for SQL client system. Therefore, if you want to keep N backups on local
shadow volumes and also perform VSS Backups to Tivoli Storage
Manager server storage, make sure you provision enough storage space
on local shadow volumes and specify verexists=N+1. Make sure to specify
a verexists value that accommodates your VSS Backup goals. If you have
limited storage space for VSS operations and are restricted to a
See the IBM Tivoli Storage Manager for Windows Administrator’s Reference,
SC32-0127 for complete information regarding these parameters.
Length of time that VSS Backups will reside on Tivoli Storage Manager server
storage.
Number of VSS Backup versions to reside on Tivoli Storage Manager server
storage.
Types of VSS Backups to reside on Tivoli Storage Manager server storage.
Number of VSS Backup versions to reside on local shadow volumes.
Types of VSS Backups to reside on local shadow volumes.
The amount of available target volume storage provisioned for VSS
operations.
Schedule VSS and legacy backups to start at different times, because you do
not want these backups to overlap. Determine how long each backup would
take and adjust their start times, so that one type of backup will not start
before another has finished.
Note that in order to perform VSS operations, you may need to register node
names for additional machines.
Target node: A node name that controls backup and restore operations and
that also owns the data on the Tivoli Storage Manager server.
Agent node: A node name that performs operations on behalf of a target
node.
Target node Data Protection for Use the nodename in the Node name where Data
SQL node name Data Protection for SQL Protection for SQL is installed.
options file (dsm.opt)
Agent node Local DSMAGENT Use the Node name where the
node localdsmagentnode backup-archive client and VSS
parameter in the Data provider are installed, it is
Protection for SQL resposible for perfoming VSS
configuration file. operations as Data Protection
itself does not perform any
direct VSS operations.
Note: The agent node and target node will be on the same machine for basic
VSS operations.
Target node Data Protection for Use the nodename option Node name where Data
SQL node name in the Data Protection for Protection for SQL is installed.
SQL options file (dsm.opt)
Agent node Local DSMAGENT Use the Node name where the
Node localdsmagentnode backup-archive client and VSS
parameter in the Data provider are installed, it is
Protection for SQL resposible for perfoming VSS
configuration file. operations as Data Protection
itself does not perform any
direct VSS operations
Note: If you are running the scheduler service in a cluster environment, use
the Cluster Administrator to stop and restart your scheduler service. Do not
use the net stop and net start commands.
Note: Output from scheduled commands are sent to the scheduler log file
(dsmsched.log). After scheduled work is performed, check the log to ensure
the work completed successfuly.
If PASSWORDACCESS GENERATE is not specified in the dsm.opt file, then the Tivoli
Storage Manager password needs to be specified on the tdpsqlc command.
Data Protection for SQL Server provides three options when specifying SQL
Server logon information:
Accept the default account and blank password used in releases prior to SQL
2005.
Use SQL user ID security and specify both the SQL user name and
password. With SQL user ID security, the SQL Server administrator provides
the logon ID and the password that provides access to the SQL Server.
Use a trusted connection and let Windows authenticate the logon.
Note: The SQL logon user or Windows user name must be added to the SQL
Server SYSADMIN fixed server role before it can be used by Data Protection
for SQL Server.
For more information about SQL Server security, refer to “SQL Server security”
on page 261.
Buffering
Data Protection for SQL Server is a multi-threaded application that uses
asynchronous execution threads to transfer data between the SQL and Tivoli
Storage Manager servers. To accomplish this, multiple data buffers are used to
allow one thread to receive data from one side, while another thread sends data
to the other side. For example, one thread can be reading data from SQL Server
while another is sending data to the Tivoli Storage Manager server. The number
of buffers that Data Protection for SQL Server allocates to these threads can be
specified in the /BUFFERS and /SQLBUFFERS parameters of the command line
interface. The size of these buffers can be specified in the /BUFFERSIZE and
/SQLBUFFERSIZE parameters.
Data striping
In addition to multi-threading to maximize throughput on a single session, Data
Protection for SQL Server uses separate threads to support SQL data striping,
which allows use of multiple parallel sessions to backup and restore a single
database. This is another method to maximize data throughput. If a single
session cannot fully exploit the available bandwidth, multiple parallel sessions
can yield improved data throughput, especially if the database is spread across
multiple physical volumes.
If you use one data stripe per physical volume for both the SQL Server and the
Tivoli Storage Manager server, the performance (measured as the amount of
time necessary to backup or restore a particular SQL database) should show an
improvement over the unstriped case (approximately proportional to the number
of data stripes used, given the constraints of the devices and the network used,
and striping independent overhead in SQL Server, Tivoli Storage Manager
server, and Data Protection for SQL Server).
You must use the MAXNUMMP parameter on a Tivoli Storage Manager REGISTER
NODE or UPDATE NODE command to allow a node to use multiple sessions to store
data on removable media such as tape (which requires multiple mount points to
be allocated to that node).
Note: Additional striping does not necessarily improve performance and may
even decrease performance if system resources such as real and paged
memory, CPUs, Network Interface Cards, networks, device I/O , and RAID
overhead become saturated or exceed capacity.
If you use striping in conjunction with SQL buffers, make sure that the number
of SQL buffers specified is equal to or greater than the number of stripes.
The default values that Data Protection for SQL Server assigns to buffers,
buffersize, and stripes can be changed in the Data Protection for SQL
configuration file. Use the set command or the Edit menu of the GUI to modify
the configuration file.
LAN-free
Running Data Protection for SQL in a LAN-free environment if you are equipped
to do so avoids network constraints. Specify ENABLELANFREE YES in the Data
Protection for SQL Server options file. For information on setting up a LAN-free
environment, see IBM Tivoli Storage Manager for SAN for Windows Storage
Agent User’s Guide.
Collocation
If you use the full plus log backup strategy, you must decide whether to modify
Tivoli Storage Manager storage management policies to ensure that all log
backups are stored together on the Tivoli Storage Manager server (collocated).
This helps improve restore performance by reducing the number of media
mounts necessary for restoring a series of log backups. Consult your Tivoli
Storage Manager administrator for details on collocation. A single restore can
require a full backup, a differential backup, and multiple incremental backups. It is
recommended to use collocation if these backups are stored on removable
media. Specify collocation by file space: define stgpool COLlocate=FILespace if
you plan to restore multiple databases in parallel. This is recommended because
individual data stripes stay on separate removable volumes. If you use data
striping, use collocation by file space on sequential storage pools to maintain the
stripes on separate storage volumes. This is necessary to allow concurrent
parallel access to each of the stripes. If it happens that multiple stripes for the
same object end up on the same sequential volume (because insufficient empty
volumes are available), the Tivoli Storage Manager server move data command
can be used to move the objects to a disk storage pool or to new sequential
volumes added to the storage pool so that they can be accessed in parallel. A
single, complete restore may require a full database backup, a differential
backup, and multiple log backups, or one or more group, file, or set backups and
multiple log backups. It is recommended that you use collocation if these
backups may be stored on removable media.
Data Protection for SQL supports SQL Server running in a Microsoft Cluster
environment and Veritas Cluster environment. The VSS is supported in a SQL
Server clustered environment.
For Windows 2003, Data Protection for SQL uses the Active Directory to support
fail-over clustering. The list below provides information to consider when running
Data Protection for SQL in a Microsoft Cluster Server Environment or in a Veritas
Cluster Server environment:
You must install Data Protection for SQL on both nodes of the cluster. In
addition, when installing Data Protection for SQL, you must install it on a disk
local to each node (not on a shared cluster disk).
You must specify clusternode yes in the Data Protection for SQL options file.
Use identical configurations in the Data Protection for SQL options file when
configuring Data Protection for SQL on each node of the cluster.
If you are using the Tivoli Storage Manager scheduler for automating
backups, you must install the scheduler service on both nodes of the cluster
to enable fail-over support.
The Tivoli Storage Manager treats backups as coming from a single server
(the virtual server) regardless of which node of the cluster a backup was
performed on.
Data Protection for SQL supports VSS operations in a clustered SQL Server
environment. These requirements and limitations must be understood in order for
Data Protection for SQL to successfully perform VSS operations in a clustered
SQL Server environment. Some limitations that you need to take care about
clustering on VSS enviroments:
Dynamic disks are not supported.
VSS Backups that reside on local VSS shadow volumes can only be restored
to the physical node that created the VSS Backup. For example, if NODE_A
of a cluster created a VSS Backup and stored it on local shadow volumes,
NODE_B of the cluster cannot restore that particular VSS Backup. NODE_B
can only restore VSS Backups stored on the Tivoli Storage Manager server or
VSS Backups stored on local shadow volumes that were created by
NODE_B. This is due to a limitation related to VSS cluster support and not to
Tivoli Storage Manager.
VSS Backups that reside on local VSS shadow volumes may be deleted in the
event of a cluster failover. This means that if NODE_A of a cluster created a
local VSS Backup and afterward, the SQL Server fails over to NODE_B, if a
Data Protection for SQL VSS operation is performed on NODE_B of the
cluster, the local VSS Backup created by NODE_A will be deleted. This is
caused by the fact that the Microsoft VSS architecture is not cluster aware.
The Tivoli Storage Manager Client Acceptor Daemon (CAD) must be installed
on each cluster node so that it can continue operations in the event of a
failover. Make sure the CAD service name is the same on all cluster nodes so
that it can be started by a generic cluster service.
It is recommended that the Local DSMAgent client node be a separate node
from your normal backup-archive client, as this CAD service will need to be
made a non cluster option.
The Remote DSMAgent client node does not require you to register a
separate node for each server within the cluster as this server only acts as a
secondary server.
Use the Microsoft vssadmin and vshadow commands to verify the
environment.
A Data Protection for SQL configuration file should be configured for each
node in the cluster. These files are almost identical, except that the
localdsmagentnode parameter points to the corresponding local DSMAgent
on each node.
The considerations about Data Protection for SQL in a cluster environment will
be covered in “Configure Data Protection options file in a clustered environment”
on page 102.
The instructions given in this chapter are very detailed. By following them, you
should be able to successfully install IBM Tivoli Storage Manager Data
Protection for SQL and configure it, meeting your company’s requirements.
Beside the basic installation and configuration, we also explain some additional
the Data Protection for SQL installation with IBM Tivoli Storage Manager
Manager for Copy Services. This includes the installation of all components
including the backup-archive client.
In your planning steps it is necessary to consider if you are using legacy and
VSS backups, if you have VSS backups you need to do an additional
configuration on your IBM Tivoli Storage Manager server.
Note: You can configure Legacy and VSS backups to work together. Consider
the features you want to use and install all the necessary software to attend all
requests.
Protection for SQL installation directory. Use the set command or the menu
Edit → Configuration task of the Data Protection for SQL GUI. For additional
information, see 3.2.10, “Specifying Data Protection for SQL preferences” on
page 103.
3. Add the Microsoft SQL Server binary path to the PATH statement in the
system environment variables.
4. The following additional steps are for VSS only customization:
a. Specify your VSSPOLICY statement in your Data Protection for SQL
configuration file. For additional information, see 3.2.10, “Specifying Data
Protection for SQL preferences” on page 103.
b. Configure the Tivoli Storage Manager backup-archive client (if it is not
already configured). If the backup-archive client is already configured, you
can use existing client services. The backup-archive client Setup Wizard
can guide you through the configuration process (if needed). In the
backup-archive client GUI menu, select Utilities → Setup Wizard → Help
me configure the TSM Backup Archive Client. Note that the node name
for this machine is referred to as the Local DSMAGENT Node and is
specified with the localdsmagentnode parameter in the Data Protection for
SQL configuration file (tdpsql.cfg by default). For additional information,
see “Required node name for VSS off-loaded backup” on page 61.
c. Install and configure the Tivoli Storage Manager Client Acceptor Daemon
(CAD) Service (if not already installed and configured). You can use an
existing client CAD Service if one is already installed and configured. The
backup-archive client Setup Wizard can guide you through the CAD
installation process (if needed). In the backup-archive client GUI menu,
select Utilities → Setup Wizard → Help me configure the TSM Web
Client. Make sure this CAD service is running before proceeding to Step
6.
d. Install and configure the Tivoli Storage Manager Remote Client Agent
Service (DSMAGENT) if it is not already installed and configured. The
backup-archive client Setup Wizard can guide you through the
configuration process. In the backup-archive client GUI menu, select
Utilities → Setup Wizard → Help me configure the TSM Web Client.
You can use the existing DSMAGENT if one is already installed and
configured.
e. Install the Tivoli Storage Manager Copy Services SQL VSS Integration
Module from the product (if it is not already installed).
f. If you plan to perform VSS Instant Restores, install the Tivoli Storage
Manager Copy Services Hardware Devices Snapshot Integration Module
from the product (if it is not already installed). Note that a SAN Volume
Note: The SQL Server does not need to be installed or running on this
machine. Only the Microsoft SQL Server management tools are required to be
installed on this machine. Check your Microsoft SQL Server documentation for
necessary license requirements.
4. Install and configure a VSS provider (if you are not using the default system
VSS provider). Consult the VSS provider documentation for information
regarding configuration of that software.
Our environment consists of five servers: ZAIRE is our IBM Tivoli Storage
Manager server, COPPER is a stand alone SQL Server used for Legacy and
VSS backups. We also have an MSCS clustered SQL Server environment -
consisting of servers LIBRA and LEO. For the VSS offloaded backup server we
have the MOLITO server. We have an IBM System Storage 3582 Tape Library
with two drives.
Corporat e LAN
Cluster He artbe at
Microsoft Cluster
zaire AIX 5.3 cooper Windows 2003 libra Windows 2003 leo
TSM Serv er Ac tive Directory SQL Server
CIM Agent SQL Server
molito
switch Windows 2003
Offloaded
358 2
N Serie s
2 drives
In our lab environment we have IBM N series external storage which hosts the
clustered SQL Server database environment. This is used as the source for VSS
backups. Table 3-2 describes our server’s configuration.
In our configuration we have five machines, one AIX and four Windows.
COPPER is our DNS server and Active Directory domain controller.
storage pool and two tape storage pools. SQLDISKPOOL is the primary storage pool
for SQL backup of transaction logs and SQLTAPEPOOL will be the next storage pool
for the SQLDISKPOOL and the primary storage pool for the SQL backup
databases. We have another pool, LNGTAPEPOOL, for long term retention period.
Example 3-1 on page 78, shows the commands to create these storage pools.
Example 3-1 IBM Tivoli Storage Manager server storage pool definitions
tsm: ZAIRE> define stgpool SQLDISKPOOL DISK description=”Backup SQL
Server transaction logs”
If you are working with VSS backups it is recommended that you configure an
additional disk storage pool on disk for SQL meta objects. Example 3-2 on
page 78, shows the commands for configuration.
Example 3-2 Adittional IBM Tivoli Storage Manager server storage pool definitions
tsm: ZAIRE>define stgpool sqlmetapool disk description="Storage Pool
for VSS Bac kup Metadata"
Example 3-4 on page 80, shows additional configuration if you have VSS
Backups.
Example 3-5 on page 81, shows how to configure a node just to use Legacy
Backup. We register one node for each of our SQL Server servers.
Example 3-6 on page 81 shows how to configure a node to work with VSS
Backups and Legacy Backups together.
Example 3-6 Node configuration for VSS and Legacy Backups together
tsm: ZAIRE>register node copper_vss <password> domain=pdsql
Example 3-7 on page 81, shows how to configure a node to perform offloaded
VSS backups.
In a cluster environment you need to install the IBM Tivoli Storage Manager
backup-archive client on both machines.
Refer to the client installation documentation for detailed instructions. You may
choose Custom installation to select additional components and features, such
as Open Files support, Image backup support, and more.
If these features are not required, we recommend that you choose Typical
installation to ensure that all Tivoli Storage Manager basic client components and
prerequisites are installed. You may install the remaining features later, when
required.
To install the IBM Tivoli Storage Manager backup-archive client, follow these
steps:
1. Insert the product installation CD. Double click the IBM Tivoli Storage
Manager backup-archive client installer icon.
Note: If you do not have the CD and have downloaded the software from the
IBM Passport Avantage Web site, just double-click on the IBM Tivoli Storage
Manager backup-archive client executable file (ending with .exe), and you will
be directed to the screns below.
3. Select “TSM Backup-archive client - x32”, as shown in Figure 3-3 on page 83.
4. Select a language for the installation, as shown in Figure 3-4 on page 83.
English language will be selected in this installation.
5. Click Next in the installation wizard welcome screen, as shown in Figure 3-5
on page 84.
Figure 3-6 IBM Tivoli Storage Manager backup-archive client installation code
8. Select setup type. We choose Custom setup so that we can also install the
Administrative Client command line files. Click Next, as in Figure 3-7.
9. Click Install to start the installation. See Figure 3-8 on page 86.
10.If the installation completes successfully, click Finish. See Figure 3-9 on
page 86.
Figure 3-9 IBM Tivoli Storage Manager backup-archive client completed successfully
After the client installs, verify that the VSS Snapshot Plug-in pivss.dll exists in the
BACLIENT\PLUGINS directory (C:\PROGRAM
FILES\TIVOLI\TSM\BACLIENT\PLUGINS).
Note: If you do not have the CD and have downloaded the software from the
IBM Passport Avantage Web site, just double-click on the Data Protection for
SQL client executable file (ending with .exe) and you will be directed to the
screns below.
2. Select a language for the installation, as shown in Figure 3-11 on page 88.
We choose English.
6. Click Install, to start the installation. See Figure 3-14 on page 89.
If you want to use the Silent Installation you can use the Data Protection for SQL
Installation and User’s Guide for reference.
IBM Tivoli Storage Manager for Copy Services actually consists of two modules:
MS SQL Server VSS Integration Module and Hardware Devices Snapshot
Integration Module. The first module is required in all configurations for VSS
backup. The Hardware Devices Snapshot Integration Module is required only if
you are using disk storage which supports Instant Restore.
Note: If you do not have the CD and have downloaded the software from the
IBM Passport Avantage Web site, just double-click on the Copy Services
executable file (ending with .exe) and you will be directed to the screns below.
2. Select a language for the installation, as shown in Figure 3-16 on page 91.
English language will be selected in this installation.
Note: If you do not have the CD and have downloaded the software from the
IBM Passport Avantage Web site, just double-click on the Copy Services
executable file (ending with .exe) and you will be directed to the screns below.
2. Select a language for the installation, as show in Figure 3-20 on page 93. We
choose English language.
Note: If you are just using Legacy Backups, these steps are not necessary.
COMMMethod TCPip
TCPServeraddress 9.43.86.45
TCPPort 1500
TCPWindowsize 63
TCPBuffSize 32
TCPCLIENTADDRESS 9.43.86.64
managedservices webclient
We created options file dsm_vss.opt in the client installation directory, rather than
the default options file dsm.opt. We recommend creating a shortcut for the
backup-archive GUI which points to the actual options file. Follow these steps to
create a shortcut:
1. On your Windows Desktop, click the right mouse button and select New →
Shortcut. The Create Shortcut screen appears, see Figure 3-24 on page 96:
3. Select a name for the shortcut and click Finish. See Figure 3-26 on page 97:
Alternatively, you can use the the command line interface to perform this step, as
shown in Example 3-9 on page 98.
tsm>
When you have a cluster environment and local VSS backups will be made, it is
necessary to configure the parameter VSSALTSTAGINGIDIR in the DSMAgent
option file. This parameter is used to specify a location to store VSS manager
files on a shared volume. It should point to a shared device that does not contain
any SQL Server objects. See Example 3-10 on page 98 and Example 3-11 on
page 99.
Example 3-10 Backup-archive options file for Local DSMAgent node for machine Libra
NODename libra_vss
PASSWORDAccess generate
vssaltstagingdir f:\tsmvssdir
COMMMethod TCPip
TCPServeraddress 9.43.86.45
TCPPort 1500
TCPWindowsize 63
TCPBuffSize 32
TCPCLIENTADDRESS 9.43.86.64
clusternode no
clusterdisksonly no
managedservices webclient
Example 3-11 Backup-archive options file for Local DSMAgent node for machine Leo
NODename leo_vss
PASSWORDAccess generate
vssaltstagingdir f:\tsmvssdir
COMMMethod TCPip
TCPServeraddress 9.43.86.45
TCPPort 1500
TCPWindowsize 63
TCPBuffSize 32
TCPCLIENTADDRESS 9.43.86.64
clusternode no
clusterdisksonly no
managedservices webclient
Nodename
The Tivoli Storage Manager nodename is the unique name by which Tivoli
Storage Manager knows the machine running Data Protection for SQL.
Servername
This is the name of the Tivoli Storage Manager server to which you backup SQL
databases.
Commmethod
The communication protocols link the Data Protection for SQL node with the
Tivoli Storage Manager server. Data Protection for SQL supports the same set of
communication protocols supported by other Tivoli Storage Manager clients.
Passwordaccess
When set to the value GENERATE, this instructs the Tivoli Storage Manager API to
store the current password (encrypted) in the Windows registry and automatically
generate a new one when the current one expires. This method of password
management is recommended when running scheduled, unattended backups
since it ensures that the backup never fails because of an expired password. The
default value is PROMPT. A utility program named dsmcutil.exe allows you to
manage (update or display) the password as stored in the registry. This utility
program is distributed with the Tivoli Storage Manager backup-archive client
package. For more information on using the dsmcutil program, see the
dsmcutil.hlp file or the dsmcutil.txt file which are distributed with the Tivoli
Storage Manager Backup-Archive Client package.
Compression
A setting of COMPRESSION ON instructs the Tivoli Storage Manager API to
compress data before sending it to the Tivoli Storage Manager server; this
reduces traffic and storage requirements.
Clusternode
A setting of CLUSTERNODE YES directs the Tivoli Storage Manager API and Data
Protection for SQL to be cluster-aware when running in a MSCS or VCS
environment. This option must be specified for Data Protection for SQL to
function properly in a MSCS or VCS environment.
Enablelanfree
A setting of ENABLELANFREE YES allows Data Protection for SQL to run in a LAN
free environment if you are equipped to do so.
Note: If you are running Data Protection for SQL in a MSCS envronment, the
options file on both nodes of the cluster must be identical, including the
nodename.
You can create additional Data Protection for SQL options files to point to
other IBM Tivoli Storage Manager servers.
100 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-3-install.fm
Data Protection for SQL allows you to utilize Tivoli Storage Manager automatic
expiration and version control by policy. Setting automatic policy for backup data
is accomplished through the Data Protection for SQL options file. Use include
and exclude statements in the options file to define which files are subject to
automatic processing, and to assign specific management classes to files using
object naming conventions.
See Example 3-12 on page 101 for Daily Backups and Example 3-13 on
page 101 for monthly backups.
EXCLUDE "\...\master\...\log*"
EXCLUDE "\...\msdb\...\log*"
password copper
COMMMethod TCPip
TCPServeraddress 9.43.86.45
TCPPort 1500
TCPWindowsize 63
TCPBuffSize 32
COMPRESSIon NO
SCHEDMODE Prompt
EXCLUDE "\...\master\...\log*"
EXCLUDE "\...\msdb\...\log*"
See Example 3-14 on page 102 for a daily backup example and Example 3-15
on page 103 for a monthly backup example.
102 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-3-install.fm
EXCLUDE "\...\master\...\log*"
EXCLUDE "\...\msdb\...\log*"
EXCLUDE "\...\master\...\log*"
EXCLUDE "\...\msdb\...\log*"
Set the policy for VSS backups by specifying the VSSPOLICY statement in your
Data Protection for SQL configuration file. Note this parameter can only be set in
the configuration file - it cannot be specified using the tdpsqlc set command or
the menu Edit → Configuration task of the Data Protection for SQL GUI.
VSSPOLICY statements are processed from the bottom up and processing stops
at the first match. To ensure that more specific specifications are processed at
all, the more general specification should be listed before the more specific ones,
so as to be processed after the more specific specifications. Otherwise, the more
general specification will match the target before the more specific specifications
are seen.
By default, SQL Server accepts connections on TCP/IP port 1433. If SQL Server
is configured to listen on a TCP/IP port different than 1433, you must specify the
TCP/IP port for the parameters SQLSERVer and FROMSQLserver.
Example 3-16 shows how to configure Tivoli Data Protection for SQL Server to
access the instance SQL_STDBY on server COPPER using port 5555.
Example 3-16 TDPSQL.cfg parameter file for SQL Server with non default port
SQLSERVer COPPER\SQL_STDBY,5555
FROMSQLserver COPPER\SQL_STDBY,5555
If you do not specify the TCP/IP port when accessing a SQL Server instance
listening on a non default port, you will receive an error messages similar to
Example 3-27.
104 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-3-install.fm
Note: This error can happen when you install SQL Server 2000 and 2005 on
the same machine. In our tests, we installed SQL Server 2000 first and then
SQL Server 2005. Although SQL Server tools were able to connect to both
SQL Server installations, Tivoli Data Protection for SQL Server was able to
connect only to the SQL Server listening on the port 1433, and to solve this
issue was necessary to include the port which SQL Server was listening on
the TDPSQL.cfg configuration file.
You can verify the port which SQL Server is listening using SQL Server tools,
such as the Server Network utility for SQL Server 2000 or SQL Server
Configuration Manager for SQL Server 2005. Another way to verify this
information is to check the SQL Server error log.
Example 3-17 Data Protection for SQL configuration file for Daily Backups
(tdpsql_daily.cfg)
SQLSERVer COPPER
FROMSQLserver COPPER
SQLAUTHentication INTegrated
nodename copper_sql
MOUNTWaitfordata Yes
BACKUPMethod LEGACY
DIFFESTimate 20
BUFFers 3
BUFFERSIze 1024
STRIPes 1
SQLBUFFers 0
SQLBUFFERSIze 1024
LOGPrune 60
LANGuage ENU
BACKUPDestination Both
LOCALDSMAgentnode copper_vss
REMOTEDSMAgentnode
********** Server Storage Group Name BU Type BU Dest. Mgmt Class
********** ------ ------------------ ------- -------- ----------
VSSPOLICY * * FULL TSM VSS_FULL_TSM
Example 3-18 Data Protection for SQL configuration file for Monthly Backups
(tdpsql_long.cfg)
SQLSERVer COPPER
FROMSQLserver COPPER
SQLAUTHentication INTegrated
nodename copper_lng
MOUNTWaitfordata Yes
BACKUPMethod LEGACY
DIFFESTimate 20
BUFFers 3
BUFFERSIze 1024
STRIPes 1
SQLBUFFers 0
SQLBUFFERSIze 1024
LOGPrune 60
LANGuage ENU
BACKUPDestination TSM
LOCALDSMAgentnode copper_vss
REMOTEDSMAgentnode
********** Server Storage Group Name BU Type BU Dest. Mgmt Class
********** ------ ------------------ ------- -------- ----------
VSSPOLICY * * FULL TSM VSS_LONG_TSM
We recommend creating a shortcut for the TDP for SQL GUI pointing to each
options file. You can follow the steps 1-3 described on page 96 to create the
shortcuts.
To create shortcuts for daily and monthly backups you need to specify the
options and configuration file. See example Example 3-19 on page 106 and
Example 3-20 on page 106.
106 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-3-install.fm
Files\Tivoli\TSM\TDPSql\tdpsql_long.cfg"
Example 3-21 Data Protection for SQL configuration file for Daily Backups
(tdpsql_libra_daily.cfg)
SQLSERVer CLUSQL01\SQL01
FROMSQLserver CLUSQL01\SQL01
SQLAUTHentication INTegrated
nodename CLUSQL01_Daily
MOUNTWaitfordata Yes
BACKUPMethod LEGACY
DIFFESTimate 20
BUFFers 3
BUFFERSIze 1024
STRIPes 1
SQLBUFFers 0
SQLBUFFERSIze 1024
LOGPrune 60
LANGuage ENU
BACKUPDestination Both
LOCALDSMAgentnode libra_vss
REMOTEDSMAgentnode leo_offload
********** Server Storage Group Name BU Type BU Dest. Mgmt Class
********** ------ ------------------ ------- -------- ----------
********** ------ ------------------ ------- -------- ----------
VSSPOLICY * * FULL TSM VSS_FULL_TSM
Example 3-22 Data Protection for SQL configuration file for Monthly Backups
(tdpsql_libra_long.cfg)
SQLSERVer CLUSQL01\SQL01
FROMSQLserver CLUSQL01\SQL01
SQLAUTHentication INTegrated
nodename clusql01_lng
MOUNTWaitfordata Yes
BACKUPMethod LEGACY
DIFFESTimate 20
BUFFers 3
BUFFERSIze 1024
STRIPes 1
SQLBUFFers 0
SQLBUFFERSIze 1024
LOGPrune 60
LANGuage ENU
BACKUPDestination TSM
LOCALDSMAgentnode libra_vss
REMOTEDSMAgentnode leo_offload
********** Server Storage Group Name BU Type BU Dest. Mgmt Class
********** ------ ------------------ ------- -------- ----------
VSSPOLICY * * FULL TSM VSS_LONG_TSM
Example 3-23 Data Protection for SQL configuration file for Daily Backups
(tdpsql_leo_daily.cfg)
SQLSERVer CLUSQL01\SQL01
FROMSQLserver CLUSQL01\SQL01
SQLAUTHentication INTegrated
nodename CLUSQL01_Daily
MOUNTWaitfordata Yes
BACKUPMethod LEGACY
DIFFESTimate 20
BUFFers 3
BUFFERSIze 1024
STRIPes 1
SQLBUFFers 0
SQLBUFFERSIze 1024
LOGPrune 60
LANGuage ENU
BACKUPDestination Both
LOCALDSMAgentnode leo_vss
108 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-3-install.fm
REMOTEDSMAgentnode libra_offload
********** Server Storage Group Name BU Type BU Dest. Mgmt Class
********** ------ ------------------ ------- -------- ----------
********** ------ ------------------ ------- -------- ----------
VSSPOLICY * * FULL TSM VSS_FULL_TSM
VSSPOLICY * * LOCAL LOCAL VSS_LOCAL
Example 3-24 Data Protection for SQL configuration file for Monthly Backups
(tdpsql_leo_long.cfg)
SQLSERVer CLUSQL01\SQL01
FROMSQLserver CLUSQL01\SQL01
SQLAUTHentication INTegrated
nodename clusql01_lng
MOUNTWaitfordata Yes
BACKUPMethod LEGACY
DIFFESTimate 20
BUFFers 3
BUFFERSIze 1024
STRIPes 1
SQLBUFFers 0
SQLBUFFERSIze 1024
LOGPrune 60
LANGuage ENU
BACKUPDestination TSM
LOCALDSMAgentnode leo_vss
REMOTEDSMAgentnode libra_offload
********** Server Storage Group Name BU Type BU Dest. Mgmt Class
********** ------ ------------------ ------- -------- ----------
VSSPOLICY * * FULL TSM VSS_LONG_TSM
We recommend creating a shortcut for the TDP for SQL GUI pointing to each
options file. You can follow the steps 1-3 described on page 96 to create the
shortcuts.
To create shortcuts for daily and monthly backups you need to specify the
options and configuration file. See Example 3-25 on page 109, Example 3-26 on
page 110, Example 3-27 on page 110 and Example 3-28 on page 110.
Example 3-25 Shortcut definition for Daily SQL Backup for server Libra
"C:\Program Files\Tivoli\TSM\TDPSql\tdpsql.exe"
/tsmoptfile="E:\tsmdata\dsm_mssqldb_daily.opt"
/configfile="E:\tsmdata\tdpsql_libra\tdpsql_libra_daily.cfg"
Example 3-26 Shortcut definition for Daily SQL Backup for server Leo
"C:\Program Files\Tivoli\TSM\TDPSql\tdpsql.exe"
/tsmoptfile="E:\tsmdata\dsm_mssqldb_daily.opt"
/configfile="E:\tsmdata\tdpsql_libra\tdpsql_leo_daily.cfg"
Example 3-27 Shortcut definition for Monthly SQL Backup for server Libra
"C:\Program Files\Tivoli\TSM\TDPSql\tdpsql.exe"
/tsmoptfile="E:\tsmdata\dsm_mssqldb_long.opt"
/configfile="E:\tsmdata\tdpsql_libra\tdpsql_libra_long.cfg"
Example 3-28 Shortcut definition for Monthly SQL Backup for server Leo
"C:\Program Files\Tivoli\TSM\TDPSql\tdpsql.exe"
/tsmoptfile="E:\tsmdata\dsm_mssqldb_daily.opt"
/configfile="E:\tsmdata\tdpsql_libra\tdpsql_leo_long.cfg"
COMMMethod TCPip
TCPServeraddress 9.43.86.45
TCPPort 1500
TCPWindowsize 63
TCPBuffSize 32
TCPCLIENTADDRESS 9.43.86.64
clusternode no
clusterdisksonly no
managedservices webclient
110 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-3-install.fm
3. Install and configure the IBM Tivoli Storage Manager Client Acceptor Daemon
(CAD) Service and Remote Client Agent Service (DSMAgent). Remember,
that you can use the backup-archive GUI, select Utilities → Setup Wizard →
Help me configure the TSM Web Client. You will configure both services.
See the steps on “Configure the CAD and remote agent services” on
page 112.
4. If in your environment you have a VSS provider (that is not the default system
VSS provider) you need to configure it. Consult the VSS provider
documentation for information regarding configuration of that software.
5. Verify on your Windows services panel, if you have the CAD and remoted
agent started.
C O PPER
MS SQ L
Server
BA C lient
Data P rotection config file (Daily Configuration):
C:\P rogram files\Tivoli\TSM\TDPSQ L\tdpsql_daily.cfg
Data
Protection
for SQ L Local DSM Agent (B A options file):
Data Protection options file (M onthly Configuration): C:\P rogram files\Tivoli\TSM \baclient\dsm _v ss.opt
C:\P rogram files\Tivoli\TSM\TDPSQ L\dsm _long.opt
libra leo
MS SQL
Server
Loc al DSMAgent (BA options file): Loc al DSMAgent (BA options file):
BA Clie nt E:\ts mdata\ds m_libra_vss .opt E:\tsmdata\ds m_leo_vs s .opt BA Clie nt
Data Data
Protection Data Protection options file (Monthly Configuration): Protection
for SQL E:\ ts mdata\ds m_c luss ql01_long.opt for SQL
Data Protection config file (Daily Configuration): Data Protection config file (Daily Configuration):
E:\ ts mdata\tdps ql_libra_daily .c fg E:\ tsmdata\tdps ql_leo_daily .c fg
Data Protection config file (Daily Configuration): Data Protection config file (Daily Configuration):
E:\ ts mdata\tdps ql_libra_long.cfg E:\ ts mdata\tdps ql_leo_long.c fg
You can use either IBM Tivoli Storage Manager backup-archive setup wizard or
dsmcutil to perform these tasks.
1. From the backup-archive GUI, select Utilities → Setup Wizard
2. The screen TSM Client Configuration Wizards appears. Select the option
Help me to configure the TSM Web Client. See Figure 3-30 on page 113.
112 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-3-install.fm
3. Select the option Install a new Web client agent and click Next. See
Figure 3-31 on page 113.
4. Select the name of the TSM acceptor and click Next. Figure 3-32 on
page 114.
5. Select the options file and location and click Next. See Figure 3-33 on
page 114
6. Choose the HTTP Port and click Next. See Figure 3-34 on page 115.
114 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-3-install.fm
7. Fill in the nodename and password information for the backup-archive node.
See Figure 3-35 on page 115.
8. Select to use the System Account, if you want to use a specific user you can
fill this account with user name and the password. Configure the service to
start automatically. See Figure 3-36 on page 116.
9. Choose the Remote Agent service name. See Figure 3-37 on page 116.
10.Select No to revoke the remote access privileges to the Web Client. See
Figure 3-38 on page 117.
116 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-3-install.fm
11.Select Yes to start this service now. See Figure 3-39 on page 117.
12.On the completion screen click Finish. See Figure 3-40 on page 118.
The DSMAgent is used as an agent node. The options file (dsm.opt) created for
the backup-archive client is used as the DSMAgent. And the target node is the
owner of the backups. In Example 3-30 on page 118, we can see a GRANT PROXY
command for two nodes, because we have two different backup policies for this
SQL Server node, in a standalone configuration.
118 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-3-install.fm
Example 3-31 on page 119 shows the GRANT PROXY commands required in the
clustered environment, with two different backup policies.
http://www-1.ibm.com/support/docview.wss?&uid=swg21269169.
Your hardware provider process installation depends on your disk hardware type.
The following steps are performed by the Microsoft VSS in conjunction with
FlashCopy when a backup application initiates a request for a backup on an IBM
disk system (SVC, DS6000 or DS8000):
VSS retrieves a list of volumes from the storage system and selects
appropriate target volumes from the free pool (VSS_FREE)
VSS moves the target volumes to the reserved pool (VSS_RESERVED) and
the SQL Server databases suspends writes.
VSS issues a FlashCopy from the source volumes to the target volumes. The
FlashCopy is performed on the hardware under the direction of the VSS
hardware provider. The FlashCopy is made as a transportable nonpersistent
snapshot.
The database resumes writes after the FlashCopy is complete. The SQL
Server now has no further involvement in the operation.
VSS assigns the target volumes to the offloaded server’s HBAs. Microsoft
Windows mounts the volumes on the offloaded server.
The VSS requestor reads the data from the target volumes and copies it to
IBM Tivoli Storage Manager server storage.
Once the backup to IBM Tivoli Storage Manager is complete, Microsoft
unmounts the volumes and VSS unassigns the target volumes from the
backup server’s HBAs.
VSS assigns the target volumes back to the free pool (VSS_FREE).
They are available for use in other VSS operations.
http://www-1.ibm.com/support/docview.wss?uid=ssg1S7001160&aid=1.
120 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-4-backup.fm
Note: By default, the Inactivate tab is not displayed in the main window. To
display the Inactivate tab you must check the option Inactivate tab in the
View menu bar option.
The backup and restore windows contain a directory tree and operation controls.
Figure 4-1 shows the Data Protection for SQL Server GUI. We describe how to
launch the GUI in 4.1.3, “Launching the GUI” on page 133. Because we have
installed Tivoli Storage Manager for Copy Services, the VSS Backup option is
available for selection. If it was not installed, the option would be grayed out.
122 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-4-backup.fm
Obtain Data Protection for SQL help to assist with GUI tasks, Tivoli Storage
Manager Web access, and information about Data Protection for SQL.
Edit menu
Use the Edit menu to change Data Protection for SQL configuration settings.
You can modify the Data Protection for SQL Server configuration file. If a
configuration file was not specified on launching the GUI tool, the file tdpsql.cfg is
used. If no configuration file is found, a default file is created which contains all
the default settings for the parameters, except for LASTPRUNEDATE value. To
specify a different configuration file, start the GUI from the command line with the
/configfile parameter.
Click Configure under Edit to display the Data Protection for SQL Settings dialog
with the following five tabs and their parameters:
General tab
This tab displays the preferences page for general configuration parameters.
124 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-4-backup.fm
Note: By default, SQL Server listens on TCP/IP port 1433. If the SQL Server
is listening on a TCP/IP port other than 1433, you must explicitly configure it
for the SQL Server and From SQL Server parameters above. For more
information, see 3.2.10, “Specifying Data Protection for SQL preferences” on
page 103.
SQL Authentication
Specifies the authorization mode used when logging on to the SQL server.
– Integrated (default)
Specifies to use a trusted connection and allow Windows to authenticate
the logon.
– SQL User ID
Specifies to use SQL User ID security. With this type of security, the
administrator provides the logon ID and the password to logon to Data
Protection for SQL.
Wait for Tape Mounts for Backup or Restore
Check this box if you want Data Protection for SQL Server to wait for tape
media (if used) to be mounted for backup and restore operations. When
backups are stored on tape, it is likely that backup and restore operations will
need to wait until the required tape volume mounts.
This setting specifies whether Data Protection for SQL Server should wait for
the media mount or stop the current operation. Wait for tape mounts is the
default, which is usually appropriate in an environment with an automated
tape library. This option is only used on legacy operations.
Use VSS Backup as the default Backup method
Check this box to set VSS Backups as the default backup method. This
parameter is grayed out if the Tivoli Storage Manager for Copy Services
Microsoft SQL VSS Integration Module is not installed. Remember that VSS
backups can only be restored using VSS. If you use VSS as the default, the
Local DSMAGENT Node name parameter must be specified (as shown in
Figure 4-6, “VSS Backup tab” on page 129).
Estimate % Change for Differential Backup
Specifies the value for the estimated change to database pages for differential
backups. This estimate is used by Data Protection for SQL to determine if
sufficient storage space is available for the backup. The value specified here
becomes the default value for all differential backups.
Performance tab
This tab displays the preferences page for performance configuration
parameters. The Performance tab is shown in Figure 4-3.
126 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-4-backup.fm
Select a number (64 to 4096) that specifies the size of the buffers used by
Data Protection for SQL to transfer data from the SQL Server to Data
Protection for SQL.
Logging
This tab displays the preferences page for logging configuration parameters. The
Logging tab is shown in Figure 4-4.
Regional
This tab displays the preferences page for regional configuration parameters.
The Regional tab is shown in Figure 4-5.
Note: To use a non default language you must install the corresponding
language pack . See “Installing Data Protection for SQL additional language
packs” on page 90 for the installation procedure.
128 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-4-backup.fm
Click one of the Time Format buttons to select a format for displaying time.
– hh: Hours (24-hour day)
– mm: Minutes in an hour
– ss: Seconds in a minute
Number Format (xxx,xxx.dd by default)
Click one of the Number Format buttons to select a format for displaying
numbers. The choices on the display represent several ways to place the
decimal, comma, and spaces.
VSS Backup
This tab displays the preferences page for VSS Backup configuration
parameters. The VSS Backup panel is shown in Figure 4-6.
View menu
The view menu gives you the following options:
Refresh tree view
By refreshing the GUI, you can:
– clear any selections.
– collapse the tree to the level you have highlighted.
– collapse corresponding tab trees even if they are not currently displayed
(e.g., refreshing the Backup Databases tree also refreshes the Backup
Groups/Files tree)
– display new backup operations in the restore trees.
Note: If you simply move back and forth between tabs without refreshing, the
current selections or tree view are kept.
Inactivate tab
Click this item to add the tab control to the backup and restore windows,
allowing you to inactivate SQL databases in Tivoli Storage Manager storage.
Utilities menu
The Utilities menu provides you the following options:
Change TSM Password
This dialog prompts you to enter the old password, then enter the new
password twice, in order to verify the new password.
130 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-4-backup.fm
Note: SQL Server login permission requirements for Data Protection for SQL
Server is discussed in 2.5.4, “Data Protection for SQL Server security
considerations” on page 63.
Help Menu
The Help Menu provides:
Data Protection for SQL Help
This dialog launches online help.
TSM Web Access
This dialog launches a Web browser to view Tivoli Storage Manager
information online.
About Data Protection for SQL
This dialog launches version, release, and modification level information
about Data Protection for SQL.
4.1.2 Toolbar
The toolbar provides shortcuts to frequently used items, such as:
Refresh tree view
Edit Data Protection for SQL configuration
Access Tivoli Storage Manager Web links
132 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-4-backup.fm
Alternatively, you can use the tdpsql command from the installation directory,
which can take the following parameters:
configfile
If specified, this parameter overrides the default Data Protection for SQL
Server configuration file - tdpsql.cfg in the installation directory. Otherwise, the
default configuration file is used.
For example, to specify a configuration file, file.cfg, located in the \temp\test
directory when invoking the GUI, enter:
tdpsql /CONFIGfile=c:\temp\test\file.cfg
sqlserver
If specified, this parameter overrides the default SQL Server, which is the
local SQL server. You must use this switch to access SQL Server named
instances and SQL Server clustered instances.
For example, to access a SQL Server named instance SQLNAMED1 on
server Copper, invoke the Data Protection for SQL Server GUI as:
tdpsql /sqlserver=Copper\SQLNAMED1
tsmoptfile
If specified, overrides the default Tivoli Storage Manager API option file
(dsm.opt). For example, to specify the file.opt option file located in the
\temp\test directory, enter:
tdpsql /TSMOPTFile=c:\temp\test\file.opt
If you need to specify non-default options, as if for example you are in a clustered
environment, we recommend customizing a shortcut for launching the GUI, as
shown in “Configure Data Protection options file in a clustered environment” on
page 102
Considerations
The following are some considerations:
Both legacy and VSS operations are performed from the same tab.
When the GUI starts, the backup window is the initial display.
Different types of backup and restores are available in different tabs.
VSS-related features are grayed out unless the Tivoli Storage Manager for
Copy Services MS SQL VSS Integration Module is installed.
After you install Tivoli Storage Manager for Copy Services, the VSS backup
becomes the default type for SQL backups. You can modify it changing the
checkbox “Use VSS Backup as the default Backup method”, as discussed in
“General tab” on page 124.
You cannot close, minimize or move the backup or restore windows
independently of the main window.
Table 4-1 describes the available tabs, and what type of backup and restore is
available in each tab.
Backup Group/Files Perform group, file and set backups Filegroup or file
Restore databases Restore from full, differential and log backups Database, differential
and log
Restore group / files Restore from full, group, file, set, and log Filegroup, file or set
backups. backup
Inactivate tab Manually inactivate selected objects apart Tivoli Storage Manager
from automated inactivation backup object
134 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-4-backup.fm
To select an item for backup or restore, check the square selection box on the left
of the item name. Checking a selection box in the Tree also highlights the item,
and displays associated information in the List View.
Double-click a selection box in the Tree to select that item and collapse or expand
the Tree at that point. An item can be selected from both the Tree and the List
View.
Figure 4-9 on page 136 shows how to select all databases in a SQL Server
instance for a full backup.
After the backup is complete, the Backup Progress window indicating whether or
not the operation completed successfully and the object(s) backed up with
detailed status information is displayed, as shown in Figure 4-11. Click OK to
finish. If any error message is displayed, it means that the backup has failed.
136 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-4-backup.fm
The Log Est % Chg spin box allows you to estimate the percentage of database
pages that have changed due to non-logged operations since the last log backup.
The default is 0.
All databases that cannot have a transaction log backup due to the simple
recovery model or truncate log on checkpoint option active are displayed with an
“X” on the left pane, so that you cannot choose these databases to perform a log
backup.
Figure 4-12 on page 138 shows an example of how to select a database for log
backups. In our example, we select the SalesDB database to perform transaction
log backup. Note that several databases on the left pane are marked with an “X”,
such as master and msdb databases. You are not allowed to perform transaction
log backups for these databases.
Click Backup to start the backup operation. The Backup Progress window is
displayed to inform you whether or not the operation completed successfully and
lists the object(s) backed up with detailed status information.
138 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-4-backup.fm
Click Backup to start the backup operation. The Backup Progress window is
displayed to inform you whether or not the operation completed successfully and
lists the object(s) backed up with detailed status information.
On the left pane, click on the database you want to backup. The existing
filegroups for the database will appear under the database name, and also on
the right pane.
Select the filegroups you want to back up. Note that when you highlight the
filegroup. the files belonging to this filegroup are listed on the List View in the
right pane. However, you cannot select the file individually; if you select a file,
all filegroup will be selected.
You can select several filegroups on the same database, or filegroups on
different databases repeating the last step.
Figure 4-14 on page 140 shows an example of group backup. In this example, we
are backing up the SalesDB_LA filegroup of the SalesDB database.
Click Backup to start the backup operation. The Backup Progress window is
displayed to inform you whether or not the operation completed successfully and
lists the object(s) backed up with detailed status information.
140 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-4-backup.fm
Figure 4-15 on page 141 shows an example of file backup. In this example, only
the file SalesDB_LA_1 is backed up. All other files from the SalesDB_LA
filegroup are not included in this backup.
Click Backup to start the backup operation. The Backup Progress window is
displayed to inform you whether or not the operation completed successfully and
lists the object(s) backed up with detailed status information.
Note: We recommend you to follow file backups with transaction log backups
for all SQL databases you back up.
Figure 4-16 on page 142 shows an example of a set backup. In this example the
filegroup SalesDB_EMEA and the file SALESDB_LA_2 from the filegroup
SalesDB_LA are backed up.
142 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-4-backup.fm
Click Backup to start the backup operation. The Backup Progress window is
displayed to inform you whether or not the operation completed successfully and
lists the object(s) backed up with detailed status information.
Note: We recommend you to follow set backups with transaction log backups for all SQL
databases you back up.
Figure 4-17 on page 143 shows an example of tail-log backup. Note that the
truncate log checkbox is unchecked.
Click Backup to start the backup operation. The Backup Progress window is
displayed to inform you whether or not the operation completed successfully and
lists the object(s) backed up with detailed status information.
Note: Tail-log backups are intended only for special situations. Refer to 2.4.4,
“Backup a transaction log without truncate the log” on page 51 for more
information.
In the following sections we discuss how to perform GUI backups using both VSS
backup types.
Figure 4-18 on page 145 shows an example of VSS full backup selection for all
databases in a SQL Server instance. Note that only the full backup option is
available.
144 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-4-backup.fm
After you click Backup, the following activities are performed by Data Protection
for SQL Server:
1. A connection to the local DSM agent is established, as shown in Figure 4-19
on page 145.
146 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-4-backup.fm
Performing a VSS GUI off-loaded backup is very similar to a normal VSS GUI
backup. The differences are that you must configure the
REMOTEDSMAgentnode parameter in the Data Protection for SQL Server
configuration file (tdpsql.cfg by default) using either the Configuration task in the
Edit Menu of the GUI or the tdpsqlc set command,. Then, in the Backup
Databases tab, choose the Backup Destination listbox as TSM Server
(offloaded), as shown in Figure 4-23.
Figure 4-24 on page 149 shows an example of backups displayed in the Restore
Databases tab for the SalesDB database.
148 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-4-backup.fm
Figure 4-25 on page 149 shows an example of the backups displayed in the
Restore Groups/File tab for the SalesDB database.
By default, only active backups are displayed. To display both active and inactive
backups, check Show Active and Inactive.
Figure 4-26 on page 150 shows both active and inactive backups for the
SalesDB database.
Only the backups taken since the last full backup are considered to be active.
When you perform a legacy full database backup, all backups taken since the
previous full backup are automatically inactivated. This does not mean they
cannot be used anymore to restore your databases. You can still use an inactive
backup as long as it is not expired from the Tivoli Storage Manager inventory.
Once a backup has been expired from the Tivoli Storage Manager inventory, it
can no longer be used in a restore operation. Other backup types also inactivate
previous backups, as can be seen in Table 4-2.
150 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-4-backup.fm
Legacy full backup All prior active backup objects for the same SQL database
Legacy differential backup All differential backups taken since the last full backup for
the same SQL database
Legacy group backup All group backups taken since the last full backup for the
same filegroup for the same SQL database
Legacy file backup All file backups taken since the last full backup for the same
file for the same SQL database
Tivoli Storage Manager never expires the active backup. If you drop an SQL
Server database, its active backup will remain in the Tivoli Storage Manager
Server inventory until it is manually inactivated, and then expired. The space
allocated for this backup also will not be deallocated from Tivoli Storage Manager
Server.
In fact, when you inactivate a backup you just select it to participate in Tivoli
Storage Manager expiration processing. Typical backups do not require this
command as Data Protection for SQL Server performs inactivation as a part of
Tivoli Storage Manager policy management. As a result, backup objects are
typically inactivated as part of the scheduled backup processing.
Note: You must manually enable the Inactivate tab. See “View menu” on
page 130 for more information.
Figure 4-27 on page 152 shows the inactivate tab. In the next example, we
selected all backups on SalesDB to be inactivated.
To inactivate the backups, click Inactivate. Figure 4-28 displays the backups that
were inactivated in our example.
152 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-4-backup.fm
Command Description
Backup Backs up all or part of one or more SQL databases to Tivoli Storage
Manager server
Restore Restores all or part of one or more SQL databases to SQL server
INACTIVate Inactivates one or more active backup objects on the Tivoli Storage
Manager server
CHANGETSMPassword Changes the Tivoli Storage Manager password used by Data Protection
for SQL.
You can also use tdpsqlc parameters to specify customized settings for your
operations. One example is the parameter /BACKUPMethod, that is used to choose
the type of backup will be performed, Legacy or VSS. If you omit this parameter,
the value specified for BACKUPMethod parameter in the configuration file will be
used.
Note: Data Protection for SQL Server CLI parameters are not case sensitive;
however, all SQL names of databases or parts of databases are
case-sensitive.
For a detailed explanation of the command line tdpsql tool, refer to Data
Protection for Microsoft SQL Server Installation and Users Guide, SC32-9059.
4.5.1 Data Protection for SQL Server 5.5 CLI new features
In Data Protection for SQL Server releases prior to 5.5, to control what
databases are included and excluded from backup operations you used
INCLUDE and EXCLUDE statements. The INCLUDE and EXCLUDE statemets
are stored, by default, in the dsm.opt configuration file. You have the flexibility to
include or exclude individual databases from a specific backup type, for example,
excluding offline databases from backup operations, or excluding databases
using simple recovery models from transaction log backups.
This option is still available in Data Protection for SQL Server 5.5; however, Data
Protection for SQL Server 5.5 CLI introduces a new parameter to the backup
command, and provides two built-in features in order to provide a greater
flexibility and control over backup operations.
The new CLI parameter introduced in the backup command is the /EXCLUDEDB
parameter. With this parameter, available for all Legacy and VSS backup types,
you can exclude databases from being backed up directly in Data Protection for
SQL Server CLI backup command, instead of having to change the EXCLUDE
statements in the dsm.opt file. Example 4-2 on page 157 shows an example of a
full legacy backup with the /EXCLUDEDB parameter.
154 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-4-backup.fm
The two built-in features introduced in Data Protection for SQL Server 5.5 are:
Automatic exclusion of simple recovery model databases from CLI log
backups. An example of this built-in functionality is shown in Example 4-4 on
page 159.
Automatic exclusion of master database from CLI log and differential
backups. An example of this built-in functionality is shown in Example 4-6 on
page 160.
For more information about Data Protection for SQL Server 5.5 new features,
refer to Data Protection for Microsoft SQL Server Installation and Users Guide,
SC32-9059.
The next sections will show how to perform similar backups to those performed in
4.6, “Legacy CLI backups” on page 155 using Data Protection for SQL CLI tool.
Note: For the next examples we use the default configuration parameters
stored in the tdpsql.cfg file. The parameter BACKUPMethod is configured as
Legacy.
As discussed in 4.5.1, “Data Protection for SQL Server 5.5 CLI new features” on
page 154, it is possible to exclude a database from a backup operation using the
/excludedb parameter, as shown in Example 4-2. In this example, we exclude the
databases ReportServer and ReportServerTempDB from the backup operation.
156 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-4-backup.fm
A new Data Protection for SQL Server feature is very useful when performing
transaction log backups: the ability to automatically exclude databases using the
simple recovery model (or truncate log on checkpoint option) from log backups.
With this new feature, you can simply ask Data Protection to perform transaction
log backups for all databases from a SQL Server, and it will detect the databases
using simple recovery model and automatically exclude them from the backup
operation.
158 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-4-backup.fm
Example 4-4 Automatic exclusion of simple recovery model databases from transaction
log backup
C:\>tdpsqlc backup * log
A new Data Protection for SQL Server feature is very useful when performing
differential backups: the ability to automatically exclude the master database
from differential backups. With this new feature, you can simply ask Data
Protection to perform differential backup for all databases from a SQL Server,
and it automatically will exclude the master database from the backup operation.
160 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-4-backup.fm
162 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-4-backup.fm
Note: We recommend you to follow file backups with transaction log backups
for all SQL databases you back up.
Note: We recommend you to follow set backups with transaction log backups
for all SQL databases you back up.
164 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-4-backup.fm
Note: Tail-log backups are intended only for special situations. Refer to 2.4.4,
“Backup a transaction log without truncate the log” on page 51 for more
information.
In next sections we discuss how to perform CLI backups using both VSS backup
types.
A VSS CLI off-loaded backup has a very similar procedure than a normal VSS
CLI backup. The differences are that you must configure the
REMOTEDSMAgentnode parameter in the Data Protection for SQL Server
configuration file (tdpsql.cfg by default) using either the Configuration task in the
Edit Menu of the GUI or the tdpsqlc set command, and use the /offload
parameter in the Data Protection for CLI command, as shown in Example 4-12
166 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-4-backup.fm
Data Protection for SQL Server configuration file tdpsqlc query tdp
information
All active legacy backup types for all databases tdpsqlc query tsm * types /active
All active and inactive legacy backup types for all tdpsqlc query tsm * types /all
databases
All active and inactive legacy backup types for a tdpsqlc query tsm SalesDB types /alla
specific database
Active full backups for a specific database including tdpsqlc query tsm SalesDB full /compata
compatibility informationb
Active full backups for a specific database including tdpsqlc query tsm SalesDB full /compat
compatibility informationb /activea
Active and inactive full backups for a specific tdpsqlc query tsm SalesDB full /fileinfo
database including file information /mountwait=yes /alla
For a detailed discussion about the query command, refer to Data Protection for
Microsoft SQL Server Installation and Users Guide, SC32-9059-02.
Inactivating backups through Data Protection for SQL Server CLI gives you more
flexibility in comparison to Data Protection for SQL Server GUI. With CLI you can
inactivate backups older than a specified number of days, while using the GUI
you must individually select the desired objects to inactivate. You can use the
parameter /olderthan to specify how old a backup object must be before the
command can inactivate it. The number of days old can range from 0 to 9999,
and if you select 0 you will inactivate all selected objects. There is no default
value for this parameter.
Example 4-13 shows an example of how to inactivate all backups for a SQL
Server. It is similar to the GUI example shown in 4.4.2, “Inactivating backups
using GUI (Legacy only)” on page 150.
168 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-4-backup.fm
170 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-5-restore.fm
We also provide several examples to discuss how to perform restores for some
common situations. It is also discussed how to use Data Protection for SQL
Server to implement a stand by database.
It is very important to understand that the restore capabilities for a SQL Server
are directly related to the backup operations performed for the databases. A well
planned and implementated set of backup routines are crucial for a successful
restore operation; in other words, you cannot restore what has not been backed
up. See 2.3, “Microsoft SQL Server backup planning” on page 40 for a discussion
about SQL Server backup planning.
When you restore a database, keep in mind that data which exists in the
database is overwritten and is no longer available after the restore is complete.
Restore Databases allows you to restore databases or parts of databases only
from full, differential, and log backups. Although only VSS full backups are
supported, Legacy differential and Legacy log backups can be applied after a full
VSS Backup has been restored.
A master database restore requires special attention. See 5.4.3, “Restore SQL
Server system databases” on page 181 for step-by-step instructions.
Using the Data Protection for SQL Server GUI, you can use the Restore
Databases tab window to display full, differential and log backups, and the
Restore Groups/Files tab window to display full, log, group, set and file backups.
Legacy and VSS backups are displayed together. For more information, refer to
4.4.1, “Displaying existing backups using GUI” on page 148.
Using Data Protection for SQL Server CLI, you can use the query command. For
more information about the query command, see 4.8.1, “Displaying existing
172 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-5-restore.fm
backups using CLI” on page 167. or refer to Data Protection for Microsoft SQL
Server Installation and Users Guide, SC32-9059.
If you plan to fully restore your database using full, log and differential backups,
select Restore Database tab in the Data Protection GUI. If you plan to restore
only parts of your database using full, file, group, set or log backups select the
Restore Groups/Files tabs in the Data Protection GUI.
Note: You can choose both Restore Database tab and Restore Groups/Files
tab to fully restore your database from a full backup and apply subsequent
transaction log files. The difference between them is that in Restore
Groups/Files tab you have the option to choose individual files from the
database full backup to be restored, while in Restore Database tab you will
restore all files from your database.
In next sections we discuss how to restore SQL Server databases using Data
Protection for SQL Server GUI.
174 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-5-restore.fm
By checking this option, you can include inactive backup objects in the tree
and list. This allows you to easily specify inactive objects for restore purposes.
The default is to display only active objects.
Stripes
You can specify the number of data stripes to use in a restore operation. A
maximum of 64 data stripes is allowed. The default value is 1. Make sure that
this matches the value set for SQL buffers. Note that this option is always
enabled for Legacy operations. However, stripes are not available for VSS
operations.
Replace
You can replace a database during a restore by selecting the check box. The
default is not to replace databases. This option is always enabled and applies
to Legacy restores only.
Recovery
If you select several objects for restore in the GUI (e.g. full, difffull, log, log)
and leave this option selected, Data Protection for SQL will make sure that
SQL administers the recovery option only on the last backup object for each
database being restored. This option is selected by default, but you can clear
this checkbox when needed.
Database Owner Only
You can mark a database for owner use only after a restore by selecting the
check box. The default is not to mark for owner use. This option is always
enabled and applies to Legacy restores only.
Wait for Tape Mounts for Restore
You can specify whether or not the Data Protection for SQL restore operation
waits for the Tivoli Storage Manager server to mount removable media such
as tapes or CDs. This information is retrieved from Tivoli Storage Manager
when you press the plus (+) icon on the backup object to expand the tree.
Wait for Tape Mounts for File Information
When querying Tivoli Storage Manager for file information, you can specify
whether or not Data Protection for SQL waits for the Tivoli Storage Manager
server to mount removable media. This option is not selected by default and
applies to Legacy restores only.
From the Restore Databases tab only, the following additional options are
available:
Point in Time
176 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-5-restore.fm
Shortcut Menu
You can display additional restore options by right-clicking a selected item in the
list control. This menu is available only when you highlight a database in the tree.
All of its backup objects will be displayed in the list control, and the menu will be
available for any selected objects. The right-click pop-up menu contains the
following items:
Restore Into
Use this option to specify the database to restore a backup object to. Click
Restore Into to display an edit box. If you have selected several databases to
be restored, the restore into name you specify applies only to the selected
backup object that you right-clicked. If other selected backups require the
restore into parameter, you will have to specify them one at a time, but you
can do this in one restore operation.
Relocate
When using TDP for SQL commands, keep in mind that all SQL names of
databases or parts of databases are case-sensitive, when addressing
commands:
SQL database names are case-sensitive.
The logicalfilename variable is case-sensitive.
The groupname variable is case-sensitive
178 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-5-restore.fm
Almost all restore operations can be performed using both Data Protection for
SQL Server GUI and CLI tools. In this chapter we will mostly cover Data
Protection for SQL Server GUI routines.
Recovery option
When the check box Recovery is checked (default), the database is ready for use
as soon as the restore is completed, and no following logs can be applied. If you
accidentally check this option before you apply the last transaction log, you must
restore your database again.
If you try to restore a database without the options described above, you will
receive errors similar to those shown in Figure 5-6.
Generally, according to the recovery needed, you may need to perform the
following tasks:
1. Install SQL Server and apply the required patchsets. Remember to use the
same sort order and code page as the SQL server you recover.
2. Install Data Protection for SQL Server according to the description in “
Chapter 3, “Installation and configuration” on page 69, and then restore the
dsm.opt and tdpsql.opt files with the TSM Backup/Archive Client. You can
also recreate the dsm.opt and tdpsql.opt yourself, using instructions
contained in same chapter.
3. Start SQL Server in single-mode using sqlservr.exe command with -m
parameter.
4. Use Data Protection for SQL Server to restore master database using either
legacy or VSS backups. At the end of the restore operation, SQL Server will
be shutdown.
5. Start SQL Server normally, as a service.
6. Manually reapply any changes that were made to the master database after
the date of the database backup used to do the restore operation.
7. Use Data Protection for SQL Server to restore all other system and user
databases.
180 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-5-restore.fm
However, there are some situations where only database files are damaged,
while all SQL Server binary files and Windows registry entries are intact, for
example, when a disk containing only SQL Server databases crashes. Another
situation is when you do not have a valid backup for the system databases, only
for the user databases.
For these situations, instead of reinstall SQL Server, you can rebuild the SQL
Server master database and then perform steps 3 to 6 listed above. When you
rebuild the master database, the msdb and model databases are recreated as
well, so you also need to restore those databases after the rebuild operation.
Note: In SQL Server 7 and 2000, to rebuild the master database use the
Rebuildm.exe utility in \..\mssql7\binn\ or \..\Microsoft SQL
server\80\Tools\Binn\ for SQL 2000.
In SQL Server 2005, use the Setup command to rebuild the master database.
For all SQL Server versions, the compact disc or shared network directory
containing the SQL Server installation software is required to rebuild the
master database, as well any service pack applied after the SQL Server
installation.
First of all, stop all SQL Server related services to the instance you will restore
the system databases, such as SQL Server Integration Services and SQL Server
Analysis Services. After, you must start SQL Server in a single-user mode. Open
a command prompt window, go to the Binn directory, located inside SQL Server
installation path, and start SQL Server in single-user mode using the following
command:
sqlservr.exe -m
Now launch Data Protection for SQL Server GUI, select the Restore Databases
tab, and select the master database to restore, as shown in Figure 5-2 on
page 182.
Regardless of the previous file path of the master database files, which is stored
with the backup object of the database, it will be restored where the
reinstalled/rebuild master database is present.
After the restore is completed, a confirmation screen will be displayed with the
restore results, as shown in Figure 5-3.
182 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-5-restore.fm
Note: When the file path settings (in the restored master database) are
different from the current file path of the model database (obtained by rebuild
of the master database or from reinstalling SQL server) the SQL server fails to
start.
Now restore the model and msdb databases using TDP for SQL Server. In the
Restore Databases tab, select model and msdb databases. If needed, you can
relocate the file space destination for the database, as shown Figure 5-4 on
page 184.
In the Relocate window, choose the location to restore the files, as shown in
Figure 5-5.
184 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-5-restore.fm
Figure 5-5 Choosing the location where model and msdb will be restored
Note: If the Logical File Names and Physical File Names columns do not
contain information about the database files, you must check the Wait for Tape
Mounts for File Information box, and refresh the tree view.
Start the restore process by clicking Restore. At the end of the operation, you will
receive a confirmation screen with the restore results.
At this point, you have restored all your system databases, and then you can
start restoring your user databases, as shown in the next section.
Performing a complete restore of the database means to apply the last full
backup taken, the last differential backup, if any, and all transaction log backups
since then.
You can choose to restore multiple databases at the same time. If you want to
relocate, you must specify this for each database to be restored.
While using Data Protection for SQL Server GUI, the necessary logs to perform a
restore are automatically selected according to the backup object you select.
However, you also have the option to to manually select and restore individual
186 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-5-restore.fm
backup objects for your databases. Allowing Data Protection for SQL Server GUI
to choose the required backup objects to be restore can avoid waste of time and
resources during a backup operation, for example, not restoring unnecessary
transaction logs due to existence of differential backups.
For more information about selection propagation rules in Data Protection for
SQL Server GUI, refer to Chapter 4, “Using the graphical user interface” in Data
Protection for Microsoft SQL Server Installation and Users Guide,
SC32-9059-02.
If you want to manually restore a transaction log or differential backup, you can:
1. Restore a full database backup taken before the transaction log or differential
backup you want to restore with the Recovery option unchecked.
2. In case of differential backups, directly restore the desired differential backup
with the Recovery option checked.
3. In case of transaction log files, you can apply either the last differential backup
taken before the transaction log backup, if available, and then all transaction
log backups since the last differential backup until the desired transaction log
backup, or all transaction log backups since the full backup. For these two
scenarios, restore only the last transaction log the Recovery option checked.
For the next example, we will restore the database SalesDB until Feb 16, 2007,
07:40. We select the last full backup, and all subsequent transaction log backups.
As the time of the last transaction log backup is 07:57:13, it must be included in
this restore operation. Figure 5-7 on page 188 shows our selection.h
Then, as shown in Figure 5-8 on page 188, click on Point in Time button, and
then choose the desired time to restore the database.
188 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-5-restore.fm
Note that after you choose the date and time desired for the point-in-time restore
operation, it will be shown in the main screen, as shown in Figure 5-9 on
page 189.
Note: Point in time restores are available only from the Restore Databases tab
If you want to include file, groups or set backups in your point in time restore
operation, you can:
1. Restore, from the Restore Databases tab, a full backup taken before the point
you want to restore you database with the Recovery option in the Restore
options panel unchecked.
2. If there is any differential backup taken after the full backup restored and
before the time you want to use in your point in time recovery, restore it using
the Restore Databases tab with the Recovery option in the Restore options
panel unchecked.
3. Switch to Restore File/Groups tab and apply the subsequent transaction log,
file, group and set backups with Recovery option in the Restore options panel
unchecked. Do not restore the last transaction log backup taken before the
time you want to
4. Back to the Restore Databases tab and choose the last transaction log to be
applied. Click on Point in Time button to specify until the database will be
restored. Before click on the Restore button, check the Recovery option in the
Restore options panel.
Data Protection for SQL Server supports restore to a named mark. To restore to
a named mark, you must select Restore Databases tab, and click on Point in
Time option in the Restore Options. Then, you must specify the mark name, and
restore to before or after the mark. Since the mark is bound to the transaction, it
is most likely repeated in the log, therefore you must specify a time prior to the
desired mark in time.
Figure 5-10 shows an example of how to select a named point restore. In this
example, the database will be restored when the named mark batch_start is
found after 05:00 am from November 18, 2007.
190 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-5-restore.fm
To relocate the database files using Data Protection for SQL Server GUI, select
the backup object, right-click on the database object and select RELOCATE, as
shown in Figure 5-11 on page 191
Figure 5-11 How to choose relocate from Data Protection for SQL Server GUI
Then the relocate box pops up, and the new location and physical filename can
be entered. In the relocate box you have two options:
Relocate all files into a directory
With this option you can choose to restore all files into a single location, or
choose to restore data files in one location, log files in a different location and
other files, such as full-text index files in another location. If you do not specify
a location for log files or full-text index files, they are restored to the same
location as SQL Server data files.
Figure 5-12 on page 192 shows how to specify a different location for each
physical file from a database with a full-text catalog.
Note: If the Logical File Names and Physical File Names columns do not
contain information about the database files, you must check the Wait for Tape
Mounts for File Information box, and refresh the tree view.
After you choose the new locations for the physical files, perform the restore
operation clicking on Restore button on Data Protection for SQL Server GUI.
192 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-5-restore.fm
After the partial restore, it is possible to restore differential and transaction log
backups to return the restored file
When performing a partial restore, the primary file group must always be
restored, together with the other files you specify.
Note: When doing a partial restore on a new server, you must do this from the
Data Protection for SQL CLI, because the relocation option is not valid with
partial restore using Data Protection for SQL Server GUI.
When restoring a file group only, it is not possible to restore with recovery. Even
though it is possible to check the Recovery check box from the Data Protection
for SQL GUI, the database will be in a loading state after the restore.
Figure 5-13 on page 194 shows how to select a group backup together with a
transaction log backup.
To restore a database backup into another database, you must first select the
database objects to be restored. From Data Protection for SQL Server GUI, first
select the required objects. Then, right click on the backup objects on right panel,
and choose Restore Into option. A pop up screen will be displayed, and you must
enter the new database name, as shown in Figure 5-14 on page 195.
In our example, we will restore database Books into BooksNew. As the database
BooksNew does not yet exist, it is not necessary to check the Replace check box.
194 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-5-restore.fm
Click Restore to restore the Books database into the new BooksNew database.
Note: Unlike Legacy backups, VSS Backups cannot be restored into an SQL
Server that has a different name.
When restoring a database to another server, you must logon to the Tivoli
Storage Manager server with the correct nodename to be able to retrieve the
backup.
The Tivoli Storage Manager nodename of the SQL Server, from which you
backed up the database, must be specified in the dsm.opt file to provide the
correct logon to the Tivoli Storage Manager server, and the tdpsql.cfg must
specify the server you want to restore to.
196 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-5-restore.fm
5.4.13 Restore SQL Server 2000 backup to SQL Server 2005 database
In some situations, you may want to restore a database taken from SQL Server
2000 to a SQL Server 2005 instance. Data Protection for SQL Server allows you
to restore this type of backup in the same way as you restore backups taken from
the same database version.
While a Data Protection for SQL Server restore operation creates a SQL Server
2005 database, it does not garantee that your applications will run in SQL Server
2005 in the same way they ran in SQL 2000. We recommend that you check the
SQL Server documentation for all required steps, recommendations, restrictions
and pitfalls in the SQL Server version upgrade process, and spend the necessary
time to test your application against new database version.
In the following example we set up a standby server, step by step, from our virtual
SQL Server cluster CLUSQL01\SQL01 to our stand alone SQL Server COPPER,
using the Tivoli Storage Manager Scheduler.
set sql_dir=C:\Progra~1\Tivoli\TSM\TDPSql
C:
cd %sql_dir%
date < NUL >> %sql_dir%\sqlsched.log
time < NUL >> %sql_dir%\sqlsched.log
5. Use the Tivoli Storage Manager scheduler to run the cmd file shown in
Example 5-2 every 10 minutes. This will restore the transaction logs on the
standby server COPPER with NORECOVERY. The cmd file first restores all
198 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-5-restore.fm
active log backups for the database LogShippingDB from SQL server
CLUSQL01\SQL01. Then all log backups are inactivated. This must be done,
otherwise every log from the start (since the full backup) will be restored every
time the restore job runs.
If the file path for the database files is different on the standby server, use the
/relocate=logicalfilename /to=physicalfilename.
This implies more complicated scripting, since you will then have to check that
the latest log backup is already restored on the standby server prior to
performing the full backup, which inactivates all the prior backups.
The management class for the log objects should be defined so they are always
available on disk. This is done with the command define stgpool LOG_SHIP_DISK
disk description='Disk for Log Shipping’.
The schedules for the two jobs are defined on the Tivoli Storage Manager server.
Example 5-3 shows the schedule for the backup job.
200 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-6-oper.fm
This section will cover how to configure the IBM Tivoli Storage Manager
scheduler to automate your backups.
For client schedules, you can specify whether the client will poll the server
regularly to receive information about scheduled actions, or whether it must wait
to be contacted by the server to start a scheduled action. This option is called the
scheduling mode on the client and is set in the client options file. There is another
type of client schedule called clientaction, which is for actions which you want
to run only once as opposed to recurring scheduled actions.
Many factors influence the actual start time and duration of the various
operations, including the client backup window, storage pool sizes, amount of
data, and so on. Remember that is important to consider the timing and
sequencing of scheduled operations, otherwise the jobs can overlap and not
complete properly.
Consider the following parameters when defining a IBM Tivoli Storage Manager
schedule:
If you are planning to schedule VSS and Legacy backups, do not overlap
these schedules in time, otherwise the second one will fail. SQL Server does
not allow Legacy and VSS backups at the same time.
If you are using server-prompted scheduling mode, make sure that the Data
Protection for SQL option file has the TCPCLIENTADDRESS and
TCPCLIENTPORT options specified.
202 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-6-oper.fm
If you change the Data Protection for SQL options file, it is necessary to
restart the service.
Data Protection for SQL creates its own log file with statistics about the
backed up database objects when the /logfile parameter is specified during
the tdpsqlc command. Output from scheduled commands are sent to the
scheduler log file (dsmsched.log). After scheduled work is performed, check
the log to ensure the work completed successfully.
The preferred method of password management for scheduler operations is
to specify PASSWORDACCESS GENERATE in the dsm.opt file. If
PASSWORDACCESS GENERATE is not specified in the dsm.opt, then the
node password needs to be specified in the tdpsqlc command. To specify the
password, use the /tsmpassword parameter in the command file.
Once the Data Protection for SQL nodename has been registered to a IBM Tivoli
Storage Manager server and the SQL Server is installed and configured, you
need to perform the following steps:
1. On the IBM Tivoli Storage Manager server:
a. Define a schedule to execute a Windows command file. This schedule
must be defined in the policy domain to which the Data Protection for SQL
nodename is registered.
b. Associate the Data Protection for SQL node with the defined schedule.
2. On the machine where SQL Server and Data Protection for SQL are installed:
a. Install the IBM Tivoli Storage Manager scheduler client as a Windows
Service for Data Protection for SQL. If a scheduler already exists for the
regular IBM Tivoli Storage Manager backup client, install another one for
Data Protection for SQL.
b. Define a command file that contains the Data Protection for SQL
commands to do the desired backup
c. If you are running in a cluster server environment, install the IBM Tivoli
Storage Manager scheduler client as a Windows service on both cluster
nodes.
If you are running in a cluster server environment, create a new cluster resource
that represents the IBM Tivoli Storage Manager scheduler. Verify that the cluster
resource is started.
Perform the following on the SQL Server to set up the IBM Tivoli Storage
Manager client scheduler:
1. Login using a Windows account with administrative privileges.
2. Install a new IBM Tivoli Storage Manager service to backup the SQL Server
databases. See Example 6-1 on page 204.
204 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-6-oper.fm
3. You can see the log information on the standard output. See Example 6-2 on
page 205.
Machine : LIBRA
Service Name : TSM SQL Scheduler service
Client Directory : c:\program files\tivoli\tsm\baclient
Automatic Start : no
Logon Account : LocalSystem
The service was successfully installed.
The registry password for TSM node CLUSQL01_DAILY has been updated.
3. If you are in a cluster environment you need to start the scheduler service. So
execute the following steps:
a. Start the cluster administrator. Select the SQL Server Cluster group and
create a new resource to represent the SQL Server scheduler (File →
New → Resource). See Example 6-1 on page 206.
b. Set the Resource type to Generic Service and select your cluster group for
Group. See Figure 6-2 on page 207.
206 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-6-oper.fm
c. Select the servers that this resource will be handling. See Figure 6-3 on
page 207.
e. Set the Generic Service Parameters. See Figure 6-5 on page 208.
f. You need to add Registry Replication. Click Add. When the screen
appears, specify the root registry key. The root registry key needs to be the
exact key where the Data Protection for SQL node name is listed. The
registry key is of the format
SOFTWARE\IBM\ADSM\CurrentVersion\BackupClient\NODES\<nodena
me>\,<servername>,. Specify <nodename> as your cluster TSM SQL
208 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-6-oper.fm
node, and <servername> as the name of the server you are adding the
service. See Figure 6-6 on page 209.
g. You will see a message that the service was created successfully, similar
to Figure 6-7 on page 209.
h. To start the service, select the service, go to menu File → Bring online.
See Figure 6-8 on page 210.
Note: You must specify COMPLETE PATHNAMES in the command file for all
file names and non-systems commands.
If you are in a cluster environment, your command file can reside on local
drives, but you need to remember to replicate the same command file to all
machines in the cluster. Alternatively, you can create the command file on a
shared drive. The TSMOPTFILE and LOGFILE options specified in your
command file must reflect the location of the options file and log file on the
SQL Server File Share.
210 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-6-oper.fm
rem ==================================================================
rem Replace "C:" with the drive where Data Protection for SQL
rem is installed. Update the directory to match the installation
rem directory that you chose when you installed the product.
rem ==================================================================
set sql_dir=C:\Progra~1\Tivoli\TSM\TDPSql
C:
cd %sql_dir%
rem ==================================================================
rem The two lines below put a date/time stamp in a log file for you.
rem Note: You can change "sqlsched.log" to whatever you prefer in
rem lines below.
rem ==================================================================
rem ==================================================================
rem Now call the command-line interface to do the backup:
rem
rem Replace "srvrname" with the name of the options file name you
rem plan to use.
rem
rem If SQL authentication is being used and the SQL login settings
have
rem not been stored via the GUI, you must also specify the /sqluser
and
rem /sqlpassword options on the command below.
rem
rem In this example, we use the '*' to back up all of the databases
rem on the SQL server. Note that database 'tempdb' will not
rem be backed up.
rem
rem Note: You can change "sqlsched.log" and "sqlfull.log" to
rem whatever you prefer.
rem ==================================================================
Based on this sample script, you can create another script to backup all
databases on your server. See Example 6-4 on page 212 for an example.
rem ==================================================================
rem Set the installation directory
rem ==================================================================
set sql_dir=C:\Progra~1\Tivoli\TSM\TDPSql
C:
cd %sql_dir%
rem ==================================================================
rem The two lines below put a date/time stamp in a log file for you.
rem Note: You can change "sqlsched.log" to whatever you prefer in
rem lines below.
rem ==================================================================
rem ==================================================================
212 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-6-oper.fm
You can create another script to backup only one database. For example, the
script sql_backupdb.bat was created to backup just the dbsales7. If you intend to
backup more than one database you can separate the databases using commas.
See Example 6-5 on page 213.
rem ==================================================================
rem Set the installation directory
rem ==================================================================
set sql_dir=C:\Progra~1\Tivoli\TSM\TDPSql
C:
cd %sql_dir%
rem ==================================================================
rem The two lines below put a date/time stamp in a log file for you.
rem Note: You can change "sqlsched.log" to whatever you prefer in
rem lines below.
rem ==================================================================
rem ==================================================================
rem Backup command
rem ==================================================================
/configfile=%sql_dir%\tdpsql_daily_sql01.cfg
/logfile=%sql_dir%\sqlfull_db_daily.log >> %sql_dir%\sqlsched.log
You can create another script to backup using VSS. For example, the script
sql_vss.bat was created to backup all database files. See Example 6-6 on
page 214.
rem ==================================================================
rem Set the installation directory
rem ==================================================================
set sql_dir=C:\Progra~1\Tivoli\TSM\TDPSql
C:
cd %sql_dir%
rem ==================================================================
rem The two lines below put a date/time stamp in a log file for you.
rem Note: You can change "sqlsched.log" to whatever you prefer in
rem lines below.
rem ==================================================================
rem ==================================================================
rem Backup command
rem ==================================================================
214 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-6-oper.fm
You can create another script to backup just the databases logs. For example,
the script sql_backuplog.bat, as shown in Example 6-7 on page 215.
rem ==================================================================
rem Set the installation directory
rem ==================================================================
set sql_dir=C:\Progra~1\Tivoli\TSM\TDPSql
C:
cd %sql_dir%
rem ==================================================================
rem The two lines below put a date/time stamp in a log file for you.
rem Note: You can change "sqlsched.log" to whatever you prefer in
rem lines below.
rem ==================================================================
rem ==================================================================
rem Backup command
rem ==================================================================
Perform the following steps on the IBM Tivoli Storage Manager server to create
the schedules to backup your SQL database:
1. Enter the following command to define the schedule. You can enter this
command on the server console or from an administrative client. See
Example 6-8 on page 216.
2. Associate this schedule with a node name. See Figure 6-9 on page 216.
You can use the same examples to create additional schedules for your
environment, it is important to create a schedule to backup the SQL log files, and
if you have a different backup policy than daily backups you need to create
another schedule.
216 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-6-oper.fm
218 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-6-oper.fm
220 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-6-oper.fm
For more information about the IBM Tivoli Storage Manager server activity log,
see the Tivoli Storage Manager Administrator Guide.
222 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-6-oper.fm
The SQL Server writes event information for the Windows event log. You can look
for backup messages. See Figure 6-9 on page 224.
224 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-6-oper.fm
If your storage supports VSS instant restore, and you are using this function,
check also the fle IBMVSS.log.
You can filter the types of events to be enabled for logging. For example, you can
enable some messages for one receiver and another messages to other
receivers.
To configure event logging, you need to enable or disable logging for one or more
event types and for one or more receivers and begin or end logging to one or
more receivers.
When you enable or disable events, you can specify the following:
A message number or an event severity (ALL, INFO, WARNING, ERROR, or
SEVERE)
Events for one or more client nodes (NODENAME) or for one or more servers
(SERVERNAME).
For example, to send TDP for SQL messages to a Tivoli Enterprise Console®,
assuming that you already have a TEC Server in your environment, you need to
follow the steps:
1. In the server options file (dsmserv.opt), specify the location of the host on
which the Tivoli server is running. See Example 6-13 on page 226, to specify
a TEC server at the IP address 9.43.86.50:155
2. Begin event logging for the Tivoli receiver using the BEGIN EVENTLOGGING Tivoli
Storage Manager administrative command. See Example 6-14 on page 226.
3. On the IBM Tivoli Storage Manager server you need to configure the TDP for
SQL events. See Example 6-15 on page 226
The events for Data Protection for SQL, have the string ACO followed by
four-digit numbers. Remember that the application client must have enhanced
T/EC support enabled in order to route the above messages to the Tivoli Event
Console.
226 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-6-oper.fm
This is the default. You could trace only specific events, but this may not give
you the required information to determine your problem. For 90% of the
cases, using /traceflag=all is fine. You can place this option in your dsm.opt
file for legacy backups.
TraceFlag ALL_VSS
This option you can use on your dsm.opt file for you local and remote
dsmagent. for VSS backups.
If you encounter a problem during Data Protection for SQL processing using VSS
for Backup and Restore, follow the steps to try to resolve the problem:
1. Retry the operation that failed.
2. If the problem persists, close other applications, especially those applications
that interact with SQL. Retry the operation that failed.
3. If the problem persists:
a. Shut down the SQL Server
b. Restart the SQL Server
c. Run the operation that failed
4. If the problem persists:
a. Shut down the entire machine
b. Restart the machine
c. Run the operation that failed.
5. If the problem persists, open a Ticket on IBM Support.
Determining
VSS issue if the problem is a Data Protection for SQL or a general
The Data Protection client interacts closely with the backup-archive client
(DSMAGENT), which performs all of the Virtual Shadow Copy Service (VSS)
operations. Determine first if the problem is with Microsoft's VSS service or with
the Tivoli Storage Manager.
Perform the following steps to try to isolate the source of the error:
1. Test the connectivity between the Data Protection client and the Tivoli
Storage Manager dsmagent. Issue the TDPSQLC QUERY SQL command on the
machine where the SQL server is installed to verify that your installation and
228 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-6-oper.fm
If the TDPSQLC QUERY SQL command does not return all of this information, you
might have a proxy configuration problem.
2. Use the vssadmin or vshadow utility to recreate the VSS operation standalone -
that is, without any involvement of Tivoli Storage Manager. When VSS
operations are failing, use these programs to recreate the error to determine if
this is a general VSS problem or a problem within the Tivoli Storage Manager
code.
– vssadmin
A utility that is pre-installed with your operating system. It can display current
volume shadow copy backups and all installed shadow copy writers and
providers in the command window. The following are example VSSADMIN
commands:
• VSSADMIN LIST WRITERS
• VSSADMIN LIST PROVIDERS
• VSSADMIN LIST SHADOWS
– vshadow
A utility included with Microsoft's Volume Shadow Copy Services SDK that
can be used to exercise most of the VSS infrastructure, such as
creating/querying/deleting shadow copies. You can also use vshadow to create
both persistent and non-persistent shadow copies, transportable snapshots,
as well as assign a drive letter or mount point to a shadow copy. The following
can be determined by using the vssadmin or vshadow utility:
• Verify VSS Provider configurations and setup
• Rule out any possible VSS problems before running the Tivoli Storage
Manager VSS functions
• That you might have a VSS configuration problem or a real hardware
problem if an operation does not work with vshadow/vssadmin
• That you might have a Tivoli Storage Manager problem if an operation
works with vshadow/vssadmin but not with the Tivoli Storage Manager
Perform the following tests to ensure that VSS is working correctly:
– Test non-persistent shadow copy creation and deletion
• Run “vshadow -p d: e:” (where d:\ and e:\ are the SQL Server
database and log volumes.
• Repeat the previous step four times
• Inspect the Windows Event Log to ensure that things look appropriate
– Test persistent shadow copy creation and deletion
• Run “vshadow -p d: e:” (where d:\ and e:\ are the SQL Server
database and log volumes. You may have to run “vshadow -da” to
remove this if you do not have enough space.
• Repeat the previous step four times
• Inspect the Windows Event Log to ensure that things look appropriate
– Test non-persistent transportable shadow copy creation and deletion (VSS
Hardware Provider environments only)
230 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ch-6-oper.fm
Gather as many of the following files as possible before contacting IBM Support:
*
The Data Protection for SQL configuration file. The default configuration file is
tdpsql.cfg.
The Data Protection for SQL Tivoli Storage Manager application programming
interface (API) options file. The default options file is dsm.opt.
The Tivoli Storage Manager registry hive export.
The SQL Server registry hive export.
The Tivoli Storage Manager Server activity log. The Data Protection client
logs information to the server activity log. A Tivoli Storage Manager
administrator can view this log for you if you do not have a Tivoli Storage
Manager administrator user ID and password.
If the Data Protection client is configured for LAN-free data movement, also
collect the options file for the Tivoli Storage Manager storage agent. The
default name for this file is dsmsta.opt.
Any screen shots or command-line output of failures or problems.
Log files can indicate the date and time of a backup, the data that is backed up,
and any error messages or completion codes that could help to determine your
problem. The following are the Tivoli Storage Manager log files to gather:
The Data Protection for SQL log file. The default location of this file is
C:\Program Files\Tivoli\TSM\TDPSql\tdpsql.log
The Tivoli Storage Manager API Error log file. The default location of this file
is C:\Program Files\Tivoli\TSM\TDPSql\dsierror.log
The DSMAGENT error log file. The default location of this file is C:\Program
Files\Tivoli\TSM\baclient\dsmerror.log
The Windows event log receives information from the SQL Server and many
different components involved during a Virtual Shadow Copy *Service (VSS)
operation.
The following VSS provider log files can also be helpful, if applicable:
System Provider - (Windows Event Log)
IBM System Storage SAN Volume Controller, DS6000, DS8000 - D:\Program
Files\IBM\Hardware Provider for VSS\IBMVss.log
NetApp or N series- D:\Program Files\SnapDrive\*.log
232 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ax01-prod.fm
IBM Tivoli Storage Manager Extended Edition adds additional support through:
Disaster preparation planning and recovery (Disaster Recovery Manager)
NDMP backup for Network Attached Storage
Small and large tape libraries
234 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ax01-prod.fm
http://www.ibm.com/software/tivoli/products/storage-mgr/
Backup/restore methodology
Tivoli Storage Manager keeps track of each backed up file in its own internal
relational database, maintaining an individual record of each version of each file
which is backed up so that it can be accurately restored in one step. The
progressive backup methodology used means that only changed files are backed
up - there is no need for periodic full backups after the first initial operation. This
saves time and storage space. Version control allows user-defined policies to
dictate how many versions are kept of each file, and for how long they are kept.
Backups can be automatically schedule to make sure they are reliably executed.
track data wherever it is stored, delivering direct one-step file restore.
Policy management
Tivoli Storage Manager policies allow you to specify:
What data is backed up? You can reduce backup times if unneeded files are
not backed up.
How many versions to keep? What about if the file is deleted?
How long to keep extra file versions, or the last remaining version of a deleted
file?
Where to initially store the backup? Backups can go to disk first, or direct to
tape - for example, for large database backups.
These policies can be set for all client nodes, for a group of client nodes, for
individual client nodes, for certain files on a client node, down to individual
policies for each individual file - allowing you to precise control how much storage
space will be needed for the backups.
236 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ax01-prod.fm
Archive
Tivoli Storage Manager archive allows you to archive particular files or groups of
files for a designated period of time. Archived files are separate from the normal
backup cycle, and are therefore not managed by version. You simply specify
which files to archive, and a retention period. You can create a description of
each archive package so you can search these descriptions when you have to
retrieve files.
With collocation enabled, the server attempts to keep files belonging to a group
of client nodes, a single client node, client file space or the last active data for a
client node, on minimal number of sequential access storage volumes. You can
set collocation for each sequential access storage pool when you define or
update the pool. By using collocation, you can reduce the number of volumes
required when user restore, retrieve, or recall a large number of files from the
storage pool. Collocation thus reduces the amount of time required for these
operations.
You can find more information on IBM Tivoli Storage Manager Basic Edition at
the Web site:
http://www.ibm.com/software/tivoli/products/storage-mgr/
IBM Tivoli Storage Manager Extended Edition adds disaster recovery planning
capability for the server, NDMP (Network Data Management Protocol) control for
network-attached storage (NAS) filers, and support for larger capacity tape
libraries and more tape drives.
One of the key features of IBM Tivoli Storage Manager and Disaster Recovery
Manager is the ability to track media in all possible states, such as onsite, in
transit, or in a vault. The media movement features assist greatly with the daily
tasks of sending disaster recovery media offsite, and receiving expired media
onsite for reuse. With these features the system administrator can quickly locate
all available copies of data.
238 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ax01-prod.fm
The NDMP backup and restore features are fully integrated with Tivoli Storage
Manager Extended Edition server and client. No extra software is required on the
server, client, or NAS appliance.
HSM for Windows allows various levels of granularity for migration of files. Files
can be migrated individually, and file systems can be partially or fully migrated,
based on a comprehensive set of policy options.
240 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ax01-prod.fm
Tivoli Continuous Data Protection for Files was developed with laptop (mobile
computer) and desktop users in mind, but can be applied to any client with a high
rate of change of data on its file systems.
Tivoli Continuous Data Protection for Files provides clients with true point-in-time
recoverability. It is supported on Windows platforms. For more information, see:
http://www.ibm.com/software/tivoli/products/continuous-data-protection/
V5.6 and higher of Sysback are integrated with IBM Tivoli Storage Manager,
allowing backups to be stored on a IBM Tivoli Storage Manager server.
SSAM makes the deletion of data before its scheduled expiration extremely
difficult. Short of physical destruction to storage media or server, or deliberate
corruption of data or deletion of the Archive Manager database, Archive Manager
will not allow data on the storage managed by the SSAM server to be deleted
before its scheduled expiration date. Content management and archive
applications can apply business policy management for ultimate expiration of
archived data at the appropriate time.
242 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ax01-prod.fm
Movement of the data from one media type to another (as media needs change,
or as new types of media become available) is achieved by migration. Migration
automates moving of the data to help ensure data longevity, and also allows for
data to be stored on the type of media that best meets its speed of access and
cost needs.
Data Protection for Informix is supported on AIX, HP/UX, and Solaris up to V5.2
of IBM Tivoli Storage Manager for Databases. Beginning with Informix V10, the
244 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ax01-prod.fm
Tivoli Storage Manager backup interface is included with the Informix database
product itself - no add-on is required. This is similar to the situation with IBM DB2
UDB.
246 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ax01-prod.fm
For Lotus Domino databases, IBM Tivoli Storage Manager for Mail exploits
Domino’s “transaction logging” feature, enabling the capture of just the database
changes for logged databases. Thus, full database backups are not required as
frequently as in previous Domino releases.
For Microsoft Exchange, Tivoli Storage Manager for Mail supports both Microsoft
Exchange Server 5.5, Microsoft Exchange Server 2000 and Microsoft Exchange
Server 2003. It uses Microsoft’s backup APIs to create a copy of the Exchange
server storage group databases along with the associated transaction logs. Tivoli
Storage Manager for Mail can produce the different types of backups specified by
Microsoft backup APIs: full backups, incremental backups, differential backups,
copy backups and database copy backups.
Data Protection for Lotus Domino provides two types of database backup,
incremental and selective, and a log archive function. Incremental backup
provides a conditional backup function that creates a full online backup of
Domino databases when necessary. The specific conditions that determine when
a new backup is necessary vary depending on whether the database is logged or
not. Selective backup unconditionally backs up the specified databases, unless
they are excluded from backup through exclude statements. When archival
logging is in effect, changes to logged databases can be captured between full
backups by archiving the transaction log.
248 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ax01-prod.fm
Tivoli Storage Manager for Advanced Copy Services supports a wide range of
hardware:
IBM DS6000
IBM DS8000
SAN Volume Controller (SVC) and all IBM and non-IBM devices supported by
the SVC.
IBM Enterprise Storage Server® (ESS)
Tivoli Storage Manager for Advanced Copy Services also provides the following
functionality:
FlashCopy support for ESS for Oracle
FlashCopy support for ESS for DB2
FlashCopy support for ESS for mySAP on DB2 UDB
FlashCopy support for ESS for mySAP on Oracle
Snapshot support for DS8000, DS6000 and SVC for DB2 UDB
As with Tivoli Storage Manager for Advanced Copy Services, zero impact
backups and instant recovery allow the primary production data to remain online
and undisturbed. Data movement to IBM Tivoli Storage Manager storage can be
off-loaded to a secondary machine via a VSS hardware provider that supports
transportable shadow copy volumes.
250 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ax02-mssql.fm
It uses Transact SQL and XML to send requests between the client and the SQL
Server. Transact SQL is a programming and query language which allows data to
be accessed, queried, updated and managed. Microsoft SQL Server runs only
on Windows platforms, and has 32-bit and 64-bit editions.
252 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ax02-mssql.fm
Similar to IBM DB2, SQL Server RDBMS has a concept of instance and
database, as shown in Figure B-1.
Until SQL Server release 7, it was possible only to have one SQL Server
instance per machine - since SQL Server 2000 it is possible to have several
instances per machine.
Appendix B. Microsoft SQL Server overview for Tivoli Storage Manager administrators 253
6148ax02-mssql.fm Draft Document for Review April 30, 2008 1:21 pm
There are two types of SQL Server databases, system databases and user
databases:
System databases
A system database stores information about the system - about the SQL Server
itself, about all other databases, and about SQL Server components other than
the Database Engine component.
254 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ax02-mssql.fm
similar to the SQL Server binaries. The resource database datafiles are
located in the same place as the datafiles for the master database, and if you
move, or restore the master database to a different location, you must also
move or restore the resource datafiles to the same location as the master
database datafiles. The resource database data file and log file are named
mssqlsystemresource.mdf and mssqlsystemresource.ldf respectively.
For more information about the resource database, refer to Microsoft Books
On Line:
http://msdn2.microsoft.com/en-us/library/ms190940.aspx.
SQL Server does not support directly updating the information stored in the
system databases. To manage and modify the information stored in the system
databases you must use one of the SQL Server administrative tools provided
within the SQL Server installation.
User databases
A user database stores user information. You create and store tables, indexes,
procedures, triggers and other objects in user databases.They must be backed
up regularly, especially after an index has been created of after a load operation.
It is a good practice to create different user databases for different applications.
Database files
SQL Server databases have three types of files:
Primary data file: This file contains the database catalog tables. It can also
contains user data and objects. The recommended file name extension for
primary files is .mdf.
Secondary data file: This optional file contains user data and objects only,
and is used to spread the data across different files and/or drives. The
recommended file name extension for secondary files is .ndf.
Transaction log file: This file records all database transactions, and it is used
to recover the database in case of failures. The recommended file name
extension for transaction log files is .ldf.
Each SQL server database has at least two operating system files: a primary
data file and a transaction log file. By default, the data and transaction log files
Appendix B. Microsoft SQL Server overview for Tivoli Storage Manager administrators 255
6148ax02-mssql.fm Draft Document for Review April 30, 2008 1:21 pm
The location of all datafiles in a database are recorded in the master database
and also in the database primary data file. Most of the time, SQL Server uses the
information stored in the master database to identify the datafiles, but, in some
situations, such as a recover from the master database, SQL Server uses the
information stored in the primary data file to initialize the database.
All files have a logical name and a physical name. The logical name is the name
that the file is referenced inside SQL Server, and the physical name is the
operating system file name. SQL Server datafiles can be stored in either FAT or
NTFS file systems.
Database filegroups
For administrative and allocation purposes, you can group database objects and
files in filegroups. There are two types of filegroups:
Primary filegroups: The primary filegroup contains the primary data file and
any other data files that are not specifically assigned to an user-defined
filegroup. The primary filegroup is created automatically during the database
creation.
User-defined filegroups: All other filegroups except the primary filegroup are
known as user-defined filegroups.
Each data file is member of only one filegroup, and a database object can be
stored in only one filegroup. For each database, one filegroup is designated as
the default filegroup. When a database object is created without the filegroup
specification, the object will be stored in the default filegroup. If no default
filegroup is specified, the primary filegroup becomes the default filegroup.
Example B-1 shows how to create a database with several files and filegroups
256 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ax02-mssql.fm
FILENAME=
'd:\MSSQL\OLTP\data\OLTP_Primary.mdf',
SIZE=100MB,
MAXSIZE=200MB,
FILEGROWTH=20MB),
FILEGROUP OLTP_FG1
( NAME = 'OLTP_FG1_Dat1',
FILENAME =
'E:\MSSQL\OLTP\data\OLTP_FG1_DF1.ndf',
SIZE = 1000MB,
MAXSIZE=2000MB,
FILEGROWTH=100MB),
( NAME = 'OLTP_FG1_Dat2',
FILENAME =
'F:\MSSQL\OLTP\data\OLTP_FG1_DF2.ndf',
SIZE = 1000MB,
MAXSIZE=2000MB,
FILEGROWTH=100MB)
LOG ON
( NAME='OLTP_log',
FILENAME =
'G:\MSSQL\OLTP\log\OLTP_LOG_DF1.ldf',
SIZE=400MB,
MAXSIZE=1000MB,
FILEGROWTH=100MB);
GO
The command executed in Example B-1 will create a database with similar
structure to Figure B-2 on page 258.
Appendix B. Microsoft SQL Server overview for Tivoli Storage Manager administrators 257
6148ax02-mssql.fm Draft Document for Review April 30, 2008 1:21 pm
The SQL Server recovery model relies on a transaction log to record all
transaction activities in the database. When data is modified, this modification is
first written to the log cache and to the transaction log file. The information
recorded for the transaction contains the modification being executed by the
transaction, the necessary information to undo, or rollback, the transaction and
restore the data to the state before the operation - the before image, and also the
value of the data after the transaction - the after image. Some transactions will
record the entire row, while others will record only the bytes that have changed
during the transaction.
Transactions from the transaction log are periodically committed to the database
data files and written to the disk. At this point, the transaction log records for
these transactions become inactive - in other words, all such transaction
258 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ax02-mssql.fm
information is already written in the database data files and the transaction log
records will be used only if a database restore from a backup taken prior to this
moment is performed.
The transaction log architecture allows SQL Server to perform three operations:
Recover from a single transaction
When an application submits a ROLLBACK command, or when there is a
connection failure between the client and the server, the log records stored in
the transaction log are used to roll back the modifications made by the
incomplete transactions.
Recover all transactions when a database is started
When a database is restarted after a failure, the transaction log records are
used to roll forward committed transactions that are not written in the
database data files, and to roll back any uncommitted transactions, ensuring
database integrity.
Rolling forward a database in a recovery scenario
After a database restore, SQL Server uses the transaction log records to
reapply all transactions performed in the database what were recorded, and
to roll back any uncommitted transactions.
Multiple log files are treated as if they were concatenated into a single file.
Note: Truncating the transaction log does not reduce the size of a physical log
file, it only reduces the size of the logical log file. To reduce the size of a
physical log file, it is necessary to shrink the file, using, for example, the DBCC
SHRINKFILE command.
Appendix B. Microsoft SQL Server overview for Tivoli Storage Manager administrators 259
6148ax02-mssql.fm Draft Document for Review April 30, 2008 1:21 pm
When a log truncation occurs, all inactive transactions are deleted from the
transaction log. However, this information is still required to roll forward a
database during a recovery process. To address this situation, SQL Server
allows you to perform transaction log backups. A transaction log backup copies
all information recorded in the transaction log to a backup file, and then performs
a truncate log to liberate space for new transactions.
Note: The backup database strategies are discussed in 2.3, “Microsoft SQL
Server backup planning” on page 40.
Another important aspect is that recording all database transactions could cause
severe performance impacts in the environment, specially for operations that
demand a high amount of data manipulation, such as an index creation or a data
warehouse load process, and also can consume a large amount of disk space.
For this situation, SQL Server allows you to reduce the amount of information to
be recorded in the transaction log files. The trade-off is, as not all information will
be recorded in the transaction log file, you may not be able to fully restore a
database since you will not have all required information recorded.
To give the flexibility to the administrators to choose the right option for their
specific needs, SQL Server implements three database recovery models, which
are mutually exclusive, and, with some limitations, can be changed when
needed.
With the simple recovery model, you cannot perform transaction log backups.
Log space is automatically reclaimed, keeping the transaction log file space
small. This model permits high-performance bulk-copy operations, because only
page allocations are logged instead of row insertions, increasing performance
and reducing log space consumption.
Note: The simple recovery model is similar to setting the trunc. log on chkpt.
database option in SQL Server 7.0 or earlier.
Generally, the simple recovery model is not used for read-write user databases in
production environments.
260 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ax02-mssql.fm
This recovery model requires more disk space for the transaction log files than
other recovery models. Under this model, transaction log backups are essential,
and must be executed periodically to ensure database recovery and to keep
transaction log disk usage at normal levels.
Note: Even the full recovery model does not guarantee no data loss. In an
event of complete hardware crash, you can have information stored in the tail
of the log file that was not backed up before the failure. In this case, you must
redo all changes after the last transaction log backup.
Appendix B. Microsoft SQL Server overview for Tivoli Storage Manager administrators 261
6148ax02-mssql.fm Draft Document for Review April 30, 2008 1:21 pm
Platform and network, including the physical hardware, the operating system
and the remote systems communicating with the SQL Server,
Principals and database object security, that includes users authentication
and authorization,
Application security, that is related to the security of applications accessing
SQL Server databases.
Authentication
The user must have an account in order to be able to connect to the SQL server.
There are two authentication modes:
Windows authentication mode: SQL Server relies on Windows
authentication to verify the username and password credentials. SQL Server
logins are not allowed to connect to the SQL Server when Windows
authentication mode is configured.
Mixed mode authentication: Provided for backward compatibility, mixed
mode authentication allows users to connect to SQL Server using either their
Windows login accounts or an SQL Server login account. When an SQL
Server login account is used, the username and password data are verified
against the SQL Server.
The users connected to SQL Server using their login accounts are called trusted
connections. The SQL server administrator specifies which kind of authentication
is used, and the default and recommended setting is Windows authentication
only.
Authorization
After a user has been authenticated, in order to perform any activity in the SQL
Server, the user must have proper permissions, which show what kind of activity
the user can perform. The are two authorization levels:
Login permissions: The login permissions are related to activities the user can
perform at the SQL Server instance level, such as create a database, modify
a SQL Server instance parameter, or create a SQL Server login, for example.
262 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ax02-mssql.fm
The login permissions are granted through the use of fixed server roles, and
each role has a predefined set of permissions. Some examples of fixed server
roles are the sysadmin role, that can perform any activity in the SQL Server,
or the serveradmin role, that can set server wide configuration options, and
shutdown the server.
Database permissions: The database permission are related to activities the
user can perform at the database level, such as create a table, read any table
in the database, manage object permissions and also backup the database.
The database permissions are configured through the use of fixed database
roles or directly to users using the GRANT, REVOKE and DENY commands.
As the fixed server roles, each fixed database role has a predefined set of
permissions. Examples of fixed database roles are the role, that can perform
any activity in the database, the db_backupoperator, that has permission to
back up the database, and the db_datareader, that can access data from all
user tables in the database.
Principals
Principals are users, groups and applications granted access to SQL Server.
There are three different types of principals:
Windows-based principals:
Examples of windows-based principals are Windows domain logins and
Windows user logins
SQL Server-level principal:
An example of SQL Server-level principal is the sa SQL Server account.
Database-level principal:
Examples of database-level principals are database users, database roles
and application roles.
The principals connects to the SQL Server database using SQL Server
authentication or Windows authentication methods.
Appendix B. Microsoft SQL Server overview for Tivoli Storage Manager administrators 263
6148ax02-mssql.fm Draft Document for Review April 30, 2008 1:21 pm
Securables
Securables are resources that have authorization access controlled either by
SQL Server or by the Windows operating system. At the Windows level, the
securables include files and registry keys used by SQL Server, and at the SQL
Server level, securables are resources, such as the server itself, the databases
and the objects stored within a database, that have the authorization access
controlled by SQL Server.
There are three scope levels for the SQL Server securables:
Server
Examples of server securables are SQL Server Endpoints, logins and
databases.
Database
Examples of database securables are database users, database roles, full
text catalogs and certificates.
Schema
Examples of schema securables are types, objects, such as tables, views and
procedures, and XML schema collections.
Permissions
Permissions are the rights granted to principals to perform some activity against
the securables. At the Windows securable level, permissions are controlled
through Windows Access Control Lists (ACL). The GRANT, REVOKE and DENY
statements are used to control the permissions that principals can perform on
SQL Server securables. Each SQL Server securable has a set of permissions
associated to them. Some examples of permissions are SELECT, INSERT,
UPDATE and DELETE permissions applicable to TABLE objects, EXECUTE
permission related to PROCEDURE objects and BACKUP permission related to
the DATABASE securable.
264 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148ax02-mssql.fm
shared among all SQL Server instances installed on the machine. The
instance-unaware services are installed only once, and cannot be installed
side-by-side, while an instance-aware service can be installed multiple times,
each one using its own SQL Server binaries.
Appendix B. Microsoft SQL Server overview for Tivoli Storage Manager administrators 265
6148ax02-mssql.fm Draft Document for Review April 30, 2008 1:21 pm
Each SQL Server account has its own registry, file system and operating system
security requirements to operate properly, and these requirements are
configured by the SQL Server installer during SQL Server installation.
Enterprise Manager SQL Server Management Studio Execute most administrative tasks
for SQL Server databases.
Query Analyzer Code editor in SQL Server GUI tool to execute ad hoc queries
Management Studio
Client Network Utility SQL Server Configuration Configure client network protocols
Manager and parameters
Service Manager SQL Server Configuration Start and stop SQL Server
Manager databases
osql command prompt tool osql is still supported Start and stop SQL Server
sqlcmd databases
266 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148abrv.fm
268 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148bibl.fm
Related publications
The publications listed in this section are considered particularly suitable for a
more detailed discussion of the topics covered in this book.
IBM Redbooks
For information about ordering these publications, see “How to get Redbooks” on
page 270. Note that some of the documents referenced here may be available in
softcopy only.
IBM Tivoli Storage Manager Implementation Guide, SG24-5416
IBM Tivoli Storage Management Concepts, SG24-4877
Using IBM Tivoli Storage Manager to Back Up Microsoft Exchange with VSS,
SG24-7373
Other publications
These publications are also relevant as further information sources:
IBM Tivoli Storage Manager for Databases Data Protection for Microsoft SQL
Server Installation and User’s Guide, SC32-9059
IBM Tivoli Storage Manager for Windows Backup-Archive Clients Installation
and User’s Guide, SC32-0146
IBM Tivoli Storage Manager for AIX Administrator's Guide, SC32-0117
IBM Tivoli Storage Manager for AIX Administrator's Reference, SC32-0123
IBM Tivoli Storage Manager for HP-UX Administrator's Guide, SC32-0118
IBM Tivoli Storage Manager for HP-UX Administrator's Reference,
SC32-0773
IBM Tivoli Storage Manager for Linux Administrator's Guide , SC32-0119
IBM Tivoli Storage Manager for Linux Administrator's Reference, SC32-0125
IBM Tivoli Storage Manager for Sun Solaris Administrator's Guide,
SC32-0120
Online resources
These Web sites are also relevant as further information sources:
Description1
http://????????.???.???/
Description2
http://????????.???.???/
Description3
http://????????.???.???/
270 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148IX.fm
Index
sqlservr.exe 180
A stgpool 199
Access Control Lists, see ACL
tdpsql 133
ACL 264
tdpsqlc 63, 103–104, 147
Agent node 61
vshadow 67, 230–231
Analysis Services 55, 252
VSSADMIN 230
API 5, 232
vssadmin 67, 229
Application Programming Interface client 5
communications parameters 5
Application Programming Interface, see API
COMPRESSION 100
application programming interface, see API
copy group destination 79
archive package 237
Copy Services 6
ascsql.lic 6
Copy-only backup 27
asynchronous 53
copy-only backup 27
ator 269
copy-on-write method 10
CSS 254
B Customer Support Services, see CSS
BACKDELete 60
Backup Destination BOTH 59
Backup-archive client 5
D
Data Protection client 5
backup-archive node 115
Data Protection components 244
BEGIN command 226
Data Protection for Informix 244
BUFFERSIZE parameter 64
Data Protection for Lotus Domino 247
Data Protection for Microsoft Exchange 248
C Data Protection for Oracle 245
CAD 67, 73–74, 111 database 253
Client Acceptor Daemon, see CAD Database Engine 252
client options file 5 db_backupoperator 263
client settings 5 db_datareader 263
clientaction 202 dbcc command 50
CLUSTERNODE 100 DESTINATION 59
clusternode 66 Disaster Recovery Manager, see DRM
collocation 237 DRM 238
commands dsm.opt 60
BEGIN 226 DSMAGENT 73
dbcc 50 dsmcutil command 112
dsmcutil 112 dsmcutil.txt 100
GRANT 72, 118–119 dsmsched.log 63
INACTIVATE 168
move 65
QUERY 167
E
EMC TimeFinder 12
query 172
ENABLELANFREE 65, 100
REGISTER 64, 72
Enterprise Manager 266
RESTORE 178
Enterprise Resource Planning, see ERP
I N
IBM FlashCopy 12 named-marks restore 30
IBM Tivoli Storage Manager client 4 NAS 238
IBM Tivoli Storage Manager for Enterprise Re- NDMP 239
source Planning 246 network attached storage, see NAS
IBM Tivoli Storage Manager for Space Management Network Data Management Protocol, see NDMP
240 nocopy 12
IIS 56 nodename option 60
INACTIVATE command 168 nodename parameter 61
Informix 244 Notification Services 252
instance 253
Integration Services 56, 252
Internet Information Services, see IIS O
Offline backup 27
OLAP 252
272 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
Draft Document for Review April 30, 2008 1:21 pm 6148IX.fm
Index 273
6148IX.fm Draft Document for Review April 30, 2008 1:21 pm
V
VCS 25
VDS 19
VERDeleted 59
verexists 58
VERITAS Cluster Server, see VCS
Virtual Disk Service, see VDS
Volume Shadow Copy Service, see VSS
Volume Snapshot Services, see VSS
vshadow command 67, 230–231
VSS 1, 8, 228, 250
VSS instant restore 29
VSS Integration Module 6
VSS restore 28
VSS_FULL_TSM 79
VSS_LOCAL 79
VSS_RESERVED 120
VSSADMIN command 230
vssadmin command 67, 229
VSSALTSTAGINGIDIR 98
VSSPOLICY statement 73
VSSPOLICY statements 104
W
WAFL 38
WAN 234
warm backup 52
wide area network, see WAN
Write Anywhere File Layout, see WAFL
X
X/Open Backup Services API, see XBSA
XBSA 244
274 Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
To determine the spine width of a book, you divide the paper PPI into the number of pages in the book. An example is a 250 page book using Plainfield opaque 50#
smooth which has a PPI of 526. Divided 250 by 526 which equals a spine width of .4752". In this case, you would use the .5” spine. Now select the Spine width for
the book and hide the others: Special>Conditional Text>Show/Hide>SpineSize(-->Hide:)>Set . Move the changed Conditional text settings to all files in your
book by opening the book file with the spine.fm still open and File>Import>Formats the Conditional Text Settings (ONLY!) to the book files.
Draft Document for Review April 30, 2008 1:21 pm 6148spine.fm 275
Backing up Microsoft SQL
Server with IBM Tivoli Storage
Manager
(1.5” spine)
1.5”<-> 1.998”
789 <->1051 pages
Backing up Microsoft SQL Server
with IBM Tivoli Storage Manager
(1.0” spine)
0.875”<->1.498”
460 <-> 788 pages
Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
(0.5” spine)
0.475”<->0.875”
250 <-> 459 pages
Backing up Microsoft SQL Server with IBM Tivoli Storage Manager
(0.2”spine)
0.17”<->0.473”
90<->249 pages
(0.1”spine)
0.1”<->0.169”
53<->89 pages
To determine the spine width of a book, you divide the paper PPI into the number of pages in the book. An example is a 250 page book using Plainfield opaque 50#
smooth which has a PPI of 526. Divided 250 by 526 which equals a spine width of .4752". In this case, you would use the .5” spine. Now select the Spine width for
the book and hide the others: Special>Conditional Text>Show/Hide>SpineSize(-->Hide:)>Set . Move the changed Conditional text settings to all files in your
book by opening the book file with the spine.fm still open and File>Import>Formats the Conditional Text Settings (ONLY!) to the book files.
Draft Document for Review April 30, 2008 1:21 pm 6148spine.fm 276
Backing up Microsoft
SQL Server with IBM
Tivoli Storage Manager
(2.5” spine)
2.5”<->nnn.n”
1315<-> nnnn pages
Backing up Microsoft
SQL Server with IBM
Tivoli Storage Manager
(2.0” spine)
2.0” <-> 2.498”
1052 <-> 1314 pages
Back cover ®
Draft Document for Review April 30, 2008 1:21 pm
SG24-6148-01 ISBN