Showing posts with label DB. Show all posts
Showing posts with label DB. Show all posts

Wednesday, December 30, 2015

Hangman.vbs

Hangman is one of SAP tools to analyze a hang situations on an SAP system. In order to be able to analyze this several types of information needs to be collected. The "Hangman" tool helps with that. It stores following information into a log file:

- SAP work process list of all application servers
- SQL Server process list
- Windows process list of all application servers
- Windows process list of the database server
- SQL Server database locks
- SQL Server configuration and log files
- extract from the SAP dev_* traces of all application servers

Log file generated by the Hangman can help to understand root cause of the problems with SAP instance. The tool supports both stacks (ABAP & JAVA) of NetWeaver. However main database type of the Hangman is MS SQL Server.


More information:
948633 - Hangman.vbs

541256 - Hangman 4.1

Tuesday, August 4, 2015

Converting Oracle DB format of date to SAP date format

There are many data flows picking up the data from "external database" based source systems in BW. One of most used DB system is Oracle. To connect BW system to Oracle DB a technology called DB Connect is very often used. As Oracle and SAP are different systems designed by two different companies there are many differences in there while comparing each other. The differences are there as well as from date and time related fields representation.

Therefore there are challenges while integrating data from Oracle DBs into SAP BW. Especially when converting date and time fields in Oracle and into format compatible with SAP BW. Let's take an Oracle date format for example. It has a format as DD-MMM-YY means it has 7 characters (e.g. today's date is represented by: 03-AUG-15). Whereas SAP format is 8 characters long in format YYYYMMDD (see Data Element SYDATUM; Domain SYDATS or Data Type DATS). If we just simply assign Oracle date field to SAP one it won't get proper data because the fields are not compatible.

Now; how to solve this? On SCN there are many discussions (e.g. here or here) on this. Most of it suggest parsing value as they come from Oracle and concatenate it at the end to field in SAP format of date. However this is not proper approach. The way how Oracle produce the format of the data field depends on national language settings (NLS) used with the database connection. Therefore the date field can come in many different flavors as per many configuration settings. What actually needs to be done is to force Oracle to produce the date field in desired format. This can be achieved by adding function TO_CHAR into e.g. SELECT statement while we extracting the data. E.g. a separate view can be created in Oracle to add TO_CHAR function. Such a SELECT statement would look like:

select  to_char(,'YYYYMMDD') as dat from where ;


For more information see:

518241 - DB Connect in BW for an external Oracle database

Tuesday, July 21, 2015

DB specific BW functions implementations

SAP BW system is similarly to SAP ECC "any" DB system. This means it support several DB platforms. In order to optimize performance of SAP system on particular DB platform some of its functions are specifically written for target DB platform. There can be optimization of SQL statements done in DB specific Native SQL or things that leverage other DB specific features. These "DB specific" codes are delivered in multiple development packages. Below I briefly introduce few main development packages specific for particular DB platforms.

pack:           description:                                        component:

RSSYB - SAP BW on Sybase ASE                           BW-SYS-DB-SYB
RSHDB - BW Porting HDB - HANA DB                    BW-SYS-DB-SDB
RSORA - BW: Oracle Porting                                 BW-BEX-OT
RSMSS - Microsoft SQL Server Porting                   BW-SYS-DB-MSS
RSADA - BW Porting MaxDB                                 BW-SYS-DB-SDB
RSDB2 - BW: Porting DB2-z/OS                            BW-SYS-DB-DB2
RSDB4 - SAP NW BW on IBM i (DB4) - AS400        BW-SYS-DB-DB4
RSDB6 - BW: Port DB6                                         BW-SYS-DB-DB6

SDBA_TERADATA - Teradata Monitoring & Admin  BW-SYS-DB-TD

Sunday, November 10, 2013

Dirty read in ABAP

SAP systems are based on Relational Database Management System (RMDB) systems or simply said database systems. That’s basically the place where all the data of the systems is stored in. There is an isolation property defined in databases. It is about definition when changes to the database are visible to other simultaneous or concurrent operations. Just side note isolation is one of ACID (Atomicity, Consistency, Isolation and Durability) properties of the databases.

From particular database systems point of view the isolation topic falls under one of phenomenas. Particular database recognizes phenomena during processing of concurrent transactions. If situation in the database is unclear we call it the phenomena. There are following phenomenas defined in e.g. SAP MaxDB as it follows ANSI/ISO standard SQL 92:

  • Dirty Read
  • Non-Repeatable Read
  • Phantom
With respect to Dirty Read: there is a situation when A row is modified in the course of a transaction T1, and a transaction T2 reads this row before T1 has been concluded with the COMMIT statement. T1 then executes the rollback statement, i.e. T2 has read a row that never actually existed. So it is dirty because we are not sure if we getting real data by that read statement.

Basically ABAP programmer should always try to avoid the phenomenas when designed locking behavior of custom tables.

Used sources:

Tuesday, June 24, 2008

Databases supported by SAP


There is a huge variety of supported database systems (in brackets you can find SAP code of particular DB system, this code is internal mark of DB, e.g. in debugger you can see it as value of variable sy-dbsys):

Adabas/SAP DB (ada) or since version 7.5 MaxDB (sdb)
Microsoft SQL Server (mss)
Oracle (ora)
IBM DB2/390 (db2)
IBM DB2/400 (db4)
IBM DB2 UDB (db6)
Informix (inf)
Sybase ASE (syb)        //added 31.8.2011
HANA Database (hdb)  //added 28.9.2011

DB supported only by BW: Teradata (td) // added 31.12.2013

Details of DB for SAP BI system can be found here.
All information related to supported operation and database systems see on SDN.

- update 31/08/2011 - 
As SAP acquired Sybase in first half of year 2011 there is a new DB platform supported soon. Yep, it will be Sybase's Adaptive Server Enterprise (ASE). Previously this DB was called Sybase SQL Server. BTW that's the DB which has same roots as Microsoft SQL Server. According SDN's DB page SAP is porting its Business Suite (SAP ERP 6.05) application to Sybase ASE. This was supposed to be done in June 2011. Other SAP’s products supporting Sybase ASE will be CRM and SRM.

- update 05/09/2011 - 
SAP is currently porting BW to Sybase ASE DB as well. There are couple of Notes pointing to that:
BW on Sybase's ASE has even its own component within SAP Marketplace:
BW-SYS-DB-SYB BW on Sybase ASE Database Platform

- update 28/09/2011 -
SAP is currently porting its BW product to HANA database. Rump up program for customers to run BW on HANA as its database start in Nov. 2011. From that point of view SAP is being supporting another database.

- update 11/03/2013 -
SAP ERP’s flagship software call ERP Central Component (ECC) is running on Sybase ASE as well.


- update 12/31/2013 -
SAP BW as of 7.3 is also capable to run on Teradata database. It is possible via technology called Bridge System. This possibility appeared beginning of year 2011. For details see Notes: 1560115 - Teradata Foundation for BW : Composite BW Note, 1557211 - Composite note for Teradata Foundation. Also see SAP Notes of component: BW-SYS-DB-TD

Monday, January 22, 2007

SAP DB, mySQL MaxDB, whatDB?

SAP DB, mySQL MaxDB, whatDB?

What I knew before I’ve started to search some information in order to clarify those names of this database product was following: SAP had long term issue with database software. Although SAP is known as a powerful ERP vendor with its highly OS and DB platform independent software it was always the pain when some other companies get their piece of cake in business e.g. in database software area. When SAP delivers its R/3 there was always a space for database provider in order to get R/3 run. For many year SAP wanted to involve their own DB platform in SAP EPR software implementations. It is still not clear what is the origin of SAP DB but according this it seems that SAP had it spoon off from ADABAS D version 6.1.15.57 very old and reliable DB system called ADABAS D from German Software AG company in late 90’s. Software AG has it own branch of ADABAS includes advanced database management system. ADABAS database development started in 1977 as a research project of Technical University in Berlin. Early 80s it became a database product that subsequently was owned by companies like: Nixdorf, Siemens Nixdorf, Software AG and today by SAP AG. The name of database was changed several times like: VDN, Reflex, Supra 2, DDB/4, Entire SQL-DB-Server and ADABAS.

ADABAS is known as world's fastest OLTP databases very famous for many years. After SAP AG took over one arm of ADABAS in 1997 he completely renewed and enhanced ABABAS and changes its name to SAP DB. So finally SAP has its own database. On other hand there SAP APO system has been released and one of its features is live Cache. To be simplified you can imagine live cache as one huge memory which is able to store all the data from large (TB) in operational memory – very high volumes of data must be permanently held always available in computer memory. This was another point of view why SAP needed its own DB system. Some of SAP software like mySAP Supply Chain Management - Advanced Planner and Optimizer (SCM-APO) and mySAP Product Lifecycle Management (PLM) use SAP DB solely. SAP DB is supporting all mainstream OS like: Linux (Intel), Microsoft Windows, Solaris, HP-UX, Tru64 AIX. Since October 2000 SAP DB sources additionally were released as open source under a GNU General Public License (GPL).

From SAP DB to mySQL MaxDB.

Lately in May 2003, SAP started cooperation with MySQL AB. As part of this agreement, the SAP DB database will be delivered under the name MySQL MaxDB from database version 7.5. With this agreement MySQL acquired full commercial rights to develop and market future releases of SAP DB. SAP will continue its investment in SAP DB development, maintenance and support. It seems that in future there will be only one name of this product MaxDB for details see here. For existing or new SAP customers this means no change. They obtain support of SAP AG and profit from open source development model.

When you buy SAP NetWeaver now you get:

Database Version SAP Release

MaxDB 7.6 SAP Netweaver 2004s

MaxDB 7.5 SAP Netweaver 2004


If you want to evaluate MaxDB you can download it from mysql.com from SDN (under technologies area) or previous releases from sapdb.org.

P.S.: Do you have some information about SAP DB, mySQL MaxDB, whatDB etc? Please feel free to post in comments area. We can enrich this article together!