(SM-2108) DB2/DB6 Storage Setup

DB2 is a database-server developed by IBM, running on Linux, Unix, and Windows (LUW). SAP calls this database type DB6.

It supports the relational DB model, also supports object-relational features and non-relational structures like JSON and XML.

Supported versions

The minimal supported version is 10.05.0004.

Storage setup

Use the transaction /DVD/SM_SETUP for Storage Management to set up storage. 

For the storage type DB2 transparent storage (secondary database) - SM_TRS_DB2, fill in the following configuration parameters:


              

  • Storage ID: name of the storage
  • Storage Type: type of storage. In our case DB2 enter SM_TRS_DB2.
  • Description: short text description

Storage parameters

  • DB Connection Name: existing SAP Database Connection.
  • Connection mode: only Open SQL connection mode (option 'O') is supported by the DB2 database.
  • Tablespace: table space. For more information, see DB2 table spaces.
  • COLUMN ORIENTED: if selected, tables created using this storage are column-organized.
  • Compression: if selected, adaptive compression is used.

The recommended DB2/DB6 setups per use case

For archiving and reporting – use columnar technology (DB2 Blu)

  • The customer must have a license for DB2 Blu
  • System Sizing and configuration must be prepared to use Blu
  • Datavard recommends following the IBM recommendation, e.g. 64 GB Ram, 8 Cores for production systems; for low-use non-production systems, half the size may be sufficient.
  • The use of multiple tablespaces to spread data – if possible target a maximum of 1 TB per tablespace; start with 5-10 tablespaces and spread objects

For most space-efficient archiving – use BLOBs

  • The system sizing can normally be independent of the database size: 16 GB ram, 4 CPU recommended.
  • The use of multiple tablespaces to spread data – if possible target a maximum of 1 TB per tablespace; start with 5-10 tablespaces and spread objects
  • For best performance create 3 tablespaces per SAP data class: data+index+LOB. The LOB tablespace must be created with a “file system caching” ON. For each tablespace is the use of multiple tablespace containers (8-16) recommended to avoid file-level locking issues. At table creation time, the tablespaces must be correctly assigned to the table (tbspace, index_tbspace, long_tbspace from syscat.tables). A change is possible using admin_move_table.
  • The majority of data will be stored in the LOB tablespace in compressed LOB table columns. Due to the nature of the content, is DB2 log file compression NOT recommended. Previous experiences where showing 4x+ longer log arching times with log file compression on.
  • Table and index compression have typically no impact for this setup since LOBs are already compressed in SAP. It is recommended to keep compression flags off.

General remarks for tablespace

  • Tablespaces in DB2 are used to store data. It is technically useful to distribute data across many tablespaces for various reasons. As background: there are locking/latching mechanisms in place per tablespace, also at lower layers at the file level. On a high workload, but also for HADR, backup, and recovery, having many tablespaces can reduce the chance of contention.
  • Space extensions: to avoid high file-level fragmentation, the use of larger increase-sizes is recommended, e.g. 128 MB per container (e.g. with 8 containers 1024 MB)
  • SAP is recommending very small tablespace extent sizes of 2 blocks. For tablespaces with a high amount of data, the use of a much larger extent size is recommended, e.g. 16 or larger.

IBM Documentation for requirements

https://www.ibm.com/software/reports/compatibility/clarity-reports/report/html/softwareReqsForProduct?deliverableId=3AF321105FF411E6865BC3F213DB63F7&osPlatforms=Linux&duComponentIds=S010|S004|S015|S008|S009|S011|S005|S013|S003|A001|A006|A014|A007|A002|A016|A012&mandatoryCapIds=183|25&optionalCapIds=30|341|47|17|1|131|20|28

  • (9)         "For BLU Acceleration, a minimum of 8 cores or IFLs and 64 GB RAM is recommended for production use"

https://www.ibm.com/software/reports/compatibility/clarity-reports/report/html/hardwareReqsForProduct?deliverableId=3AF321105FF411E6865BC3F213DB63F7&osPlatforms=AIX|Linux|Windows&duComponentIds=S010|S004|S015|S008|S009|S011|S005|S013|S003|A001|A006|A014|A007|A002|A016|A012

  • Require minimum 8 cores with at least 64 GB RAM
  • Memory requirements temporarily increase when the column compression dictionary is being created.
  • For optimal load performance, additional cache memory is required to write column-organized data in extent-sized amounts, rather than one page at a time, thereby reducing I/O costs.