Live Cache Maxdb Log Area_0000869267

15
22.11.2011 Page 1 of 15 SAP Note 869267 - FAQ: SAP MaxDB LOG area Note Language: English Version: 34 Validity: Valid Since 21.07.2011 Summary Symptom This note contains questions that are frequently asked by SAP staff and customers. It provides answers and refers you to other information sources. The note is in no way complete. 1. Which information is written into the log area of the MaxDB database? 2. What does the log configuration in a MaxDB database consist of? 3. What do I need to pay attention to when configuring the log with MaxDB? 4. Why should the log, data area, and swap not be on the same hard disks? 5. Can I use RAID technology for the log area? 6. Can I mirror the log area using database means? 7. Which log settings are available in MaxDB version >= 7.5? 8. How can I reduce the size of an existing logging configuration? 9. What is a log segment? 10. How are log segments configured? 11. How large should log segments be when configured? 12. What happens when a log segment is completed? 13. Can I enlarge log segments online? 14. Can I reduce log segments? 15. What happens if a log volume fails when a log area is mirrored with MaxDB? 16. Can I convert the log area to SINGLE myself in online mode? 17. How do I integrate a new hard disk as log volume if a log volume has previously failed in "mirrored" mode? 18. What danger is there if I do not mirror the log area? 19. How does a LOG full situation occur? 20. How do I recognize a LOG full situation? 21. How do I resolve a LOG full situation? 22. Where can I find more information about log backup?

Transcript of Live Cache Maxdb Log Area_0000869267

Page 1: Live Cache Maxdb Log Area_0000869267

22.11.2011 Page 1 of 15

SAP Note 869267 - FAQ: SAP MaxDB LOG area

Note Language: English Version: 34 Validity: Valid Since 21.07.2011

Summary

SymptomThis note contains questions that are frequently asked by SAP staff andcustomers. It provides answers and refers you to other information sources.The note is in no way complete.

1. Which information is written into the log area of the MaxDB database?

2. What does the log configuration in a MaxDB database consist of?

3. What do I need to pay attention to when configuring the log withMaxDB?

4. Why should the log, data area, and swap not be on the same hard disks?

5. Can I use RAID technology for the log area?

6. Can I mirror the log area using database means?

7. Which log settings are available in MaxDB version >= 7.5?

8. How can I reduce the size of an existing logging configuration?

9. What is a log segment?

10. How are log segments configured?

11. How large should log segments be when configured?

12. What happens when a log segment is completed?

13. Can I enlarge log segments online?

14. Can I reduce log segments?

15. What happens if a log volume fails when a log area is mirrored withMaxDB?

16. Can I convert the log area to SINGLE myself in online mode?

17. How do I integrate a new hard disk as log volume if a log volume haspreviously failed in "mirrored" mode?

18. What danger is there if I do not mirror the log area?

19. How does a LOG full situation occur?

20. How do I recognize a LOG full situation?

21. How do I resolve a LOG full situation?

22. Where can I find more information about log backup?

Page 2: Live Cache Maxdb Log Area_0000869267

22.11.2011 Page 2 of 15

SAP Note 869267 - FAQ: SAP MaxDB LOG area

23. What do I do if I cannot successfully restart in a LOG full situation?

24. Why is adding a new LOG volume not helpful in a LOG full situation?

25. Can I enlarge the log area online?

26. Can I deactivate log writing?

27. What are the dangers of deactivating log writing?

28. Can the log be overwritten cyclically without having to perform a logbackup?

29. What are REDO log entries (After images)?

30. What are UNDO log entries (Before images)?

31. Where are UNDO and REDO log entries stored?

32. What causes the log area to be released again for overwriting?

33. Which information does the DBMCLI command db_restartinfo provide?

34. Which information does the DBMCLI utility command "get restartversion" provide?

35. When is the login information written on hard disk?

36. What is the LOG IO queue for?

37. What are LOG QUEUE overflows?

38. What does it mean when tasks are in the "LOG FULL" status?

39. What parameter do I use to configure the size of the LOG-IO-QUEUE?

40. How many LOG-IO-QUEUES are configured?

41. Where can I see how many LOG-IO-QUEUES are active?

42. If I reduce the number of LOG-IO-QUEUES online, are the changes activeimmediately?

43. How large should I configure the LOG-IO-QUEUE?

44. Why can the log backup increase after the migration from MaxDB 7.5 to7.6?

45. What is a GROUP COMMIT?

46. If I use shutdown to set the status of the MaxDB database to ADMIN oroffline, does the shutdown wait until all transactions have beenended?

47. Where do I find additional information on the subject of the databaselog?

Page 3: Live Cache Maxdb Log Area_0000869267

22.11.2011 Page 3 of 15

SAP Note 869267 - FAQ: SAP MaxDB LOG area

Other termsFAQ; LOG; Logging; Log Full; Configuration; RAID;

Reason and PrerequisitesYou are using a MaxDB database version 7.5 or above in an OLTP, BW, orliveCache environment.

Definition of term:The term log area describes the quantity of log volumes.The term log entry describes both UNDO and REDO log entries.

Further FAQ notes about MaxDB/live Cache are available available on SDN(SAP Developer Network):https://wiki.sdn.sap.com/wiki/x/GkM

Solution

1. Which information is written into the log area of the MaxDB database?

The database system logs all changes to data by transactions in logentries. The database system uses these log entries in order to rollback or repeat individual SQL statements where necessary and therebyensure transaction consistency.The information on the log volume is only used for the roll forward that is, restart/recovery.

2. What does the log configuration in a MaxDB database consist of?

A log area can consist of between 1 and 32 log volumes. When thedatabase is installed, the number of log volumes (must not exceed/fallshort of the parameter: MAXLOGVOLUMES), their name, size and, underUNIX, their type, is configured.

3. What do I need to pay attention to when configuring the log withMaxDB?

Use the fastest hard disks available on the market for the log area.Striping of hard disks for log volumes is only recommended if the harddisk system works with a large cache and log volumes are alsomirrored. The cache of the hard disk system must be large enough sothat it is not necessary to wait for physical hard disks - I/O duringwriting of log pages.

In systems in which the database must guarantee the persistence of thedata, the log volumes must either be mirrored, or the system deliversa comparable security that does not negatively affect performance.Mirroring can be done using MaxDB.If the parameter LOG_MIRRORED is set to NO, the log must be mirroredusing the operating system devices or secured using the hardware thathas comparable mechanisms (for example, RAID-1, -10, -0+1, -DP) .If there is no sufficient redundancy of the log volumes, loss of datawill occur in the case of a disk error. A log area that is not securedaccordngly is therefore recommended only in test systems.

4. Why should the log, data area, and swap not be on the same hard disks?

Page 4: Live Cache Maxdb Log Area_0000869267

22.11.2011 Page 4 of 15

SAP Note 869267 - FAQ: SAP MaxDB LOG area

Changes to the data of a MaxDB database (AFTER images) are writtenasynchronously in the log area on the hard disk using a buffer knownas the LOG IO queue.If the Logwriter cannot copy the log pages in the Log IO queue fastenough, the Log IO queue can fill up with pages that have not yet beenwritten. This effect is called Log Queue Overflow.All users wishing to make changes have to wait in this situation. Thesituation can therefore be very critical for performance.In most cases, log queue overflows occur in the case of write I/O forlog volumes being too slow. You must therefore keep in mind that theI/O is not made worse by other actions (possibly because the data areaor SWAP area are also contained on the log hard disks,).

5. Can I use RAID technology for the log area?

You can use RAID-1, -10, -0+1, -DP to secure the log areas.RAID 5 is not to be recommended for safety and performance reasons.

6. Can I mirror the log area using database means?

Yes. You can activate mirroring of the log area using the DatabaseManager Gui.

In the DBMGUI, go to -> Instance -> Configuration -> Log Settings.Select the log setting "Log Mode".

The database instance can be in any operation status. However, bear inmind that after log mode status has terminated, the database instanceis always transferred to the OFFLINE operational status and then tothe ONLINE operational status.

You are requested by the database manager to create the necessarymirror for the log volumes. Choose -> Properties and, under"Location", specify the situation for the mirror, then start theactivity.

The database instance is transferred on to the OFFLINE operationalstatus and then OFFLINE operating status upon completion of thisoperation.

Use this setting only if you cannot perform a hardware-based mirroringof the log area. A software-based mirroring will impair theperformance of your database system.

During software-based mirroring, the database system describes two logareas at the same time (primary and secondary log area). The databasesystem can only overwrite the log areas again if the log entries ofthe primary log area have been saved.

7. Which log settings are available in MaxDB version >= 7.5?

For MaxDB-Version 7.5 and above, the following log settings exist:a) Log modeThe Log mode defines whether mirroring of the log area by the databasesystem is software-based. Database-side mirroring is not proposed asdefault. Database-side mirroring should only be used when it is notpossible to perform hardware-based mirroring of the log area.

Page 5: Live Cache Maxdb Log Area_0000869267

22.11.2011 Page 5 of 15

SAP Note 869267 - FAQ: SAP MaxDB LOG area

The other log modes (DEMO, SINGLE, DUAL), as they were known on MaxDBversions lower than 7.5, are no longer supported.

b) Overwrite mode for log areaOverwrite mode for the log area defines whether the database systemcan overwrite the log area without the log entries having been savedpreviously.

Overwrite mode is not activated as default.The database system can only overwrite the log area if thecorresponding log entries have been saved.

If overwrite mode is activated, the database system overwrites the logarea cyclically if no previous backups have been made to log entries.The log backup history is thus interrupted. This means you cannotrestore your database instance up to the last COMMIT before systemfailure or any other time but only up to the time the last data backupwas made.If you switch off overwrite mode when this was switched on, you mustexecute a complete data backup.

Overwrite mode corresponds to the DEMO Log mode known from olderversions of MaxDB.

c) Switching off Redo Log Management (Activate or Deactivate the REDOLog Management)Redo Log Management defines whether the database system writes RedoLog entries (After Images).

REDO Log Management is activated and the after images(REDO-LOG-entries) are saved in the log area.

In rare cases, it can be useful to switch off Redo Log Management, forexample during a large loading job or an SAP upgrade. Note that logbackup history is thus interrupted. If you need to restore thedatabase instance after an error, no log entries are then availablefor this time period.

You set log settings in the Database Manager using Configuration ->Log Settings.

8. How can I reduce the size of an existing logging configuration?

You can reduce the size of the logging configuration using a restoredata with an integrated configuration change (recovery withinitialization).

9. What is a log segment?

Log segments are backup units. Segmentation is not a physical divisionof the log area. The log area is divided into segments of fixedlength. Log segments determine the size of the files in which the logpages are saved.

10. How are log segments configured?

You set the size of log segments using the database kernel parameter

Page 6: Live Cache Maxdb Log Area_0000869267

22.11.2011 Page 6 of 15

SAP Note 869267 - FAQ: SAP MaxDB LOG area

AutoLogBackupSize (LOG_SEGMENT_SIZE). These are specified in Pages. Apage has a size of 8 kbyte.If the value 0 is specified for the parameter AutoLogBackupSize(LOG_SEGMENT_SIZE), the database manager automatically calculates 1/3of the entire log area. Enlarging the log area does not change the logsegment size.The segment size corresponds a maximum of half the log area.

11. How large should log segments be when configured?

There is no absolute size recommendation for log segments. Logsegments are backup units. You determine the size of the files inwhich log pages are saved.A log segment can consist of a maximum of half the entire log area.

12. What happens when a log segment is completed?

Log segments are NOT completed by a savepoint.A log segment is completed if the number of unsaved log pages exceedsAutoLogBackupSize (LOG_SEGMENT_SIZE). If autosave_log is activated,the closed segment is saved automatically.

13. Can I enlarge log segments online?

No, you change the size of the log segments using the parameterAutoLogBackupSize (LOG_SEGMENT_SIZE). For a parameter change in MaxDBversions < 7.6, it is essential that the database is started. As ofMaxDB Version 7.6, some parameters can also be changed ONLINE, but theparameter AutoLogBackupSize (LOG_SEGMENT_SIZE) is among those thatcannot be changed online.

14. Can I reduce log segments?

Yes, you can also reduce log segments using the parameterAutoLogBackupSize (LOG_SEGMENT_SIZE) without having to completely savethe log area that is described beforehand.

15. What happens if a log volume fails when a log area is mirrored withMaxDB?

If the log area is mirrored by the database, failure of a log volumeresults in an Emergency Shutdown.

With access problems to a log volume in the primary log area, thedatabase system selects the affected log volume as BAD and transfersthe database instance to the OFFLINE operating status. To restore thedefective log volume, replace the corresponding hard disk and then, inthe ADMIN operational status, reintegrate the full contents of thecorresponding log volume mirrored in the primary log volume .For version 7.4 and above, the log volume cannot be integrated in theONLINE status.

16. Can I convert the log area to "SINGLE" in online mode?

Converting the log area from "Mirrored" to SINGLE or vice versa alwaysrequires the database to be restarted. You can carry out the actionswith the database in ONLINE status, for example, in DBMGUI usingConfiguration -> Log Settings -> LOG Mode, but the change can only be

Page 7: Live Cache Maxdb Log Area_0000869267

22.11.2011 Page 7 of 15

SAP Note 869267 - FAQ: SAP MaxDB LOG area

carried out in conjunction with a stop/start database.

17. How do I integrate a new hard disk as log volume if a log volume haspreviously failed in "mirrored" mode?

For information about how to proceed, see Note 1177052.

18. What danger is there if I do not mirror the log area?

If you do not make a copy of the log area, a disk error will result indata loss, as the unsaved log area cannot be used for a recovery.

19. How does a LOG FULL situation occur?

A Log Full situation only arises if the log area is not regularlysaved. The log area can only be released for overwriting if it hasbeen previously saved and then a SAVEPOINT was written.

In a LOG full situation, the system can only write COMMITS/ROLLBACKSand SAVEPOINTS in the log.

You recognize a Log full situation in knldiag, for instance.

An exception occurs if REDO Log Management is deactivated, as no logis then written. Even if the log is set to OVERWRITE, the log area maynot actually become full.

20. How do I recognize a LOG full situation?

If the log area becomes full, a corresponding warning is written toknldiag. If the log area is full, the tasks will have the status "LOGFULL" (x_cons <DBNAME> show tasks), and no more changes can be made inthe database.

21. How do I resolve a LOG full situation?

If the log has become full, any further on-line operation is onlypossible if a log backup is created. Log backup can be created inADMIN or ONLINE status. A log backup can also be created by switchingon automatic log backup.If no database backup has been created on the affected database beforethe log backup, or if the log area has been switched off once in themeantime, a data backup is still necessary before the log backup.

22. Where can I find more information about log backup?

For more information, see Note 1377148 (FAQ: SAP MaxDB Backup /Recovery).

23. What do I do if I cannot successfully restart in a LOG full situation?

In a log full situation, if the database is offline, the restart mayhang in rare cases due to the LOG full situation.

knldiag contains a relevant message. With the database console, youcan see that user tasks were suspended due to another log fullsituation.

Page 8: Live Cache Maxdb Log Area_0000869267

22.11.2011 Page 8 of 15

SAP Note 869267 - FAQ: SAP MaxDB LOG area

In this situation, you can perform a SAVE LOG in the ADMIN status ofthe database, and repeat the restart.

24. Why is adding a new LOG volume not helpful in a LOG full situation?

If the database has the status 'Log full', this cannot be resolved byenlarging the log area. The current write position is only movedsequentially. The position is not moved from the center of one logvolume to the start of the next log volume. If the log volume isenlarged with a new log volume, this new volume is not described untilthe current write position from the last page of the preceding volumeis changed.

25. Can I enlarge the log area online?

Yes. The parameter MaxLogVolumes (MAXLOGVOLUMES) specifies the maximumnumber of log volumes. The log area can be enlarged online up to thisnumber. If the value of MaxLogVolumes (MAXLOGVOLUMES) is reached, youmust first increase the parameter MaxLogVolumes (MAXLOGVOLUMES) beforeyou can add a new log volume to the database. You must restart thedatabase before the parameter change becomes active.

Expanding the log area does NOT resolve the LOG FULL situation.

26. Can I deactivate log writing?

Yes, as of version 7.4, you have the option of switching off theLogwriter.

C A U T I O N:This is now permitted because the database is consistent with eachsavepoint. You can restart without log because you can roll back allopen transactions based on the last savepoint.

B U T: As long as the log is deactivated, the system writes NOsavepoints implicitly. If the database crashes, data loss may occur.

The Logwriter must not be deactivated for production operation. Thefunction is used to accelerate such administration tasks as upgradesand larger loading jobs.

Switch off the Logwriter using the DBM command util_execute SET LOG WRITER OFF. To do this, start the database with the ADMIN status.Log backups are not possible after switching off the the Logwriter.Backup history is broken down and flagged with the abbreviationHISTLOST. The backup history is restarted when you switch on theLogwriter again with the DBM command util_execute SET LOG WRITER ONin the ADMIN status and create a complete data backup in ADMIN orONLINE status.

27. What are the dangers of deactivating log writing?

When the Logwriter is switched off, the backup history is lost. In thecase of a RECOVERY triggered by hardware errors, you can only import

Page 9: Live Cache Maxdb Log Area_0000869267

22.11.2011 Page 9 of 15

SAP Note 869267 - FAQ: SAP MaxDB LOG area

the last complete backup and any possible incremental backups. Changesto the data will not have been logged, therefore you cannot trackedthem.

C A U T I O N: Note that after you deactivate the log, the system nolonger writes implicit savepoints in love operation. Therefore,changes to data are not written to the disk. If you do not stop thedatabase with a correct shutdown, all data changes are irretrievablylost.

28. Can the log area be overwritten cyclically without having to make alog backup?

Yes, the log area can be automatically overwritten without logbackups. Use the DBM command util_execute SET LOG AUTO OVERWRITE ONto set this status. The behavior of the database corresponds to theDEMO log mode in older versions. With version 7.4.03 and above, thisbehavior can be set online.Log backups are not possible after switching on automatic overwrite.Backup history is broken down and flagged by the abbreviation HISTLOSTin the backup history (dbm.knl file). The backup history is restartedwhen you switch off automatic overwrite without log backups using thecommand util_execute SET LOG AUTO OVERWRITE OFFand by creating a complete data backup in the ADMIN or ONLINE status.Automatic overwrite of the log area without log backups is NOTsuitable for production operation. Since no backup history exists forthe following changes in the database, you cannot track transactionsin the case of recovery.

29. What are REDO Log entries (After images)?

The database system uses Redo Log entries (After images) if it has torepeat data changes carried out by a transaction that has already beencompleted. All information that the database system needs to repeattransactions is saved in Redo Log entries.Redo Log entries therefore allow complete recovery of data after acrash or in the case of hard disk defects.

30. What are UNDO Log entries (BEFORE IMAGES)?

The database system writes Undo Log entries (Before images) for everytransaction that changes data in the database. In Undo Log entries,the database system saves the original values for all database objectsthat the transaction is going to change.The database system uses the Undo Log entries if it must roll backtransactions that have not yet been completed (ROLLBACK).

31. Where are UNDO and REDO log entries stored?

MaxDB manages Redo and Undo Log entries separately.

a) UNDO Log entries (BEFORE images)Undo Log entries consist of one or more permanent data pages. Theseare handled in exactly the same way as data pages with table and indexinformation at the Savepoint - that is they are written into datavolumes.

Page 10: Live Cache Maxdb Log Area_0000869267

22.11.2011 Page 10 of 15

SAP Note 869267 - FAQ: SAP MaxDB LOG area

b) REDO LOG entries (After images)

Redo Log entries are written to the log area (log volumes) using theLog IO queue.

32. What causes the log area to be released again for overwriting?

The Log-area is cyclically overwritten. Log pages can only beoverwritten if they have been saved. (Exception: SET LOG AUTOOVERWRITE ON).A reserved page, known as the INFORMATION PAGE, exists in the LogVolumes header, for example, that is not overwritten cyclically.Positions are managed on the information page. Including: - The current character position - The position up to which overwriting may occur - The position before which the last backup was made - The number of the last log backup

When the current write position reaches the page up to whichoverwriting may occur, the log area is full. In such cases thedatabase does not allow any more write transactions to be made. Thisstatus cannot be resolved by enlarging the log area. The current writeposition is only moved sequentially. If the Log Full status occurs,the database kernel first writes a Savepoint. Log entries may only beoverwritten if they have been saved and if the position of the lastsavepoint is still in the log area (Exception: SET LOG AUTO OVERWRITEON).A subsequent log backup saves the area starting from the positionafter which a backup has not yet been made.After a successful log backup, the position after which a backup hasnot yet been made is moved accordingly, and the area that has justbeen saved is re-released for overwriting by the new position beingnoted in the LOG Info page.

33. Which information does the DBMCLI command db_restartinfo provide?

This command can be executed in the data base status ADMIN or ONLINE.It is used, for example, to determine the setup point for a RESTORELOG in the log area. This command is particularly important if shadowdatabases have been set up.

Call: dbmcli -d <DBNAME> -u <DBMUser>,<DBMPWD> db_restartinfoOKUsed LOG Page 7451First LOG Page 2527Restartable 1Id Restart Record BERD00144137A.ber.sap.corp:MAXDB_75_20050914_165Id LOG Info BERD00144137A.ber.sap.corp:MAXDB_75_20050914_165Consistent 1

Used LOG Page is the log page number currently being used.First LOG page is the oldest log page still contained in the logvolume that may be imported directly by the log volume in the case ofa recovery.Restartable shows the restartability of the database. Possible valuesare: 1: The database instance is restartable. 0: The database instance is not restartable.

Page 11: Live Cache Maxdb Log Area_0000869267

22.11.2011 Page 11 of 15

SAP Note 869267 - FAQ: SAP MaxDB LOG area

Id Restart Record specifies the identifier for the restart record inthe database instance.Id LOG info provides the identifier for the log area of the databaseinstance.Consistent specifies the consistency of the database instance - thatis, restartability without Log_Entries having to be tracked 1: Restartable without log 0: Not restartable without Log

34. Which information does the DBMCLI utility command "get restartversion" provide?

This command contains the same information as the commanddb_restartinfo. Output for "get restart version" is subject toconstant revision by developers however where a demand exists for moreinformation. These outputs are then copied successively to the DBMCLIcommand db_restartinfo. Output for the both commands described heremay therefore differ. In MaxDB documentation, you will only find thecommand db_restartinfo described in the DBMCLI handbook.

This command can be sent in ADMIN and online status and is used byDevelopment Support for detailed analysis in the case of recoveryproblems.

dbmcli -d <DBNAME> -u <dbmUser>,<pwd> util_execute get restart versionOKFIRST IO SEQUENCE NEEDED = 7451FIRST IO SEQUENCE ON LOG = 2527RESTARTABLE = 1DB IDENT FROM RESTARTRECORD =BERD00144137A.ber.sap.corp:MAXDB_75_200509DB IDENT FROM LOGINFO =BERD00144137A.ber.sap.corp:MAXDB_75_20050914_165RESTARTABLE WITHOUT LOG = 1LOG VOLUME ENABLED = 1LOG AUTO OVERWRITE = 0MASTER SERVERNODE =CONVERTER VERSION = 57OLDEST COMPATIBLE VERSION = 7.5.0.8

FIRST IO SEQUENCE NEEDED corresponds to the Used LOG Page.FIRST IO SEQUENCE ON LOG corresponds to the First LOG Page.Restartable shows the restartability of the database. Possible valuesare: 1: The database instance is restartable. 0: The database instance is not restartable.DB IDENT FROM RESTARTRECORD shows the DBIdent of the Restart Record.DB IDENT FROM LOGINFO shows the DBIdent of the Log area.RESTARTABLE WITHOUT LOG shows the restartability of the database.Possible values are:1: The database instance is restartable without log entries having to be tracked.0: The database instance is not restartable. Log entries must be tracked so that you can track the open transactions.

LOG VOLUME ENABLED specifies whether REDO Log Management isdeactivated. 1= REDO Log Management is activated; 0= REDO LogManagement is deactivated.

Page 12: Live Cache Maxdb Log Area_0000869267

22.11.2011 Page 12 of 15

SAP Note 869267 - FAQ: SAP MaxDB LOG area

LOG AUTO OVERWRITE specifies whether overwrite mode is activated forthe log area. 1= the Log area is overwritten cyclically, log backup isnot possible; 0= The log area is NOT in overwrite mode.MASTER SERVERNODE specifies the master in Hotstandby systems.CONVERTER VERSION specifies the converter versions, and thisinformation is used for internal testing purposes.OLDEST COMPATIBLE VERSION is the version that can still be reachedwith a downgrade.

35. When are the log entries (After Images) written to hard disk?

At the beginning of a transaction in which data is going to bechanged, the database system writes Undo Log entries (Before images)for all database objects to be changed by the transaction into an Undolog file in the data area.

After a transaction of this type has been completed using COMMIT, thedatabase system writes Redo Log entries (After images) in the LOG IOqueue in the main memory. The database system always writes the redolog entries from the log queues into the log area when a page is fullin the log queue or when a transaction is completed using a COMMIT.

36. What is the LOG IO queue for?

The LOG IO queue (log queue) enables asynchronous writing of logentries. the database system first writes Redo Log entries into thelog IO queue (log queues) in the main memory. The database system thenwrites the Redo Log entries from the Log queues to the log area inasynchronously.

37. What are LOG QUEUE overflows?

If the logwriter is unable to copy the log pages contained in the logqueue quickly enough, then the log queue can fill up with pages thathave not yet been written. This effect is called the log queueoverflow.

All users wishing to make changes have to wait in this situation. Thesituation can therefore be very critical for performance.In most cases, log queue overflows occur when the write I/O is tooslow for the log volumes. The log queue may have to be enlarged.

The DBM command "info log" displays the number of log queue overflowsthat have occurred since the instance was last restarted.

38. What does it mean when tasks are in the "LOG FULL" status?

With the x_cons database console, you can display the status ofdatabase tasks using the "show tasks" command. If the tasks are in"LOGQ FULL" status, this means no more entries can be written in theLog IO queue. This status only occurs if the log area has become fulland does not occur in normal operation. A LOG Full Situation means nomore entries can be written from the LOG IO queue to the Log area.This problem is solved by a log backup.

39. What parameter do I use to configure the size of the LOG-IO-QUEUE?

Page 13: Live Cache Maxdb Log Area_0000869267

22.11.2011 Page 13 of 15

SAP Note 869267 - FAQ: SAP MaxDB LOG area

Use the parameter LogQueueSize (LOG_IO_QUEUE) to configure the size ofa log queue.

40. How many LOG-IO-QUEUES are configured?

As of MaxDB Version 7.6, the parameter of the MaxCPU (MAXCPU)determines the number of LOG-IO-QUEUES that are set. The parametersMaxLogQueues (MAX_LOG_QUEUE_COUNT) and LogQueues (LOG_QUEUE_COUNT)determine the number of LOG queues. MaxLogQueues (MAX_LOG_QUEUE_COUNT)is set to 0. This means that, at most, you can allocate the number ofLOG-IO-QUEUES set with MaxCPUs (MAXCPU).The parameter LogQueues (LOG_QUEUE_COUNT) determines the actual numberof LOG-IO-QUEUES used. A recommendation for setting the parameterLogQueues (LOG_QUEUE_COUNT) is available in the parameter notes forthe MaxDB/liveCache version you use.

41. Where can I see how many LOG-IO-QUEUES are active?

The system table LOGQUEUESTATISTICS provides detailed informationabout Log-IO-queues. The system table contains one line for eachLOG-IO-QUEUE.

42. If I reduce the number of LOG-IO-QUEUES online, are the changes activeimmediately?

No. The changes become active if all entries from the LOG-IO-QUEUESthat are no longer used due to the online changes of the parameterLogQueues (LOG_QUEUE_COUNT) are written to the log volume.

43. How large should I configure the LOG-IO-QUEUE?

Experience has shown that, on 64-bit platforms, LOG_IO_QUEUE(parameter LogQueueSize (LOG_IO_QUEUE)) should be configured between1,000 and 2,000 pages if the number of LOG-IO-QUEUES is lower than 5.For larger systems with more than 4 LOG-IO-QUEUES, you should firstcheck whether the computer has sufficient memory available.

Note that the size of the LOG-IO-QUEUE reduces the usable log area.The usable log area is calculated from the difference of theconfigured log area (size of the log file(s)) and (number ofLOG-IO-QUEUES * size of LOG-IO-QUEUES). The memory area for theLOG-IO-QUEUE(s) is reserved. The background for this is that the logentries that are already located in the LOG-IO-QUEUE(s) can still bewritten even if a LOG FULL situation occurs.

44. Why can the log backup increase after the migration from MaxDB 7.5 to7.6?

LOG queue entries must be written to the log volume as fast aspossible after a commit. This process takes place immediately, even ifthe LOG-QUEUE-PAGE is not full yet.Up to and including the MaxDB Version 7.5, LOG-QUEUE-PAGES that werepartially filled and written to disk could be filled further, and thenwritten to disk again completely after a subsequent I/O.As of MaxDB Version 7.6, LOG-QUEUE pages that were already written todisk are no longer filled further, only subsequent log entries arewritten to a new page. For this reason, the storage space on the log

Page 14: Live Cache Maxdb Log Area_0000869267

22.11.2011 Page 14 of 15

SAP Note 869267 - FAQ: SAP MaxDB LOG area

volume and therefore the log backups will increase for applicationswith a lot of short transactions (a lot of commits).

45. What is a GROUP COMMIT?

Before they are written in the log volume, log entries are writteninto the LOG IO queue. If there are several commit entries on aLOG_IO_QUEUE page, it is known as a group commit. Several commits withan IO are written to the log device.

46. If I use shutdown to set the status of the MaxDB database to ADMIN oroffline, does the shutdown wait until all transactions have beenended?

No. The database system does not wait until all transactions haveended; this also applies to a "normal shutdown". The database starts asave point to write all of the changed data from the cache to the harddisk. The system then shuts down the database instance and, as aresult, terminates any transactions that are still running. You mustthen roll back these terminated transactions the next time you startthe database.

47. Where do I find additional information on the subject of the databaselog?

You can find more information on the subject of the MaxDB Database Login the glossary in the MaxDB documentation (Note 767598) under the keywords "Log area", "Log setting", "Log entry", "Logging", "Log reader""Log mode", "Log segment", "Log page" and so on.

Alternatively, you can use the SDN to access the MaxDB documentation.

https://www.sdn.sap.com/irj/sdn/maxdb

In addition, the subject of database logging is dealt with in detailin the MaxDB Internals Workshop WB550. You can find the documents ofthe unit about logging (Version 7.6) on maxdb.sap.com under:http://maxdb.sap.com/training/internals_7.6/logging_EN_76.pdf

Header Data

Release Status: Released for CustomerReleased on: 21.07.2011 06:17:49Master Language: GermanPriority: Recommendations/additional infoCategory: ConsultingPrimary Component: BC-DB-SDB MaxDB

Secondary Components:BC-DB-LVC liveCache

BW-SYS-DB-SDB BW MaxDB

The Note is release-independent

Page 15: Live Cache Maxdb Log Area_0000869267

22.11.2011 Page 15 of 15

SAP Note 869267 - FAQ: SAP MaxDB LOG area

Related Notes

Number Short Text

1377148 FAQ: SAP MaxDB backup/recovery

1177052 Mirrored log: Recovery of deficient log volume

1173395 FAQ: MaxDB configuration

1167342 MaxDB parameter LOG_QUEUE_COUNT as of version 7.6

993848 Direct I/O mount options for liveCache/MaxDB

936058 FAQ: SAP MaxDB Runtime Environment

846890 FAQ: SAP MaxDB Administration

820824 FAQ: SAP MaxDB/liveCache technology

534036 SAP LT: System settings for conversions