Sie sind auf Seite 1von 29

SAP Data Archiving

By Gayatri Narendra Patil, Infosys

Introduction Data Archiving, in general means deleting the huge volumes of the data that is no longer required in the database to some file system or any third party storage system. It is also a service provided by AP for the consistent removal of data ob!ects from database tables of the AP database, "here all table entries that characteri#e a data ob!ect are "ritten to an archive file outside the database. Benefits of DATA Archiving $. %educes the costs of memory, dis& and also administration costs. '. (nsures cost efficient system upgrades and migration. ). Improved system performance due to shorter response time. *. %educes the cost of maintenance and run of gro"ing application infrastructure. SAP Data Archiving Process Flow AP Data Archiving main involves three steps+ $. ,reating the Archive files. '. %un the delete programs. ). tore the archive files. ,reating the archive file and running the delete programs are the mandatory steps to follo" for data archiving "hereas storing the archive files is optional. 1. Creating the Archive files In this step, a ne" archive file is been created and data to be archived is sequentially "ritten in it.

2. Run the delete rogra!s In this step, the delete programs are e-ecuted "hich deletes the data from the database, once the archived data is read successfully from the archive files. /he delete programs can be triggered manually or automatically. ". Store the Archive files 0ere, the archive file "ith the archived data is moved to the third party storage system or copied to dis&, etc. /his can also be triggered manually or automatically. AP %.)

D#na!ic $enu %tCode SD$&' A list of transaction codes along1"ith the short description required for AP Archiving can be found in the dynamic menu. Go to transaction SD$& and enter search for the te-t as 2Archive3.

,lic& on e-ecute button. /he screen "ill be displayed as belo".

(hat is Archiving &)*ect+

Archiving 4b!ect is the central component of ap Data Archiving. Archiving 4b!ect specifies "hich data is to be archived and ho". Archiving 4b!ects directs the AP Archiving system to get the correct tables associate "ith the specific Business 4b!ect. /he archiving ob!ect name can be ten characters long in length. Archiving ob!ects are defined by the transaction A4B5.

6ig.$. Archiving 4b!ect Details 7A4B58. Identif#ing the Archive &)*ects /ransaction DB,2 is used to identify tables "ith high gro"th in data volumes and to compare the table si#e after archiving and thus to monitor gro"th of the database tables. /ransaction TAA-A "hich is used to identify the appropriate archiving ob!ect "hen a table has more than one archiving ob!ect

/ransaction DB1. is used to identify the Archive 4b!ects, if you &no" the Database tables or if you &no" the Archiving 4b!ect it displays the list of associated database tables for that particular Archiving 4b!ect as ho"n in 6ig.a.

6ig.a. /ransaction DB$9 Clic/ here to continue... 1. Structure Definition. As sho"n in the 6ig.'. , the tructure definition contains the list of the database tables from "hich the data "ill be archived. /his is pre1configured for the tandard AP Archive 4b!ects.

6ig.'. tructure Definition. '. Ta)les fro! which #ou onl# Delete 0ntries. As sho"n in 6ig.). , this contains the list of Database tables from "hich the data "ill be only deleted and not archived. /his is pre1configured for the tandard AP Archive 4b!ects.

6ig.). /ables from "hich :ou 4nly Delete (ntries. ". $aintain -etwor/ 1ra hic /his contains the list of pre1requisite Archived 4b!ects that needs to be archived before the actually archive ob!ects. /his is pre1configured for the tandard AP Archive 4b!ects.

6ig.*.;aintain Net"or& Graphic. 2. Custo!i3ing Settings. /his should be configured as per the business requirements. As sho"n in the 6ig.9. , this contains details about Archive 6ile i#e, etting for Delete programs li&e /est ;ode <ariants and =ive ;ode <ariant7i.e. Production ;ode variant8, content %epositories and the sequence of deletion. If the radio button 2 tart Automatically3 for Delete 5obs is selected, automatically the delete program is e-ecuted after the "rite program. If not selected, e-ecute the delete program manually for the particular archiving ob!ect.

6ig.9. ,ustomi#ing ettings. Clic/ here to continue... .. Archiving Classes 4sed. As sho"n in the 6ig.>., this contains the details about the archiving classes used by the particular Archiving 4b!ect.

6ig.>. Archiving ,lasses ?sed. >. Read Progra!s. /his contains the details about the read programs "hich is used by both the archiving ob!ects and Archiving ,lass to read the data from the Archive files.

6ig.@. %ead Programs. 5. Custo!i3ing Transactions. /his contains the transaction code for the application1specific customi#ing for the relevant archiving ob!ect. 4nce this code is entered, you can go directly from transaction A%A to the application1specific ,ustomi#ing transaction, "hich is often used for entering residence times for an archiving ob!ect.

6ig.A. ,ustomi#ing transactions. 6. Info Ta)les for Archive Files. /his contains the list of database tables that "ill give the archive file name, the criteria for archiving and other related information.

6ig.B. Info /ables for Archive 6iles. 7. 08it Routine Assign!ent 1eneration. /his contains details about the customi#ing code 7user e-its. Business add in8 in the archive and delete programs.

6ig.$C. (-it %outine Assignment Generation. Clic/ here to continue... Archive Progra!s /he belo" mentioned Program in the AP ystem should be assigned to the Archiving 4b!ects. 1. Pre rocessing%& tional' /his program prepares the data for archiving mar&ing the data by setting the deletion indicator to 2D3, but it does not delete any data from the database. Preprocessing Programs operates on the database and no Archive files are required. Preprocessing Programs are scheduled manually and run in Archive Administration 7t,ode+ A%A8. '. (rite /his program creates a ne" archive file and "rites the data in them. At this point, No data is been deleted from the database. /he Erite programs can be e-ecuted in t"o processing modes. a. /est ;ode.

b. Production ;ode. In the /est ;ode, No archive files "ill be created "hereas in Production ;ode, Archive files "ill be created. ). Delete /his program reads the data from the archived files and deletes the data from the database. /he delete programs can be e-ecuted in t"o processing modes. a. /est ;ode. b. Production ;ode. In the /est ;ode, the log after the e-ecution sho"s the entries of the data going to be deleted from the database "hereas in the production ;ode it sho"s the statistics of the deleted data from the database. *. Post rocessing%& tional' /his program also operates on the Database and does not require any Archive files. /his is final program and can be e-ecuted asynchronously "ith the delete program. If the data from the database id not deleted by the delete programs, it can be deleted by the Post processing Programs. It is also used for different functions li&e updating the statistical data, deleting the log data log that is no longer required, etc. 9. Reload Progra!s%& tional' /his program is used to reload the archived data from the e-ternal storage system bac& into respective AP Database tables. It is not available for all the archiving ob!ects. 9. Inde8 Progra!s%& tional' /his program builds or deletes an inde- that allo"s individual access. Chec/ Archiva)ilit# ,hec&ing the Archivabilty of the business ob!ects precedes the actual archiving process. /his should ensure that the data is not archived, if some other application still needs it. /he business ob!ects are considered to be archivable if it+ $. Is ,ompleted. '. 0as reached the desired residence time. ). Does not serve as basis for other Business 4b!ects. It is also recommend not be archive ;aster Data but the /ransaction Data. Residence Ti!e: is the minimum length of time that data must spend in the database before it meets the archivability criteria.

Retention Ti!e: is the entire time that data spends in the database before it is archived. Setting u the connection )etween the SAP R;" data)ase and the 08ternal Storage s#ste! $aintain the Content Re ositor#%tCode &AC,' /he content repository is maintained for every archiving ob!ect. Belo" is the content %epository ;aintained for ;;F(GG4.

/o retrieve the content repository details, double clic& on content repository. Details are as belo".

$aintain the Docu!ent T# e %TCode &AC2'

/he document type is maintained by transaction 4A,'. (very Archiving ob!ect is associated "ith the document type "hich is in turn lin&ed to document class. /he document class identifies archive format for document in ,ontent server.

<in/ing the content re ositor# to Docu!ent t# e %tCode &AC"' In transaction &AC", the content %epository "ill be lin&ed to Document /ype.

Clic/ here to continue...


Previous

$aintain the <ogical Filena!e%tCode FI<0' =ogical filename should be assigned to every Archiving ob!ect. Archive files are stored in the file system under a physical path and file name that is derived from a user1definable logical path or file name. teps to ,onfigure the =ogical 6ilename is as belo". $. ,hoose 2A%,0I<(FG=4BA=FPA/03 and double clic& on sub1folder 2Assignment of Physical path to =ogical Path3 on the =eft ide.

'. Double clic& on Eindo"s N/.

). Double clic& on 2Definition of <ariables3 on =eft ide.

*.

In the definition of variables, you can see the value 26I=(NA;(3 in the physical file path represents filename

9.

Double ,lic& on =ogical 6ile Name Definition, ,ross ,lient. =ogical 6ilename should be maintained here.

/he format of the physical file is =PARA$>1?=DAT0?=TI$0?=PARA$>2?=PARA$>"?.AR@ PARA$>1+ /"o1character application abbreviation 7for e-ample, 0%, ,4, ;;8 for the classification of the archive files in the system. /he value of the definition is determined from the relevant archiving ob!ect at runtime. PARA$>2+ ingle1character alphanumerical code 7C1B, A1H8. If, "hen creating a ne" archive file, an e-isting file "ith an identical physical name "ould result in a conflict, the ADG increases this value by $. /his value must, therefore, al"ays be a part of the physical name. PARA$>"+ /his parameter is filled at runtime "ith the name of the archiving ob!ect. In archive management, this enables you to chec& the file contents or to store the archive files by archiving ob!ects. Clic/ here to continue... Ste B# Ste Archiving Procedure $. ,all /ransaction SARA and enter the Archive 4b!ect Name. (-ample+ ;;F(GG4. ,lic& on 2Preproc3 button. /his step is 4ptional.

'. Give the variant and clic& on maintain button. Ne-t creen is displayed.

).

elect the parameters as sho"n belo" and clic& on continue.

*.

/his is the selection screen for Preprocessing. Provide the selection criteria as per the requirements and clic& on 2Attributes3.

9. Give the meaning for the variant here and clic& on 2save3.

>. Go bac& to initial screen. ,lic& on 2 tart Date3 Button.

@. ,lic& on 2Immediate3 button to schedule the bac&ground !ob and save.

A. No" clic& on pool Params and set the printer here.

B. /he initial screen is no" displayed as belo".

$C. ,lic& on 2(-ecute3.

$$. %epeat the same procedure from ' to $C for "rite program by maintaining the variant as 2/( /FE%I/(3 along1"ith same selection criteria as given for preprocessing program and clic& on 2(-ecute3 button.

$'. ,lic& on the 25ob 4vervie"3 button to see the archived session.

$).

elect the 5ob and ,lic& on the pool to vie" the output.

Clic/ here to continue...

Accessing the Archived Data ?ser can access the archived data by the Archive Information ystem. ?ser can chec& the Archive Information ystem by clic&ing on the 2 Infor!ation S#ste!3 button in the Archive Administration i.e. t,ode A%A.

/he screen "ill be displayed as belo".

Creating an Infostructure (very Archive file accessed using Archive Information ystem is through infostructure. (very infostructure belongs to a unique Archiving ob!ects and also refers to the 6ield ,atalog. A 6ield ,atalog is the collection of fields suitable for inde-ing the archive files of Archiving ob!ect concerned. All the data related to infostructure is maintained in database tables.

6or creating an infostructure call transaction 2SARA3 or ,lic& on the 2,ustomi#ing3 button in the Archive Information ystem+ ,entral ;anagement as sho"n belo".

It "ill open an 2Archive Retrieval ConfiguratorB "hich is used to create an infostructure. ?ser can create o"n infostructure or use the available standard infostructure. Before creating the o"n infostructure, one should chec& if there is any standard infostructure available. ?ser can copy this infostructure and modify it according to the requirements. -ote: /he standard infostructure APFD%BF;;F(GG4 is used here.

Ehile creating an Infostructure one can determine the fields from the field catalogue and transfer them to the Infostructure. ome fields are already transferred to the infostructure. /his cannot be removed as they are &ey fields.

Activating an Infostructure /o use an infostructure, user must activate the infostructure. All the standard infostructures "ill be already activated. 4nly after activating the infostructure it can be filled "ith data from archive file and evaluated. 4nce the infostructure is activated, it cannot be modified. 0valuating an Infostructure /he data from the archive files can be retrieved using 2 Archive 08 lorer3 by calling transaction 2SAR03 or by clic&ing on 2Archive (-plorer3 button in the Archive Information ystem+ ,entral ;anagement as sho"n belo".

Archive (-plorer screen is displayed as belo". (nter the archiving 4b!ect name and Archive Infostructure name as given belo" and clic& on 2(-ecute3 button.

/he Archived data is displayed as belo".

References 2Archiving Cour Sa Data3 reference boo& by SAP Press.