Vous êtes sur la page 1sur 20

Data Archiving in Business

Intelligence 7.0

Applies to:
This Article applies to SAP BI 7.0.

Summary
With the fast growing databases, it will not be long before the database sizes grows from Terabytes to
Petabytes and to Exabytes. But in reality not all the data residing on the database is used every day. This
results in lot of dormant data on the disk. Huge databases would result in performance issues and
maintenance costs. In the wake of above problems, SAP came up with a Data Archiving solution. This article
describes the step-by-step process of Data Archiving solution provided by SAP for BI in NetWeaver 2004s.
Author:

Kalyan Reddy Kothinti

Company: Intelligroup Asia Pvt. Ltd.


Created on: 25 December 2008

Author Bio
Kalyan Reddy Kothinti is working as a Senior SAP BI Consultant at Intelligroup Asia Pvt Ltd. He
has been in this space for 3 years now and also has expertise in reporting SAP BI data using BO
Crystal Reports.

SAP DEVELOPER NETWORK | sdn.sap.com


2008 SAP AG

BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com


1

Data Archiving in Business Intelligence 7.0

Table of Contents
Creating Data Archiving Process........................................................................................................................3
Step 1 ..............................................................................................................................................................4
Step 2 ..............................................................................................................................................................5
Step 3 ..............................................................................................................................................................5
Step 4 ..............................................................................................................................................................6
Step 5 ..............................................................................................................................................................7
Writing the Archive File.......................................................................................................................................7
Step 1 ..............................................................................................................................................................7
Step 2 ..............................................................................................................................................................8
Step 3 ..............................................................................................................................................................9
Step 4 ..............................................................................................................................................................9
Deletion of data from Database........................................................................................................................11
Step 1 ............................................................................................................................................................11
Step 2 ............................................................................................................................................................11
Checking the Statistics .....................................................................................................................................13
Reloading Data .................................................................................................................................................15
Step 1 ............................................................................................................................................................15
Step 2 ............................................................................................................................................................16
Step 3 ............................................................................................................................................................17
Related Content................................................................................................................................................20
Copyright............................................................................................................ Error! Bookmark not defined.

SAP DEVELOPER NETWORK | sdn.sap.com


2008 SAP AG

BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com


2

Data Archiving in Business Intelligence 7.0

Introduction
Data plays the most important part in success or failure of an organization. With the advancement of
technology it has become easier now to create and store data than ever. Though data has such an important
role to play, it loses its importance after a period of time resulting in inactive data residing on the database.
With the data growing at a very high pace each day, the amount of inactive data residing on the database
also increases. It becomes difficult to manage such high volumes of data for organizations, which in turn
results in unacceptable system response times and maintenance costs.
Data Archiving, where in inactive data is offloaded from the databases and stored on alternate storage
systems, evolved as a solution for organizations to handle the large databases and keep a check on the
increasing volumes of data. However, before Data Archiving is implemented it is mandatory that the data is
retained long enough to meet both internal and external requirements. Internal requirements include need of
history data for doing trend analysis, forecasting, etc. External requirements include government regulations
such as Sarbanes-Oxley Act, HIPAA and BASEL II to name a few which states the duration of time the data
has to be retained before it is archived.

Data Archiving in BI - Solution provided by SAP


Main advantage of Data Archiving in BI when compared to other SAP components is the ease of use.
Defining a data archiving process in BI is easy as the system generates the Archiving Object and the
necessary Write and Delete programs for us instead of we creating them.
SAP provides two types of archiving solutions, ADK based and XML based. Archive Development Kit (ADK),
is a SAP tool used for archiving. It acts as abstract layer between the SAP applications, the data and the
archive files. XML archiving is primarily used for XML objects implemented by ABAP applications and JAVA
applications. In this article we will be focusing on ADK based archiving.
The archiving procedure is divided into three steps:

Creating the archive files - In this step, the data selected for archiving is written into archive files in
the location specified.

Deletion of data from the database In this step, the deletion program deletes the data from the
database which has been archived.

Storing the archive files The main purpose of archiving is to offload the inactive data from the
database and store it separate storage media. In this step, the archive files created in first step are
moved to a storage media, such as a tape or a hard disk.

Procedure
We can classify the data archive data in BI 7.0 into three phases,
1. Creating the Data Archiving Process in this phase, we make all the necessary settings required for
data archiving, such as characteristics for partitioning, structure of the archive file, archive file
location, etc.
2. Writing the Archive File In this phase, we execute the write process which writes the data we have
selected for archiving into the archive files in the directory we specify.
3. Deletion of data from Database In this phase, the data which has been archived is deleted from the
database.

Creating Data Archiving Process


For demonstrating the data archiving procedure, a DSO with 33,816 records has been chosen. Though this
is very little amount of data to be archived, it has been chosen purely for this demonstration.

SAP DEVELOPER NETWORK | sdn.sap.com


2008 SAP AG

BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com


3

Data Archiving in Business Intelligence 7.0

Step 1
Select the InfoProvider which we want to archive from RSA1->InfoProvider and right click to access the
Context menu. From the Context menu select Create Data Archiving Process.

SAP DEVELOPER NETWORK | sdn.sap.com


2008 SAP AG

BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com


4

Data Archiving in Business Intelligence 7.0

Step 2
ADK-Based Archiving check box is selected by default. If you have Nearline storage system available, you
can select it here. New Archiving Object is created for every InfoProvider chosen for archiving. Archiving
Object name will begin with BW and will have O for and DSO or C for a cube, followed by seven characters
of the InfoProvider technical name.

Note: Nearline Storage is a new technology which would allow users to have access to the archived data. This
would require additional hardware. This topic is out of scope for this article.

Step 3
On the Selection Profile tab, select the characteristics on which you want to partition. Make sure we have at
least one Time Characteristic available for archiving. Below we can see that in addition to Fiscal Period,
Controlling area is also chosen for partitioning.

SAP DEVELOPER NETWORK | sdn.sap.com


2008 SAP AG

BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com


5

Data Archiving in Business Intelligence 7.0

Step 4
On the Semantic Group tab, we can make selection on which fields should the newly created archive file will
have. Usually, we select all the fields.

SAP DEVELOPER NETWORK | sdn.sap.com


2008 SAP AG

BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com


6

Data Archiving in Business Intelligence 7.0

Step 5
On the last tab ADK, we specify all the parameters which will be used for archiving.
We can select the Logical File name here, for demo the default file name has been chosen, if we want we
can have a new file name and location by maintaining in FILE transaction.
We can select here how we want to start the delete job once the write job is finished. It is recommended to
start the delete job manually. If we want we can start the delete job either automatically or after occurrence of
an event.
Activate the Data Archiving process we just created.

Writing the Archive File


Step 1
Go to Archive Administration, this can be accessed from the Context menu of the InfoProvider and
selecting Manage ADK Archive, as shown below or from transaction SARA.

SAP DEVELOPER NETWORK | sdn.sap.com


2008 SAP AG

BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com


7

Data Archiving in Business Intelligence 7.0

Step 2
Click on Write and create a variant by in the following screen. Variant creation is discussed in the following
steps.

SAP DEVELOPER NETWORK | sdn.sap.com


2008 SAP AG

BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com


8

Data Archiving in Business Intelligence 7.0

Step 3
On the variant creation screen, enter the selection conditions for the data which needs to be archived. In our
example, we have chosen to archive the data for Fiscal periods 2004/006 and 2004/007. It is important that
we chose Production Mode here. Choosing Test Mode would only simulate the process and not actually
create the archive files. Therefore Production Mode must be chosen if we want to carry out archiving and
not just simulate the process. We can maintain further restrictions also, for example we have chose
Controlling Area as additional partitioning characteristic, here we can maintain values of which Controlling
areas data needs to be archived. For our demo we did not maintain any value for Controlling Area, which
means data, will be archived for all Controlling areas. Once we have maintained all the attributes, save the
variant and go back to previous screen.

Step 4
In this screen we need to maintain Start Date and Spool Parameters, #1 highlighted in RED. Start date
allows us to schedule archiving process. Spool parameters allow us to maintain the print parameters for the
archiving log. Once these parameters are maintained, we are all set to start the write process. This process
can be executed using execute button, #2. We can access the logs using Logs button, #3.

SAP DEVELOPER NETWORK | sdn.sap.com


2008 SAP AG

BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com


9

Data Archiving in Business Intelligence 7.0

Screenshot below shows the log of the write process. Highlighted in the screenshot are the location and the
file name of the archive file created and the number of records selected for archiving (14,565 records met the
selection criteria of Fiscal period 2004/006 and 2004/007). We have successfully created the archive files.

SAP DEVELOPER NETWORK | sdn.sap.com


2008 SAP AG

BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com


10

Data Archiving in Business Intelligence 7.0

Deletion of data from Database


The main reason an organization would consider data archiving could be,
1. For resolving the performance problems caused by large volumes of data available on the database.

2. To take back up of sensitive data as part of disaster management.


3. Allows organizations to spend less on the system maintenance.
So it is necessary that the archived data be deleted from the database. Deletion process can be automated
as discussed earlier, but it is better to execute this step manually as discussed below.
Step 1
Select Delete from the Archive Administration (transaction SARA).

Step 2
Select the Archive session which you want to delete and maintain the Start Date and Spool Parameters,
shown in the screen shot #1. Once all the necessary parameters are maintained, execute the deletion phase
by choosing #2. You can access the logs from #3.

SAP DEVELOPER NETWORK | sdn.sap.com


2008 SAP AG

BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com


11

Data Archiving in Business Intelligence 7.0

Below is the screen shot of the deletion log and highlighted area shows the selection conditions used for
deletion from the active table of the DSO.

Note: Data is deleted from the active table only for DSO and Fact table for the Cubes.

SAP DEVELOPER NETWORK | sdn.sap.com


2008 SAP AG

BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com


12

Data Archiving in Business Intelligence 7.0

Screen shot below shows the number of entries in the active table of DSO after the Deletion phase. Initially
we started our demo with an active table which had 33,816 entries and in the write phase we have seen in
the log that 14,565 entries have been written to Archive file. Which leaves us with 33,816 14,565 = 19,251
entries which are available in the DSOs active table.

Checking the Statistics


Statistics can be accessed from transaction SARA.

SAP DEVELOPER NETWORK | sdn.sap.com


2008 SAP AG

BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com


13

Data Archiving in Business Intelligence 7.0

Statistics displays the information about the Disk Space before and after and the number of data records
which have been archived.

SAP DEVELOPER NETWORK | sdn.sap.com


2008 SAP AG

BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com


14

Data Archiving in Business Intelligence 7.0

Reloading Data
Reloading the archived data is not a very common situation unless it is an exceptional case. This is because,
we resort to data archiving only when we are sure that we will not be using the data on the database any
more. But there could be some exceptional cases like, we have archived the wrong data, we want it back on
the database. Though it is very unlikely that reloading will be necessary, but still considering the worst case
scenario, the following procedure is discussed.
Step 1
From transaction SARA->Goto->Reload.

SAP DEVELOPER NETWORK | sdn.sap.com


2008 SAP AG

BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com


15

Data Archiving in Business Intelligence 7.0

Note: SAP also warns us saying that Reloading is done in exceptional cases only with a warning message.

Step 2
Create a variant and save it. Choose Test Run, if you want to simulate and choose Reload if we want the
data to be actually reloaded.

SAP DEVELOPER NETWORK | sdn.sap.com


2008 SAP AG

BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com


16

Data Archiving in Business Intelligence 7.0

Step 3
Choose the archive session which you want to reload and maintain the Start Date and Spool Parameters,
just like we did for Deletion Phase, #1 in screen shot. Reloading can be executed using #2 and logs can be
accessed from #3.

SAP DEVELOPER NETWORK | sdn.sap.com


2008 SAP AG

BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com


17

Data Archiving in Business Intelligence 7.0

Screenshot below displays the number of records in the DSOs active table after the reload. This is exactly
equal to the number of entries which were present in the DSO initially, i.e., 33,816.

Details about the archiving can also be accessed via the Manage on the DSO administration. Once the Data
Archiving Process has been activated a new tab Archiving is displayed. Selection conditions used for
archiving are also displayed. Two requests are displayed in our example, one is for the Archiving and the
other is for Reloading.

SAP DEVELOPER NETWORK | sdn.sap.com


2008 SAP AG

BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com


18

Data Archiving in Business Intelligence 7.0

We can also schedule Archiving runs from the Manage->Archive tab. Archive Administration can also be
accessed from here.

SAP DEVELOPER NETWORK | sdn.sap.com


2008 SAP AG

BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com


19

Data Archiving in Business Intelligence 7.0

Related Content
http://help.sap.com/saphelp_nw04s/helpdata/en/8d/3e4d70462a11d189000000e8323d3a/frameset.htm
http://help.sap.com/saphelp_nw04s/helpdata/en/b7/78104292615833e10000000a155106/frameset.htm
http://help.sap.com/saphelp_nw04s/helpdata/en/2a/fa0391493111d182b70000e829fbfe/frameset.htm
http://help.sap.com/saphelp_nw04s/helpdata/en/fa/2250e2bc4b1442a39265abba676cd9/frameset.htm

SAP DEVELOPER NETWORK | sdn.sap.com


2008 SAP AG

BUSINESS PROCESS EXPERT COMMUNITY | bpx.sap.com


20

Vous aimerez peut-être aussi