Posts

Showing posts from June, 2013

Oracle 11g Extended Statistics for SAP Tables

Extended Statistics is an attempt to fix one of the flaws in CBO--values of different columns are not correlated. Let us take an example of two columns in a table. One of the column contain department code and the other contains employee name. Let us assume that there are 10 departments and 3000 employees in our example. In a real life scenario, all the employees do not belong to all the departments, but CBO assumes that is the case and hence it assumes that there are 3000*10 = 30000 combinations of employee name and department code that exist. In reality, it can be between 3000 and 30000 (assuming employee belongs to at least one department and can clock for multiple departments). The CBO is not intelligent to know these relations and this assumption can have serious performance impact on join operations. In order to calculate better statistics, we can use extended statistics from Oracle 11g onwards . SAP has provided these statistics for AUSP, BKPF, MSEG and HRP1001 tables as

Oracle Database Overview - Memory Areas

Image
One of the most important aspects of understanding the Oracle system architecture is understanding how instance memory is divided. We will look at an overview of the memory areas which have relevance to database usage with an SAP application as SAP does not make use of all the memory areas available. There are two broad memory areas Memory shared by all the processes - System Global Area in Oracle Memory assigned to exactly one process - Program Global Area in Oracle System Global Area [SGA] Database Buffer Cache Also known as Buffer Pool or Data buffer or " Cache " This portion of SGA holds copies of the data blocks from the datafiles. The SQL operations on data objects are first performed on these blocks and then transferred to the datafiles by the DB Writer processes. The Buffer pool is further divided into the following parts Free Buffer - free space Pinned Buffer - holds data that is currently being accessed Dirty Buffer -  holds data that is mod

Checking if an Environment Variable is Set in UNIX Shell

We had a task to write a script to check if certain environment variables, which should not be set, were set. This task was straightforward with C shell: if $?GARBAGEENV then echo "Unset GARBAGEENV on `hostname`" endif With K shell, we did not find anything built-in. So we used something innovative. if test "isenvset${GARBAGEENV}" != "isenvset"; then echo "Unset GARBAGEENV on `hostname`" fi If GARBAGEENV was set to N, isenvset${GARBAGEENV} would be evaluated as  isenvsetN (which is not equal to isenvset). If it was not set isenvset${GARBAGEENV} would be evaluated as isenvset.

Oracle Error Information Utility oerr

You can look up the explanation of Oracle error code on the database server itself using  oerr utility on UNIX OS. Here is an example explanation of ORA-1555 error. sapadm> oerr ora 1555 01555, 00000, "snapshot too old: rollback segment number %s with name \"%s\" too small" // *Cause: rollback records needed by a reader for consistent read are //         overwritten by other writers // *Action: If in Automatic Undo Management mode, increase undo_retention //          setting. Otherwise, use larger rollback segments Pretty handy if you are working for a third-class company that blocks google search.

Ubuntu Phone Demo

Image

Massive Open Online Courses - openSAP

SAP is offering online classes keeping students and general IT professionals in mind. The course delivery is a bit different from the regular self-paced online training you would find. The courses brings in the deadlines, assignments, grading system of traditional classroom courses to online training. Each course is designed to take 90 minutes/week and then combined with assignments, self study goes up to 4-5 hours a week. You get to discuss the course with other participants and  the instructor on the study forum. The participants are expected to complete their assignments on time :). However, this is not an obligation. You are also allowed to take the course of your own time as well, but the ability to communicate with other participants or instructor is limited. These courses are created using openHPI . Currently the following courses are available and are expected to increase: Warm-Up: In-Memory Data Management by Dr.-Ing. Jürgen Müller Introduction to Software Development

Monitor SAP PI queues on iPhone

SAP PI integration pipeline steps are processed as qRFCs. These calls can be monitored using the ABAP transaction SMQ2. If any of these calls fails, the next entries in the queue will not be processed until the failed LUW is reprocessed or cancelled. Therefore monitoring SMQ2 is important. There are several alert mechanisms in place, however they do not entirely replace manual monitoring. You can monitor SAP PI queues on iPhone or your website using the PI monitor tool freely available at Sourceforge. The features of this tool include: Perl kit with SAPNWRFC for Windows 32 bit (perl_with_nwrfc.zip) Save queue data to a SQLite database for later analysis (pi_monitor.zip) Google Charts to generate bar charts (pi_monitor.zip) iPhone web application (pi_monitor.zip)