Posts

Showing posts from March, 2012

Functions in UNIX Shell

Functions in any programming language help you break down the script into logical subsections. UNIX shell lets you use functions. Let's look at an example function called hello. Here is how we define hello function: [user19@localhost ~]$ hello() { > echo hello. please enter your nme > read name > echo welcome $name > } To call function hello , simply call it by its name: [user19@localhost ~]$ hello hello. please enter your nme user1 welcome user1 You can list the functions that you have defined using set command. [user19@localhost ~]$set tmpid=509 hello () {     echo hello. please enter your nme;     read name;     echo welcome $name } To undefine the function , use unset command: [user19@localhost ~]$ unset hello Functions are stored in memory and therefore are faster than a regular script. Any script or program with the same name as the function will have lesser precedence. Let's see how we can use a function in a script . Let'

OutOfMemory Error due to XSLT Transformations

XI uses caching to speed up XSLT transformations. The mappings structures (transformer objects) that are already generated are stored in a mapping pool for reuse. Whenever a mapping is required, a transformer object is required to execute the mapping. Therefore the mapping pool will store as many transformer objects as the number of messages being mapped. By default the maximum number of transformer objects is set to 20, which means that this limit is reached when 20 messages are being mapped using the same XSLT logic. Storing these transformer objects in heap can degrade performance or cause OOM error if the messages are large in size. To minimize the chances of performance problem due to caching of transformer objects: 1. Apply the latest patch for SAP J2EE ENGINE CORE 2. Reduce the maximum number of transformer objects that can be used in a memory pool to 1 (from default 20)    a. Call exchange profile http://<server>:<port>/exchangeProfile    b. Go to category I

Audit Log for Successful PI Messages

PI 7.1 does not persist the audit logs for the messages that are processed successfully. The audit entries are available in memory for successful messages, but they are deleted once cleanup is done or if there is a restart. If you want to persist the audit logs to database, change the property  messaging.auditLog.memoryCache in com.sap.aii.af.ms.svc service to  false . 

Using LOB Securefile Conversion to Improve XI Performance

XI/PI stores the XML data into LOB fields in the following tables: SXMSCLUP, SXMSCLUP2, SXMSCLUR, SXMSCLUR2, XI_AF_MSG/BC_MSG. LOB data has always been a source of performance problem when performing transactions on these tables. Oracle 11g has introduced a new way of storing LOB data to improve performance. The LOBs stored with the new approach are called SecureFile LOBs. The traditional LOBs i.e the LOBs before developing SecureFile are called as BasicFile LOBs. You can convert the above mentioned tables from BasicFile LOBs to SecureFile LOBs using BR Tools (7.2) to benefit from the options available in Oracle 11g. Check SAP note 1431296 to know more about LOB conversion using BR Tools.