You are on page 1of 19

How-to Guide SAP CPM

How To Backup & Restore with SAP BPC (MS SQL 2005)
Version 1.0 September 2007 Applicable Releases: SAP BPC 5.1

Copyright 2007 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Some software products marketed by SAP AG and its distributors contain proprietary software components of other software vendors. Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. IBM, DB2, DB2 Universal Database, OS/2, Parallel Sysplex, MVS/ESA, AIX, S/390, AS/400, OS/390, OS/400, iSeries, pSeries, xSeries, zSeries, z/OS, AFP, Intelligent Miner, WebSphere, Netfinity, Tivoli, and Informix are trademarks or registered trademarks of IBM Corporation in the United States and/or other countries. Oracle is a registered trademark of Oracle Corporation. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc. HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C , World Wide Web Consortium, Massachusetts Institute of Technology. Java is a registered trademark of Sun Microsystems, Inc. JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. MaxDB is a trademark of MySQL AB, Sweden. SAP, R/3, mySAP, mySAP.com, xApps, xApp, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data

contained in this document serves informational purposes only. National product specifications may vary. These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty. These materials are provided as is without a warranty of any kind, either express or implied, including but not limited to, the implied warranties of merchantability, fitness for a particular purpose, or non-infringement. SAP shall not be liable for damages of any kind including without limitation direct, special, indirect, or consequential damages that may result from the use of these materials. SAP does not warrant the accuracy or completeness of the information, text, graphics, links or other items contained within these materials. SAP has no control over the information that you may access through the use of hot links contained in these materials and does not endorse your use of third party web pages nor provide any warranty whatsoever relating to third party web pages. SAP CPM How-to Guides are intended to simplify the product implementation. While specific product features and procedures typically are explained in a practical business context, it is not implied that those features and procedures are the only approach in solving a specific business problem using SAP. Should you wish to receive additional information, clarification or support, please refer to SAP Consulting. Any software coding and/or code lines / strings (Code) included in this documentation are only examples and are not intended to be used in a productive system environment. The Code is only intended better explain and visualize the syntax and phrasing rules of certain coding. SAP does not warrant the correctness and completeness of the Code given herein, and SAP shall not be liable for errors or damages caused by the usage of the Code, except if such damages were caused by SAP intentionally or grossly negligent.

1 Introduction
This guide covers the two typical backup & restore procedures with SAP BPC 5.x for Microsoft SQL Server 2005 Note that you must plan ahead for the type of recovery you want to perform. There are two types of recovery: 1. Simple Recovery - In the simple recovery model, an SAP BPC 5.x application can be recovered to the point of the last full backup. This strategy is relatively simple to implement, but it does not provide recovery to the point of failure. Updates performed after the last available full backup will have to be redone manually. 2. Full Recovery - In this recovery model, the SAP BPC 5.x application can be recovered to the point of the last incremental backup. This strategy, although more difficult to implement than the simple recovery method, can provide recovery to the most recent incremental backups made. Depending upon the size of the database these incremental backups of various SAP BPC 5.x components can be scheduled up to every X hour.

If a situation arises where you need to perform a recovery, follow the recovery steps for either the Simple or Full recovery, depending on which backup procedures you implemented. Also, for both backup strategies, it is recommended to take the AppSet you are backing up offline during the backup process.

2 Simple Recovery Step by Step Solution


The backup and recovery steps for simple recovery are outlined here. The simple recovery process covers the following steps Backing up Microsoft SQL Server Databases Backing up Microsoft Analysis Services Databases Automating Backup Using SQL Server Agent Jobs Backing up Files & Folders Recovering and Rebuilding If you are using Simple Recovery, you should schedule backups of SQL Server and Analysis Services databases, as well as SAP BPC 5.x WebFolders on a nightly basis. Having these items backed up allows you to perform a Simple Recovery.

2.1

Backing up Microsoft SQL Server for Simple Recovery

You can use SQL Server Management Studio to backup SQL Databases for Simple Recovery:

Perform nightly backup of the master and msdb databases. Perform nightly backup of the <appserver> database.

-1-

Perform nightly backup of the ApShell and ApShellExtra database Perform nightly backup of each of your organization-specific application set databases. Each Application Set is contained in a separate SQL database.

Below are the steps to backup a database (in this case the master database). You will need to follow these steps for all databases you will need to backup. 1. Launch SQL Server Management Studio

2. Connect to your Database Engine

-2-

3. Navigate to your master database.

4. Right click and navigate to Tasks -> Back Up

5. Specify your Backup options and press OK.

-3-

6. When this is complete, you should get a message. Click OK.

2.2

Backing up Microsoft Analysis Services Databases

Your OLAP Databases can be backed up using Microsoft SQL Server 2005 Management Studio. 1. Launch SQL Server Management Studio

-4-

2. Connect to your Analysis Services

3. You should now see all your AppSets. For this example, we shall backup ApShell. You should repeat this backup process for all AppSets that you would like to backup.

4. Right click on ApShell and choose Back Up

-5-

5. Enter the name and location for the backup file. If you would you like to encrypt your backup file, select Encrypt backup file and provide a password. Then click OK.

6. You can script your Backup command. Click Script at the top of the dialog box to get a script which looks like following:

2.3

Automating backup using SQL Server Agent jobs

-6-

1. Launch SQL Server Management Studio

2. Connect to your Database Engine

3. Navigate to SQL Server Agent and right click and choose New Job

-7-

4. Fill in the name, and specify your Category.

5. Click Steps in the left pane

6. Click New to create a new step in your job

-8-

7. Name the step and choose the step type SQL Server Analysis Services Command. Then Provide the name of the Analysis Services server on which you want to run this command.

8. Copy and paste the script you generated from the previous section in this window

9. Click OK

-9-

10. Click on Schedules

11. Create a New Schedule

12. Define your schedule and click OK

- 10 -

13. Click OK in the New Job Dialog Box

14. Go back to SQL Server Management Studio and you will find the new job you have created

15. Right-click the new node and start the job to test it does actually work NOTE: To back up Microsoft Analysis Services databases, perform a nightly archive of each of application set database using either the Analysis Manager or the command listed above. If using SAP BPC 5.x Insight, there will be a second Analysis Services database per application set name that will need to be backed up nightly. It will be named using the following convention, AppSetName_BPU. For example with ApShell, the DB name would be, ApShell_BPU

- 11 -

2.4

Backing up Files and Folders

You must use an Open File Agent to backup Data files that may be in use by the web server. The procedure for different Open File Agents is different so in this section, we will focus on the overall steps that you will need to perform. To back up Files and folders, do the following: 1. Perform nightly backup of all files and folders in the SAP BPC 5.x Data Folder directory. This directory is normally located in: <drive letter>:\BPC\Data where <drive letter> is the letter of the hard drive where SAP BPC 5.x files are stored. These files and folders can be used to reload metadata from the saved excel sheets. Report and Input Templates are saved in these folders as well. If data has been loaded via text files, these files will also be stored within this folder structure. The following represents a summary of the files contained within the WebFolders directory. These files are available for all Appsets: Dimension XLS files User XLS file Report and Input Templates Data Conversion XLS files Data files (if loading from text or other file) Appset publications Application Publications Private Publications

2. Perform nightly backup of all files and folders in <drive letter>\BPC\Data\FileDB. This folder contains all the books published for all available Appsets. 3. Perform nightly backups of files in <drive letter>\BPC\Websrvr\Insight\InsightRepTemplate This folder contains the configuration for users KPIs in Insight. File name site_ Application Set name.

- 12 -

2.5

Recovering and Rebuilding BPC 5.x Applications based on Simple Recovery


The following steps should be performed in order to rebuild SAP BPC 5.x application using backups. 1. Reinstall SAP BPC 5.x Install the SAP BPC 5.x software onto the new machine and verify the install is successful by performing basic testing using the ApShell database. 2. Shutdown IIS Select Start > Run, and then type IISRESET /stop and click OK to stop IIS. 3. Restore the Microsoft SQL Server 2005 database Restore the most recent full database backup for APPSERVER, and each of the application set databases. (ApShell/ApShellExtra) 4. Restore Files and Folders:

Replace <drive letter>:\BPC\Data\WebFolders including sub-folders and files from the last backup. Replace <drive letter>:\BPC\Data\FileDB including sub-folders and files from the last backup. Replace <drive letter>:\BPC\Websrvr\Web\Insight Reports files from backup if using Insight

5. Restart IIS services Select Start > Run, and then type IISRESET /start and click OK to start IIS. 6. Perform system testing.

3 Full Recovery Step by Step Solution


The Full Recovery model uses database backups and transaction log backups to provide complete protection against media failure. If one or more data files are damaged, media recovery can restore all committed transactions. In-process transactions are rolled back. The backup and recovery steps for full recovery are outlined here.

3.1

Backing up Microsoft SQL Server 2005 Databases

The database server needs to be setup in full-recovery mode. To guarantee this degree of recoverability, all operations, including bulk operations such as SELECT INTO, CREATE INDEX, and bulk loading data, are fully logged. To see details for how to setup full recovery, see this Microsoft Article: http://msdn2.microsoft.com/en-us/library/ms187495.aspx Use Enterprise Manager to backup SQL Databases for Full Recovery:

Database backups:

Perform nightly backup of the master and msdb databases. Perform nightly backup of the <appserver> database. Perform nightly backup of the ApShell and ApShellExtra database

- 13 -

Perform nightly backup of each of the other application set databases. A separate database exists for each application set. Perform differential backup of the <appserver> database every X hours during business hours. Perform differential backup of each of the other application set databases every X hours during business hours. Perform transaction log backup of the <appserver> database every X hour during business hours. Perform transaction log backup of each of the other application set databases every X hour during business hours.

Differential backups (optional):


Transaction log backups:


3.2

Recovering and Rebuilding SAP BPC 5.x Application Sets based on Full Recovery

The following steps should be performed in order to rebuild SAP BPC 5.x application using backups. 1. Reinstall SAP BPC 5.x Install the SAP BPC 5.x software onto the new machine and verify the install is successful by performing basic testing using the ApShell database. 2. Shutdown IIS Select Start > Run, and then type IISRESET /stop and click OK to stop IIS. 3. Restore Microsoft SQL Server 2005 Database(s): Restore the most recent database backup for APPSERVER, and each of the application set databases. (ApShell/ApShellExtra) SQL Server 2005 database restores can be performed using SQL Server management Studio. Perform following database restores steps. 1. Back up the currently active transaction log. 2. Restore the most recent database backup without recovering the database. 3. If differential backups exist, restore the most recent one. 4. Restore each transaction log backup created since the database or differential backup in the same sequence in which they were created without recovering the database. 5. Apply the most recent log backup (created in Step 1), and recover the database. 6. Restore Microsoft Analysis services database. Microsoft Analysis services database can be restored from the archive interactively using SQL Server Management Studio. Restore the most recent archive of each of application set database. 4. Restore Files and Folders: 1. Replace <drive letter>:\BPC\Data\WebFolders\AppSetName including subfolders and files from the last backup.

- 14 -

2. Replace <drive letter>:\BPC\Data\FileDB\AppSetName including sub-folders and files from the last backup. 3. Replace <drive letter>:\BPC\Websrvr\InsightReports files from backup if using Insight 5. Restart IIS services Select Start > Run, and then type IISRESET /start and click OK to start IIS. 6. Perform system testing.

4 Post Recovery Considerations


1. There is no impact to the client post recovery. You should however, run SAP BPC Server Manager post recovery and ensure all settings are correct.

2. Go to Server -> Diagnostic

- 15 -

3. Ensure all Diagnostic checks are successful

- 16 -

www.sdn.sap.com/irj/sdn/bpx-cpm

You might also like