3. Legacy Backup
• In SQL SERVER two types of backups are available: Legacy backups
and VSS backups.
• Legacy backup is a specialized API backup that functions with the
Microsoft 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 Server.
4. • A Legacy backup creates a copy of all or part of a SQL Server database on
Tivoli Storage Manager storage media.
• When you initiate a Legacy backup operation, Data Protection for SQL
executes the following steps:
• 1. Starts a session with the server using the IBM Tivoli Storage Manager API
and information contained in a client options file.
• 2. Starts a session with the SQL server using an 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 Tivoli Storage Manager server and Microsoft SQL Server
sessions.
5. Legacy Backup
• The following characteristics are true of Legacy backups:
• Full, copy, incremental, differential, and database copy types are
supported. Backup granularity is at the database level.
• Backups are stored on IBM Tivoli Storage Manager server storage.
• Backups are managed through IBM Tivoli Storage Manager server
policy.
• Backups can be performed in a Microsoft Cluster Server (MSCS)
environment.Backups provide Microsoft SQL Server database
integrity check functionality.
6. VSS Backup
• A VSS backup uses Microsoft Volume Shadow Copy Service technology to produce an online
snapshot (point-in-time consistent copy) of SQL Server data that can be stored on local shadow
volumes or on Tivoli Storage Manager server storage.
• During a VSS backup, the SQL server is not in “backup mode” for an extended period of time
because the length of time required to perform the snapshot is usually measured in seconds and
not hours.
• In addition, a VSS backup makes it possible to take a snapshot of large amounts of data at the
same time because the snapshot works at the volume level.
• VSS backups require 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 use an alternate machine to move data to the IBM Tivoli Storage Manager server, an
offloaded backup.
• 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 Server data is not transferred from Tivoli
Storage Manager server storage over the network.
8. VSS
• Full VSS snapshot backups and full VSS offloaded snapshot backups are
supported. Incremental, differential, and transaction log backup types are
not supported.
• Backup granularity is at the database level only. Backups are managed
through Tivoli Storage Manager policy.
• Backups can be stored on local shadow volumes, Tivoli Storage Manager
server storage, or both locations.
• Different policy settings can be defined for each storage location and
backup method.
• Backups to Tivoli Storage Manager server storage can be offloaded to an
alternate machine, to reduce the workload on the production servers.
• Backups can be performed in a Microsoft Cluster Server (MSCS) or Veritas
Cluster Server (VCS) environment.
9. Legacy vs VSS
Legacy VSS
Using sql vdi interface Uses volume shadow copy services
Supports full/diff/log backups Supports only full backups
Can be restored to any sql instance Can be restored to same sql instance only
Vss is much faster in backups and restores for the larger
database
Vss backup has better consistency as it created point in
time snapshot
10. SQL Server Management Objects (SMO)
Programming
• SQL Server Management Objects (SMO) is a collection of objects that
are designed for programming all aspects of managing Microsoft SQL
Server.
• You can use SMO to create databases, perform backups, create jobs,
configure SQL Server, assign permissions, and to perform many other
administrative tasks.
• Programming-specific tasks using SMO objects include complex
subjects that would only be required by programs with a specific
function, such as backing up, monitoring statistics, replication,
managing instance objects, and setting configuration options.
11. SMO
• In SMO, the Backup class and the Restore class are utility classes that provide the tools to
accomplish the specific tasks of backing up and restoring. A Backup object represents a
specific backup task that is required instead of a Microsoft SQL Server object on the
server instance.
• If data loss or corruption occurs, the backup must be restored, either fully or partially.
Partial restoration uses the FileGroupCollection collection to segment the data to be
restored. If the backup is of a transaction log, the data can be restored up to a particular
point in time by using the ToPointInTime property of the Restore object. The data can
also be validated by using the SqlVerify method. The recommended backup procedure is
to check the integrity of the backup by doing a restore operation and checking the data
in the database on a regular basis.
• Like the Backup object, the Restore object does not need to be created by using a Create
method because it does not represent any object on the instance of SQL Server. The
Restore object is a set of properties and methods used to restore a database.
The virtual device interface of SQL Server allows developers to define "virtual devices" for SQL Server to backup and restore databases and transaction logs.