Sunteți pe pagina 1din 16

How-to Guide SAP CPM

How To Backup & Restore with SAP BPC (MS SQL 2000)
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 2000 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 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

Use Enterprise Manager to backup SQL Databases for Simple Recovery:


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

-1-

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

2.2

Backing up Microsoft Analysis Services Databases

You can archive Analysis Services databases interactively using Analysis Manager, or you can schedule Analysis Services backups using SQL Enterprise Manager with the following command:
["command-path]msmdarch["] /a Server "OLAPDataPath" "DatabaseName" "BackupFileName" ["LogFileName" ["TempDirectory"]]

Example:
The following command archives the sample FoodMart 2000 database included in Analysis Services. This is a single line command.
"\Program Files\Microsoft Analysis Services\Bin\msmdarch" /a myserver "\Program Files\Microsoft Analysis Services\Data\" "FoodMart 2000" "\My archives\server myserver\FoodMart 2000.cab"

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 OUTLOOKSOFT 5 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 The command above should be used in a SQL Job in order to automate the process and maintenance for an effective history of logged backups. Follow the step by step instruction to create the SQL Job. First Open SQL Enterprise Manager, and create a new job. Screen Capture:

-2-

Next, create a new step using the Operating System Command (CmdExec) type and use the following example line for ApShell. Example: "X:\Program Files\Microsoft Analysis Services\Bin\msmdarch" /a demov4 "X:\Program Files\Microsoft Analysis Services\Data" "ApShell" "X:\OLAP Backups\ApShell.cab" "X:\OLAP Backups\ApShell.log"

Next, set on the On success and On failure actions if you plan on backing up several OLAP databases in the same job, using the following as an example;

Set the schedule for when OLAP backups will run.

-3-

Use the Enterprise Manager to review the history of the Job to monitor.

-4-

2.3

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.

-5-

2.4

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 2000 database Restore the most recent full database backup for APPSERVER, and each of the application set databases. (ApShell/ApShellExtra) 4. Restore the Microsoft Analysis Services database:

Microsoft Analysis services database can be restored from the archive interactively using Analysis manager or alternatively can be scheduled using SQL Enterprise Manager using following command. This is a single line command.
["command-path]msmdarch["] switch Server "OLAPDataPath" "BackupFileName" ["LogFileName" ["TempDirectory"]]

The /r switch is used to specify a regular restoration, which will overwrite the database if it exists. The /rs switch is used to restore the database from the archive file only if the database does not exist already. For Example, the following command restores the sample FoodMart 2000 database included in Analysis Services. This is a single line command.
"\Program Files\Microsoft Analysis Services\Bin\msmdarch" /r myserver "\Program Files\Microsoft Analysis Services\Data\" "\My archives\server myserver\FoodMart 2000.cab"

Restore the most recent archive of each of application set database. 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. Restore Files and Folders:

6. Restart IIS services Select Start > Run, and then type IISRESET /start and click OK to start IIS. 7. 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.

-6-

The backup and recovery steps for full recovery are outlined here.

3.1

Backing up Microsoft SQL Server 2000 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. Use Enterprise Manager to backup SQL Databases for Simple 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 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 2 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

Backing up Microsoft Analysis Services Databases

You can archive Analysis Services databases interactively using Analysis Manager, or you can schedule Analysis Services backups using SQL Enterprise Manager with the following command:
["command-path]msmdarch["] /a Server "OLAPDataPath" "DatabaseName" "BackupFileName" ["LogFileName" ["TempDirectory"]]

Example: The following command archives the sample FoodMart 2000 database included in Analysis Services. This is a single line command.
"\Program Files\Microsoft Analysis Services\Bin\msmdarch" /a myserver "\Program Files\Microsoft Analysis Services\Data\" "FoodMart 2000" "\My archives\server myserver\FoodMart 2000.cab"

To back up Microsoft Analysis Services databases, archive each of the application set databases. If using OUTLOOKSOFT 5 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.

-7-

The command above should be used in a SQL Job in order to automate the process and maintenance for an effective history of logged backups. Follow the step by step instruction to create the SQL Job. First Open SQL Enterprise Manager, and create a new job. Screen Capture:

Next, create a new step using the Operating System Command (CmdExec) type and use the following example line for ApShell. Example: "X:\Program Files\Microsoft Analysis Services\Bin\msmdarch" /a demov4 "X:\Program Files\Microsoft Analysis Services\Data" "ApShell" "X:\OLAP Backups\ApShell.cab" "X:\OLAP Backups\ApShell.log"

-8-

Next, set on the On success and On failure actions if you plan on backing up several OLAP databases in the same job, using the following as an example;

Set the schedule for when OLAP backups will run.

-9-

Use the Enterprise Manager to review the history of the Job to monitor.

- 10 -

3.3

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 applications 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 2000 Database(s): SQL Server 2000 database restores can be performed using Enterprise 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. 4. Restore Microsoft Analysis services database.

Microsoft Analysis services database can be restored from the archive interactively using Analysis manager or alternatively can be scheduled using SQL Enterprise Manager using following command. This is a single line command.
["command-path]msmdarch["] switch Server "OLAPDataPath" "BackupFileName" ["LogFileName" ["TempDirectory"]]

The /r switch is used to specify a regular restoration, which will overwrite the database if it exists. The /rs switch is used to restore the database from the archive file only if the database does not exist already. For Example, the following command restores the sample FoodMart 2000 database included in Analysis Services. This is a single line command.
"\Program Files\Microsoft Analysis Services\Bin\msmdarch" /r myserver "\Program Files\Microsoft Analysis Services\Data\" "\My archives\server myserver\FoodMart 2000.cab"

Restore the most recent archive of each of application set database. 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\Insight files from backup if using Insight

5. Restore Files and Folders:

- 11 -

6. Restart IIS services Select Start > Run, and then type IISRESET /start and click OK to start IIS. 7. 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

- 12 -

3. Ensure all Diagnostic checks are successful

- 13 -

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