Database and Operating System compose the foundation on which all SAP software is running. We therefore often talk about the (DB-, OS-)'platform' of an SAP system. Names of database management systems, like names for any product, change over time. In this post I'd like to help you understand the official names for the IBM DB2 databases as well as naming conventions used in the SAP environment. Based on this I will also present an example for database dependent coding in ABAP as well as in Java.
The IBM DB2 product family
Talking about DB2 we need to consider in fact three products with a different codebase. There is one DB2 running on mainframes using z/OS (formerly known as OS/390), one DB2 running on the operating system i5 (aka as OS/400) and one DB2 for Linux, UNIX and Windows. The current official names for these IBM products are:
All of these products were renamed in the past. For DB2 9 for Linux Unix and Windows in particular the names 'DB2/6000', 'DB2 Common Server' and 'DB2 Universal Database' (or 'DB2 UDB') may sound familiar to you. Note that with the latest release a name change took place and the term 'UDB' was dropped. So
IBM UDB Version 8.2
became
DB2 9
. As with every name change, it takes some time until it arrives in all the written material. This means that you will still find the term 'IBM UDB' in a lot of places.
Database platform names in SAP systems
The SAP basis offers very good abstractions of the underlying operating and database system. If you do your development in OpenSQL which is available for ABAP and Java you don't have to care about specifics of the DBMS. Your coding will be portable between all SAP supported platforms. In most cases this works perfect and you should stay with OpenSQL. Seldom it is necessary to exploit a database specific feature - something which is either available just on one database or on more than one database, but accessed each time in a different way. Typically everything which affiliated to the Database Meta data belongs into this category, although in some cases java.sql.DatabaseMetaData can help here on the WebAS Java. Anyway, the first step if you need to issue a database dependent SQL statement is to find out on which database system your program is actually running, and secondly you need a way to send an SQL statement directly to the database, bypassing OpenSQL.
Let's take a simple example and assume we'd like to find out programmatically on which version of DB2 for Linux UNIX and Windows and on which fixpack level we are running.
For ABAP the following piece of code will do this for us:
The
system field
sy-dbsys
contains a three letter abbreviation for the database system on which we are currently running. Defining such an abbreviation is an interesting task if you take into account that there are three different products named 'DB2'. Here is the outcome that can be understand best if you consider the historical context:
'DB2' is the three letter abbreviation for DB2 for z/OS.
'DB4' was chosen for DB2 for i5/OS. The '4' in DB4 was borrowed from AS/400, the midrange server product line on which this particular DB2 ('DB2/400' integrated into the operating system 'OS/400') was running at the time of developing the port.
'DB6' is the choice for DB2 for Linux UNIX and Windows. The '6' in DB6 was borrowed from RS/6000, IBM's server product line on which this DB2 was available on AIX at the time the development for this port started at SAP.
Quitar espacios en una consulta SQL
Quitar espacios en una consulta SQL
Cuando trabajamos con consultas SQL, a menudo nos encontramos con la necesidad de limpiar o mani...
Transacciones MIGO y MIRO en SAP MM
Transacciones MIGO y MIRO en SAP MM
1. ¿Qué es la transacción MIGO?
La transacción MIGO (Entrada de Mercancías) se utiliza para registrar las mercancías que...
Hola a todos,
¿Alguien puede decirme sobre java.lang.NullPointerException?
Cuándo recibiremos este tipo de error y cómo solucionarlo.
Si obtenemos este error, ¿dónde debemo...
Pasos para abrir y cerrar período - MM FI CO
Muchos de nosotros luchamos con los cambios de períodos en nuestros entornos DEV y QA, aquí tienes una referencia rápida para abrir y...