This is another issue we frequently receive complaints about. What is scary about it is  it always comes as a Dump, and may require a little attention to some specific points, before you can understand that it was actually "just" a deadlock in your database. +   Runtime Errors         DBIF_RSQL_SQL_ERROR+

+   Exception              CX_SY_OPEN_SQL_DB+

 

+   Database error text........: "ORA-00060: deadlock detected while waiting for+

+    resource"+

+   Internal call code.........: "[RSQL/INSR//BIC/FDDLK_CBE]"+

+   Please check the entries in the system log (Transaction SM21).+ I'll try to be as simple as possible with this explanation, just to help you understand the basic and necessary principles. h3. What is a deadlock? A deadlock is a condition where two or more users are waiting for data locked by each other.  Imagine two processes are running in parallel. *Process A* is currently locking a resource called *Resource 1* and *Process B* is locking *Resource 2*. A *deadlock* would happen if, to continue, *Process A* needs *Resource 2* and *Process B* needs *Resource 1*.TX-00090004-00011000   43   39    *X *                      35     46          *S* TX-0006001a-0001397d   35   46    X                       43     39          S If you see the value ‘X' in both columns "Hold waits", you may start working in the BW system. If you don't, you should first check your Oracle database. h4. Database Side When we first understand what a deadlock in the database is, we tend to think of two processes fighting for the same records. This isn't always true. The lock may be related to another resource. In Oracle databases, a table contains various blocks of data. The locks are managed inside the blocks. For that purpose, they also contain a list of transactions that are interested in specific rows. This list is called *Interested Transactions List (ITL)*. The *ITL* is composed by transaction slots. Each slot will point out which transaction is interested in which row. For each table/partition, its *INITRANS* and *MAXTRAN* parameters will delimiter how this resource will be managed. *INITRANS* establishes the Initial Transaction Slots. This is the number of transaction slots a block will initially have. *MAXTRANS* defines the maximum number of slots that a block can allocate. According to the necessity, Oracle will dynamically increase the number of slots in the block until it reaches the value set in this parameter. Our recommendation usually concerns increasing *INITRANS*, as Oracle, by default, doesn't reserve much space for it. Therefore, if there is high concurrency, the transaction list usually needs to be extended. This extension is a very expensive and time consuming task. In this situation, transactions may be seen waiting for a "shared not exclusive lock". Therefore, it makes sense to always look for a higher and optimum value for *INITRANS* for all blocks, so the transactions won't have to wait for the list to be extended. *SAP Note #84348* describes a few situations that may cause a deadlock in the database and lists a few suggestions on how to solve it. {code:html}84348 - Oracle deadlocks, ORA-00060.{code} h4. Application Side h5. Drop the Indices BITMAP indices are designed to be used only in Data Warehouse systems. BW creates BITMAP indices on the F-Tables, for example, to improve the reporting performance. However, this type of index is very susceptible to deadlocks, as each index row references various records, not just one. Any DML statement (INSERTS, UPDATES, etc.) will lock many rows within an index. Dropping the secondary indexes from the InfoCube before loading data is recommended to improve dataload performance, but it also prevents deadlocks. Since indices are defined both in the DataBase and in the Dictionary, you may drop it only in the database, and rebuild from the dictionary definition after the load has finished. If you are manually loading the data, you can drop and rebuild the index in RSA1: RSA1- Delete and Repair Indices Or, you may set a default option directly to perform this action automatically in before each load.  The following popup window appears after clicking on the button "DB Index Creation" Delete InfoCube Indexes in BW If you are loading via process chain, you may create variants do manipulate the index: Dropping Indexes in Process Chains h5. Reduce Parallelism Reducing the number of parallel processes or deactivating the parallelism is another way to avoid deadlocks. To change this setting in a DTP, display the object and choose the menu option "Goto -> "Settings for Batch Manager...". DTP: Settings for Batch Manager A popup window will be displayed. You may change the number of parallel processes in the field "Number of Processes".  If set to 1, the parallelism is deactivated and the load will be serial. Number of Parallel Processes for DTP Loads For an InfoPackage in a 3.X dataflow, you can load serially by choosing the processing option "PSA and then into Data Targets (Package by Package)". Processing types in an infopackage

Recently, we have received many complaints about 2 particular issues. The solutions are already documented, but it always requires more explanations before the issue is completely eliminated.

 

I was a little reluctant about creating posts about these issues. However, I have seen so many complaints about this, that I realized a weblog post about it may be really useful for many BW consultants, to let them quickly solve the problem by their your own.

 

The first issue is about transformation transports. I have worked on many messages in which transformations were not correctly converted when transported, even though the source systems mapping for the transport is properly set.  Furthermore, the transport logs show the error code RSTRAN803.

 

This issue can be prevented by implement the following SAP Note:

 

 1412414 - (SP24) Content is not generated/transport errors.

 

However, even after you apply it and re-transport the transformation, you may still have an inactive object inconsistently pointing to the wrong system. This is where you may think SAP Note #1412414 didn't solve the issue and open a message to SAP Support. Specially because it's impossible to display or manually delete this inconsistent transformation.

 

What you need to know is that, if in the table RSTRAN, you can see an ‘M' (Modified) version of this transformation pointing to the wrong system, you may delete it using the method CL_RSTRAN_STAT=>DELETE_VERSION_FROM_DB, as described in the SAP Note below:

 

 1240905 - Transformation guide: Transport of deletions.

 

 

 

1-  SE24 - Display CL_RSTRAN_STAT.

 

SE24 - CL_RSTRAN_STAT

 

 

 

2- Click on the Test Icon.

 

Display the CL_RSTRAN_STAT Class

 

 

 

3- Run the method DELETE_VERSION_FROM_DB.

 

 Test CL_RSTRAN_STAT

 

 

 

4- Provide in the field I_TRANID the Id of the transformation to be deleted and the value ‘M' in the field I_OBJVERS.

 

Method CL_RSTRAN_STAT-DELETE_VERSION_FROM_DB 

 

 

The inconsistent version will be deleted.

 

In the next post I will talk about another frequent issue: Oracle DeadLocks on data loads. 

In a previous Programs for Activating BW Objects in a Productive System, I composed a list of programs that can be used to activate/re-activate BW objects. As stated in the same post, the report RSAU_UPDR_REACTIVATE_ALL cannot activate inactive update rules.

 

RSAU_UPDR_REACTIVATE_ALL

 

This is a question that is often raised at Primary Support. After discussing this subject with developer of this program, I created the following SAP Note:

 

1516916 - RSAU_UPDR_REACTIVATE_ALL doesn't activate inactive upd. Rule.

 

Part of the reason I created this weblog post, is to announce this SAP Note. 

 

HOWEVER... we all know though that these reports are very useful on productive systems, to quickly activate them, if, for some reason, they get inactive.

 

In some forums, I saw some created a Z report based on RSAU_UPDR_REACTIVATE_ALL and made it able to activate inactive update rules as well. I cannot suggest that you do the same, though.

 

Program to activate Update rules

 

Has any of you faced a situation where several update rules all got inactive and you had to lose some time to reactivate them? Were you able to find out why it got inactive?

 

If I can collect some cases, I may be able use them as arguments and bring this topic to discussion once more.
 
I hope to receive some feedback from you on this post.

 

Updated on 2011-01-07: I have received feedbacks from the experts and developers. This feature won't be changed. The update rules always need to be checked if they are inactive. Reactivating them "blindly" may cause inconsistencies. Therefore, as mentioned before, it isn't that safe to use the workaround from the SDN forum thread above.