HP Application Software Suite for Microsoft SQL manual Recovery for Microsoft SQL Server

Page 68

8 Recovery for Microsoft SQL Server

Microsoft SQL Server Recovery Models

Microsoft SQL Server offers three disaster-recovery models:

Simple Recovery Model - The Simple Recovery model enables you to restore a database to the point at which a virtual copy or backup was created; it does not enable you to restore a database to a specific point in time. Therefore, any data modifications made between the time of the most recent backup and the time of the failure are lost. This recovery model uses circular logging to minimize the amount of space used for transaction logs.

Full Recovery Model - The Full Recovery model enables you to restore a database to a specific point in time; either to a virtual copy created before an error occurred or to the point just before which a system failure occurred. Under this recovery model, transaction logs are saved until a failure occurs, and therefore no data is lost.

Bulk-Logged Recovery Model - The Bulk-Logged Recovery model is used for high-performance operations such as bulk copying and bulk data modification.

NOTE: If you are recovering data from SQL servers across multiple domains, ensure you have stored the login and password for each domain on your backup server. For more information, see “Configuring Recovery Manager Policies” (page 20).

Recovering Data with HP 3PAR Recovery Manager

HP 3PAR Recovery Manager for Microsoft SQL Server supports both recovery from virtual copy and recovery from media. However, only recovery from virtual copy enables you to perform a point-in-time or point-of-failure recovery.

Therefore, if you are running SQL Server under the Full Recovery model, you must perform a restore from a virtual copy.

Preparing for the Recovery Process

Before recovery begins, you must ensure the database can be taken offline.

1.Check whether database ID 9 is full.

When the SQL server takes a database offline, it writes a checkpoint record to database ID 9. After this log file becomes full, the SQL server cannot write the checkpoint record and therefore cannot take the database offline.

2.If database ID 9 is full, either:

Back up the transaction log for the database

Detach the database

Recovery Manager uses the Volume Shadow Copy Service (VSS) framework to restore data. Because the VSS framework takes a database offline before it allows you to restore it, you do not need to place the database in single-user mode.

Recovering from Logical Errors with Point-in-Time Recovery

Point-in-time recovery is useful for recovering from logical errors. For example, if you accidentally altered an entry or deleted a table, you can use a virtual copy to restore your instance or database back to a consistent, known prior state. Point-in-time recovery restores the instance or database to the state it was in at the time the virtual copy was created.

To perform a point-in-time recovery, use Recovery Manager to perform a file copy restore or a volume restore. The restore steps depend on whether your SQL servers are in a clustered or non-clustered environment.

68 Recovery for Microsoft SQL Server

Image 68
Contents User’s Guide Documentation Contents Configuring Backup Software Using the Recovery Manager GUIUsing the Recovery Manager CLI Recovery for Microsoft SQL ServerRemote Copy for Recovery Manager Troubleshooting Event MessagesTypographical Conventions IntroductionRelated Documents Advisories Overview of Recovery Manager System RequirementsWindows Server Requirements Additional System RequirementsRecovery Manager Requirements Running Recovery Manager on a Japanese OSFeatures Supported Features Not Supported Microsoft Volume Shadow Copy ServiceSupported VSS Components How HP 3PAR VSS Software Works with Microsoft SQL ServerRecovery Manager Layout Overview of Recovery Manager Pre-Installation Steps Installation and DeinstallationUpgrading to Recovery Manager 4.2.0 for SQL Installing Recovery Manager Verifying the Installation Understanding the RegistryDeinstalling Recovery Manager Configuring Recovery Manager Configuring Recovery ManagerConfiguring the SQL Database Grouping Volumes into Autonomic Groups Configuring Recovery Manager PoliciesConfiguring Mount Functionality Testing SQL Connectivity Volume SetsConfiguring the Host Computer and the HP 3PAR Storage System Troubleshooting SQL ConnectivityFormatting Partitions on a New HP 3PAR Vlun Windows ServerConfiguring Backup Software Setting Up Symantec NetBackupOverview Before You BeginConfiguring HP Data Protector Setting Up the HP Data Protector Backup SpecificationSetting Up HP Data Protector Cell Manager Access RequirementsUsing Your Backup Software Using Symantec NetBackupUsing HP Data Protector RM installation location\log\nbulog\databasetimestamp.logUsing the Recovery Manager GUI Overview of the Recovery Manager GUIOpening the Recovery Manager GUI Closing the Recovery Manager GUIUpdating Registration after Server Modification Unregistering a SQL Server Instance Setting the Recovery Manager PolicyHow Recovery Manager Policies Work Setting Recovery Manager Policies Retention Time RestrictionsConfiguring Email Notifications Modifying the Policy for a Virtual CopyDeleting Email Configurations Creating Virtual CopiesHow Virtual Copy Creation Works Manually Creating a Virtual CopyCreating Remote Virtual Copies Scheduling Automatic Virtual CopiesAutomating Tasks Scheduling Automated Tasks with Task SchedulerMounting a Virtual Copy Managing Automated Tasks with Task ManagerBacking Up a Virtual Copy Manually Creating Backups at the Instance or Database LevelUnmounting a Virtual Copy Scheduling Automatic Backups of an Instance or Database Creating a Backup of a Virtual Copy Removing a Backup from the RepositoryRestoring Instances, Databases, and Volumes Restoring an Instance or Database with Volume Restore Restoring an Instance or Database with File Copy RestoreRestoring an Instance or Database from a Backup Analyzing and Synchronizing the RepositoryRemoving a Virtual Copy Viewing Event Message DescriptionsRecovery Manager Commands Using the Recovery Manager CLIRecovery Manager for SQL Server Command Line Interface CLI RMSql analyze RMSql analyze -s SQL server -sync -fSQL Server SyncRMSql backup Example RMSql create RMSql create -s SQLServer -d test RMSql create -s SQLVirtualServer -d testUsing the Recovery Manager CLI RMSql deletebackup RMSql deletebackup -s server1 -d db1 -tRMSql display RMSql display -s server1RMSql listbackup RMSql mount Instance virtual copy limit RMSql policyDatabase virtual copy limit RMSql policy -exp 30d -s SQL server Retain timehHdDRMSql policy -n 5 -s SQL server Recovery Manager Commands RMSql portconfig RMSql portconfig -n number -s WindowsHostRMSql portconfig -n RMSql portconfig -n 9999 -s WindowsHostRMSql remove RMSql remove -s SQL server -t timestampRMSql report RMSql report -s WindowsHost -output OutputDirectoryWindowsHost RMSql report -s Grampus -output c\MyReportRMSql repository -a d\3parvv RMSql repositoryRMSql repository -a alter location -r AltLocation RMSql restoreSystemDrive\3parSnapshot by default Norecovery RMSql restore -s server1 -d testdb -tRMSql restore -snap -s server1 -d testdb -t SnapUsing the Recovery Manager CLI RMSql setvc RMSql setvc -s server1 -t 020409162103 -exp 2h RMSql setvc -s server1 -t 020409162103 -exp 30dRMSql timeconfig RMSql timeconfigRMSql timeconfig -prt RMSql timeconfig -bktRunning Recovery Manager as a Scheduled Job Scheduling an Automated Task in WindowsRMSql unmount RMSql unmount -s SQL server -t timestampFor example Recovery for Microsoft SQL Server Microsoft SQL Server Recovery ModelsRecovering Data with HP 3PAR Recovery Manager Preparing for the Recovery ProcessRecovering All Data with Point-of-Failure Recovery Performing a Point-of-Failure Recovery Recovering All Data with Point-of-Failure Recovery Remote Copy for Recovery Manager How Remote Copy WorksSetting Up Remote Copy Setting Up Remote Copy Volume Groups Setting Up a Remote Copy Volume Group for DatabasesSupport for Remote Copy Modes and Policies Support for GeoCluster for Microsoft WindowsRecovering a SQL Database from a Remote Copy Backup Server Setting Up a Remote Copy Volume Group for InstancesServer Virtualization Environments VMWare and EgeneraTroubleshooting Installpath\NetBackup\db\ Installpath\NetBackup\db\altnames\No.RestrictionsEvent Messages Event ID Event ID Event ID Event ID Provcfg conn -syncrc Yes