SQL Backup and Restore using CDP



Similar documents
SonicWALL CDP 5.0 Microsoft Exchange InfoStore Backup and Restore

SonicWALL CDP 5.0 Microsoft Exchange User Mailbox Backup and Restore

GO!NotifyLink. Database Maintenance. GO!NotifyLink Database Maintenance 1

Table of Contents. CHAPTER 1 About This Guide CHAPTER 2 Introduction CHAPTER 3 Database Backup and Restoration... 15

Migrating MSDE to Microsoft SQL 2008 R2 Express

Support Document: Microsoft SQL Server - LiveVault 7.6X

Moving the TRITON Reporting Databases

BackupAssist v6 quickstart guide

BackupAssist v6 quickstart guide

Install SQL Server 2014 Express Edition

STIDistrict Server Replacement

Moving the Web Security Log Database

BrightStor ARCserve Backup for Windows

Bosch ReadykeyPRO Unlimited Installation Guide, product version 6.5. This guide is item number DOC , revision 2.029, May 2012.

Database Maintenance Guide

Portions of this product were created using LEADTOOLS LEAD Technologies, Inc. ALL RIGHTS RESERVED.

DocAve 6 Service Pack 1 Platform Backup and Restore

Upgrading from MSDE to SQL Server 2005 Express Edition with Advanced Services SP2

3 Setting up Databases on a Microsoft SQL 7.0 Server

Networking Best Practices Guide. Version 6.5

How to Copy A SQL Database SQL Server Express (Making a History Company)

QUANTIFY INSTALLATION GUIDE

1 of 10 1/31/2014 4:08 PM

Video Administration Backup and Restore Procedures

Reporting Installation Checklist

TIGERPAW EXCHANGE INTEGRATOR SETUP GUIDE V3.6.0 August 26, 2015

Implementing Microsoft SQL Server 2008 Exercise Guide. Database by Design

NovaBACKUP. Storage Server. NovaStor / May 2011

Exchange Server Backup and Restore

CA ARCserve Backup for Windows

User Guide. CTERA Agent. August 2011 Version 3.0

ilaw Installation Procedure

DigiVault Online Backup Manager. Microsoft SQL Server Backup/Restore Guide

SQL Server Protection Whitepaper

1. CONFIGURING REMOTE ACCESS TO SQL SERVER EXPRESS

Upgrade Guide BES12. Version 12.1

Installation Guide: Delta Module Manager Launcher

NETWORK INSTALLATION GUIDE V5.1. Recorder 6 JNCC

Portions of this product were created using LEADTOOLS LEAD Technologies, Inc. ALL RIGHTS RESERVED.

Online Backup Client 3.9 Manual

Vess A2000 Series. NVR Storage Appliance. Windows Recovery Instructions. Version PROMISE Technology, Inc. All Rights Reserved.

Installing SQL Express. For CribMaster 9.2 and Later

SQL Server Hardening

Best Practices for Backup of Microsoft SQL 2000 Databases with Unitrends Backup Professional

Integrating LANGuardian with Active Directory

Version 4.61 or Later. Copyright 2013 Interactive Financial Solutions, Inc. All Rights Reserved. ProviderPro Network Administration Guide.

DocAve 6 SQL Server Data Manager

InformationNOW SQL 2008 Database Backup and Restoration

InventoryControl for use with QuoteWerks Quick Start Guide

DocAve 6 Platform Backup and Restore

Sitecore Ecommerce Enterprise Edition Installation Guide Installation guide for administrators and developers

SQL Tuning and Maintenance for the Altiris Deployment Server express database.

GP REPORTS VIEWER USER GUIDE

How to protect, restore and recover SQL 2005 and SQL 2008 Databases

CRM Migration Manager for Microsoft Dynamics CRM. User Guide

Use of Commercial Backup Software with Juris (Juris 2.x w/msde)

Backup/Restore Microsoft SQL Server 7.0 / 2000 / 2005 / 2008

Backups and Maintenance

e-business Suite Server Install Guide

VERITAS Backup Exec 9.1 for Windows Servers Quick Installation Guide

Bitrix Site Manager ASP.NET. Installation Guide

Database Administration Guide

Microsoft SQL Server Guide. Best Practices and Backup Procedures

ilaw Server Migration Guide

About This Manual. 2 About This Manual

WhatsUp Gold v16.3 Installation and Configuration Guide

StruxureWare Power Monitoring 7.0.1

MS SQL Server Backup - User Guide

Restoring Sage Data Sage 200

Symantec Backup Exec TM 11d for Windows Servers. Quick Installation Guide

Lenovo Online Data Backup User Guide Version

Telelogic DASHBOARD Installation Guide Release 3.6

Arcserve Backup for Windows

Moving a Romexis Database to an Existing SQL Instance

National Fire Incident Reporting System (NFIRS 5.0) Configuration Tool User's Guide

Features - Microsoft Data Protection Manager

Veritas Cluster Server Database Agent for Microsoft SQL Configuration Guide

EXPRESSCLUSTER X for Windows Quick Start Guide for Microsoft SQL Server Version 1

WHITE PAPER: ENTERPRISE SOLUTIONS. Symantec Backup Exec Continuous Protection Server Continuous Protection for Microsoft SQL Server Databases

Database Administration Guide

vcenter Configuration Manager Backup and Disaster Recovery Guide VCM 5.3

Avatier Identity Management Suite

SQL Server Protection. User guide

Allworx OfficeSafe Operations Guide Release 6.0

SQL Server 2008 R2 Express Installation for Windows 7 Professional, Vista Business Edition and XP Professional.

Rev 7 06-OCT Site Manager Installation Guide

User Guide. Version 3.2. Copyright Snow Software AB. All rights reserved.

Operating System Installation Guide

AVALANCHE MC 5.3 AND DATABASE MANAGEMENT SYSTEMS

Backing up SIMS and FMS Databases

Notes Transfer instructions INTRODUCTION More information

BACKUP & RESTORE (FILE SYSTEM)

1. Overview... 2 Documentation... 2 Licensing... 2 Operating system considerations... 2

Monitoring SQL Server with Microsoft Operations Manager 2005

Tool Tip. SyAM Management Utilities and Non-Admin Domain Users

Server & Workstation Installation of Client Profiles for Windows

1. PROJECT MANAGEMENT INTRO

Migrating TimeForce To A New Server

Backing Up CNG SAFE Version 6.0

Synchronizer Installation

Transcription:

CDP SQL Backup and Restore using CDP Table of Contents Table of Contents... 1 Introduction... 2 Supported Platforms... 2 SQL Server Connection... 2 Figure 1: CDP Interface with the SQL Server... 3 SQL Server Backup and Restore... 3 CDP Software Tools Capabilities... 3 Additional Information... 4 SQL Server Backup with CDP... 4 Full, Differential and Log Backup... 4 CDP Storage of the SQL Database... 4 SQL Configuration Levels... 4 Figure 2: Configuration Levels on the AT and EM... 5 Table 1: SQL Configuration Map... 6 Configuring Backup Intervals... 6 Table 2: Database Backup Intervals... 6 Table 3: Interval Scheduling Examples... 7 SQL Authentication... 7 Figure 3: SQL Authentication Button on the CDP Enterprise Manager... 8 Figure 4: SQL Authentication Settings with CDP Enterprise Manager... 8 Figure 5: Successful Connection... 9 Figure 6: Failed Connection... 9 Backing Up Native SQL Databases... 9 Table 3: Schedule Rules of SQL Server... 9 Offsite Backup of SQL... 10 SQL Server Restore with CDP... 10 Database Recovery... 10 Additional Information... 10 SQL Server Backup and Restore Case Scenario... 14 SQL Backup Configuration Example... 14 SQL Backup Configuration Example... 14 SQL Authentication... 19 Authentication Modes... 19 Windows Authentication... 19 SQL Server Authentication... 20 Figure 9: SQL Server Security Decision Tree... 21 How to set up Windows Authentication Mode security... 21 SQL Account Configuration... 22 Agent Service SQL Backup Process... 23 Full Backup Triggers... 24 SQL Backup when no changes occur... 25 Problem 1 - Installation Issues... 25 Problem 2 - Three SQL Full Backups... 26 Problem 3 - VDI Object Creation Error... 26 Resolution... 26 Problem 4 - CDP and GMS... 27

Introduction This document details the process of backing up and restoring Microsoft SQL with SonicWALL Continuous Data Protection (CDP). Note that this document mainly focuses on key concepts and topics relating to the interaction between CDP and the SQL server. Proper training in SQL Database Administration is advised for successful maintenance, backup and restore of the Microsoft SQL Database Management System (DBMS). Supported Platforms SonicWALL CDP Software version 2.3 supports the following SQL server versions: SQL 7.0 SQL 8.0 (SQL 2000) SQL 2005. SonicWALL CDP supports a SQL server running on the following operating systems: Windows 2000 Server (SP4) Windows 2003 Server (SP1) Windows 2000 Professional (SP4) Windows XP Professional (SP2) SQL Server Connection CDP Interfaces directly with the Microsoft SQL server for backup and restore. It interfaces through the ODBC through an SQL-ODBC driver that is installed with SQL. By ODBC, the Agent service communicates to the SQL server through transactional SQL commands. 2

Figure 1: CDP Interface with the SQL Server The Agent Service first needs to connect to the database and authenticate using either a Windows user account credentials or using a SQL account. More details are provided in the SQL authentication section. SQL Server Backup and Restore When the CDP Agent Service (AS) backs up an SQL database, it instructs SQL to place the data in a certain location in memory. The AS will then process the data one block at a time, compressing it and sending to the appliance. In the section SQL Server Backup with CDP, the different CDP backup options are covered. Here we also cover the meaning and configuration of Full, Differential, or Log backups. Restoring the database can be done in one or two ways. The database can be either restored to disk or to application. When restoring the database to disk, the database is downloaded as a set of files from the CDP Appliance. Restored to application, on the other hand, applies the database directly to the same SQL server. Both these options are covered in the section SQL Server Restore with CDP. CDP Software Tools Capabilities Both the CDP Enterprise Manager (EM) and the Agent Tool (AT) can perform all backup and restore operations for the agent machine it is running on. In addition, the Agent Tool displays a useful log in the Status page showing each database being backed up. 3

If Local Management is disabled for the Agent s policy, then the Agent Tool will not be able to backup and restore operations. Enterprise Manager can also perform a subset of operations from a different agent. It is able to restore SQL to disk and it can modify backup intervals on a database. However, it can not perform operations that rely on local querying of SQL such as adding new databases for backup or restoring to application. Additional Information Appendices have been added for convenient additional information. Appendix A covers in detail SQL authentication. Appendix B covers the algorithm used by the agent to back up CDP. Appendix C lists the events that force a full backup, re-scheduling the server backup. Appendix D lists the exceptions to when the CDP agent software will still perform a full database backup despite no changes having occurred to it. Finally Appendixes E through H list common issues and resolutions for SQL backup with CDP. SQL Server Backup with CDP Full, Differential and Log Backup The SQL database provides full, differential and log backups. A full backup extracts the entire database. The SQL server divides a database into logical blocks. After a full backup, the database tags blocks of data that have changed. In a differential backup, only the tagged blocks of data are backed up. The changed tag is removed from all blocks every time a full backup is performed. Each database is composed of two files which, by default, are located in the data folder. One is the main database file with the MDF extension and the other is the database s transactional log file with the LDF extension. The SQL Database Management System (DBMS) will write each SQL command to the log file before it writes to the database. The SQL commands in the log are uncommitted until they are executed on the database. A log backup will retrieve all committed transactions from the log file and, afterwards, it will truncate the file. Full and differential backups will also truncate the log file. Backing up log files allow for point-in-time recovery. CDP Storage of the SQL Database The CDP appliance will store the last two full backups of each database, together with all related differential and log backups. If the agent is also configured for SQL Offsite Service backup, the last full backup is stored at the offsite service for all databases backed up on the appliance. SQL Configuration Levels SQL backup configuration is set at different levels. These are: 4

Agent (or application) Level: Offsite backup is set on the entire agent. SQL Instance Level: More than one SQL instance can be running on a same machine. Database Level: An instance can contain one or more databases. The databases are backed up independently. Servers normally have only one instance which matches the Windows computer name. SQL instances can be created to allow for completely separate database management access to different databases. Also, an instance will be created for each database version installed on the same machine. In this way, SQL 2000 and SQL 20005 can run on the same server, but they will have different instances. Figure 2: Configuration Levels on the AT and EM Agent Tool: Enterprise Manager: Agent Level SQL Instance Level Database Level Different SQL backup configurations settings for each level are shown in Table 1. For example, Offsite Backup is applied to the entire agent, meaning that all selected instances and databases will be backed up to offsite. Authentication is set at an instance level. Backup intervals are described in the next section. 5

Table 1: SQL Configuration Map Configuring Backup Intervals SonicWALL CDP can be configured to perform full, differential and/or log backup. Each database is backed up independently from one another where backup intervals can be set differently for each. Possible intervals are listed in Table 2. Table 2: Database Backup Intervals Full Monthly Biweekly Weekly Daily Differential Daily Every 12, 6, 4, 3, 2 or 1 hours. Every 30 minutes Log Daily Every 12, 6, 4, 3, 2 or 1 hours. Every 30 minutes The following interval settings precedence rules apply: Full backup always takes precedence over Differential: o If the differential is >= than the full, then the full will take precedence. Diff always takes precedence over Log: o If the log is >= than the differential, then the differential will take precedence. 6

Table 3 below shows how the precedence rules play out on different interval scheduling on the Barcelona database. Table 3: Interval Scheduling Examples Schedule 1 Schedule 2 Schedule 3 Schedule 4 Result: Full: Daily Diff: 2 Hours Log: 30 minutes Result: Full: Daily Diff: 2 Hours Log: --- Result: Full: Daily Diff: -- Log: 2 Hours Result: Full: Daily Diff: ---- Log: --- As shown on Table 1, the backup interval can be scheduled at the agent, instance, and database level. CDP will always backup at the interval set at the database level. Changing the interval backup configuration at a higher level will change all interval configurations below it. For example, setting a daily full backup at the agent level will make all its instances and databases below to be set to full backup. On the other hand, configuring an interval on a database level will only affect configuration for that database alone. As seen in the next sections, interval scheduling configuration on native SQL database may be overridden by the SQL server. SQL Authentication SQL Authentication can be set with both the CDP Agent Tool and the CDP Enterprise Manager by selecting the SQL instance and clicking on the Authentication button. 7

Figure 3: SQL Authentication Button on the CDP Enterprise Manager The authentication window will allow you to check Use Trusted Connection. This option will use Windows Authentication where the Windows User credentials will be submitted to SQL. Backup interval configuration is discussed in the next section. Figure 4: SQL Authentication Settings with CDP Enterprise Manager Un-checking the Use Trusted Connection checkbox will allow User Name and Password entry for SQL server authentication. Please review Appendix A for detailed information on Microsoft authentication modes and configuration. The Test Connection button allows successful connection to the database. 8

Figure 5: Successful Connection Figure 6: Failed Connection Backing Up Native SQL Databases The Microsoft SQL makes use of a few databases for its own operation. It is recommended to backup the model, master, and msdb databases. For example, the master database stores users names and passwords used to connect the database. Restoring the SQL server without database can be a daunting task. It is up to the user to set these databases for backup, as they are not backed up automatically. Because these databases are typically small, it is recommended to back them up on a daily basis. The SQL server will also override interval scheduling set by CDP. Table 3 shows the scheduling rules imposed by the SQL server. Table 3: Schedule Rules of SQL Server Database SQL Imposed Backup Behavior master Only full (daily backup recommended) model Only full (daily backup recommended) msdb Only full (daily backup recommended) northwind Only full and differential pubs Only full and differential tempdb No backups allowed 9

Offsite Backup of SQL Offsite Service backup of CDP is set at the agent level. This implies that all SQL instances and databases selected on the agent are going to be backed up to the Offsite Service. The Offsite Service will store the last full backup.. SQL Server Restore with CDP Database Recovery If a SQL database system fails, the first step would be to recover all databases and transaction log files from the server. These databases contain the latest information, up to the point of failure. Next, the SQL system should be brought up on the same server or a different server. Having spare hardware will speed up database recovery. Each recovered database should be run through a data consistency check (using DBCC CHECKDB ) because it is possible that these are corrupted database and may have been the reason for failure. If the databases are corrupted, these could either be fixed, which normally includes data loss, or the latest backed up database (from CDP) could be used instead. If the backed up databases consists of a full, a differential and several logs, these have to be applied in order and a database consistency check should be run at each step. Additional Information More information can be found here: - SQL Forum on Disaster Recovery run by Microsoft: http://forums.microsoft.com/msdn/showforum.aspx?forumid=744&siteid=1 - Log Definition and Explanation: http://www.dbazine.com/sql/sqlarticles/mullins-sqlserver - Handling Large Log Files: http://mkruger.cfwebtools.com/index.cfm?mode=entry&entry=cfea536d- FC85-271F-691D1A974BA71B07 10

This document explains the Manual restore of SQL databases using the Lasso application. The Lasso client must be installed locally on the machine that hosts the SQL server: Launch the Lasso client, navigate to the database you want to restore, select it, and click Restore Database. Browse to a folder and restore the data to that folder. A.bak file will be created. Launch SQL Enterprise Manager Drill down to the Database folder, select it, right click and select Restore Database Databases are restored in three steps: 1. Full backup database file is applied to the SQL DBMS o Integrity check is run afterwards 2. The differential database backup file (if backed up) is applied o Integrity check is run again 3. The backed up log files (if backed up) since the last differential or full backup are executed. o Log files should be run sequentially o If up-to-point-of-failure is needed, then the last log file needs to be recovered from the server and executed. This consists of rolling the log forwards for all transactions and, then, rolling the log backwards for SQL transactions uncommitted to the database. This log should be also analyzed for erroneous SQL transactions that may have caused the database corruption (such as a dropped table). If a SQL database system fails, the first good step is to recover the database and log files on the server. These files are located by default in the data directory where the SQL server is installed (C:\Program Files\Microsoft SQL Server\MSSQL\Data). The database file will normally be databasename.mdb and the transactional log is databasename_log.ldf. However, these files may be located at a different location. It is good practice for better performance to place the log file on a different disk (or, better yet, RAID) than the database file. 11

From the Restore Database window, enter the name of the new database (In this case, InsertNameHere is the name of the new database. Select the appropriate Restore backup set (In this case we are restoring Database complete). Select From device radio button and click Select Devices. The Choose Restore Devices window appears. Click Add. 12

The Choose Restore Destination window appears. Click the browse button. Navigate to the.bak file that you created from the Lasso application. In this case, MSSQL_MSSQLSERVER_TESTDB_full.bak is the correct file. Click OK on the four windows and the database will be restored to the name you selected. 13

SQL Server Backup and Restore Case Scenario SQL Backup Configuration Example This section shows a step-by-step configuration for backing up a database called barcelona. Scheduling is to be set as: Full: daily. Differential: every 6 hours. Log: every 2 hours. Offsite Service is to be enabled. In addition, all necessary native databases will be backed up on a daily basis. All configurations are performed with the Agent Tool. SQL Backup Configuration Example 1. Add Application Button. Run the Agent Tool, click on the applications tab, select Server Applications and click on the Add Application button. 2. Add SQL Application and Instance. On the pop-up window, enable Offsite Service backup, select Microsoft SQL server, and click on Add. Another pop-up window will follow to select a particular SQL instance running on the machine 14

3. Test SQL Instance Authentication. Select the Instance, click on authenticate and make sure it is using the Trusted user connection. Testify and verify connection with the SQL server instance. Other applications (like GMS) may use dedicated connection user names and passwords. A user may also be created with enough privileges to only backup the database, without the ability to delete or overwrite the databases. This application uses the standard windows profile credentials to authenticate. 15

4. Add Main Database. Select the instance and click on Add Database. On the pop-up window select the barcelona database. Click Add. Database backup can be verified on AT Status page. 5. Verify Main Database Backup. Database backup can be verified on the File Activity Log in Agent Tool s Status page. Note that this is only possible with the AT and not with the EM. 6. Refresh. The Refresh button needs to be clicked in order for the backed up database to be displayed in the Applications page. The display shows when the full backup type of the Barcelona database was performed. The log also shows both the original database size labeled Size and the size it occupies on the appliance after compression, called Size on Disk. 16

7. Set the Database Backup Interval. Select the Barcelona database and click on Backup Interval. Set the backup intervals as displayed: 8. Add Native Databases. Repeat steps 4 through 7 adding the SQL native databases master, model, and msdb. Set these databases for full daily backup. Multiple databases can be added at once by holding down on either the Shift or Ctrl button while selecting the databases with the mouse. 17

9. Backup Summary. A full backup of each database was performed. All databases will undergo a full backup on a daily basis. In addition, the Barcelona database will have a differential backup every 6 hours and transaction logs backup up every 2 hours. 18

SQL Authentication Authentication Modes Microsoft SQL Server can operate in one of two security (authentication) modes: Windows Authentication Mode (Windows Authentication) Mixed Mode (Windows Authentication and SQL Server Authentication) Windows Authentication mode allows a user to connect through a Microsoft Windows user account. Mixed Mode allows users to connect to an instance of SQL Server using either Windows Authentication or SQL Server Authentication. Users who connect through a Windows user account can make use of trusted connections in either Windows Authentication Mode or Mixed Mode. SQL Server Authentication is provided for backward compatibility. For example, if you create a single Windows 2000 group and add all necessary users to that group, you will need to grant the Windows 2000 group login rights to SQL Server and access to any necessary databases. Windows Authentication When a user connects through a Windows NT 4.0 or Windows 2000 user account, SQL Server revalidates the account name and password by calling back to Windows NT 4.0 or Windows 2000 for the information. SQL Server achieves login security integration with Windows NT 4.0 or Windows 2000 by using the security attributes of a network user to control login access. A user's network security attributes are established at network login time and are validated by a Windows domain controller. When a network user tries to connect, SQL Server uses Windows-based facilities to determine the validated network user name. SQL Server then verifies that the person is who they say they are, and then permits or denies login access based on that network user name alone, without requiring a separate login name and password. Login security integration operates over any supported network protocol in SQL Server. Note that if a user attempts to connect to an instance of SQL Server providing a blank login name, SQL Server uses Windows Authentication. Additionally, if a user attempts to connect to an instance of SQL Server configured for Windows Authentication Mode by using a specific login, the login is ignored and Windows Authentication is used. Windows Authentication has certain benefits over SQL Server Authentication, primarily due to its integration with Windows security system. Windows security provides more features, such as secure validation and encryption of passwords, auditing, password expiration, minimum password length, and account lockout after multiple invalid login requests. Because Windows users and groups are maintained only by Windows, SQL Server reads information about a user's membership in groups when the user connects. If changes are made to the 19

accessibility rights of a connected user, the changes become effective the next time the user connects to an instance of SQL Server or logs on to Windows (depending on the type of change). SQL Server Authentication When a user connects with a specified login name and password from a non-trusted connection, SQL Server performs the authentication itself by checking to see if a SQL Server login account has been set up and if the specified password matches the one previously recorded. If SQL Server does not have a login account set, authentication fails and the user receives an error message. SQL Server Authentication is provided for backward compatibility because applications written for SQL Server version 7.0 or earlier may require the use of SQL Server logins and passwords. Additionally, SQL Server Authentication is required when an instance of SQL Server is running on Windows 98 because Windows Authentication Mode is not supported on Windows 98. Therefore, SQL Server uses Mixed Mode when running on Windows 98 (but supports only SQL Server Authentication). Application developers and database users may prefer SQL Server Authentication because they are familiar with the login and password functionality. SQL Server Authentication may also be required for connections with clients other than Windows NT 4.0 and Windows 2000 clients. 20

Figure 9: SQL Server Security Decision Tree Note that when connecting to an instance of SQL Server running on Windows NT 4.0 or Windows 2000 using Named Pipes, the user must have permission to connect to the Windows NT Named Pipes IPC, \\<computername>\ipc$. If the user does not have permission to connect, it is not possible to connect to an instance of SQL Server using Named Pipes unless either the Windows NT 4.0 or Windows 2000 guest account on the computer is enabled (disabled by default), or the permission "access this computer from the network" is granted to their user account. How to set up Windows Authentication Mode security To set up Windows Authentication Mode security with the SQL Enterprise Manager: 1) Expand a server group. 21

2) Right-click a server, and then click Properties. 3) On the Security tab, under Authentication, click Windows only. 4) Under Audit level, select the level at which user accesses to Microsoft SQL Server are recorded in the SQL Server error log: None causes no auditing to be performed. Success causes only successful login attempts to be audited. Failure causes only failed login attempts to be audited. All causes successful and failed login attempts to be audited. How to set up Mixed Mode security To set up Windows Authentication Mode security with the SQL Enterprise Manager: 1) Expand a server group. 2) Right-click a server, and then click Properties. 3) On the Security tab, under Authentication, click SQL Server and Windows. 4) Under Audit level, select the level at which user accesses to Microsoft SQL Server are recorded in the SQL Server error log: None causes no auditing to be performed. Success causes only successful login attempts to be audited. Failure causes only failed login attempts to be audited. All causes successful and failed login attempts to be audited. SQL Account Configuration In order to backup a database, the SQL account used to access the SQL database must have: (1) System administrators role (2) Database Owner Role (db_owner). (3) Access Right to Database to back up. In general, a user called sa is created when the SQL is installed. To verify, do the following: 1. From SQL Enterprise Manager, high light the SQL account on the right hand side of the screen and double click on it. 2. Expand security tab under SQL server instance. 3. Click Logins. 4. Go to Server Roles tab. 5. Make sure that "System Administrators" role is selected. 6. Click the Database Access tab. 22

7. Make sure that the user has the "db_owner" role, and make sure that access is permitted to the databases to backup. Agent Service SQL Backup Process This section describes the SQL Backup process. SQL Backup Algorithm Inputs: Instance-name, database-name, backup-type, authentication-info, last-backup-id, snapshot of database activities metrics at the time of last backup Check whether or not the SQL Instance exists. If not, return with error. Check if the SQL instance is running. If not, return with error. Check if the authentication information is valid. If not, return with error. Check whether or not the SQL database exists. If not, return with error. Check whether the database can be backed up or not. If not, return with error. 23

Check whether or not the specified backup type is permitted on the given database. If not, request the agent to backup the next higher scope backup. For log, this would be incremental. For incremental, this would be full. For log and incremental backup, check if the backup continuity is broken. This can be done by comparing last-backup-id with the last backup id for this database stored in the master database. If the continuity is broken, then request the agent to perform full backup. For SQL 2000 and SQL 2005, check if the database is modified from the last backup activity by comparing the metrics with the metrics in the database. If the database is not modified, then return with information saying no backup required. Create an instance of SQL in memory backup COM component for backup. If the creation fails, then return with "ERR_MSSQLVDI_OBJECT_CREATION_FAILED error. Check if the CDP appliance is ready to accept the backup. If CDP appliance is busy, return with error saying appliance is busy. Start backing up the database. If the backup fails due to heavy activity in the database, return with information to delay the backup. Also, the backup can fail if the database is being restored currently while we try to backup. If the backup fails due to disk-full or quota error in the CDP appliance, abort backup and return with error. Otherwise, complete the backup. Retrieve the current backup ID and database activities metrics. Return with success. Full Backup Triggers This section describes the events that will trigger a full backup. The following cases will override the backup sequence: Whenever the backup-object is overridden through either restore or deleted and a new instance is created externally. For example, restoring a database with override enabled will trigger an automatic full backup. Same is the case in Exchange. Adding a new file to a SQL database for storing the data will automatically trigger full backup. Adding a new message store or deleting an existing store in an Exchange storage group will trigger full backup automatically. If someone deletes a log file in the Exchange storage group will automatically trigger a full backup. If a log file is corrupted in an Exchange storage group will automatically trigger a full backup. Changing the storage group name in exchange should trigger a full backup. Detaching and reattaching a database in SQL server will automatically trigger the full backup. If the CDP agent is terminated while uploading either log or incremental backup will trigger full backup of the database. If the CDP agent is terminated while uploading incremental backup of exchange will trigger full backup. 24

SQL Backup when no changes occur The CDP SQL agent will not take any backup if there is no change made to the target database with SQL server 2000 and above. This optimization is not applicable for SQL server 6.5 and SQL server 7. The above statement would be broken under following cases: Backup sequence in CDP is broken by any external backup agent or activity. o This can be caused by using third party agents like Veritas, or native SQL backup or changing the CDP CDP agent between more than one appliance Removing SQL application from backup and adding it back again. If the SQL server is stopped and restarted. o This can happen either just the SQL server is stopped and restarted or the machine is rebooted. If the database is detached and reattached to the SQL server. If the database is renamed and a new database is created with the same name. Restarting CDP agent service The agent uses the following SQL statement to find-out whether any changes are made with respect to last SQL backup. This information is cached in memory and lost when the agent is restarted. To execute the SQL statement, replace $DatabaseName$ following with actual database name. SELECT CONVERT(int, SERVERPROPERTY('ProcessID')) SQLProcessId, ISNULL(SUM((SIGN((c.status & 0x40)) ^ 1) * a.numberwrites), 0) NumberOfDataWrites, ISNULL(SUM((SIGN((c.status & 0x40)) ^ 1) * a.byteswritten), 0) DataBytesWritten, ISNULL(SUM(SIGN((c.status & 0x40)) * a.numberwrites), 0) NumberOfLogWrites, ISNULL(SUM(SIGN((c.status & 0x40)) * a.byteswritten), 0) LogBytesWritten FROM ::fn_virtualfilestats(-1,-1) a, sysdatabases b, [$DatabaseName$]..sysfiles c WHERE b.name = '$DatabaseName$' AND b.dbid = a.dbid AND a.fileid = c.fileid Problem 1 - Installation Issues During installation on Windows 2000 the following error may result: The dynamic link library WINHTTP.dll could not be found in the specified path C:\Program Files\SonicWALL\SonicWALL Continuous Data Protection;.;C:\WINNT\System32; C:\WINNT\system;C:\WINNT;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\Program Files\Microsoft SQL Server\80\Tools\BINN;c:\cygwin;c:\cygwin\bin. This error is probably because Windows 2000 Service Pack is not installed. Installing Service Pack 4 will install this library and solve the problem. 25

Problem 2 - Three SQL Full Backups CDP keeps the two latest full backups of SQL on the appliance. Sometimes when reviewing the SQL backup on the appliance, three SQL full backups may be observed. Once a third full backup occurs, the appliance will remove the first full backup on the appliance with any subsequent differential or log backups up until the second full backup. However, this trimming process is asynchronous. Therefore, some time may elapse until the database is removed. Making trimming asynchronous speeds up the backup by postponing part of the processing. Problem 3 - VDI Object Creation Error SQL Backup generates the following error on the Agent Tool: error_mssql_vdi_object_creation_failed For improved performance, CDP avoids the backup data to touch the disk. To do so, the Agent Service requests (by sending SQL commands via the SQL ODBC driver) the SQL server to place the backup data in memory, rather than on disk. The CDP Agent uses SQL server s in-memory component to backup the SQL database. This component is not installed in this machine. Generally, the SQL server installs this component as part of regular installation unless the SQL customized installation is configured to not install it. The following instructions should solve the problem: Resolution 1. Verify the location of the "sqlvdi.dll" file by searching the local computer. 2. Verify, in the registry, that the following two keys do not exist: o HKEY_CLASSES_ROOT\CLSID\{40700425-0080-11d2-851f- 00c04fc21759}\InprocServer32 o HKEY_CLASSES_ROOT\CLSID\{b5e7a132-a7bd-11d1-84c2-00c04fc21759}\InprocServer32 3. Re-register the sqlvdi.dll file from the DOS prompt using the regsvr32 program. In a DOS window, go to the directory where the sqlvdi.dll file is located, and execute the following command: regsvr32 sqlvdi.dll This was done in the example from the C:\Program Files\Microsoft SQL Server\80\COM directory. 26

The sqlvdi.dll file can also be re-registered from within Windows Explorer. Navigate to the directory where the sqlvdi.dll is located, right-click the DLL, select Open with Other..., navigate to Winnt\System32 and select regsvr32 Open OK. Again, there should be a pop-up message indicating successful registration. 4. For either DOS or Windows registration, a pop-up message similar to the following one should appear, indicating the successful registration of the DLL file. 5. Rerun the backup, and confirm success. If the above resolution doesn t work, please perform the procedure detailed in the following MS KB article. http://support.microsoft.com/default.aspx?scid=kb;en-us;280759 SQL components used by SQLVDI are listed below. 1. Sqlvdi.dll 2. Sqlresld.dll 3. Sqlunirl.dll 4. Sqlsvc.dll Problem 4 - CDP and GMS There is a known issue covered in the release notes between GMS and the CDP Agent Service interoperability. Until fixed in a future release, it is SonicWALL s recommendation not to install the CDP software on a server running GMS. Last Updated: November 2008 27