sapnote_0000825473

6
07.03.2011 Page 1 of 6 SAP Note 825473 - IBM i: Online backup as of V5R3M0 Note Language: English Version: 13 Validity: Valid Since 24.02.2010 Summary Symptom This note describes how the online backup without COMMIT boundary, which is available from i5/OS V5R3M0, may be used for SAP systems. This note describes the new parameter *NOCMTBDY, which enables the online backup and explains which objects must be saved for systems using SAP Application Server ABAP (SAP AS ABAP), SAP Application Server Java (SAP AS Java), or SAP Master Data Management (SAP MDM). Other terms OS/400, AS/400, ragged, save, V5R3, CPE3029, 3029, EBUSY, iSeries, V5R4, V6R1, ASP, auxiliary storage pool Reason and Prerequisites Starting with i5/OS V5R3M0 the possibility also exists of backing up an online database when the associated work processes are not at a COMMIT boundary. In the same way as for older releases, the online backup is selected via the parameter SAVACT(*SYNCLIB) in the backup command (SAVLIB or SAVOBJ). The parameter SAVACTWAIT (wait time) has three components from V5R3M0 onward. 1. Wait time in seconds for object locks. If a backup is taken while the system is active, then the save operation will attempt to obtain a "Shared read no update" (*SHRNUP) lock for the majority of objects. If it does not succeed within the time given here, the backup will abort. During normal SAP system operation, there should be no locks on database objects which would prevent a backup being taken. 2. Wait time for pending record changes. If this value is set to *NOCMTBDY, then the backup will not wait for open transactions to reach a COMMIT boundary. This includes the SQL statements INSERT, UPDATE and DELETE. 3. The wait time for other pending changes. This limit includes changes made by DDL statements, for example, ALTER TABLE. Transactions which use SQL statements of this type must reach a COMMIT boundary before a backup can be executed. If DDL-Instructions are executed during a save with the value *NOCMTBDY, then the affected work-process will send a query message CPA8351 to the QSYSOPR message queue. The work-process remains in status MSGW until the message is answered. The reply to the message may be 'C' for Cancel or 'R' for Repeat (after waiting). In order to prevent operator replies being necessary during a save, an entry with reply 'R' should be made for the message-id CPA8351 in the System Reply List. If a backup is taken with *NOCMTBDY, then the saved tables may contain partially changed records from transactions which were incomplete at the time the save was made. In order to ensure that restored data will be consistent, in case of data loss, the journal receivers must also be saved and made available in such a way, that the start of each open transaction may be found in the chain of the journal receivers.

Upload: neelpushkar2000

Post on 30-Mar-2015

161 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: sapnote_0000825473

07.03.2011 Page 1 of 6

SAP Note 825473 - IBM i: Online backup as of V5R3M0

Note Language: English Version: 13 Validity: Valid Since 24.02.2010

Summary

SymptomThis note describes how the online backup without COMMIT boundary, which isavailable from i5/OS V5R3M0, may be used for SAP systems. This notedescribes the new parameter *NOCMTBDY, which enables the online backup andexplains which objects must be saved for systems using SAP ApplicationServer ABAP (SAP AS ABAP), SAP Application Server Java (SAP AS Java), orSAP Master Data Management (SAP MDM).

Other termsOS/400, AS/400, ragged, save, V5R3, CPE3029, 3029, EBUSY, iSeries, V5R4,V6R1, ASP, auxiliary storage pool

Reason and PrerequisitesStarting with i5/OS V5R3M0 the possibility also exists of backing up anonline database when the associated work processes are not at a COMMITboundary. In the same way as for older releases, the online backup isselected via the parameter SAVACT(*SYNCLIB) in the backup command (SAVLIBor SAVOBJ). The parameter SAVACTWAIT (wait time) has three components fromV5R3M0 onward.

1. Wait time in seconds for object locks. If a backup is taken while thesystem is active, then the save operation will attempt to obtain a"Shared read no update" (*SHRNUP) lock for the majority of objects. Ifit does not succeed within the time given here, the backup will abort.During normal SAP system operation, there should be no locks ondatabase objects which would prevent a backup being taken.

2. Wait time for pending record changes. If this value is set to*NOCMTBDY, then the backup will not wait for open transactions toreach a COMMIT boundary. This includes the SQL statements INSERT,UPDATE and DELETE.

3. The wait time for other pending changes. This limit includes changesmade by DDL statements, for example, ALTER TABLE. Transactions whichuse SQL statements of this type must reach a COMMIT boundary before abackup can be executed.

If DDL-Instructions are executed during a save with the value *NOCMTBDY,then the affected work-process will send a query message CPA8351 to theQSYSOPR message queue. The work-process remains in status MSGW until themessage is answered. The reply to the message may be 'C' for Cancel or 'R'for Repeat (after waiting). In order to prevent operator replies beingnecessary during a save, an entry with reply 'R' should be made for themessage-id CPA8351 in the System Reply List.

If a backup is taken with *NOCMTBDY, then the saved tables may containpartially changed records from transactions which were incomplete at thetime the save was made. In order to ensure that restored data will beconsistent, in case of data loss, the journal receivers must also be savedand made available in such a way, that the start of each open transactionmay be found in the chain of the journal receivers.

Page 2: sapnote_0000825473

07.03.2011 Page 2 of 6

SAP Note 825473 - IBM i: Online backup as of V5R3M0

When database tables which were saved with *NOCMTBDY have to be restoredwith RSTLIB or RSTOBJ, they cannot be used before the application ofjournal entries via APYJRNCHG or APYJRNCHGX. An attempt to use such tablesbefore the application of the journal entries will result in the errormessages CPF428D or SQL7008 with reason code 17.

Please note that *NOCMTBDY for SAVACTWAIT may only be used when the targetrelease for the backup (TGTRLS) is at least V5R3M0.

SolutionThe following gives a description of the execution of an online backup fromrelease V5R3M0. This description is relevant for SAP systems in Release6.40 (NetWeaver 04) and higher; the ABAP part is also relevant for lowerSAP Releases.

Libraries and directories to be savedAfter the new installation of an SAP system, a full backup should beperformed via Menu SAVE, Option 21, as described in the installation guide.Objects such as user profiles which do not often change, including thelibraries R3SYS and R3<sid>400 will be saved at this time. The kernellibrary and, under SAP WebAS Java, the os_libs library

Objects that must be saved during an online backup of SAP AS ABAP:

o Library R3<sid>DATA

o Library R3<sid>JRN

Objects that must be saved during an online backup of SAP AS Java:

o Library SAP<sid>DB

o Library SAP<sid>JRN

Objects that must be saved during an online backup of SAP MDM:For SAP MDM in Release 7.1 or higher, the names of the libraries that mustbe saved are derived from the repository names. The assignment results fromthe table A2I_CATALOGS in the schema (or library) A2I_MDMDBS. To determinethe assignment, perform the following query in the interactive SQL (STRSQL,SQLUTIL, or system i navigator):

SELECT MAINDB FROM A2I_MDMDBS/A2I_CATALOGS

The column MAINDB contains the names of the main libraries for therepositories. The names consist of the first five characters of therepository name (without underscores), one underscore, the letter "m", anda three-digit number that ensures that the name is unique, for example,"REPOS_m000". In addition to this library, each repository has a furtherlibrary that includes history data and for which "m" is replaced with "z",for example, "REPOS_z000". During the backup, the libraries A2I_MDMDBS,<repository>_m<nnn> and <repository>_z<nnn> must be taken into account. Formore information about SAP MDM on IBM i, see Note 1390533.

Page 3: sapnote_0000825473

07.03.2011 Page 3 of 6

SAP Note 825473 - IBM i: Online backup as of V5R3M0

Objects that must be saved for all variants (SAP ABAP, Java, andMDM):

o Directory /sapmnt/<sid> with its subdirectories

o Directory /sapmnt/trans with its subdirectories

o Directory /usr/sap/<sid> with its subdirectories

o Symbolic Link /usr/sap/trans

If an independent ASP (iASP) is used:

o Directory /<asp>/sapmnt/<sid> with its subdirectories

o Directory /<asp>/sapmnt/trans with its subdirectories

o Directory /<asp>/usr/sap/<sid> with its subdirectories

Some directories cannot be saved online, since the processes of an activeSAP system lock them. A backup is not necessary, however, since thedirectories only contain temporary data (for example log files). Thefollowing directories are affected (preceded by /<asp> if you use anIndepentent ASP):

o /sapmnt/<sid>/j2ee/cache/*

o /usr/sap/<sid>/<instance>/SDM/program/log/*

o /usr/sap/<sid>/<instance>/igs/log/*

o /usr/sap/<sid>/<instance>/j2ee/cluster/dispatcher/log/*

o /usr/sap/<sid>/<instance>/j2ee/cluster/dispatcher/temp/*

o /usr/sap/<sid>/<instance>/j2ee/cluster/server<n>/log/*

o /usr/sap/<sid>/<instance>/j2ee/cluster/server<n>/temp/*

o /usr/sap/<sid>/<instance>/j2ee/cluster/server<n>/sapjms/*

o /usr/sap/<sid>/<instance>/log/*

o /usr/sap/<sid>/<instance>/work/*

It is unnecessary to back up the following files:

o /sapmnt/<sid>/global/ABAPPROT

o /sapmnt/<sid>/global/SLOGJ

o /usr/sap/<sid>/<instance>/data/SAP_ES2_<nn>_* (<nn> = instancenumber, path name depending on the profile parameteres2/filename_prefix)

Page 4: sapnote_0000825473

07.03.2011 Page 4 of 6

SAP Note 825473 - IBM i: Online backup as of V5R3M0

o /usr/sap/<sid>/<instance>/j2ee/cluster/server<n>/*.trc

o /usr/sap/<sid>/<instance>/j2ee/cluster/server<n>/jarm.log

o /usr/sap/<sid>/<instance>/j2ee/cluster/server<n>/slderror.log

o /usr/sap/<sid>/<instance>/j2ee/cluster/server<n>/security_audit.*

o /usr/sap/<sid>/<instance>/j2ee/cluster/server<n>/apps/sap.com/bi~mmr~browser_ea/servlet_jsp/mmr/root/velocity.log

Execution of the backup

1. Make sure that all transactions which contain DDL satements have beencompleted. This applies especially to changes in the data dictionary,for example, importing transports.

2. Save all libraries with the command:SAVLIB LIB(<library>) DEV(<tape device>) SAVACT(*SYNCLIB)SAVACTWAIT(3600 *NOCMTBDY *LOCKWAIT)

3. Save all directories with the command:SAV DEV(/QSYS.LIB/<tape device>.DEVD) OBJ((<directory> *INCLUDE)...)SUBTREE(*ALL) SAVACT(*YES)

In order to establish which tables were saved while transactions werepending and which journal receivers need to be available so that you canrecover completely from the backup, you can use the paramterOUTPUT(OUTFILE) on the SAVLIB command.

To query which tables have pending transactions and which is the oldestjournal receiver that must be saved, you can use SQL (STRSQL, SQLUTIL, orsystem i navigator): Use the following SQL statement:

SELECT SRONAM, SROLIB, SROJRN, SROJRL FROM <yourlib>/<yourfile> WHERE SROPRT = '1' ORDER BY SROJRN

Using option *NOCMTBDY with BRMSIf the backup is performed using the IBM software product "Backup Recoveryand Media Services for iSeries" (BRMS), you can define the use of option*NOCMTBDY in the backup control group.

Use the command WRKCTLGBRM with option 2 (Edit the entries) to do this.Make sure that the field "Retain object detail" is set to either *MBR or*YES for all entries which should be saved while active.

Ater this use the command WRKCTLGBRM with option 8 (Change attributes). Onthe third screen you will find the parameter group "Save active wait time".The value for the sub-parameter "Pending record changes" should be set to*NOCMTBDY if you wish to take backups without considering transactionboundaries. Make sure here as well, that the target release is at leastV5R3M0 (*CURRENT, if you are working with V5R3M0).

Page 5: sapnote_0000825473

07.03.2011 Page 5 of 6

SAP Note 825473 - IBM i: Online backup as of V5R3M0

Recovery after data lossFor information about the recovery of a system after loss of data, see theIBM online documentation, for example, at the linkhttp://publib.boulder.ibm.com/infocenter/iseries/v6r1m0/index.jsp (IBM iInformation Center for Release 6.1). Instructions are available in the"Systems management" section under "Backup and recovery-> Recovering yoursystem".

It is important that, after the restore of the libraries R3<sid>DATA orSAP<sid>DB and the corresponding journal libraries R3<sid>JRN orSAP<sid>JRN, the changes recorded in the journal be applied. To do this,after you restored the database libraries and the journal receivers,perform the following steps:

1. If the journal receivers (for example, in library R3<sid>JRN orSAP<sid>JRN) are in an ASP that differs from the ASP of the databaselibrary (for example, R3<sid>DATA or SAP<sid>DB), then often only thedatabase library has to be restored because the journal receivers havebeen retained in the separate ASP. In this case, it is only necessaryto associate the journal receivers with the journal. In order to dothis, enter the command WRKJRN without parameters. This will preset ascreen on which you should enter the name of the journal and thelibrary which contains it. Enter QSQJRN as the journal name and thename of your database library, for example, R3<sid>DATA orSAP<sid>DB as the library name. The next screen displays the journalQSQJRN in the database library list. Select 9 - Associate receiverswith Journal for that journal.

2. The next step is to establish which journal receivers are necessaryfor the recovery. The easiest way to do this is to use the commandWRKJRNA for the journal QSQJRN in your database library (for example,R3<sid>DATA or SAP<sid>DB) and to then use the function key F15(shift+F3) to display the receiver directory. Based on the attach dateyou can establish which receivers have been attached since the lastbackup.

3. Now you can apply the journal entries. Use the following command forthis: APYJRNCHGX JRN(<database library>/QSQJRN) FILE(<databaselibrary>/*ALL) RCVRNG(<journal libray>/<receiver1> <journallibray>/<receiver2>) FRMENTLRG(*LASTSAVE) TOTIME(<time before dataloss>) CMTBDY(*YES) OBJERROPT(*CONTINUE)

Header Data

Release Status: Released for CustomerReleased on: 25.02.2010 08:06:45Master Language: GermanPriority: Recommendations/additional infoCategory: ConsultingPrimary Component: BC-OP-AS4 IBM AS/400

Secondary Components:BC-DB-DB4 DB2 for AS/400

Page 6: sapnote_0000825473

07.03.2011 Page 6 of 6

SAP Note 825473 - IBM i: Online backup as of V5R3M0

The Note is release-independent

Related Notes

Number Short Text

1390533 IBM i: Recommendations for using MDM syst in operating syst

1278155 Security audit logs separated from other security logs

1061267 iSeries: Problem analysis for online data backup

1021310 iSeries: Short dump in RSDB4BFT and incorrect data in DB12

831678 IBM i: Recovery of damaged objects

826449 iSeries: Changing the JDBC driver

214369 iSeries: 3029, Resource busy, /usr/sap/<SID>/SYS/global

202593 iSeries: online backup with SAVR3SYS

116192 IBM i: SQL error -7008