You are on page 1of 544

Front cover

DB2 OLAP Server V8.1


Using Advanced Functions

Enhancing OLAP cube scalability and


discovering deviant values

Implementing high concurrency


and high availability scenarios

Managing multiple OLAP


servers

Corinne Baragoin
Luciana Dongo Alves
Jakob Burkard
Ulrich Guldborg
Jo Ramos
Paola Rodriguez

ibm.com/redbooks
International Technical Support Organization

DB2 OLAP Server V8.1: Using Advanced Functions

November 2002

SG24-6599-00
Note: Before using this information and the product it supports, read the information in
“Notices” on page xxi.

First Edition (November 2002)

This edition applies to IBM DB2 OLAP Server Version 8, Release 1 and to IBM DB2 OLAP
Analyzer Analysis Server Version 8 Release 1.

© Copyright International Business Machines Corporation 2002. All rights reserved.


Note to U.S. Government Users Restricted Rights -- Use, duplication or disclosure restricted by GSA ADP Schedule
Contract with IBM Corp.
Contents

Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ix

Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xvii

Examples. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix

Notices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi
Trademarks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxii

Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiii
The team that wrote this redbook . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiv
Become a published author . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxvi
Comments welcome . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .xxvii

Part 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1

Chapter 1. DB2 OLAP Server V8.1 overview. . . . . . . . . . . . . . . . . . . . . . . . . 3


1.1 Advanced analytical functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.1.1 Combining OLAP and relational databases: Hybrid Analysis . . . . . . . 4
1.1.2 OLAP Miner. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.2 Advanced enterprise functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.3 Advanced administrative functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.3.1 Parallel calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.3.2 Parallel data load . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
1.3.3 Parallel export . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.3.4 Administration Services. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.3.5 Security Migration Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.3.6 Custom Defined Functions and Custom Defined Macros . . . . . . . . . 15
1.3.7 API enhancements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
1.3.8 Additional improvements and new functions . . . . . . . . . . . . . . . . . . . 17

Chapter 2. DB2 OLAP Server components and case studies . . . . . . . . . . 21


2.1 DB2 OLAP Server components architecture . . . . . . . . . . . . . . . . . . . . . . . 22
2.1.1 The basic DB2 OLAP Server installation . . . . . . . . . . . . . . . . . . . . . 22
2.1.2 Expanding OLAP capabilities with Integration Server . . . . . . . . . . . . 23
2.1.3 Expanding with Enterprise Services . . . . . . . . . . . . . . . . . . . . . . . . . 25
2.1.4 Expanding with Administration Services . . . . . . . . . . . . . . . . . . . . . . 25
2.1.5 Using Security Migration Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
2.1.6 Using Analyzer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26

© Copyright IBM Corp. 2002. All rights reserved. iii


2.1.7 The big picture . . . . . . . . . . . . . . . . . . . . ...... ....... ...... .. 27
2.2 Case studies and our test environment. . . . . . ...... ....... ...... .. 28
2.2.1 E-banking case study . . . . . . . . . . . . . . . ...... ....... ...... .. 28
2.2.2 Online Investment case study . . . . . . . . . ...... ....... ...... .. 31
2.2.3 Our test environment setup . . . . . . . . . . . ...... ....... ...... .. 36

Part 2. Advanced analytical functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39

Chapter 3. Hybrid Analysis. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41


3.1 Hybrid Analysis overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
3.1.1 Terminology and definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
3.2 When to use Hybrid Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44
3.3 Hybrid Analysis architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
3.4 Hybrid Analysis challenges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
3.5 Implementation of Hybrid Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
3.5.1 Building Hybrid Analysis using Integration Server . . . . . . . . . . . . . . 49
3.5.2 Hybrid Analysis member transformation . . . . . . . . . . . . . . . . . . . . . . 52
3.5.3 Impact of Hybrid Analysis versus multidimensional . . . . . . . . . . . . . 54
3.5.4 Hybrid Analysis in Application Manager . . . . . . . . . . . . . . . . . . . . . . 56
3.5.5 Hybrid Analysis and Administration Services . . . . . . . . . . . . . . . . . . 57
3.6 Tips and tricks for tuning Hybrid OLAP applications . . . . . . . . . . . . . . . . . 59
3.6.1 Defining HAMEMORYCACHESIZE . . . . . . . . . . . . . . . . . . . . . . . . . 62
3.6.2 Defining HAMAXNUMCONNECTION . . . . . . . . . . . . . . . . . . . . . . . . 64
3.6.3 Defining HAMAXNUMSQLQUERY . . . . . . . . . . . . . . . . . . . . . . . . . . 65
3.6.4 Defining HAMAXQUERYROWS . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
3.6.5 Defining HAMAXQUERYTIME . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
3.6.6 Defining HARETRIEVENUMROW . . . . . . . . . . . . . . . . . . . . . . . . . . 67
3.6.7 Conclusions: Hybrid Analysis configuration settings . . . . . . . . . . . . . 68
3.7 Queries in the Hybrid Analysis environment . . . . . . . . . . . . . . . . . . . . . . . 68
3.7.1 Member caching for better query performance . . . . . . . . . . . . . . . . . 73
3.8 Query performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
3.9 Hybrid Analysis and Drill-Through Reports . . . . . . . . . . . . . . . . . . . . . . . . 80
3.9.1 Characteristics of Drill-Through Reports . . . . . . . . . . . . . . . . . . . . . . 81
3.9.2 Characteristics of Hybrid Analysis. . . . . . . . . . . . . . . . . . . . . . . . . . . 82
3.9.3 Drill-Through Reports versus Hybrid Analysis . . . . . . . . . . . . . . . . . 82
3.10 Data modeling for Hybrid Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83
3.11 Security configuration for Hybrid Analysis . . . . . . . . . . . . . . . . . . . . . . . . 85
3.11.1 Tracing Hybrid Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86

Chapter 4. Mining your OLAP cube with OLAP Miner . . . . . . . . . . . . . . . . 89


4.1 OLAP Miner overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 90
4.2 Deviation detection in OLAP Miner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91
4.2.1 OLAP Miner performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
4.3 When to use OLAP Miner, and when not to use it . . . . . . . . . . . . . . . . . . 96

iv DB2 OLAP Server V8.1: Using Advanced Functions


4.4 Mining and interpreting E-banking cube results . . . . . . . . . . . . . . . . . . . . 99
4.4.1 Scenario 1: PC-banking usage by branch. . . . . . . . . . . . . . . . . . . . . 99
4.4.2 Scenario 2: Equity trade and Net-banking in branches . . . . . . . . . . 105
4.5 OLAP Miner setup and architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
4.6 Running and monitoring OLAP Miner . . . . . . . . . . . . . . . . . . . . . . . . . . . 110
4.6.1 Getting OLAP Miner to run, and stopping it . . . . . . . . . . . . . . . . . . 111
4.6.2 OLAP Miner client configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
4.7 OLAP Miner results and logs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 114

Part 3. Advanced functions of Enterprise Services. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117

Chapter 5. Enterprise Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 119


5.1 Enterprise Services overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
5.1.1 Enterprise Services components . . . . . . . . . . . . . . . . . . . . . . . . . . 122
5.2 Enterprise Services configurations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124
5.2.1 TCP/IP Client Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
5.2.2 HTTP client programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
5.2.3 EJB client programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
5.2.4 CORBA client programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 129
5.3 Enterprise Services deployment scenarios . . . . . . . . . . . . . . . . . . . . . . . 129
5.3.1 Scalability overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
5.3.2 Clustering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130
5.3.3 Connection pooling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 134
5.3.4 Workload balancing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 138
5.3.5 Server and application failure and failover . . . . . . . . . . . . . . . . . . . 151
5.3.6 Enterprise Services: the whole picture . . . . . . . . . . . . . . . . . . . . . . 159
5.3.7 Guidelines for implementing a full cluster of OLAP servers . . . . . . 159
5.3.8 Copy DB2 OLAP applications and databases across servers . . . . 161
5.3.9 Synchronizing data across DB2 OLAP Servers in a cluster . . . . . . 165
5.3.10 Synchronizing security across all OLAP Servers in a cluster . . . . 166
5.4 Implementing Enterprise Services with TCP/IP. . . . . . . . . . . . . . . . . . . . 166
5.4.1 Installation tips for Enterprise Services: Windows and AIX. . . . . . . 168
5.4.2 Setting up the domain storage . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
5.4.3 Starting Enterprise Services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
5.4.4 Creating a domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
5.4.5 Defining users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
5.4.6 Defining DB2 OLAP Server and Enterprise Services servers . . . . . 189
5.4.7 Creating clusters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
5.4.8 Creating connection pools. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
5.4.9 Using the sample programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 208
5.4.10 Additional tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 215

Part 4. Advanced administrative functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 221

Contents v
Chapter 6. Parallel calculation, data load, and export . . . . . . . . . . . . . . . 223
6.1 Performing parallel calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224
6.1.1 Understanding parallel calculation . . . . . . . . . . . . . . . . . . . . . . . . . 224
6.1.2 Parallel calculation architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . 225
6.1.3 Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
6.1.4 Enabling parallel calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
6.1.5 Identifying concurrent tasks for parallel calculation. . . . . . . . . . . . . 234
6.1.6 Running parallel calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
6.1.7 Parallel calculation performance . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
6.1.8 Monitoring using the log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246
6.1.9 Estimating the size of a database calculation . . . . . . . . . . . . . . . . . 248
6.2 Performing parallel load . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
6.2.1 Understanding the parallel load . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
6.2.2 Enabling parallel load . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
6.2.3 Running parallel data load . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
6.2.4 Monitoring using the log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260
6.2.5 Parallel load performance: Defining the right parameters . . . . . . . . 261
6.2.6 Tools to monitor parallel calculation and load . . . . . . . . . . . . . . . . . 264
6.3 Performing parallel export . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 269
6.3.1 Running parallel export . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271
6.3.2 Monitoring using the log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
6.3.3 Parallel export performance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 276
6.3.4 Exporting files larger than 2 GB . . . . . . . . . . . . . . . . . . . . . . . . . . . 277

Chapter 7. Administration Services. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279


7.1 Administration Services components . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
7.2 New administrative capabilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
7.3 Administration Services configurations . . . . . . . . . . . . . . . . . . . . . . . . . . 283
7.4 Using Administration Services. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
7.4.1 Managing security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 286
7.4.2 Managing DB2 OLAP Servers, applications, and databases . . . . . 304
7.4.3 Managing logs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343
7.4.4 Managing scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349
7.4.5 Miscellaneous . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357
7.5 Implementing Administration Services . . . . . . . . . . . . . . . . . . . . . . . . . . 358
7.5.1 Preparing for installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 360
7.5.2 Installing DB2 OLAP Server components . . . . . . . . . . . . . . . . . . . . 360
7.5.3 Installing Administration Services . . . . . . . . . . . . . . . . . . . . . . . . . . 362
7.5.4 Starting Administration Services . . . . . . . . . . . . . . . . . . . . . . . . . . . 363
7.5.5 Setting up users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 371
7.5.6 Backing up Administration Services users information . . . . . . . . . . 384
7.5.7 Creating views. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 385

vi DB2 OLAP Server V8.1: Using Advanced Functions


Chapter 8. Additional enhancements . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389
8.1 Direct I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390
8.1.1 Understanding the DB2 OLAP Server caches . . . . . . . . . . . . . . . . 390
8.1.2 The difference between buffered I/O and direct I/O . . . . . . . . . . . . 390
8.1.3 New features in DB2 OLAP Server version 8.1 . . . . . . . . . . . . . . . 392
8.1.4 Changing the I/O access mode (buffered I/O or direct I/O). . . . . . . 393
8.1.5 The cache memory locking option . . . . . . . . . . . . . . . . . . . . . . . . . 394
8.1.6 Defining the DB2 OLAP Server caches when using direct I/O . . . . 395
8.2 Security Migration Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 396
8.2.1 Before running the Security Migration Tool. . . . . . . . . . . . . . . . . . . 397
8.2.2 Running the Security Migration Tool . . . . . . . . . . . . . . . . . . . . . . . . 397
8.3 Multiple OLAP agents on the same machine . . . . . . . . . . . . . . . . . . . . . 412
8.3.1 Hints and tips . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 414
8.3.2 A sample configuration scenario . . . . . . . . . . . . . . . . . . . . . . . . . . . 415
8.4 Custom Defined Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419
8.4.1 Software requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 419
8.4.2 Performance considerations in the Windows environment . . . . . . . 420
8.4.3 Creating a CDF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421
8.4.4 Using a CDF in the outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 434
8.4.5 Using a CDF in calculations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438

Part 5. Appendixes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 439

Appendix A. DB2 OLAP Integration Server . . . . . . . . . . . . . . . . . . . . . . . 441


A.1 Integration Server enhancements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 442
A.2 Migration of earlier OLAP metadata catalogs . . . . . . . . . . . . . . . . . . . . . 443
A.2.1 New configuration file for Integration Server. . . . . . . . . . . . . . . . . . 444
A.2.2 Multiple data sources in Integration Server . . . . . . . . . . . . . . . . . . 445
A.2.3 Drill through . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 452
A.2.4 XML export/import of models and metaoutlines . . . . . . . . . . . . . . . 459
A.2.5 Intelligent help and increased usability . . . . . . . . . . . . . . . . . . . . . . 460

Appendix B. Setting up DB2 OLAP Analyzer Analysis Server V8.1 . . . . 463


B.1 Analyzer V8.1 overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 464
B.1.1 Supported platforms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 465
B.1.2 Architectural overview. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 467
B.2 WebSphere Application Server setup . . . . . . . . . . . . . . . . . . . . . . . . . . . 468
B.3 Setting up and configuring Analyzer Server V8.1 . . . . . . . . . . . . . . . . . . 475
B.3.1 Configuring Analyzer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 475
B.3.2 Uninstalling Analyzer V8.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484
B.4 Using Analyzer V8.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 484
B.4.1 Analyzer Server console . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 485
B.4.2 Analyzer Administration Tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 486

Contents vii
Appendix C. Enterprise Services sample programs . . . . . . . . . . . . . . . . 489
C.1 Copy application/database using CopyOLAP . . . . . . . . . . . . . . . . . . . . . 490
C.2 Sample runsamples.cmd script. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 492

Appendix D. Data modeling basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 495


D.1 ER data models . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 495
D.2 Multidimensional data models: star and snowflake . . . . . . . . . . . . . . . . 497

Related publications . . . . . . . . . . . . . . . . . . . . . . ...... ....... ...... . 499


IBM Redbooks . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...... ....... ...... . 499
Other resources . . . . . . . . . . . . . . . . . . . . . . . . ...... ....... ...... . 499
Referenced Web sites . . . . . . . . . . . . . . . . . . . . . . ...... ....... ...... . 500
How to get IBM Redbooks . . . . . . . . . . . . . . . . . . . ...... ....... ...... . 500
IBM Redbooks collections . . . . . . . . . . . . . . . . . ...... ....... ...... . 500

Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 501

viii DB2 OLAP Server V8.1: Using Advanced Functions


Figures

1-1 Relational databases supported by Hybrid Analysis . . . . . . . . . . . . . . . . 5


1-2 Serial calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1-3 Parallel calculation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1-4 Parallel load schema . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
1-5 Parallel export . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1-6 Administration Services architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1-7 Sample scenarios when migrating DB2 OLAP Server . . . . . . . . . . . . . . 15
1-8 List of functions under Application Manger script editor . . . . . . . . . . . . 16
1-9 Substitution variable. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
2-1 Basic DB2 OLAP Server architecture . . . . . . . . . . . . . . . . . . . . . . . . . . 23
2-2 DB2 OLAP Server environment using Integration Services. . . . . . . . . . 24
2-3 DB2 OLAP Server: the whole picture. . . . . . . . . . . . . . . . . . . . . . . . . . . 28
2-4 E-banking outline used together with OLAP Miner case study . . . . . . . 31
2-5 Online Investment OLAP application model . . . . . . . . . . . . . . . . . . . . . 34
2-6 Online Investment OLAP application metaoutline . . . . . . . . . . . . . . . . . 36
2-7 Cases and test setup for E-banking and Online Investment . . . . . . . . . 37
3-1 Accessing relational and multidimensional data in a hybrid cube . . . . . 42
3-2 Hybrid analysis architecture in an DB2 OLAP Server environment. . . . 46
3-3 Building a multidimensional application to this point . . . . . . . . . . . . . . . 50
3-4 Enabling Hybrid Analysis from this point in your application . . . . . . . . . 50
3-5 Build of 1-level Hybrid Analysis in Integration Server . . . . . . . . . . . . . . 51
3-6 Selecting the Update Hybrid Analysis Data: option from the menu . . . . 51
3-7 Shows the application and database synchronization settings . . . . . . . 52
3-8 Validation warning initiated by the reversible process . . . . . . . . . . . . . . 54
3-9 Application Manager outline with member enabled for Hybrid Analysis 57
3-10 Administration Services outline showing Hybrid Analysis . . . . . . . . . . . 58
3-11 Enabling or disabling Hybrid Analysis in Administration Services . . . . . 59
3-12 HAMEMORYCACHESIZE overrun . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
3-13 HA max query row limit exceeded . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
3-14 HAMAXQUERYTIME exceeded message. . . . . . . . . . . . . . . . . . . . . . . 67
3-15 Enabling and disabling of Hybrid Analysis on a per-query basis . . . . . . 70
3-16 Shows the level at which HA is enabled . . . . . . . . . . . . . . . . . . . . . . . . 71
3-17 Scapa workload running against the DB2 OLAP Server cube . . . . . . . . 76
3-18 Scapa workload running against the hybrid cube . . . . . . . . . . . . . . . . . 77
3-19 Properties selection in Integration Server Metaoutline . . . . . . . . . . . . . 85
3-20 OLAP metaoutline security options . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86
4-1 Generic OLAP Miner, OLAP Server and Hybrid Analysis architecture . 91
4-2 Bell shaped standard deviation graph . . . . . . . . . . . . . . . . . . . . . . . . . . 92

© Copyright IBM Corp. 2002. All rights reserved. ix


4-3 Extraction of a Sales subcube for OLAP Mining . . . . . . . . . . . . . . . . . . 93
4-4 OLAP Miner calculates an expected value for each cell in the subcube 94
4-5 2 Kilobytes set for the E-bank application in Application Manager . . . . 96
4-6 OLAP Mining either just the member or the member and descendants 97
4-7 The E-bank application outline shown in Application Manager . . . . . . . 99
4-8 Adding descriptive metadata for your deviation detection . . . . . . . . . . 100
4-9 Selecting members with the deviation detection wizard . . . . . . . . . . . 101
4-10 E-banking 1. quarter 2002, transactions and PC-banking results . . . . 102
4-11 Simple magnitude illustration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 102
4-12 Selecting Display in Context by right clicking result line . . . . . . . . . . . 103
4-13 Results from mining E-bank shown in Deviation Viewer . . . . . . . . . . . 104
4-14 Graph built in spreadsheet and launched from the deviation viewer . . 105
4-15 Review detection, and set maximum deviations . . . . . . . . . . . . . . . . . 106
4-16 Results from Equity Trade and Netbanking scenario. . . . . . . . . . . . . . 106
4-17 Results for E-bank scenario 2 shown in deviation viewer . . . . . . . . . . 108
4-18 OLAP Miner Server and client communication with DB2 OLAP Server 109
4-19 Starting OLAP Miner in the foreground: Command Console options. . 112
4-20 OLAP Miner XML files shown in the Web browser . . . . . . . . . . . . . . . 115
5-1 OLAP system architecture overview . . . . . . . . . . . . . . . . . . . . . . . . . . 121
5-2 Enterprise Services System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 123
5-3 Client program technologies . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
5-4 Java applet client program using TCP/IP. . . . . . . . . . . . . . . . . . . . . . . 126
5-5 Java applet client program using HTTP . . . . . . . . . . . . . . . . . . . . . . . . 127
5-6 Spreadsheet architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127
5-7 Client program using EJB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128
5-8 Java servlet client program using CORBA. . . . . . . . . . . . . . . . . . . . . . 129
5-9 Clustering sample scenario: single OLAP database per server. . . . . . 132
5-10 Clustering sample scenario: Multiple databases copies per server . . . 133
5-11 Connection pooling sample scenario . . . . . . . . . . . . . . . . . . . . . . . . . . 136
5-12 Connection pooling and clustering scenario . . . . . . . . . . . . . . . . . . . . 137
5-13 Workload balance: Initial sessions established to DB2 OLAP Servers 139
5-14 Enterprise Services: connection pool definition for e-BankConnPool . 140
5-15 Enterprise Services: Cluster definition for e-BankCluster . . . . . . . . . . 141
5-16 Enterprise Services: Enable cluster and connection pool . . . . . . . . . . 142
5-17 Opening connections to DB2 OLAP Server . . . . . . . . . . . . . . . . . . . . . 143
5-18 AM: Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 144
5-19 AM connections panel: DB2 OLAP Server on CAYMAN server . . . . . 144
5-20 AM connections panel: DB2 OLAP Server on SICILY server . . . . . . . 145
5-21 Workload balance: Incremental sessions established to OLAP servers146
5-22 Sample cluster definition: Without repetition . . . . . . . . . . . . . . . . . . . . 147
5-23 Sample cluster definition: With repetition . . . . . . . . . . . . . . . . . . . . . . . 148
5-24 Workload balance: Unbalanced load sample scenario . . . . . . . . . . . . 149
5-25 Sample cluster definition: Duplicating an application and database . . 150

x DB2 OLAP Server V8.1: Using Advanced Functions


5-26 Failover scenario . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 155
5-27 Application failover scenario . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156
5-28 Server failover scenario . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157
5-29 Server failover scenario . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158
5-30 Enterprise Services: the whole picture. . . . . . . . . . . . . . . . . . . . . . . . . 159
5-31 Copying application and databases across OLAP servers . . . . . . . . . 162
5-32 Copy OLAP application across servers via Command Shell . . . . . . . . 164
5-33 Software components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
5-34 Creating a database in DB2 Control Center . . . . . . . . . . . . . . . . . . . . 172
5-35 DB2 configuration variables in the essbase.properties file . . . . . . . . . 173
5-36 Configuration variables in the essbase.properties file . . . . . . . . . . . . . 174
5-37 Configuration of the ClassPath in startees.cmd file . . . . . . . . . . . . . . . 175
5-38 Enterprise Services server window . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
5-39 Enterprise Services Console . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 177
5-40 Enterprise Services Console . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 179
5-41 Command Shell signon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 180
5-42 Command Shell available commands . . . . . . . . . . . . . . . . . . . . . . . . . 181
5-43 Creating domains . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
5-44 The console with the new domain created. . . . . . . . . . . . . . . . . . . . . . 183
5-45 Creating users in the domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 185
5-46 Adding users to the root domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 186
5-47 Creating groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
5-48 Adding users to groups . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 189
5-49 Creating Enterprise Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 190
5-50 Enterprise Server added . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
5-51 OLAP cube parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 192
5-52 Enterprise Services Command Shell: adding an OLAP server . . . . . . 194
5-53 Creating clusters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 196
5-54 Defining applications to participate in the e-BankCluster cluster. . . . . 197
5-55 Enabling the cluster to be used by the Enterprise Services server . . . 198
5-56 Creating a cluster in the Command Shell . . . . . . . . . . . . . . . . . . . . . . 199
5-57 Creating a connection pool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
5-58 Parameters definition for connection pool with cluster. . . . . . . . . . . . . 202
5-59 Connection pool properties without a cluster definition . . . . . . . . . . . . 203
5-60 Enabling the connection pool in the Enterprise Services server . . . . . 204
5-61 Opening connection pool and cluster. . . . . . . . . . . . . . . . . . . . . . . . . . 207
5-62 Connections opened to DB2 OLAP Server . . . . . . . . . . . . . . . . . . . . . 208
5-63 Runsamples variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210
5-64 DataQuery program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213
5-65 Data Query result . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
5-66 Creating Cube View . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 218
5-67 Cube View screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 219
5-68 Cube View spreadsheet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220

Figures xi
6-1 Serial calculation and parallel calculation . . . . . . . . . . . . . . . . . . . . . . 225
6-2 Parallel calculation steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226
6-3 Sample.Basic outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
6-4 Calculation process using Application Manager . . . . . . . . . . . . . . . . . 238
6-5 Integration Server data load. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 240
6-6 Verifying the database size . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 241
6-7 Data load process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
6-8 Parallel load process in a single CPU . . . . . . . . . . . . . . . . . . . . . . . . . 253
6-9 Data load using Application Manager . . . . . . . . . . . . . . . . . . . . . . . . . 257
6-10 Data load using ESSCMD command interface . . . . . . . . . . . . . . . . . . 258
6-11 Integration Server data load. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 259
6-12 VMSTAT example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 261
6-13 Hit ratio information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
6-14 Task Manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 267
6-15 MMC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
6-16 Parallel export . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 270
6-17 MaxL export syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
7-1 Administration Services architecture . . . . . . . . . . . . . . . . . . . . . . . . . . 280
7-2 Administration Services: enterprise scenario . . . . . . . . . . . . . . . . . . . . 283
7-3 Administration Services: mixed scenario . . . . . . . . . . . . . . . . . . . . . . . 284
7-4 Administration Services: stand alone scenario . . . . . . . . . . . . . . . . . . 285
7-5 Uing Administration Services to create an OLAP Server user . . . . . . . 287
7-6 Using Administration Services to create an OLAP Server group . . . . . 289
7-7 Using Administration Services to delete and rename users or groups 290
7-8 Editing group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 291
7-9 Adding a user to a group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292
7-10 Granting permissions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
7-11 Migrating users . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 295
7-12 Migrating users to OLAP Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296
7-13 User migrated . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 297
7-14 Copy user. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 298
7-15 Propagating password in a cluster environment. . . . . . . . . . . . . . . . . . 299
7-16 Propagating the password . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 300
7-17 Propagating password dialog box . . . . . . . . . . . . . . . . . . . . . . . . . . . . 301
7-18 Creating a new user using LDAP external authentication.. . . . . . . . . . 303
7-19 DB2 OLAP Server properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 305
7-20 Administration Services - comparing DB2 OLAP Server properties . . 308
7-21 Managing sessions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 309
7-22 Logging off users — example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 310
7-23 Logging off users result . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 311
7-24 Administration Services managing locks . . . . . . . . . . . . . . . . . . . . . . . 311
7-25 Creating application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 313
7-26 Creating, renaming or deleting a database. . . . . . . . . . . . . . . . . . . . . . 316

xii DB2 OLAP Server V8.1: Using Advanced Functions


7-27 Opening the Outline Editor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
7-28 The outline structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 322
7-29 Defining dimensions and members . . . . . . . . . . . . . . . . . . . . . . . . . . . 323
7-30 Changing a member properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 324
7-31 Outline properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 326
7-32 Outline editor toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 327
7-33 Member formula . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328
7-34 Data load and dimension build. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 330
7-35 Execute a calculation in the background . . . . . . . . . . . . . . . . . . . . . . . 331
7-36 Clearing data before a data load . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 333
7-37 Migration Wizard: dialog box 1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 336
7-38 Migrating Wizard: dialog box 3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 337
7-39 Hit ratio on Administration Services . . . . . . . . . . . . . . . . . . . . . . . . . . . 339
7-40 Operating System monitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 341
7-41 Disk drivers monitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
7-42 Background execution status . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 342
7-43 Viewing background processes status. . . . . . . . . . . . . . . . . . . . . . . . . 343
7-44 Process ID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 343
7-45 The message panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344
7-46 Closing the message panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 345
7-47 Filtering messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 346
7-48 Log analyzer message folder. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 347
7-49 Log analyzer chart folder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 348
7-50 OLAP Server log enhancements. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 349
7-51 MaxL auto completion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 350
7-52 MaxL color coding . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351
7-53 MaxL Script editor toolbar. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 351
7-54 MaxL Script Editor result panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 353
7-55 Creating a calculation script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 354
7-56 Calculation script editor.. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355
7-57 Calculation scripts buttons. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 355
7-58 Report Script editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356
7-59 Report Viewer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 357
7-60 Setting the ARBORPATH variable . . . . . . . . . . . . . . . . . . . . . . . . . . . . 362
7-61 Choose Product Features Prompt Screen . . . . . . . . . . . . . . . . . . . . . . 363
7-62 Administration Server window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 365
7-63 Saving logs to a file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 366
7-64 Saving logs to a log file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 367
7-65 Stopping Administration Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 368
7-66 Administration Services Console login. . . . . . . . . . . . . . . . . . . . . . . . . 369
7-67 Administration Services Console . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 370
7-68 Launching the User Setup Wizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . 373
7-69 User Information Panel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 374

Figures xiii
7-70 User ibmuser created. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 375
7-71 Creating users in the navigation panel. . . . . . . . . . . . . . . . . . . . . . . . . 376
7-72 Create user window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 377
7-73 New user in the navigational panel . . . . . . . . . . . . . . . . . . . . . . . . . . . 378
7-74 Administration Services single sign-on . . . . . . . . . . . . . . . . . . . . . . . . 379
7-75 Associating OLAP servers to users . . . . . . . . . . . . . . . . . . . . . . . . . . . 380
7-76 OLAP Servers window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 381
7-77 Adding a OLAP Server to a user . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 382
7-78 Enterprise View for user ibmuser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 383
7-79 Editing user properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 384
7-80 Administration Services Enterprise View . . . . . . . . . . . . . . . . . . . . . . . 385
7-81 New custom view . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 386
8-1 DB2 OLAP Server caches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 390
8-2 Direct I/O versus buffered I/O . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 391
8-3 Migrating data: first option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 398
8-4 Enter servers information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 399
8-5 Select specific application to migrate . . . . . . . . . . . . . . . . . . . . . . . . . . 399
8-6 List of available applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400
8-7 Run the migration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 400
8-8 Migration results display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401
8-9 Connect.log example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 401
8-10 Results.log example. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 402
8-11 Data.txt example: user section. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 403
8-12 Data.txt example: application section . . . . . . . . . . . . . . . . . . . . . . . . . 404
8-13 Secmgr.log example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 405
8-14 Migrating data: second option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406
8-15 Enter server information. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 406
8-16 Select specific application to migrate . . . . . . . . . . . . . . . . . . . . . . . . . . 407
8-17 List of available applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 407
8-18 Run the migration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408
8-19 Migration results display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 408
8-20 Migrating data: third option . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 409
8-21 Enter destination server information . . . . . . . . . . . . . . . . . . . . . . . . . . 410
8-22 Select specific application to migrate . . . . . . . . . . . . . . . . . . . . . . . . . . 410
8-23 Run the migration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411
8-24 Migration results display . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 411
8-25 Custom Defined Function Manager main screen. . . . . . . . . . . . . . . . . 430
8-26 Custom Defined Function Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 431
8-27 Filling in the Custom Defined Function Editor . . . . . . . . . . . . . . . . . . . 432
8-28 Displaying the CDF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 433
8-29 Formula editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 435
8-30 Function templates. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 436
8-31 Formula created formula in the outline . . . . . . . . . . . . . . . . . . . . . . . . 437

xiv DB2 OLAP Server V8.1: Using Advanced Functions


8-32 Outline with formula . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 438
A-1 OLAP Metadata Catalog setup or migration dialog box . . . . . . . . . . . . 444
A-2 Connecting to a second data source in Integration Server . . . . . . . . . 446
A-3 Check to remember secondary data source password.. . . . . . . . . . . . 447
A-4 Primary data source properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 448
A-5 Dimension properties showing selection of data source . . . . . . . . . . . 449
A-6 Secondary data source properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . 450
A-7 Multiple data sources connected in left frame . . . . . . . . . . . . . . . . . . . 451
A-8 How to add a new drill through report . . . . . . . . . . . . . . . . . . . . . . . . . 452
A-9 New drill through functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453
A-10 SQL generated by a drill-through report and changes made to it . . . . 454
A-11 SQL Override . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 455
A-12 Formula validation for member . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 456
A-13 Error reporting on Formulas in Member Properties . . . . . . . . . . . . . . . 457
A-14 Start with the Application Manager outline for drill through reports . . . 458
A-15 Update drill through data for the added drill through functionality . . . . 459
A-16 Saving a Model as an XML file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 460
A-17 Intelligent help in Integration Server . . . . . . . . . . . . . . . . . . . . . . . . . . 461
B-1 Architecture for Java based clients . . . . . . . . . . . . . . . . . . . . . . . . . . . 467
B-2 Selecting custom installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 469
B-3 Selecting WebSphere Application Server components . . . . . . . . . . . . 470
B-4 Choosing the Web Server Plugins . . . . . . . . . . . . . . . . . . . . . . . . . . . . 471
B-5 Specifying security options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 472
B-6 Specifying products directories . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473
B-7 Specifying database options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 473
B-8 Selecting the Application Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 476
B-9 Configuring the Application Server . . . . . . . . . . . . . . . . . . . . . . . . . . . 477
B-10 Using a local RDBMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 478
B-11 Using a remote RDBMS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 479
B-12 Configuring the local DB2 connection . . . . . . . . . . . . . . . . . . . . . . . . . 480
B-13 Configuring the remote DB2 connection . . . . . . . . . . . . . . . . . . . . . . . 481
B-14 Configuring Analyzer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 482
B-15 Running usejdbc2.bat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 483
B-16 Analyzer Launch Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 485
B-17 Analyzer Server console for user monitoring . . . . . . . . . . . . . . . . . . . . 486
B-18 Connecting to DB2 OLAP application . . . . . . . . . . . . . . . . . . . . . . . . . 487
D-1 ER data model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 496
D-2 Star schema data model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 497
D-3 Snowflake data model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 498

Figures xv
xvi DB2 OLAP Server V8.1: Using Advanced Functions
Tables

1-1 Grade of platforms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6


1-2 New parameters and commands (parallel calculation) . . . . . . . . . . . . . 10
1-3 Administration Services functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3-1 Supported and unsupported transformations. . . . . . . . . . . . . . . . . . . . . 53
3-2 Test results: loading and calculating the Online Investment application 55
3-3 Tuning examples and query performance impact . . . . . . . . . . . . . . . . . 61
3-4 End of the run statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
3-5 End of the run statistics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78
3-6 Response times . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79
3-7 Hybrid Analysis and drill through reports — general comparison . . . . . 80
3-8 Ctrace and performance trace properties . . . . . . . . . . . . . . . . . . . . . . . 87
4-1 OLAP Mining performance test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
4-2 OLAP Miner installation preferences. . . . . . . . . . . . . . . . . . . . . . . . . . 110
5-1 Main characteristics of connection pool and cluster . . . . . . . . . . . . . . 138
5-2 Step-by-step implementation checklist . . . . . . . . . . . . . . . . . . . . . . . . 167
5-3 Additional commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 187
5-4 Addition commands related to DB2 OLAP Server . . . . . . . . . . . . . . . . 194
5-5 Additional commands related to cluster . . . . . . . . . . . . . . . . . . . . . . . . 199
5-6 Connection Pool commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
5-7 Most common sample programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
6-1 Setting the database isolation level . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
6-2 Parameters of CALCTASKDIMS or SET CALCTASKDIMS . . . . . . . . 236
6-3 ESSCMD commands to calculate . . . . . . . . . . . . . . . . . . . . . . . . . . . . 239
6-4 Outline disordered . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 242
6-5 Outline ordered . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
6-6 SET MSG ONLY versus EstimateFullDBSize versus real calculation . 250
6-7 The vmstat tool . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 268
6-8 Parexport syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 272
6-9 MaxL export syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
7-1 New functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
7-2 AUTHENTICATIONMODULE syntax. . . . . . . . . . . . . . . . . . . . . . . . . . 302
7-3 DB2 OLAP Server properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 306
7-4 Application properties . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 315
7-5 Database properties. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 318
7-6 Administration Services step by step implementation . . . . . . . . . . . . . 359
8-1 Direct I/O supported platforms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 392
8-2 Default buffer cache configuration and how to set it . . . . . . . . . . . . . . 392
8-3 IBM DB2 OLAP Server and Hyperion Essbase correspondences. . . . 396

© Copyright IBM Corp. 2002. All rights reserved. xvii


B-1 Supported components and platforms . . . . . . . . . . . . . . . . . . . . . . . . . 465
B-2 Compatibilities and dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . . . 466

xviii DB2 OLAP Server V8.1: Using Advanced Functions


Examples

3-1 HAMEMORYCACHESIZE set at 1 MB . . . . . . . . . . . . . . . . . . . . . . . . . 63


3-2 HAMEMORYCACHESIZE for specific application and all others . . . . . 63
3-3 HAMEMORYCACHESIZE last setting overrides first setting . . . . . . . . . 63
3-4 HAMAXNUMCONNECTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
3-5 Number of SQL queries per OLAP Server query session is set to 10 . . 65
3-6 OLAP Server processes up to 100,000 rows per SQL query . . . . . . . . 65
3-7 HAMAXQUERYTIME set at 300 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
3-8 HARETRIEVENUMROW set at 50 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
3-9 Enabling Hybrid Analysis in essbase.cfg . . . . . . . . . . . . . . . . . . . . . . . . 69
3-10 Location of branches in the e-banking application . . . . . . . . . . . . . . . . . 71
3-11 Hybrid Analysis generated SQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
3-12 Setting Ctrace to level 2 for application Oiha . . . . . . . . . . . . . . . . . . . . . 87
4-1 Subcube definition for Online Investment . . . . . . . . . . . . . . . . . . . . . . . 92
4-2 OMServer.cfg file: client log verbose level set to high . . . . . . . . . . . . . 111
4-3 Running sync olap command. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112
4-4 OMClient.cfg file. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113
4-5 Running OLAP Miner on PC-banking . . . . . . . . . . . . . . . . . . . . . . . . . 113
4-6 Log file describing the subcube that was mined . . . . . . . . . . . . . . . . . 114
5-1 Fail tolerance actions on same service component . . . . . . . . . . . . . . . 152
5-2 Fault tolerance actions on a different service component . . . . . . . . . . 153
5-3 Copy OLAP application across servers . . . . . . . . . . . . . . . . . . . . . . . . 164
5-4 Copy OLAP database across servers . . . . . . . . . . . . . . . . . . . . . . . . . 164
5-5 CreateConnPoolAndCluster sample program . . . . . . . . . . . . . . . . . . . 206
5-6 DataQuery program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211
5-7 Data Query program updated . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
6-1 Using two threads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
6-2 Using three threads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
6-3 Using four threads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
6-4 Using SET CALCPARALLEL command . . . . . . . . . . . . . . . . . . . . . . . 233
6-5 Calculation script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 234
6-6 Configuring threads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244
6-7 Set msg only result . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
6-8 EstimateFullDBSize output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
6-9 essbase.cfg configuration file. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254
6-10 DLSINGLETHREADPERSTAGE: application level . . . . . . . . . . . . . . . 254
6-11 DLSINGLETHREADPERSTAGE: database level . . . . . . . . . . . . . . . . 255
6-12 DLSINGLETHREADPERSTAGE: server level . . . . . . . . . . . . . . . . . . 255
6-13 DLSINGLETHREADPERSTAGE: parallel mode . . . . . . . . . . . . . . . . . 255

© Copyright IBM Corp. 2002. All rights reserved. xix


6-14 DLTHREADSPREPARE: application level . . . . . . . . . . . . . . . . . . . . . 255
6-15 DLTHREADSPREPARE: database level . . . . . . . . . . . . . . . . . . . . . . . 256
6-16 DLTHREADSPREPARE: server level . . . . . . . . . . . . . . . . . . . . . . . . . 256
6-17 DLTHREADSWRITE: application level . . . . . . . . . . . . . . . . . . . . . . . . 256
6-18 DLTHREADSWRITE: database level . . . . . . . . . . . . . . . . . . . . . . . . . 256
6-19 DLTHREADSWRITE: server level . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
7-1 Authentication module essbase.cfg . . . . . . . . . . . . . . . . . . . . . . . . . . . 302
7-2 Error on verifying formula. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 328
7-3 Modifications folder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 329
7-4 Validation status. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 335
7-5 DB2 OLAP Server error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344
7-6 Administration Services error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 344
8-1 Changing I/O access mode without restarting the database . . . . . . . . 394
8-2 Changing the I/O access mode and restarting the database . . . . . . . . 394
8-3 The olapcay user .profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 415
8-4 Olapcayb user .profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 417
8-5 Essbase.cfg file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 421
8-6 Example of Java program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424
8-7 Compiling the Java program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424
8-8 Archiving Java program using jar. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 424
8-9 Using MaxL to log in to DB2 OLAP Server . . . . . . . . . . . . . . . . . . . . . 426
8-10 Register the CDF using MaxL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 426
8-11 Refresh MaxL statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 427
8-12 Combining MaxL commands in a script . . . . . . . . . . . . . . . . . . . . . . . . 427
8-13 MaxL drop function statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 428
8-14 MaxL display statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429
8-15 MaxL display atatement on the application . . . . . . . . . . . . . . . . . . . . . 429
8-16 MaxL display statement output . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 429
A-1 Server configuration settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 445
8-17 CopyOlapAppAndCube sample script . . . . . . . . . . . . . . . . . . . . . . . . . 490
8-18 Sample runsamples.cmd script . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 492

xx DB2 OLAP Server V8.1: Using Advanced Functions


Notices

This information was developed for products and services offered in the U.S.A.

IBM may not offer the products, services, or features discussed in this document in other countries. Consult
your local IBM representative for information on the products and services currently available in your area.
Any reference to an IBM product, program, or service is not intended to state or imply that only that IBM
product, program, or service may be used. Any functionally equivalent product, program, or service that
does not infringe any IBM intellectual property right may be used instead. However, it is the user's
responsibility to evaluate and verify the operation of any non-IBM product, program, or service.

IBM may have patents or pending patent applications covering subject matter described in this document.
The furnishing of this document does not give you any license to these patents. You can send license
inquiries, in writing, to:
IBM Director of Licensing, IBM Corporation, North Castle Drive Armonk, NY 10504-1785 U.S.A.
The following paragraph does not apply to the United Kingdom or any other country where such
provisions are inconsistent with local law: INTERNATIONAL BUSINESS MACHINES CORPORATION
PROVIDES THIS PUBLICATION "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR
IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF NON-INFRINGEMENT,
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Some states do not allow disclaimer
of express or implied warranties in certain transactions, therefore, this statement may not apply to you.

This information could include technical inaccuracies or typographical errors. Changes are periodically made
to the information herein; these changes will be incorporated in new editions of the publication. IBM may
make improvements and/or changes in the product(s) and/or the program(s) described in this publication at
any time without notice.

Any references in this information to non-IBM Web sites are provided for convenience only and do not in any
manner serve as an endorsement of those Web sites. The materials at those Web sites are not part of the
materials for this IBM product and use of those Web sites is at your own risk.

IBM may use or distribute any of the information you supply in any way it believes appropriate without
incurring any obligation to you.

Information concerning non-IBM products was obtained from the suppliers of those products, their published
announcements or other publicly available sources. IBM has not tested those products and cannot confirm
the accuracy of performance, compatibility or any other claims related to non-IBM products. Questions on
the capabilities of non-IBM products should be addressed to the suppliers of those products.

This information contains examples of data and reports used in daily business operations. To illustrate them
as completely as possible, the examples include the names of individuals, companies, brands, and products.
All of these names are fictitious and any similarity to the names and addresses used by an actual business
enterprise is entirely coincidental.

COPYRIGHT LICENSE:
This information contains sample application programs in source language, which illustrates programming
techniques on various operating platforms. You may copy, modify, and distribute these sample programs in
any form without payment to IBM, for the purposes of developing, using, marketing or distributing application
programs conforming to the application programming interface for the operating platform for which the
sample programs are written. These examples have not been thoroughly tested under all conditions. IBM,
therefore, cannot guarantee or imply reliability, serviceability, or function of these programs. You may copy,
modify, and distribute these sample programs in any form without payment to IBM for the purposes of
developing, using, marketing, or distributing application programs conforming to IBM's application
programming interfaces.

© Copyright IBM Corp. 2002. All rights reserved. xxi


Trademarks
The following terms are trademarks of the International Business Machines Corporation in the United States,
other countries, or both:
IBM® SP™
AIX® IMS™ WebSphere®
Balance® Intelligent Miner™ Lotus®
DB2® Perform™ 1-2-3®
DB2 OLAP Server™ Redbooks™
DB2 Universal Database™ Redbooks(logo)™

The following terms are trademarks of International Business Machines Corporation and Lotus Development
Corporation in the United States, other countries, or both:

Lotus® Word Pro® 1-2-3®

The following terms are trademarks of other companies:

ActionMedia, LANDesk, MMX, Pentium and ProShare are trademarks of Intel Corporation in the United
States, other countries, or both.

Microsoft, Windows, Windows NT, and the Windows logo are trademarks of Microsoft Corporation in the
United States, other countries, or both.

Java and all Java-based trademarks and logos are trademarks or registered trademarks of Sun
Microsystems, Inc. in the United States, other countries, or both.

C-bus is a trademark of Corollary, Inc. in the United States, other countries, or both.

UNIX is a registered trademark of The Open Group in the United States and other countries.

SET, SET Secure Electronic Transaction, and the SET Logo are trademarks owned by SET Secure
Electronic Transaction LLC.

xxii DB2 OLAP Server V8.1: Using Advanced Functions


Preface

IBM DB2 OLAP Server V8.1 (DB2 OLAP Server throughout this IBM Redbook),
based on Hyperion Essbase Server V6.5, incorporates significant improvements
and integrates the whole enterprise dimension, with multiple OLAP servers
(IBM DB2 OLAP Server or Hyperion Essbase Server) to control and manage
your data.

We discuss the new advanced functions in the areas of scalability, analytics,


performance, high concurrency, high availability, and administrative functions,
and explain how DB2 OLAP Server V8.1:
򐂰 Combines the high performance of multidimensional with relational scalability
through Hybrid Analysis
򐂰 Enables you to automate the discovery of atypical patterns in your cubes
through DB2 OLAP Server Miner (OLAP Miner throughout this book)
򐂰 Lets you run operations in multithreaded mode with parallel calculation, data
load, and export
򐂰 Provides availability and reliability, allowing cube clustering, failing over, and
connection pooling through DB2 OLAP Server Enterprise Services or High
Concurrency Option (Enterprise Services throughout this book)
򐂰 Gives a single point of administration for managing multiple OLAP Servers
through DB2 OLAP Server Administration Services (Administration Services
throughout this book)
򐂰 Allows you to integrate information from multiple data sources through new
DB2 OLAP Integration Server improvements (Integration Server throughout
this book)

This book positions the new advanced analytics, enterprise and administration
functions, and other features, so you can understand and evaluate their
applicability in your own enterprise environment. It provides information and
examples to help you to get started prioritizing and implementing the new
advanced functions.

© Copyright IBM Corp. 2002. All rights reserved. xxiii


The team that wrote this redbook
This redbook was produced by a team of specialists from around the world
working at the International Technical Support Organization, San Jose Center.

The team: Paola, Ulrich, Jakob, Corinne, Jo, Luciana (from left to right)

Corinne Baragoin is a Business Intelligence Project Leader at the International


Technical Support Organization, San Jose Center. She has over 16 years of
experience as an IT specialist on DB2 UDB and related solutions. Before joining
the ITSO in 2000, she worked as an IT Specialist for IBM France, supporting
Business Intelligence technical presales activities and assisting customers on
DB2 UDB, data warehouse and OLAP solutions.

Luciana Dongo Alves is an I/T Specialist in database management and


Business Intelligence in IBM Brazil. She has three years of experience in
Business Intelligence support and services. Her areas of expertise include DB2
OLAP Server, DB2 Universal Database, DB2 Intelligent Miner and DB2
Warehouse manager on UNIX and Intel platforms.

Jakob Burkard is a Senior IT Specialist in the Nordic Data Management team.


He holds a Masters degree in Information Science and has 6 years of experience
in architecting, building, and implementing Business Intelligence solutions. His
experience as a project manager has given him an in-depth view of challenges
facing the deployment of Business Intelligence solutions. He has worked at IBM
for 2.5 years. His areas of expertise include data warehousing, OLAP solutions
and front-end applications.

xxiv DB2 OLAP Server V8.1: Using Advanced Functions


Ulrich Guldborg is an IT Developer in Denmark. He works for Nordea, which is
one of the largest financial companies in the Nordics including Denmark,
Sweden Norway, Finland, and the Baltics. Here he is responsible for the use of
DB2 OLAP Server within the company. Ulrich has more than 20 years of
experience in the Business Intelligence and Data Warehouse field, and has
worked extensively in this area. He holds a degree in Life Insurance, and has
been working in banking and insurance throughout his career. In addition to
advanced ETL, Ulrich’s areas of experience include programming in COBOL,
Java, VB, SAS, Basic, Assembler, and other languages.

Jo Ramos has 15 years of experience in Information Technology and practical


experience in implementing Data Management and Business Intelligence
solutions. He works for the Advanced Technical Support Organization (ATS) in
Dallas, in the Business Intelligence Solution Center (BISC) group. He provides
presales support for Data Management products, developing customized
demonstrations and proof of concepts for ETL and OLAP applications.

Paola Rodriguez is a Data Management and Business Intelligence IT specialist


at the Software Division in IBM Argentina, providing pre-sales technical support
since she joined IBM in 1998. She has 4 years of experience in developing
Business Intelligence solutions in a wide range of companies for Argentina,
Paraguay and Uruguay. Her areas of expertise include OLAP Solutions, Mining
Solutions and end-user analysis tools.

We would like to especially thank the following people for their specific
contributions to this project, for testing and writing:

Julia L Hirlinger
Lori Norton
Gary Robinson
Marty Yarnall
IBM Silicon Valley Lab

Cintia Y Ogura
IBM DB2 Advanced Technical Support

Thanks to the following people for their help to this project by providing their
technical support and/or reviewing this redbook:

Melissa Biggs
Aaron Briscoe
Larry Higbee
Gary Mason
Gregor Meyer
John Poelman
Allan Wei

Preface xxv
Chris Yao
IBM Silicon Valley Laboratory

Vaishnavi Anjur
Hematha Banerjee
Michael Gnann
Bob Jacobson
Al Marciante
Vince Medina
Sujata Shah
Eric Smadja
Richard Sawa
Hyperion Solutions

Doreen Fogle
IBM WW DB2 OLAP Server Technical Sales Support

Ian Allen
IBM EMEA Technical Sales Business Intelligence Solutions

Jaap Verhees
Business Partner from Ordina, Netherlands

Yvonne Lyon, Technical Editor


IBM International Technical Support Organization, San Jose Center

Become a published author


Join us for a two- to seven-week residency program! Help write an IBM Redbook
dealing with specific products or solutions, while getting hands-on experience
with leading-edge technologies. You'll team with IBM technical professionals,
Business Partners and/or customers.

Your efforts will help increase product acceptance and customer satisfaction. As
a bonus, you'll develop a network of contacts in IBM development labs, and
increase your productivity and marketability.

Find out more about the residency program, browse the residency index, and
apply online at:
ibm.com/redbooks/residencies.html

xxvi DB2 OLAP Server V8.1: Using Advanced Functions


Comments welcome
Your comments are important to us!

We want our Redbooks to be as helpful as possible. Send us your comments


about this or other Redbooks in one of the following ways:
򐂰 Use the online Contact us review redbook form found at:
ibm.com/redbooks
򐂰 Send your comments in an Internet note to:
redbook@us.ibm.com
򐂰 Mail your comments to:
IBM Corporation, International Technical Support Organization
Dept. QXXE Building 80-E2
650 Harry Road
San Jose, California 95120-6099

Preface xxvii
xxviii DB2 OLAP Server V8.1: Using Advanced Functions
Part 1

Part 1 Introduction
In this part of the book, we take you through an overview of the DB2 OLAP
Server V8.1 new advanced functions and describe how to combine the different
components.

Furthermore, we discuss an environment that is as near real life as possible — a


banking case study that has been used throughout the book.

© Copyright IBM Corp. 2002. All rights reserved. 1


2 DB2 OLAP Server V8.1: Using Advanced Functions
1

Chapter 1. DB2 OLAP Server V8.1


overview
DB2 OLAP Server V8.1 major and significant enhancements provide the
following advantages:
򐂰 Even more scalability through Hybrid Analysis that combines the high
performance of multidimensional and relational scalability
򐂰 Deviation detection or discovery of unexpected values
򐂰 Parallel engine to exploit hardware and run OLAP operations as calculation,
load and export in parallel, decreasing the batch window to build your cube or
export it
򐂰 High concurrency and high availability solutions through Enterprise Services
for workload balancing, clustering, connection pooling and failing over on
multiple OLAP Servers
򐂰 Framework to manage and maintain OLAP Servers from anywhere in the
enterprise from a centralized and single point of control

In this chapter we present an overview of these new features and enhancements,


which we then detail in the remainder of the book.

© Copyright IBM Corp. 2002. All rights reserved. 3


1.1 Advanced analytical functions
DB2 OLAP Server version 8.1 has two features that add power and flexibility to
your analytical environment: Hybrid Analysis and DB2 OLAP Miner.

1.1.1 Combining OLAP and relational databases: Hybrid Analysis


Using the Hybrid Analysis feature, you can combine multidimensional OLAP
performance with the scalability of a relational database, defining your
multidimensional database to have a lower portion residing in the relational
database.

Hybrid Analysis can retrieve data from a relational database as if the data
physically resides on the cube storage. It can construct multiple SQL queries
dynamically and automatically allowing total flexibility to access the relational
database from DB2 OLAP Server multidimensional database.

Important: Hybrid Analysis does not replace Integration Server Drill-Through


Reports. A Hybrid Analysis cube can still have Drill-Through Reports for its
“regular” portion to deal with exceptional or specific requests.

If you have applications that analyze very large volumes of data, only a smaller
physical cube needs to be loaded and precalculated in DB2 OLAP Server while
the lower, more detailed level of data can be accessed dynamically at execution
time. This avoids taking a long time to load and calculate the multidimensional
database, and allows you to use the efficiency of mass data scalability that the
relational databases offer.

One of the most important issue will be to design the database and define how
much aggregation is done dynamically in the database.

Integration Server is required for data description tasks of Hybrid Analysis. It is


used to build Hybrid Analysis outline and Hybrid Analysis cubes. The information
about the Hybrid Analysis portion of a cube is kept in the Integration Server
metaoutline and used at query time.

4 DB2 OLAP Server V8.1: Using Advanced Functions


The relational databases supported by Hybrid Analysis are diagrammed in
Figure 1-1.

Hybrid Analysis
Manager

DB2 DB2 ORACLE


ODBC 6.1 ODBC 7.1 MERANT 4.0

Figure 1-1 Relational databases supported by Hybrid Analysis

1.1.2 OLAP Miner


OLAP Miner enhances the reporting capabilities of DB2 OLAP Server, combining
IBM data mining technology with OLAP technology. It uses the loaded and
calculated data that is created with DB2 OLAP Server to identify atypical or
deviant values automatically.

OLAP databases can often hold so much data that it is impossible to search all
areas of the cube for useful information. OLAP Miner helps with this data
exploration problem using a data mining algorithm developed at IBM Laboratory
to search cubes for extraordinary values or deviations. A deviation is defined as
a value in the cube that differs significantly from its expected value.

A value in a cell is a deviation if it significantly varies from the expected value,


calculated by the OLAP Miner algorithm. The algorithm calculates the expected
value of a cell based on the context of the cell's position in the cube, and the
algorithm combines contributions from all dimensions to which the cell belongs.
OLAP Miner lists deviations, presents various views of each deviation, and
quantifies how big the difference is between the expected value and the actual
value (magnitude). OLAP Miner lists the deviations in the order of their
importance.

Chapter 1. DB2 OLAP Server V8.1 overview 5


OLAP Miner helps in the following ways:
򐂰 By discovering anomalies from the wealth of data analyzed
򐂰 By discovering notable fluctuations in sales numbers, budgets, or other data
in a customer’s business
򐂰 By detecting problem areas, or areas of excellent performance in the cube
data
򐂰 By saving the analyst’s time when looking for problem areas
򐂰 By highlighting problem areas that an analyst may not see

OLAP Miner provides a graphical interface to help when creating deviation


detection definitions and to display the results of these definitions (Table 1-1).

Table 1-1 Grade of platforms


Platforms supported by OLAP Miner Platforms supported by OLAP Miner
Server Client

Windows NT v4.0 Windows 98


Windows 2000 Windows NT v4.0
AIX 4.3.3 Windows 2000
Windows ME

Important: OLAP Miner is an IBM DB2 OLAP Server feature that is supplied
free. In DB2 OLAP Server version 8.1, the OLAP Miner feature is packaged as
a separate installation.

1.2 Advanced enterprise functions


DB2 OLAP Server Version 8.1 incorporates a new feature, Enterprise Services,
that enables the DB2 OLAP Server to run in a more reliable and efficient
enterprise environment to serve the analysis needs of a larger number of users,
in Web-based environments. Enterprise Services allows you to cluster OLAP
Servers and balance their workload, as well as to provide connection pooling and
high concurrency and to support the OLAP Server failover and develop high
availability scenarios.

Enterprise Services
Enterprise Services gives the capability to group identical DB2 OLAP Server
version 8.1 databases using them as a single resource. These databases can be
in multiple machines and the Enterprise Services serves users applications as
one logical unit.

6 DB2 OLAP Server V8.1: Using Advanced Functions


The Enterprise Services feature provides these capabilities:
򐂰 Connection pooling to serve multiple users requests sharing connections,
conserving software and network resources and improving performance:
The connection pooling facilitates the scaling of DB2 OLAP Server
applications to thousands of users.
򐂰 Clustering to serve multiple requests and distribute the workload across
multiple servers running the same cube:
By distributing the activity, an administrator can ensure that their users
receive a consistent response time from the system. As the user community
grows or becomes more active, the administrator can simply add more DB2
OLAP Server databases to the cluster to improve response time.

Combining these two functions provides a high availability environment. Through


the use of clustering, if a failure occurs on a database or on an OLAP Server in
the cluster, the system will be able to continue processing requests using the
other databases in the cluster. DB2 OLAP Server detects service interruptions
and automatically re-routes requests to another DB2 OLAP Server.

Enterprise Services is supported on Windows XP, Windows NT 4.0, Windows


2000, Sun Solaris 7/8 (SunOS 5.7/5.8), HP-UX 11.0/11i and AIX 4.3.3 or 5L.

A new priced feature, High Concurrency Option, is required for cube clustering
that is itself required for workload balancing and failover capabilities.

1.3 Advanced administrative functions


DB2 OLAP Server version 8.1 incorporates significant improvements:
򐂰 Exploits the new parallel capabilities on load, calculation and export, DB2
OLAP Server incorporates significant improvements in performance to exploit
multiple processors.
򐂰 Helps administrators managing the multiple OLAP objects and environments
in the enterprise, DB2 OLAP Server expands Application Manager
capabilities with a new feature: Administration Services.
򐂰 Facilitates migration between different OLAP server environments, DB2
OLAP Server version 8.1 provides an additional tool called the Security
Migration Tool.
򐂰 Provides more flexibility to develop and use applications, the DB2 OLAP
Server version 8.1 has new API functions and enhancements in Custom
Defined Functions and Custom Defined Macros.

Chapter 1. DB2 OLAP Server V8.1 overview 7


1.3.1 Parallel calculation
Now, any of the critical operations can be run in multi-threaded mode, enabling
you to take advantage of your multiprocessor hardware. This improves system
performance and throughput, reducing batch window when building cubes.

Previously DB2 OLAP Server version 8.1, the OLAP kernel operated in
single-threaded mode and performed load and calculation serially, even if the
engine was highly parallel for queries.

In a serial calculation (see Figure 1-2) all steps run on a single thread. Each task
is completed before next is started.

Serial Calculation
Calculate
process
waiting
task5
waiting
task4

Only 1
Thread
waiting
task3
waiting
task2

Operating System
executing: task1

CPU 1 CPU 2
processing idle

Figure 1-2 Serial calculation

If you enable parallel calculation (see Figure 1-3), the OLAP engine analyzes all
the tasks for a calculation pass and breaks them down into tasks that can run
independently of each other. DB2 OLAP Server passes the tasks that are ready
to be executed to the operating system using multiple threads simultaneously on
up to four threads.

8 DB2 OLAP Server V8.1: Using Advanced Functions


Parallel Calculation

Calculate
process

CALCPARALLEL 2
or
SET CALCPARALLEL 2

Threa
d1
re a

d
Th

2
waiting
waiting
task6

task4
waiting

waiting
task5

task3
Operating System
executing: task1, task2

CPU 1 CPU 2
processing processing

Figure 1-3 Parallel calculation

If DB2 OLAP Server determines that parallel calculation does not improve
performance or if the formulas have complex interdependencies (cannot break
them in subtasks to run independently), the DB2 OLAP Server executes the
calculation process in single mode, even if the parallel load is enabled.

You can enable the parallel calculation at the server level, application level, or
database level.

Table 1-2 shows the new parameters and commands to administrate parallel
calculation.

Chapter 1. DB2 OLAP Server V8.1 overview 9


Table 1-2 New parameters and commands (parallel calculation)
Settings Command What it does
(essbase.cfg)

CALCPARALLEL SET CALCPARALLEL Enables DB2 OLAP Server to use


parallel calculation, specifying the
number of threads to be made
available for parallel calculation.
DB2 OLAP Server analyzes each
pass of a calculation to determine
whether parallel calculation would
optimize the calculation. If it would
not, DB2 OLAP Server uses serial
calculation even if CALCPARALLEL
is set.

CALCTASKDIMS SET CALCTASKDIMS Specifies how many of the sparse


dimensions in an outline are used to
identify potential tasks that can be
run in parallel.

1.3.2 Parallel data load


Enabling parallel load, you can have substantial performance improvements,
taking advantage of your multiprocessor machine.

For better performance, DB2 OLAP Server divides the load processing in two
steps: preparation and write (see Figure 1-4).

In the preparation step, the DB2 OLAP Server organizes the data source in
memory. In the write step, the DB2 OLAP Server writes blocks from the memory
to the disk.

You can define how many threads you can run for preparation steps and how
many threads you can run for write steps. For example, in Figure 1-4 we are
using three threads for the preparation step and two threads for the write step.

10 DB2 OLAP Server V8.1: Using Advanced Functions


Input file
flat
file or Relational
database

Input stage
Portion of
data

3
threads

Preparation data
stage organized

2
threads
data cache
(memory)

Write stage

blocks
data
Disk

Figure 1-4 Parallel load schema

1.3.3 Parallel export


The export command is very useful to transfer data across platforms, back up
only a certain portion of the data, create an exported file in text format rather than
binary format, reduce fragmentation in a database by exporting data into an
ASCII file, clearing all data from the database, and reloading the ASCII file.

Now, using DB2 OLAP Server version 8.1, you can decrease the export process
time using the new parallel export. The parallel export is executed on multiple
threads and each thread retrieves data and writes it to a corresponding export
file allowing I/O parallelism, writing to two or more I/O devices simultaneously.

DB2 OLAP Server can also exploit I/O parallelism, splitting the output in multiple
files, until 8 files. In Figure 1-5, the database e-bank is exported using two
threads. Two output files are generated.

Chapter 1. DB2 OLAP Server V8.1 overview 11


App: e-bank
Database: e-bank

Export

Output
Output
file1
file1

Figure 1-5 Parallel export

To execute the export in parallel, you can use the new PAREXPORT command
(ESSCMD) or you can use the MaxL export command.

1.3.4 Administration Services


Administration Services combines a single point of administration with an
easy-to-use wizard graphical interface.

Now you can manage OLAP Servers objects quickly, in a visual, familiar setting.
You can perform multiple tasks simultaneously, run process in the background,
perform cross-server operations, and manage active user sessions and requests
from anywhere in the enterprise.

In contrast, when using Application Manager, you cannot run processes in the
background. While you are running processes such as calculation or load using
the Application Manager, you lose other operations. However, when using
Administration Services, you can save time by running common processes in the
background, and you can continue administering your OLAP servers.

12 DB2 OLAP Server V8.1: Using Advanced Functions


The Administration Services works as a middle tier server that communicates
directly with OLAP Servers as shown on Figure 1-6, providing a graphical user
interface client console. This user interface client console is based on Java and
can run on multiple platforms, including UNIX platforms.

Client Tier Middle Tier Database Tier


Administration Services Administration Services DB2 OLAP Server
Console Server servers

HTTP TCP/IP

Data Store

HTTP
Listener

Figure 1-6 Administration Services architecture

The console incorporates many of the functionalities of Application Manager and


other administration tools, such as MaxL, offering many new functions not
available in Application Manager.

Table 1-3 describes the major functions available in Administration Services.

Table 1-3 Administration Services functions


Functions What they do

Monitor - Manage user sessions and requests


- Manage user locks on data
- Log Analyzer: filter, search and analyze OLAP Server
logs and application logs
- Monitor OLAP Server performance and view
configuration information

Object manipulation - Custom Defined Function and Macros: creates, edit


and delete
- Database: clear data, view and edit properties, create,
rename, start and stop
- Applications: view and edit properties, create, rename,
start and stop

Password propagation - Change a password and then propagate that password


to other OLAP Servers.

Chapter 1. DB2 OLAP Server V8.1 overview 13


Functions What they do

Scripts - MaxL script editor integrated with the Administrative


Services Console: create, edit, save and execute MaxL
statements scripts or use the MaxL interactively.
- Calculation Script Editor integrated with the
Administrative Services Console: create, manage and
execute calculation scripts in the background.
- Create, edit and delete custom-defined functions and
macros.

Single sign-on - Handle your connections to OLAP Servers,


applications, and databases.

View - Show port information


- View OLAP outlines

Print - Print the content of many windows in the console

These are the Administration Services platforms supported:


򐂰 Windows NT 4.0
򐂰 Windows 2000 on Pentium or later machines
򐂰 Windows 98
򐂰 Windows ME (Millennium Edition)
򐂰 Sun Solaris 6, 7, and 8
򐂰 AIX 4.3.3 or 5L

1.3.5 Security Migration Tool


The Security Migration Tool is available with DB2 OLAP Server V8.1 and
migrates automatically OLAP security data, from a source server into a
destination server, where the servers can be of either the same version of DB2
OLAP Server, or of different versions.

It allows you to migrate applications, databases, filters, users, groups from one
server onto another server without any user interaction.

The current available hardware platforms are: AIX and Windows and the DB2
OLAP Servers are DB2 OLAP versions 1.1, 7.1 and 8.1. Figure 1-7 shows some
migration scenarios.

14 DB2 OLAP Server V8.1: Using Advanced Functions


DB2 OLAP Server DB2 OLAP Server
version 7.1 for AIX version 8.1 for AIX

DB2 OLAP Server DB2 OLAP Server


version 1.1 for AIX version 8.1 for Win

DB2 OLAP Server DB2 OLAP Server


version 8.1 for Win version 8.1 for AIX

Figure 1-7 Sample scenarios when migrating DB2 OLAP Server

You can use one of the following options to migrate your data:
򐂰 Migrate security data directly from one OLAP Server to another OLAP Server
on the same platform.
򐂰 Copy security data into a data file that can be re-used to create security data
on any of the supported platforms.
򐂰 Migrate security data onto an OLAP Server using a data file

To run the Security Migration tool, the installation program must be downloaded
from the DB2 OLAP Server Web site:
http://www.ibm.com/software/data/db2/db2olap

1.3.6 Custom Defined Functions and Custom Defined Macros


DB2 OLAP Server enhances Custom Defined Functions (CDF) and Custom
Defined Macros (CDM):
򐂰 Previously, in DB2 OLAP Server version 8.1 it was required to install and
configure a Java Virtual Machine (JVM) to create or use CDM. In DB2 OLAP
Server version 8.1 only CDF still require the JVM.

Chapter 1. DB2 OLAP Server V8.1 overview 15


򐂰 In previous versions of DB2 OLAP Server, you had to start the
multidimensional application before creating a CDF, because DB2 OLAP
Server validates function records before completing the CDF creation. Now,
DB2 OLAP Server version 8.1 checks the errors when the CDF is loaded. You
can even create it with your multidimensional application stopped.
򐂰 You can now use MaxL to create and drop function records without loading or
unloading an application.

1.3.7 API enhancements


DB2 OLAP Server version 8.1 provides new API functions that give you more
flexibility to develop your own OLAP access application.

These are the new API functions:


򐂰 List of native and custom-defined calculation functions:
DB2 OLAP Server version 8.1 includes a new API function (EssListCalc),
that can list all available custom-defined macros and functions, all DB2 OLAP
Server native functions, and all calculator functions.
This information gives applications a way to discover what custom functions
have been defined to the server.
In previous versions of DB2 OLAP Server, the only way to access the list of
these functions was through dialog boxes provided in Application Manager

Figure 1-8 List of functions under Application Manger script editor

Now you can access these functions and operators using the EssListCalc
API function.

16 DB2 OLAP Server V8.1: Using Advanced Functions


򐂰 New API function to create filter:
The function EssCreateFilter is now available in DB2 OLAP Server. It
creates a filter and starts setting its contents. To finish setting the filter
contents, you must also use EssSetFilterRow. The new EssCreateFilter
differs from the old EssSetFilter, because it returns an error if a filter of the
same name already exists on the database. The old EssSetFilter overwrites
a filter of the same name if it already exists on the database.
򐂰 API programs can access information about users connected
The new function EssListLogins() provides a count of the users logged in to
a specified connection and returns information on the connected client names
and IP addresses.
The function EssListLogins() returns the list of login instances in the current
session. You can call EssListLogins() more than once for the same user
name and server. The API returns a unique context handle for each login to
the specified server.
򐂰 Backward compatibility support
The DB2 OLAP Server version 8.1 client API programs can access previous
releases of DB2 OLAP Servers, beginning with DB2 OLAP Server version 7.1
fixpack 8.
Now you can run a program in an environment with multiple servers of
different versions. For the rare feature that is incompatible with a previous
server, DB2 OLAP Server generates an appropriate error message.

1.3.8 Additional improvements and new functions


DB2 OLAP Server incorporates other significant improvements. This section
describes other major enhancements available in DB2 OLAP Server version 8.1:
򐂰 Single computer and multiple DB2 OLAP Servers:
New configuration settings enable a single computer to run multiple DB2
OLAP Server agents (DB2 OLAP services) at the same time. To configure
multiple agents on the same machine, you should perform one DB2 OLAP
Server installation for each agent you want to run at the same time.
The new essbase.cfg configuration settings that allow multiple agents on the
same machine are the following:
AGENTPORT, SERVERPORTBEGIN, SERVERPORTEND, and PORTINC.
򐂰 I/O settings changes:
In previous releases of DB2 OLAP Server buffered I/O or direct I/O
configuration setting is server-wide (essbase.cfg) and affects all databases.
With DB2 OLAP Server version 8.1, the I/O access mode is a database

Chapter 1. DB2 OLAP Server V8.1 overview 17


setting stored in the security file. DB2 OLAP Server version 8.1 allows
different configuration settings (buffered I/O or direct I/O) for each database.
This provides more flexibility to configure the right I/O setting to your system.
In DB2 OLAP Server version 8.1 (and version 7.1 with fixpack 8), the default
mode of I/O setting is buffered I/O (when in DB2 OLAP Server version 7.1
until fixpack 7, the default mode of I/O access is direct).
򐂰 External authentication:
DB2 OLAP Server version 8.1 provides an option to use external
authentication of DB2 OLAP Server users instead of using native DB2 OLAP
Server authentication. Now it can authenticate users against global
repositories like LDAP. DB2 OLAP Server supports LDAP V3-compliant
servers, Microsoft Active Directory Service and NT authentication as external
authentication methods. You can also develop your own authentication
modules and plug them into DB2 OLAP Server security infrastructure.
򐂰 Server log enhancements:
Now the Essbase.log file includes more information about DB2 OLAP Server
users login, to help monitoring DB2 OLAP Server security. These new
messages are:
– The user name of anyone entering an incorrect password or changing a
password
– The IP address of the computer on which a user logs in
– The user name and group name when the user or group is deleted
򐂰 Limits on query duration and time:
You can also limit the amount of time a query can run before completion, or
you can limit the number of blocks that a query may access. You can set
these limits at the server, application, or database level in essbase.cfg.
򐂰 Empty outline support in dimension building
Previously DB2 OLAP Server version 8.1, you have to add at least one
dimension member before building an outline. Now when building member
dimensions from an input file or relational database, you don’t have to add
one dimension member before building the outline.
򐂰 Substitution variable support in SQL Interface
You can use substitution variables in Application Manager SQL strings. This is
similar to substitution variable use in report scripts and calculation scripts.
You should create them through Application Manager (Server>Substitution
variable as shown in Figure 1-9).

18 DB2 OLAP Server V8.1: Using Advanced Functions


In the Define SQL dialog box you can use the substitution variable instead of
a “field=value” string in the Select, From or Where box, typing the ampersand
(&) in front of the substitution variable name.

Figure 1-9 Substitution variable

򐂰 New calculation functions:


DB2 OLAP Server provides three new calculation functions in version 8.1:
– @PRIORS and @NEXTS to skip #missing values, zero (0) values, or both.
– @NAME to pass a member name, as a string, to another function
– @ALIAS to pass a member alias, as a string, to another function
򐂰 Case sensitivity improvement
In version 8.1, DB2 OLAP Server creates the database name exactly as it is
entered. In previous releases, it automatically changed the case of application
and databases names when they were created: the first letter was converted
to uppercase and other letters were all lowercase.

Chapter 1. DB2 OLAP Server V8.1 overview 19


20 DB2 OLAP Server V8.1: Using Advanced Functions
2

Chapter 2. DB2 OLAP Server


components and case
studies
The capabilities of DB2 OLAP Server components have been expanded with
version 8.1. This environment is moving towards large scale enterprise
configurations, and provides companies the possibility to choose the particular
configuration that covers their needs and integrates the best in their Business
Intelligence environment.

The complete DB2 OLAP Server environment is now made up of seven


components, each with its own place in the architecture:
򐂰 DB2 OLAP Server
򐂰 OLAP Miner
򐂰 Integration Server
򐂰 Enterprise Services
򐂰 Security Migration Tool
򐂰 Analyzer
򐂰 Scripting environments, such as EssCmd and MaxL

For this book, we also had the opportunity to work with two real-life case studies,
which cover a regional portion of E-banking and Online Investment in a financial
institution.

© Copyright IBM Corp. 2002. All rights reserved. 21


2.1 DB2 OLAP Server components architecture
DB2 OLAP Server components can be combined together as follows:
򐂰 Starting with basic DB2 OLAP Server Installation and OLAP Miner
򐂰 Expanding your basic OLAP Server installation with OLAP Integration
Services
򐂰 Expanding with the Enterprise Services feature
򐂰 Expanding with the Enterprise Administration feature
򐂰 Using the Security Migration Toolkit to facilitate OLAP Servers migration
򐂰 Using DB2 OLAP Analyzer 8.1 for reporting and analyzing data in your OLAP
applications

2.1.1 The basic DB2 OLAP Server installation


The basic DB2 OLAP Server installation (see Figure 2-1) gives you the possibility
to build a complete multidimensional OLAP environment using Application
Manager.

Even though this is the basic version of DB2 OLAP Server, you have the
functions for building, maintaining, and using OLAP applications. The
functionalities that are part of this configuration include:
򐂰 Application Manager for building, deploying your OLAP applications, and
monitoring users, security and overall OLAP database administration tasks.
򐂰 OLAP Miner for mining your multidimensional applications for deviations in
data. This is a great way to explore the story behind your data.
򐂰 Spreadsheet add-in for browsing, analysis, drilling and slicing your data. This
feature comes also with write-back functionality, where you can update your
OLAP application from the client. This is helpful, for example, if you are doing
budgeting and forecasting.

To access your OLAP application besides spreadsheet, you can use a wide
variety of products that support the Essbase API, for example, Analyzer, Brio
Enterprise, and Business Objects.

22 DB2 OLAP Server V8.1: Using Advanced Functions


Figure 2-1 Basic DB2 OLAP Server architecture

With Application Manager, you build the outline for the multidimensional OLAP
application. You can use relational databases as well as flat files for sources, and
by using the Data Preparation Editor in Application Manager, you can edit the
format of the data that will be loaded from the data source to the OLAP cube
through DB2 OLAP Server. After the load and calculation of data in the OLAP
cube, you can access the data using the spreadsheet add-in and mine the data
using OLAP Miner.

2.1.2 Expanding OLAP capabilities with Integration Server


When expanding the basic OLAP Server installation with Integration Services,
you can:
򐂰 Source data directly from multiple relational data sources — you can connect
and access data from more than one data source, giving you considerable
flexibility in creating OLAP models and metaoutlines.
򐂰 Build your star schema model and metaoutline directly from the relational
sources by dragging and dropping tables onto Integration Services canvas.
򐂰 Verify and edit static formulas before using the formulas in DB2 OLAP Server,
avoiding the formula to be rejected by DB2 OLAP Server because of simple
errors such as misspellings or missing semicolons. This can save you
significant amounts of time during member and data load.

Chapter 2. DB2 OLAP Server components and case studies 23


򐂰 Apply Hybrid Analysis, by simply right-clicking with your mouse and defining
to which level your multidimensional application is built, and specifying where
the relational database takes over as the data source.
򐂰 Move and copy your OLAP models and outlines using XML, modifying and
reusing these for new OLAP applications.
򐂰 Schedule and run multiple load and calculation processes from Integration
Services GUI interface.

As shown in Figure 2-2, the Integration Services console (or client)


communicates through TCP/IP with both Integration Server and DB2 OLAP
Server. When building the application, your client is communicating through
Integration Server to your relational database using ODBC to retrieve the
metadata from the relational tables. Once you have selected the tables that will
be used for building the OLAP model, you store this definition as metadata in the
OLAP Metadata Catalog. The OLAP Metadata Catalog works as a relational
repository for your environment while you are building, maintaining, or modifying
the model or metaoutline.

DB2 OLAP integration Services Console

TCP/IP

OLAP Model OLAP Metaoutline

TCP/IP

OLAP
RDBMS Command
TCP/IP
ODBC
ODBC
source Interface
In Se
O rat r
LA io
te r v
g e

P n

Hybrid
Analysis
relational
access
through OLAP ODBC
Metadata
TCP/IP
ODBC
Catalog
API

API
DB2 OLAP Server 8.1

OLAP Cube

Figure 2-2 DB2 OLAP Server environment using Integration Services

Once the OLAP model and metaoutline is built, loading and calculation of data
takes place, and the OLAP Application is created. This task is done through DB2
OLAP Server, which also handles end-user applications requests for data,
whenever data is ready for use.

24 DB2 OLAP Server V8.1: Using Advanced Functions


2.1.3 Expanding with Enterprise Services
The next level of extending the DB2 OLAP Server environment is to apply
Enterprise Services to the architecture in Figure 2-2, to manage middle tier
OLAP Servers. As a result, you get the benefits of these features:
򐂰 Connection pooling, which maximizes resource utilization, enabling multiple
connections per session.
򐂰 Workload balancing, which enables multiple instances of OLAP Server on
multiple machines, and thereby rebalances the requests workload.
򐂰 Cube clustering, which allows to copy cube and to synchronize them through
multiple OLAP Servers for consistent query response time and failover.
򐂰 Query failover support, which provides transparent failover capability to
available OLAP servers. For example, the administrator can take a cube
offline from the cluster for maintenance and it will be transparent to the users.

Enterprise Services uses and delivers the Essbase Java API that is not included
with the other APIs.

2.1.4 Expanding with Administration Services


The last extension to your DB2 OLAP environment is Administration Services,
the enterprise administration tool that is ultimately going to replace Application
Manager, and therefore covers many of the same features and functions as
Application Manager.

Beside well-known functions, Enterprise Administration also adds new features


and functions to your OLAP environment, such as these:
򐂰 Single sign-on, which means that the Administration Server handles your
connections to OLAP servers, applications, and databases.
򐂰 Password propagation, which enables users to change their passwords once
and apply the change to multiple OLAP servers.
򐂰 Asynchronous processing, so you can start a process, such as a calculation,
and run that process in the background. While you are doing other things, a
message panel in the console window tells you when the process is
completed.
򐂰 New common look and feel for all script editors (Calculation Script Editor,
MaxL Script Editor, and Report Script Editor).

Chapter 2. DB2 OLAP Server components and case studies 25


2.1.5 Using Security Migration Tool
The Security Migration Tool is a utility that migrates OLAP security data. It allows
administrators to migrate data from one server onto another server, as well as
across platforms. The tool allows the administrator to migrate security
information on applications, databases, filters, users and groups.

The tool will update the essbase.sec file on the destination server, and generate
log files which include information on the servers and data chosen to migrate, as
well as a data file which includes the security data migrated. The data file can be
copied onto a destination server and used to migrate data (it can be used as a
backup of security data as well). It also migrates the data files associated with the
applications and databases, including outlines and reports.

2.1.6 Using Analyzer


Analyzer version 8.1 is the newest release of the multidimensional analysis
product. It enables users to analyze and explore sophisticated multidimensional
and relational data in the OLAP applications/databases built by DB2 OLAP
Server Application Manager or Integration Server in an easy-to-use graphical
interface.

Analyzer is available as a Java Web client, as a pure HTML based client, or as a


thick client.

Analyzer has been completely re-architected for this new version and offers new
major changes and enhancements:
򐂰 The user interface has been reworked, with new options such as these:
– Seamless access to Hybrid Analysis applications.
– Relational integration that provides an improved user interface for defining
direct access to relational databases, in addition to OLAP Servers.
– Before this version, Analyzer could only access the multidimensional
cubes created by Application Manager or Integration Server.
– Users are now able to access data regardless of where it is located, and
merge relational and multidimensional data together on a single report.
򐂰 The user interface has been re-architected to leverage the power and
performance of open systems platforms, including Windows NT/2000/XP, AIX,
and Sun Solaris.
򐂰 The Hyperion Analyzer Java-based Web Client (100% Java) has been
enhanced to contain major features from the Hyperion Analyzer 5.0.2
Windows client and Design Tools.

26 DB2 OLAP Server V8.1: Using Advanced Functions


These major features include the ability to define calculations; show/hide
member filters based on name, values, or traffic lighting colors, retrieve
top/bottom, restrict data, subsets, date/time series, substitution variables,
form designer, pin designer, and pinboard designer.
򐂰 Hyperion Administrator (100% Java) is now a Java applet allowing users, user
groups, and database connections to be managed from anywhere within the
enterprise. Also, the user types “system manager” and “user” have been
replaced with security roles. Users are assigned roles to allow full access,
manage users and user groups, manage database connections, create
custom reports, create basic reports, or allow read-only access.
򐂰 Personalization is now available that allows users to easily customize their
user preferences, choosing from options that:
– Modify the user interface's look and feel.
– Create personal database connections.
– Set a perspective (point of view) on a database connection that remains
persistent throughout a user's session.
– Enable a list (personal variable) of members to be reused as a member
selection.
򐂰 High-end scalability is now available, with the ability to run right inside leading
J2EE-compliant application servers, such as IBM WebSphere. This benefits
users by providing the highest level of scalability and performance available in
the industry, plus it enables them to leverage existing investments in
enterprise application server technology.

2.1.7 The big picture


The following picture shows you all the components of the DB2 OLAP Server
version 8.1 (see Figure 2-3).

Chapter 2. DB2 OLAP Server components and case studies 27


= One way data cmmunication
DB2 OLAP integration Services Console
= Bidirectional

TCP/IP

OLAP Model OLAP Metaoutline TCP/IP

TCP/IP

Administra-
TCP/IP OLAP Administra-
tion
RDBMS ODBC
ODBC Command tion
Services
source Interface
In
O r at r
Services
LA io
t e er v
g e Client

P n
API
S

Hybrid
Analysis TCP/IP
relational HTTP
access Enterprise
JAPI
through OLAP ODBC TCP/IP
Enterprise
CORBA
Services
ODBC Metadata Services
EJB
Client
Catalog JAPI
ODBC
API
API
Domain
API Storage
DB2 OLAP Server 8.1

OLAP Cube Security


TCP/IP TCP/IP TCP/IP TCP/IP TCP/IP Migration
Toolkit
DB2 OLAP DB2 OLAP
Spreadsheet Spreadsheet
Analyzer Miner
add-in add-in
Server Server

Flat
files

DB2 OLAP DB2 OLAP Excel/ Data Sources


Analyzer Client Miner Client Lotus 1-2-3

Figure 2-3 DB2 OLAP Server: the whole picture

2.2 Case studies and our test environment


We tested the advanced new functions presented throughout this book, using
two real life case studies, which cover a regional portion of E-banking and Online
Investment in a financial institution.

2.2.1 E-banking case study


The E-banking application will be used for the OLAP Miner case study later on in
the book, where we will explore how customers use the different E-banking
systems, and what is expected on the background of previous observations in
their customer behavior, age groups, and Facility types (PC-banking,
Net-banking or Equity trading).

28 DB2 OLAP Server V8.1: Using Advanced Functions


The purpose of the E-banking application is to provide analysis capabilities to the
business managers of the branches, so they can view the E-banking transactions
divided over Time, Customer Segments, Transaction Types, Paper Type,
Exchange code, Facility, Organizational Unit, and Age groups.

The E-banking solution offers management an analysis of each customer’s


behavior; for example:
򐂰 Do certain groups of customers (age, gender, and so on) use the E-banking
facilities?
򐂰 What are the general trends in using the E-banking facilities?
򐂰 What are the trends in using E-banking, compared with the PC-banking?
When is it convenient to withdraw the PC-banking part (which has the same,
but old-fashioned, functionality as the E-banking)?

The E-banking application uses the following 9 dimensions (see the outline in
Figure 2-4):
1. Measures
This dimension contains transactions.
2. Time
This dimension contains, for this case study, only fourth quarter 2001 and first
quarter 2002. Hierarchy is Year - Quarter - Month. There are 193 members in
the dimension.
3. Customer
The customer segment is divided into Private and Corporate customers.
Private customers are divided into 3 sub-segments: segment 1, 2, and 3.
Corporate customers are divided into 5 sub-segments: segment 4, 5, 6, 7,
and 8. All segments are divided into existing known sub-segments. The
element “Others” is a grouping covering employees, internal customers, and
non-segmented customers. The segmentation is based on a set of rules
about the customer’s engagement with the bank. This dimension consists of
32 members.
4. Transaction type
Transaction types are divided into Logon, Payment, Account request, and
Trades. Payment is divided into different kinds of payments, such as money
transfers. There are 12 members in the dimension.

Chapter 2. DB2 OLAP Server components and case studies 29


5. Paper type
This is the type of stock trade done via the E-banking application. This
dimension consists of 4 members:
– No security type
– Share
– Bond
– Mutual fund
6. Exchange code
The dimension covers where the stock trade took place. The exchange code
consists of 3 members:
– No exchange code
– Internal
– Overseas
7. Facility
This dimension covers which part of the E-banking application has been used
to do the transaction. It consists of 5 members:
– PC banking, which is a dial-up method of doing the home banking.
– Net banking, which covers home banking done via the Internet.
– Equity trading, which is the online investment application via the Internet,
as described in detail in 2.2.2, “Online Investment case study” on page 31.
– Cash management, which is a corporate customer application for doing
banking via the Internet.
8. Organizational unit
This dimension has the hierarchy Area-Region-Branch. There are 5163
members in the dimension. The dimension covers the relationship between
each customer and the corresponding branch.
9. Age groups
These groups are divided into 10 age-intervals.

30 DB2 OLAP Server V8.1: Using Advanced Functions


Figure 2-4 E-banking outline used together with OLAP Miner case study

The cube is updated each first working day of the new month, with data from the
past month. Data amounts are approximately 10 MB, which is the expected
growth rate of the application monthly.

2.2.2 Online Investment case study


The Online Investment application is an Internet based application, which is
available 24 hours a day, 7 days a week. Its main purpose is to provide the
customers with fast and reliable information about movements in stocks and
shares combined with the possibility for the customers to do stock-exchange
transactions.

This application is divided into two parts:


1. A public area, where everyone using the Internet can get common information
about what is happening on the different exchanges around the world:
a. You have the capability to see the actual quotation for stocks and shares
on different exchanges (as London, Tokyo, Nasdaq, and so on).
b. You can get news about what is going on in the market in general, or you
can see if something relevant is happening to a specific stock market
(for example, when a merge of companies has been announced).

Chapter 2. DB2 OLAP Server components and case studies 31


c. You can analyze the trend or fluctuation of the price for a certain stock
either in a spreadsheet or any graphical interface. These analyses can be
done for different periods of time and for either a specific stock or stocks
group wise.
d. You have links to other services, offered by the company.
2. A private area, where you have to be a registered user. This part of the
application extends the functionalities discussed above, as follows:
a. You have the possibility to do stock exchange transactions online in
different types of trade (for example, immediate or average quotations).
b. You can subscribe/unsubscribe on specific news in the market either via
e-mail or via SMS; for example, when there is a financial announcement
about a merge, or if a certain stock has reached your targeted price.
c. There is an educational area, where users can be trained and learn about
the application capabilities.
d. You can create your own tailor-made stock lists containing the stocks
options you are interested in.
e. You can read more detailed articles about what is going up at the moment.
f. You can read comments related to the behavior of the market.

The business requirements


The business issue here is to analyze and understand the users’ behavior when
accessing online investment applications.

The data sources actually available to satisfy these business needs are the data
warehouse data and data from the Web log, detailing the application use.

Keeping the point above in mind, the business requirements for analysis are
related to either marketing or maintaining the analysis factors. As described later
in detail, functionalities can be removed or modified in ways that affect the
analysis environment.

The business needs can be separated into three groups and organized with
specified prioritized questions to answer:

1. Customer behavior trends:


These are some business questions concerning this group:
– What do the users actually use in the application? Where does their
greatest interest lie? Is there a trend in the way they use the application
(by sex, age, job function, and so on)?

32 DB2 OLAP Server V8.1: Using Advanced Functions


– Is the use of the stock exchange part of the application impacted if there is
any change in the brokerage? Does the impact differ across the different
groups of customers (amount of trade, sex, age, geography, and so on)?
– How can you analyze deviations on different kinds of behavior and/or
segmentation?

2. Segmentation/marketing
These are some business questions concerning this group:
– How can you do a segmentation of the users related to the use of the
application? Is there a common behavior within certain groups of
customers? You can use this information to define groups of customers
toward which you can direct your marketing efforts.
– How can you analyze the groups into which customers are split (by age,
geography, sex, and so on) in order to decide whether to direct your
marketing efforts towards existing customers who are not using the
specific functionality, or towards completely new potential customers?
– Is the use of the part of the application without logon increasing or
decreasing, as compared to the part where you have to log on? This will
help you to decide which information has to be in the public area of the
application, in order to attract more users to become actual customers of
the application.

3. Application development
These are some business questions concerning this group:
– By grouping the functions in the online investment application and
analyzing them, how can you define new functionalities or extend existing
ones? This is where the interest is greatest or the benefit is largest for the
bank or the customer (for example, if the function to create your own stock
lists is very popular, then you might want to consider extending it to 6 or 8
lists).
– How can you get a tailor-made application and market the application
towards specific groups of customers with specific needs? This is a matter
of customizing the application to fit the different segmentations of
customers (different segments need a different level of service/quality).
– How can you know if certain services in the application are used or not?
Especially, you could use this information to decide on the following:
• If some functions in the application need to receive more attention.
• If parts of the application should be removed from the application.
– How can you know if there is an economical benefit in further development
on specific services or functions in the application?

Chapter 2. DB2 OLAP Server components and case studies 33


– Does the supposed business need for 24x7 availability really exist? This
will help you to optimize when it will be most timely to close the application
for migration with a minimum of affect on the customers.

The Integration Server model (see Figure 2-5) designed to cover the business
requirements contains 1 fact table and 11 dimension tables. The fact table is the
amount of transactions for each combination of members in the dimensions The
fact table data is loaded, pre accumulated into DB2 UDB weekly.

Figure 2-5 Online Investment OLAP application model

Since the Online Investment application on the Internet has a public part where
the customer does not need to login, the customer based data such as gender,
age, and so on is only known when the customer has been logged in to the
application. To cover this, in the dimension building, the dimensions related to
customer information have a member called “Unknown”.

All the groups of intervals are defined by the business users.

34 DB2 OLAP Server V8.1: Using Advanced Functions


The Online investment model uses the following 11 dimensions:
1. Time
This dimension contains the study data for this case, for 17 weeks in the
autumn of 2001. The hierarchy is Week - Day of the week.
2. Age
This dimension covers the grouping of customers into different intervals of
ages.
3. Gender
This dimension specifies if the customer is female, male, or unknown.
4. Brokerage
This dimension contains a group of intervals, by age, for the summarized pay
of brokerage from the beginning of the year to the date of load and
calculation.
5. Organization
This dimension holds the hierarchy of the organization. The structure is
Region - Area - Branch.
6. Time-interval
This dimension groups transactions into intervals of the time of day, where the
transactions took place.
7. Vintage
This dimension contains the time interval during which each customer has
been registered in the institution.
8. Trade
This dimension groups the amount of trade done, summarized from the
beginning of the year to the date of loading it into the intervals.
9. Transactions
This dimension organizes the type of transactions into different members.
Members are, for example: Transaction group - Transaction type.
10. Customer
This dimension covers whether the customers have been registered users
since the last load of data, or not. Members are “New”, “Old” and “Unknown”.

Based on the definitions of the dimension tables to suit the business needs, the
metaoutline appears as shown in Figure 2-6.

Chapter 2. DB2 OLAP Server components and case studies 35


Figure 2-6 Online Investment OLAP application metaoutline

2.2.3 Our test environment setup


For both case study and testing, we have set up an environment consisting of two
AIX servers, three Windows 2000 Servers, and three Windows 2000 clients, in
order to show how the advanced functions in DB2 OLAP Server V8.1 are working
in a heterogeneous client-server environment.
The communication of the architecture shown in Figure 2-7 is TCP/IP based —
except for the communication between the Administration Services Console and
the server called Fermium, which is TCP/IP HTTP based.

36 DB2 OLAP Server V8.1: Using Advanced Functions


W2 Client W2 Client

Enterprise
Services Console

Corinne
(W2k)

DB2 OLAP Server


Cayman (AIX) A23BK58H
(W2k)
DB2 OLAP Server
Integration Server DB2
DB2 OLAP Miner OLAP Server
Hybrid Analysis Enterprise Services

Sicily (AIX)
Fermium W2k Client
(W2k) DB2 OLAP Server
Administration Integration Server
API Services Console
Administration DB2 OLAP Miner
Services
Hybrid Analysis
(Clustering, failover
and parallel calc)

Figure 2-7 Cases and test setup for E-banking and Online Investment

The Administration Services Console connects to the Fermium server where the
Administration Services Server is running, and holds the administration link
between Cayman (AIX), Sicily (AIX) and Corinne (W2k) servers.

Cayman is a 2-way AIX server and is used to test OLAP Miner and the E-banking
application.

Sicily is a 4-way AIX server and is used to test parallel load and calculation. This
is also where OLAP Miner performances are tested on both the E-banking
application and the Online Investment application.

Chapter 2. DB2 OLAP Server components and case studies 37


38 DB2 OLAP Server V8.1: Using Advanced Functions
Part 2

Part 2 Advanced analytical


functions
In this part of the book, we describe the advanced analytical functions of DB2
OLAP Server:
򐂰 We consider how to combine multidimensional and relational data in one
seamless application, and describe how the Hybrid Analysis Manager works.
We also provide some guidelines on when and how to use it.
򐂰 We explore methods for mining a multidimensional OLAP application, using
the e-banking case study for this. We also discuss how and when to use
OLAP Miner, and more importantly, how to interpret the results.

© Copyright IBM Corp. 2002. All rights reserved. 39


40 DB2 OLAP Server V8.1: Using Advanced Functions
3

Chapter 3. Hybrid Analysis


In this chapter we describe how to use the new Hybrid Analysis feature and
explain how Hybrid Analysis works. We also provide some guidelines for when
and how to use Hybrid Analysis, and when not to use it.

Implementation of Hybrid Analysis differs considerably from implementation of


the ordinary OLAP applications, and therefore we show how to build Hybrid
Analysis applications with Integration Server. Finally, we explore the possibilities
for configuring, tracing, and tuning your Hybrid OLAP application.

We provide the following information:


򐂰 An explanation of what Hybrid OLAP is, and how to use Hybrid Analysis
򐂰 Instructions on how to build your hybrid OLAP application
򐂰 Tips for configuring, tracing, and tuning your hybrid environment
򐂰 Performance and storage considerations

© Copyright IBM Corp. 2002. All rights reserved. 41


3.1 Hybrid Analysis overview
Hybrid Analysis is a whole new feature included in DB2 OLAP Server V8.1. It
allows part of a multidimensional cube to reside in a relational data source. At the
current time, this includes DB2 using native or Merant drivers, and Oracle using
Merant drivers.

To the end user, the cube employing Hybrid Analysis still looks like a single,
seamless multidimensional application. The Hybrid Analysis part of the cube is
computed dynamically by SQL queries against the relational source database.
This means that Hybrid Analysis accesses member names and cell values in the
relational data source through dynamically generated SQL, instead of being
pre-loaded and pre-calculated in OLAP Server.

The hybrid analysis portion of the cube can be thought of as a logical (or virtual)
partition of the cube residing in a relational database. The member names and
cell values of this portion of the cube are computable at query time by querying
the source relational database using information stored in the Integration Server
metadata catalog.

The metaoutline specifies which part of the application is situated in relational


storage, and which part is situated in multidimensional storage, both when the
application is built and when the application is queried, as shown in Figure 3-1.
The Integration Server does not need to be running for Hybrid Analysis to work: it
is only involved in the creation of Hybrid Analysis cubes. After that, clients talk to
DB2 OLAP Server, which accesses the metaoutline and the RDBMS.

Figure 3-1 Accessing relational and multidimensional data in a hybrid cube

Hybrid Analysis is similar to any drill-through ability, in the sense that it provides a
way of getting more detailed data from the relational source. However, it is more
convenient, because you don't have to create and maintain several Drill-Through
Reports.

42 DB2 OLAP Server V8.1: Using Advanced Functions


If we compare Hybrid Analysis with Drill Through Report, which is the ability to
access additional data for a cell in a multidimensional cube, Hybrid Analysis is a
dynamic “live” analytical environment, while Drill Through Report is based on
static reports. This topic will be covered more in thoroughly in 3.9, “Hybrid
Analysis and Drill-Through Reports” on page 80.

In the following sections, we take you through the steps required for setting up
the Hybrid Analysis environment. We cover these topics:
򐂰 When to use Hybrid Analysis, and the architecture for setting up the Hybrid
Analysis architecture
򐂰 The challenges associated with using Hybrid Analysis
򐂰 Implementing the Hybrid Analysis application using Integration Server
򐂰 How Hybrid Analysis does the query on the relational part of the OLAP
Application, and use of the reversing capability
򐂰 Setting variables for the configuration file
򐂰 How to do tracing on the Hybrid Analysis environment

3.1.1 Terminology and definitions


Due to diversity in the terminology, when it comes to OLAP and Hybrid Analysis,
we offer a short list of definitions and terminology for this book:
򐂰 Hybrid Cube refers to the OLAP application, with both a relational and a
multidimensional part.
򐂰 OLAP cube refers to a pure multidimensional cube, without the relational
storage part (this means, without the active usage of Hybrid Analysis).
򐂰 Hybrid Analysis is the conceptual frame for using both the relational and the
multidimensional storage together in the same application.
򐂰 Hybrid Analysis part of the application refers to the relational part of the hybrid
cube.
򐂰 Hybrid Analysis cube refers to the multidimensional part of the hybrid cube.
򐂰 Hybrid Analysis levels refer to the levels defined for relational access and
storage in the hybrid cube. For example, level 1 of Hybrid Analysis can be
seen in Figure 3-1, and if the outline had a second level of Hybrid Analysis,
this would be the next level in the member hierarchy:
– OIWEB_ORG.RegionalBranch is level 1
– OIWEB_ORG.Area_ID is level 2.

Chapter 3. Hybrid Analysis 43


3.2 When to use Hybrid Analysis
When should you use Hybrid Analysis, instead of just continuing running the
multidimensional storage for your OLAP applications? What are the benefits, and
is the payoff worth it, compared to the sacrifice? In the following sections, we
hope we will be able to answer these questions, or at least give some indication
that you can use and compare within your own environment in your organization.

Briefly defined, Hybrid Analysis allows bottom levels (parts) of dimensions to


reside in the relational source. The relational part is usually very large, and is
expected to hold low-level data too big to load and calculate into the cube.
Therefore, the best candidate for Hybrid Analysis is the largest sparse
dimension.

Using Hybrid Analysis gives theoretical room for building cubes with thousands
or even millions of members. This means, for example, that if you have the need
for adding customers in your OLAP application as single members, this is now
possible through Hybrid Analysis.

If you have several cubes located on the same physical machine, a major
advantage is gained using Hybrid Analysis. With Hybrid Analysis, the need for
multidimensional storage is significantly reduced (see Table 3-2 on page 55), and
the reduction in storage space is a significant consequence. These advantages
result from the following characteristics:
򐂰 Data from the relational input source used in the OLAP application does not
need to be loaded, and therefore is not calculated.
򐂰 Calculation time dominates over load time, so reducing calculation time
significantly decreases the total application build process.
򐂰 Data stays in the relational source and is accessed through Hybrid Analysis.
򐂰 DB2 OLAP Server requires the entire outline for the multidimensional part to
be loaded into memory. When DB2 OLAP Server loads an outline into
memory, each member requires about 500 bytes of space. An outline with
one million members will require 500 MB of memory. You can use Hybrid
Analysis to make your outlines smaller and require less memory when they
are loaded.

Running more OLAP applications by using Hybrid Analysis on the same server is
now possible due to the extreme reduction in calculation time. This allows for
more frequent updates, and less storage space is now needed. Hybrid Analysis
therefore makes it possible to run more applications on the same physical server.

44 DB2 OLAP Server V8.1: Using Advanced Functions


When deploying Hybrid Analysis, it is critical to keep the outline synchronized
with the Integration Server metadata catalog and relational data source, because
the metaoutline is based on metadata derived directly from your relational data.
Therefore, it is the same metadata that is used for accessing the relational
database when Hybrid Analysis is being used.

In summary, using Hybrid Analysis offers many benefits. You can use Hybrid
Analysis and place part of the OLAP application in relational storage whenever:
򐂰 Outlines have a large number of members.
򐂰 Outlines require large amounts of detailed data.
򐂰 The portion of the hierarchy stored in relational is infrequently accessed.
򐂰 It is necessary to reduce disk storage.
򐂰 It is also necessary to significantly reduce memory usage for member load.
򐂰 Shorter batch windows are required for updating the OLAP application with a
higher frequency.

3.3 Hybrid Analysis architecture


The architecture for DB2 OLAP Server v8.1 has changed slightly compared to
earlier versions. DB2 OLAP Server uses a new internal function, referred to as
Hybrid Analysis to enable to build and maintain hybrid cubes. It controls the
access to the low level data in the Relational DataBase Management System
(RDBMS) source via ODBC.

The other relational source, shown in Figure 3-2, contains the catalog which
holds the metadata that describes the outline of the hybrid cubes. This catalog is
used by Hybrid Analysis during queries execution involving the relational
sources.

Chapter 3. Hybrid Analysis 45


ODBC

OLAP Integration ODBC


Services

TCP/IP

DB2 OLAP Server Hyperion


8.1 API

TCP/IP

ODBC RDBMS
Query &
Reporting

Hybrid Analysis

ODBC
RDBMS

Figure 3-2 Hybrid analysis architecture in an DB2 OLAP Server environment.

With Integration Server, you build the Hybrid Analysis application, using the
Model and Metaoutline functions of the Integration Server. The Hybrid Analysis
internal function reads the information in the catalog about the Model and
Metaoutline and uses this metadata to formulate the queries that are run against
the source database.

Both RDBMS for the OLAP catalog and for the data source can reside on other
platforms if this is more feasible in a day-to-day operational environment.

Important: It is not possible to build hybrid cubes using Application Manager,


but some useful functionalities can be applied from Application Manager. We
will look into this further in 3.5.4, “Hybrid Analysis in Application Manager” on
page 56.

To query the relational part of the hybrid cube, the OLAP server uses the model
and metaoutline information in the Integration Server metadata catalog to obtain:
򐂰 Information on which levels are in the Hybrid Analysis part of the application,
from the lowest level and upwards

46 DB2 OLAP Server V8.1: Using Advanced Functions


򐂰 Model and metaoutline filters for the regular multidimensional part of the
application
򐂰 Transformation rules

The OLAP server requests the Hybrid Analysis function for data, but only when it
cannot get data from the regular part of the cube.

3.4 Hybrid Analysis challenges


Hybrid Analysis saves you space and reduces the load and calculation time. So
from an operations point of view, these are compelling facts, but they may result
in some difficulties and challenges to be faced by both operations and the end
user community.

From an operations point of view, there are two main challenges:


򐂰 Connections to the Hybrid Analysis relational source do not have to stay up at
all times. If the pool of connections is turned off (HAMAXNUMCONNECTION 0), the
database connections will release themselves once they are done. This will
be slower, since the extra overhead of establishing the connection will have to
be done for every query.
򐂰 Backup of both the multidimensional and relational part of the hybrid cube
must be in place. If the relational source is the enterprise data warehouse or
datamart, backup routines are probably already in place. If the data sources
before applying Hybrid Analysis are an Operational Data Store (ODS) or
staging area for feeding the OLAP application, then backup and data retention
routines must be established:
– Backup of both the multidimensional application and the relational source
must be performed synchronously, so all data updates are backed up at
the same time. This is to ensure a consistent and synchronous restore if
needed at a later time.
– Alternatively, complete retention of all data used for the OLAP application
will make it unnecessary to back up the application, since a new complete
load and calculation would do the job of restoring the application.

From the application developer’s point of view, the challenges described in 3.5.2,
“Hybrid Analysis member transformation” on page 52 require consideration when
building hybrid cubes:

Chapter 3. Hybrid Analysis 47


򐂰 For example, the end user community may experience a longer query
response time, because a consequence of using Hybrid Analysis would be
the chance of queries running slower. This happens because the queries are
accessing and computing in a relational environment instead of the
pre-calculated multidimensional environment in the OLAP cube.
򐂰 The implication would then be, that instead of accessing data stored in a
precalculated array, the query is accessing relational tables, and joining tables
needed to respond to the queries. Said another way, there is a trade-off
between space and time: Queries that require access to relational data may
run more slowly, but storage and calculation time on the server is reduced.

The multidimensional part of the Hybrid Analysis application will be the same as
the one built without the relational part. Because of that, Integration Server
ignore filters on Hybrid Analysis levels during data load and only sums up the
values of these levels. To make the data consistent, Hybrid Analysis also ignores
filters and assumes addition consolidation on relational levels.

Recursive hierarchies are not supported for Hybrid Analysis, and no manual
changes should be made to member names using Application Manager. Level 0
data should always be in the regular portion of the cube. The level number is
undefined for Hybrid Analysis members. Also, you can’t use Hybrid Analysis in
the time dimension if there are Time Balance members such as inventory, and
you should not use SQL Override in metaoutlines with Hybrid Analysis.

Presently, the following functionality is not supported by the OLAP Server:


򐂰 Aliases on relational stored members are not supported.
򐂰 Non-additive consolidation on non-accounts members is not supported, so it
is not possible to have shared member/ alternate hierarchies.
򐂰 Attributes on relational stored members are not supported.
򐂰 A formula cannot specifically reference a relational stored member or be
attached to a relational stored member.
򐂰 Write-back cannot be performed into cells which include relational stored
members.
򐂰 Multiple data source support is not supported: only one RDBMS is supported
at a time as relational source in the hybrid cube.

In the following sections, we explain some of the limitations associated with using
Hybrid Analysis. This is important because some of the limitations may impact
the design of the OLAP Application.

48 DB2 OLAP Server V8.1: Using Advanced Functions


3.5 Implementation of Hybrid Analysis
Next we ,explain how you can use Integration Server to build a hybrid cube, using
our Online Investment case study, which is described more closely in 2.2.2,
“Online Investment case study” on page 31.

Furthermore, we test three different scenarios for comparison of member load,


data load, and calculation. This is done to show the difference in time and
storage used, when Hybrid Analysis is applied in the OLAP environment. Each of
our three scenarios involves an Online Investment application, done as one of
the following:
1. A pure multidimensional cube
2. A hybrid cube with one level of Hybrid Analysis
3. A hybrid cube with two member levels of Hybrid Analysis in the relational part

Note: When setting up ODBC driver on both OLAP Server and Integration
Server, use the same ODBC level on both. The names for the metadata
catalog and the source database must be the same on both physical servers if
different.

3.5.1 Building Hybrid Analysis using Integration Server


This section shows how to use Integration Server to build a hybrid cube. We
assume that you have been using Integration server and have already built a
model and a metaoutline with hierarchies from a relational data source as DB2
UDB.

The metaoutline is used by Integration server and DB2 OLAP Server at query
time, and is based on the structure of the specified OLAP Model. The
metaoutline is the template containing the structure and rules for creating the
physical outline of the application.

To build your hybrid cube:


򐂰 Start by opening Integration Server and go to the metaoutline of the
application from where you want to build a Hybrid Analysis application.
򐂰 Select a dimension or a suitable level in the hierarchy to where you want your
multidimensional application storage to be used, and right-click it.
򐂰 Select the option Build Multidimensional Down to Here. The icon for the
level below the level you just selected gets marked over by a red X, as shown
in Figure 3-3. This means that the OIWEB_ORG.Branch_ID level is disabled
in the application at current time. The regular multidimensional part of the
application is built down to include OIWEB_ORG.Area_ID.

Chapter 3. Hybrid Analysis 49


Figure 3-3 Building a multidimensional application to this point

򐂰 Enable level OIWEB_ORG.Branch_ID for Hybrid Analysis. This is done by


right-clicking the level, and choosing Enable Hybrid Analysis Down to Here
(see Figure 3-4).

Figure 3-4 Enabling Hybrid Analysis from this point in your application

The level you just enabled for Hybrid Analysis is now shown with an icon
illustrating half a cube, and half a relational database, as seen in Figure 3-5.

50 DB2 OLAP Server V8.1: Using Advanced Functions


Figure 3-5 Build of 1-level Hybrid Analysis in Integration Server

Figure 3-5 only shows one level being in the Hybrid Analysis relational part of
the application. Members from more than one dimension can reside in the
relational Hybrid Analysis part, while members from the account dimension
cannot be placed in the Hybrid Analysis part of the application.
򐂰 When using Hybrid Analysis, the OLAP server outline needs to be consistent
with the metaoutline from which it was built, and the relational data source
needs to be consistent with the model/metaoutline. If the regular
multidimensional part of the application does not change, you can use
Update Hybrid Analysis Data... instead of loading the members again. Go to
Outline --> Update Hybrid Analysis Data... as shown in Figure 3-6.

Figure 3-6 Selecting the Update Hybrid Analysis Data: option from the menu

򐂰 The OLAP application and database dialog box appears. You should now
select the Application Name, Database Name, and application you want to
synchronize (see Figure 3-7). You choose the Member Load Filter, which in
this case is default. For Command Scripts we have shown a recalculation of
our Brokers Commission as an example. See more on calculation scripts in
IBM DB2 OLAP Server 8.1: Database Administrator’s Guide, SC18-7001-00.

Chapter 3. Hybrid Analysis 51


Figure 3-7 Shows the application and database synchronization settings

3.5.2 Hybrid Analysis member transformation


For hybrid relational levels to work, the transformations of the metaoutline
member name for these levels must be reversible. This might sound
complicated, but Integration Server metaoutlines use a member transformation,
from which Integration Server creates the member names of the metaoutline. A
member transformation is a set of rules for changing a database value into a
member name. Each member created by Integration Server during member load
is associated with a database value from which the member was derived.

For example, if we take the metaoutline member “Regional_Branch” as shown in


Figure 3-16 from the Online Investment application, it has “REGBANK” values as
the database value; and the “Female” member in the “Gender” dimension has “F”
as the database value. This requires that a transformation be reversible, meaning
that the database value is uniquely computable from the member name.

52 DB2 OLAP Server V8.1: Using Advanced Functions


Important: Hybrid Analysis finds out member name duplicates by looking at
the member cache to see if the same member but a different ancestor already
exists. The member cache can only store a certain number of members. If the
duplicate member is not in the member cache at that time, it cannot solve
duplicates.

Table 3-1 shows what transformations are supported by hybrid cube, and which
are not.

Table 3-1 Supported and unsupported transformations

Supported transformations Unsupported transformations

򐂰 Convert spaces to underscores 򐂰 Drop spaces from around


a member name
򐂰 Change case
򐂰 Apply prefix operation
򐂰 Replace operations in the order the
operations are created – Prefix without
separator
򐂰 Apply prefix operations:
– All parents name
– Parent name prefix with separator
prefix with or without
– Dimension name prefix with separator
separator
– Custom prefix
򐂰 Apply suffix operations
򐂰 Apply suffix operations
– Parent name suffix with separator – Apply suffix without
– Grandparent name suffix with separator separator
– Dimension name suffix with separator – Apply all parents
– Custom suffix name suffix with or
without separator

Note: An “all parents” suffix or prefix is also called “all ancestors”.

Even though the user interface supports the grandparent name prefix with
separator, this functionality does not work in real life. As a workaround, the
unsupported transformations can be implemented through a view. This means
that you will need to create a view on your source database, use SQL to
implement the prefix or suffix changes, and then use this view as a data source in
Integration Server when building the model.

If the supported transformations are used, the following limitations apply to the
transformation rules:
1. Database values cannot have a separator character similar to the one being
used for prefix or suffix.

Chapter 3. Hybrid Analysis 53


2. Member names should be no more than 80 characters long (including
blanks).
3. Prefix and suffix should always have a separator associated with it.
4. Source database value cannot have trailing blanks.
5. Spaces converted to underscores during transformation is assumed as no
underscores being present by Hybrid Analysis, in the database values.
6. All ancestors as prefix or suffix are not supported.

Also, the user-defined members in a Hybrid Analysis dimension cannot be in the


Hybrid Analysis relational part but must be the multidimensional top levels.

If the metaoutline includes the relational part of the hybrid cube, the Integration
Server will warn if any transformation is not reversible, when the metaoutline is
saved or verified (see Figure 3-8). This check only applies for prefix or suffix
transformation rules.

Figure 3-8 Validation warning initiated by the reversible process

In conclusion, it is important to think through how the member names are


transformed when using Hybrid Analysis. Transformations should be carried out
before loading the datamart that will feed Integration Server. A good practice will
be to let the transformations be done in the datamart instead of Integration
Server, even for extra transformations and reverse transformations that might be
required by Hybrid Analysis.

3.5.3 Impact of Hybrid Analysis versus multidimensional


If the question still persists regarding whether you should use Hybrid Analysis or
pure multidimensional storage, the following information will help you to answer
some of these questions. We have tested for speed in member and data load,
calculation time, and used storage. The general conclusion is that the more data
you leave in relational storage, the faster you are able to load and calculate your
data in the multidimensional part of your application. It is really a trade-off
between load/calculation times (and data storage) and retrieval times of the
Hybrid Analysis portion of the data.

54 DB2 OLAP Server V8.1: Using Advanced Functions


To illustrate the differences in using Hybrid Analysis versus using pure
multidimensional storage, we tested three scenarios with data from our Online
Investment application. We used data for 13 weeks, and loaded the 160 MB IXF
files in DB2, which then takes up approximately 100 MB of space before running
the queries (see 3.6, “Tips and tricks for tuning Hybrid OLAP applications” on
page 59 for queries results on Hybrid Analysis 1 level).

We then built the model and metaoutline in Integration Server, sorting the dense
dimensions first. Then we defined the level for Hybrid Analysis, where we chose
to build first one level (as shown in Figure 3-5), and to test the member load, data
load, and finally the calculation. The same procedure was carried out for the two
levels of Hybrid Analysis and for the multidimensional application.

Before each test, we restarted DB2 to clear the buffers, to assure consistency in
the test.

Table 3-2 Test results: loading and calculating the Online Investment application
Multidimensional Hybrid Analysis Hybrid Analysis
1 level 2 levels

Member load 18 21 18
(Seconds)

Data load 00:05:55 00:07:01 00:06:06


(hh:mm:ss)

Number of rows in 211396 148192 73361


data load

Calculation time 01:46:00 00:02:52 00:00:30


(hh:mm:ss)

Number of blocks 122,742 35,526 7,988


before calculation

Number of blocks 8,604,516 196,722 39,462


after calculation

Storage used after 37.9 12.0 2.9


data load, before
calculation (MB)

Storage used after 19231.9 174.5 49.2


data load, and
calculation (MB)

Storage used for 335.9 16.4 8.2


index after
calculation (MB)

Chapter 3. Hybrid Analysis 55


All numbers on storage used are shown without the index file’s storage use (.ind);
which, for all, were default 8.2 MB before calculation. Data in DB2 UDB is used
for the hybrid cube and can therefore not be deleted, compared to the
multidimensional, where all the data is loaded, and the RDBMS only serves as
the OLAP metadata catalog.

An interesting observation is the decrease in storage after the application has


been both loaded and calculated.

3.5.4 Hybrid Analysis in Application Manager


In Application Manager you can enable or disable Hybrid Analysis on each
dimension separately. When you open the metaoutline which has been created
with Integration Server, you use the H button, for which the default is “Hybrid
Analysis enabled” or “Hybrid Analysis disabled”. This button shows up only when
users click a dimension containing Hybrid Analysis members. Changes done
with Application Manager will not have any effect in Integration Server, and when
working with Hybrid Analysis models and metaoutlines, we recommend that
Application Manager only should be used as a viewer in regards to the
application.

Application Manager only loads the outline, which doesn't contain members of
the relational Hybrid Analysis part. Therefore, it cannot show the Hybrid Analysis
relational members. However, it can tell whether a dimension has Hybrid
Analysis level(s) or not and whether a leaf level has relational children. You will
only see the regular part of the cube. The leaf levels of the multidimensional part
of the cube can tell wether relational children exists.

Dimensions which contain a relational member are marked by “Hybrid Analysis:


Enabled”, and members with a relational child are marked :RelChild Present” as
shown with Application Manager in Figure 3-9. This is comparable with the view
of the metaoutline in Integration Server, as shown in Figure 3-5.

56 DB2 OLAP Server V8.1: Using Advanced Functions


Figure 3-9 Application Manager outline with member enabled for Hybrid Analysis

Formulas supported in Application Manager cannot specifically reference


relational members.

When a report is run, it has to run against some outline (cube/database).


Application Manager looks at the outline saved on disk, not the one that is being
open. So you must save the outline before running a report for the “Relational
Partition: Enabled/Disabled” property to take effect, where the relational partition
is the relational part of the hybrid cube.

3.5.5 Hybrid Analysis and Administration Services


In Administration Services it is possible to toggle the Hybrid Analysis on or off the
same way as in Application Manager: you can enable or disable Hybrid Analysis
of each dimension separately.

The option to enable or disable the Hybrid Analysis is showed only when
selecting dimensions that contains Hybrid Analysis members. When a dimension
contains Hybrid Analysis, you can see a comment in “Hybrid Analysis” in the
outline editor. See Figure 3-10.

Chapter 3. Hybrid Analysis 57


Figure 3-10 Administration Services outline showing Hybrid Analysis

To enable or disable Hybrid Analysis for a specific dimension in an outline using


Administration Services, open the Administration Services outline editor,
right-click the member name, and select the option Edit Properties. On the
Information folder you have an option to enable or disable the Hybrid Analysis.
See Figure 3-11.

58 DB2 OLAP Server V8.1: Using Advanced Functions


Figure 3-11 Enabling or disabling Hybrid Analysis in Administration Services

When working with Hybrid Analysis, you can use Administration Services only to
enable or disable the Hybrid Analysis. Other changes done in the outline using
Administration Services will not have any effect in Integration Server. When
working with Hybrid Analysis models and metaoutlines, it is recommended that
Administration Services Manager should only be used as a viewer in regards to
the application.

3.6 Tips and tricks for tuning Hybrid OLAP applications


Besides the parameters, for example, in the essbase.cfg file, you can set the
member caching functionality specific relevant to the query performance in the
hybrid cube. There are some general related issues regarding performance to be
considered when designing the hybrid cube.

Chapter 3. Hybrid Analysis 59


Relational tuning will be very important, and includes the following issues:
򐂰 A true warehouse star schema consists of the following:
– Dimensional tables, consisting of keys and dimensional metadata
– A fact table, consisting of key and measures data
– Pre-transformed member names, ready to be loaded by Integration Server
without further transformation
򐂰 Accounts existing along the columns is an issue, because SQL is poor when
using inter-row calculation.
򐂰 Accounts existing as columns within the fact table is beneficial for
performance, but is not required.
򐂰 Indexing on all key columns, both in the fact table and dimensional tables, is
necessary.
򐂰 Foreign key relationships between fact and dimension tables should be
defined within the relational database.
򐂰 A clean data source, for example, can be accomplished by deleting erratic
rows.
򐂰 It is necessary to create appropriate automatic summary tables and
materialized views or query tables to help in denormalizing the relational
stored data. This should include all dimensions and not only the hybrid cube
dimensions, because Hybrid Analysis uses only the relational storage tables
when a query including a relational member is executed. Queries are
dependent on the structure and design of the schema.
򐂰 Hybrid Analysis cannot support recursive (parent-child) dimension builds
򐂰 Also, in this release, Hybrid Analysis cannot support null promotion within
dimensional hierarchies. This means that you should define the columns in
the star schema as Not Null.
򐂰 A time dimension table is also beneficial for performance, but is not required.

To illustrate the query efficiency of Hybrid Analysis, we have set up a small test
scenario on the online Investment cube. This is the same application as shown in
Table 3-2 with one level Hybrid Analysis. We are doing a simple query where we
are drilling down on Branches and Number of transactions.

In Table 3-3 we show the performance enhancements done to the relational


database and design, and the effect of this. The query is performed without
tracing turned on, and DB2 UDB is restarted before every query run. We have
not tested using Materialized Query Tables (MQTs) or Automatic Summary
Tables (ASTs), but this could eventually increase query performance as well.

60 DB2 OLAP Server V8.1: Using Advanced Functions


Table 3-3 Tuning examples and query performance impact

Scenario Elapsed query


time (Impact) in
mm:ss

Data is loaded in DB2. No index or changes to the default database 07:33


installation is done.

Index applied only on Org_ID in the OIWEB_FACT table, and 04:11


unique index on Org_ID in the OIWEB_ORG table

Run of DB2 Performance Wizard where the following changes 00:54


were set:
򐂰 Target memory: 80%
򐂰 Type of workload: Queries
򐂰 Administrative priorities: Faster transactions
򐂰 Populated: Yes
򐂰 Connected local applications: 4
򐂰 Connected remote applications: 10
򐂰 Uncommitted read
Important: Notice that the Performance Wizard suggests a
relatively high setting on the Buffer Pool to reduce I/O, but this
requires usage of a large amount of memory.

Index added on the OIWEB_TIME table. 0:08

Unique indexes added on all keys in the rest of the dimension 0:08
tables. Still only index on ORG_ID in the fact table.

Index on all keys in the dimensions and on all keys in the fact table. 0:02 - 0:06

For the test shown in Table 3-3, it is important to note that during testing we did
experience some network difficulties which can have a negative effect on the
measured query response times.

The following parameters are important in regard to Hybrid Analysis, and are set
in the essbase.cfg file located in the ARBORPATH/bin directory:
򐂰 Enable or disable retrieval of members (HAENABLE). This is the most important
setting, since it enables or disables Hybrid Analysis on the server.
HAENABLE is explained in 3.7, “Queries in the Hybrid Analysis environment”
on page 68.
򐂰 Size the amount of memory for member caching (HAMEMORYCACHESIZE). This
reduces the amount of member lookup SQL, while data lookup still takes the
same duration.
򐂰 Determine the number of maximum connections per OLAP database
(HAMAXNUMCONNECTION).

Chapter 3. Hybrid Analysis 61


򐂰 Set the maximum numbers of SQL queries (HAMAXSQLQUERY).
򐂰 Set the maximum number of rows returned from your SQL query
(HAMAXQUERYROWS).
򐂰 Set the maximum query time before terminated (HAMAXQUERYTIME).
򐂰 Determine the number of rows, resulting from an SQL query, to process at
one time (HARETRIEVENUMROW).

These parameters can be set in the essbase.cfg file on the server, but changes
will not be effective before you have restarted the OLAP Server. For tips and
tricks regarding how to build your OLAP cube, define dimensions, members, and
set up calculation, define dense and sparse data, see the DB2 OLAP Server:
Theory and practices, SG24-6138-00.

3.6.1 Defining HAMEMORYCACHESIZE


HAMEMORYCACHESIZE determines the amount of memory that is reserved to cache
queried members that are within the Hybrid Analysis Relational Source.
HAMEMORYCACHESIZE is therefore a memory buffer that holds relational data during
the execution of spreadsheet or report scripts that drill into Hybrid Analysis
Relational Sources. When you specify the cache size, you control the memory
used to cache relational members during execution. A larger cache size
optimizes the usage of relational members during execution and increases the
speed of metadata retrieval from the metaoutline. Thus, more memory allocated
to the cache means fewer SQL queries to resolve member names, resulting in
improved performance.

Hybrid Analysis finds out member name duplicates by looking at the member
cache to see if the same member but different ancestor already exists. The
member cache can only store a certain number of members. If the duplicate
member is not in the member cache at that time, Hybrid Analysis will then not be
able to spot the duplicate member. Therefore, member name transformations
should always be reversible (see 3.5.2, “Hybrid Analysis member transformation”
on page 52.

Syntax: HAMEMORYCACHESIZE [appname [dbname]] n


򐂰 appname (optional parameter): if you supply an application name, the setting
applies to all databases within the named application. If you do not supply an
application name, the setting applies to all applications and databases on the
server.
򐂰 dbname (optional parameter): if you supply a database name and an
application name, the setting applies only to the named database. If you do
not also provide an application name, the database is ignored and the setting
applies to all applications and databases on the server.

62 DB2 OLAP Server V8.1: Using Advanced Functions


򐂰 n: an integer expressed in bytes (B), kilobytes (K), megabytes (M), or
gigabytes (G). Minimum value: 1048576 B (1 M) (see Example 3-1). Any
value less than this minimum value causes HAMEMORYCACHESIZE to
default to 1 M. Default value: 1 megabytes (1 M, which is 1048576 bytes). If a
value is given without a B, K, M, or G qualifier, it is assumed the value is in
bytes. The qualifier can be in upper or lowercase and can be entered adjacent
to the value (10M) or separated by a space (10 M).

Example 3-1 HAMEMORYCACHESIZE set at 1 MB


HAMEMORYCACHESIZE 1M

In order to have configuration parameters applied to the application level, the


global value must be defined first, and the application level value must be defined
secondly as shown here:
򐂰 In Example 3-2, all databases in the application “Test” have a cache value of
1500K, and all other applications have a cache value of 2M. The parameters
are as mentioned earlier set in the essbase.cfg file on the OLAP server.

Example 3-2 HAMEMORYCACHESIZE for specific application and all others


HAMEMORYCACHESIZE 2M
HAMEMORYCACHESIZE Test 1500K

򐂰 In Example 3-3, all applications and databases have a cache value of 2M


because the application cache value is overridden.

Example 3-3 HAMEMORYCACHESIZE last setting overrides first setting


HAMEMORYCACHESIZE Test 1500K
HAMEMORYCACHESIZE 2M

򐂰 If your query exceeds the HAMEMORYCACHESIZE you will get the following error
message as shown in Figure 3-12. The desired response to this consists of
increasing the HAMEMORYCACHESIZE.

Figure 3-12 HAMEMORYCACHESIZE overrun

Chapter 3. Hybrid Analysis 63


Remember that the memory cache size determines the quality of your check for
member uniqueness, as described in 3.5.2, “Hybrid Analysis member
transformation” on page 52. We recommend that you enable a memory cache
size large enough to handle all of your members at once. For this, use the
following simple formula:
Number of members in the outline * bytes for each member = bytes of
memory needed to load the members into memory cache.

3.6.2 Defining HAMAXNUMCONNECTION


HAMAXNUMCONNECTION determines the maximum number of connections per OLAP
database that an OLAP server can keep active against the relational database.
This optimizes the overhead involved in opening a relational database
connection for every Hybrid Analysis report.

Syntax: HAMAXNUMCONNECTION n

n: the value of n specifies the number of connections per OLAP database that an
OLAP Server can keep connected to a relational database. The default is 25, and
the maximum is n=100 (see Example 3-4).

Example 3-4 HAMAXNUMCONNECTION


HAMAXNUMCONNECTION 10

Note: You may need to set the value for the HAMAXNUMCONNECTION higher if, in
Integration Services Console, you set the security mode to use the OLAP
Server user ID to connect to the source database. Refer to Integration
Services online help for more information on the security mode setting.

Remember that there are two security modes in accessing the relational data
source:
1. Using the OLAP Server user ID and password
2. Using the user ID and password stored in a Hybrid Analysis outline.

If you choose to use security mode (1), different clients having different DB2
OLAP Server user ID and password will cause multiple connections opened, but
if you choose security mode (2), all clients may share only one connection. See
3.11, “Security configuration for Hybrid Analysis” on page 85.

64 DB2 OLAP Server V8.1: Using Advanced Functions


3.6.3 Defining HAMAXNUMSQLQUERY
HAMAXNUMSQLQUERY sets the maximum number of SQL queries that can be
executed during a DB2 OLAP Server query session from Report Writer or from
the Spreadsheet Add-in extractor. If a query cannot be split into pieces in such a
way as not to violate the limits set by this command, the query execution fails.
The user has to submit a smaller version of the query, or the administrator must
raise the value of this setting. HAMAXNUMSQLQUERY does not refer to the number of
users performing queries; rather, it refers to the number of SQL queries in a
complex statement.

Syntax: HAMAXNUMSQLQUERY n

n: The value of n is the number of simultaneous SQL queries per OLAP Server
query session. The default is 50, the minimum is n=10, and the maximum is
n=255.

In Example 3-5, the maximum number of SQL queries per OLAP Server query
session is set to 10 (see Example 3-5).

Example 3-5 Number of SQL queries per OLAP Server query session is set to 10
HAMAXNUMSQLQUERY 10

3.6.4 Defining HAMAXQUERYROWS


HAMAXQUERYROWS determines the maximum number of rows retrieved per SQL
query issued on behalf of an OLAP Server base query. HAMAXQUERYROWS is a
specific limit to an OLAP Server query and is set in the essbase.cfg file. The
setting provides a way of controlling queries that retrieve too much data.

Syntax: HAMAXQUERYROWS n

n: The value of n determines the maximum number of rows retrieved per SQL
query (see Example 3-6). The default is zero, meaning that no row limit is
applied.

Example 3-6 OLAP Server processes up to 100,000 rows per SQL query
HAMAXQUERYROWS 100000

Chapter 3. Hybrid Analysis 65


An important distinction exists between the purposes of HAMAXQUERYROWS and
HARETRIEVENUMROW. Whereas HAMAXQUERYROWS controls the number of total rows to
return, HARETRIEVENUMROW affects memory consumption by controlling how many
rows to process at one time. HAMAXQUERYROWS and HARETRIEVENUMROW should not
be confused with QRYGOVEXECBLK, which sets the maximum number of blocks that
a query can access before the query is terminated.

If HAMAXQUERYROWS is exceeded, the message shown in Figure 3-13 appears.


Change the HAMAXQUERYROWS or your query and try again.

Figure 3-13 HA max query row limit exceeded

HAMAXQUERYROWS is practical in relation to user management. It controls how many


rows users can get returned from an executed query.

3.6.5 Defining HAMAXQUERYTIME


HAMAXQUERYTIME determines the maximum time limit per query and thereby
determines how much time an SQL query operation can take before it is
forcefully terminated. This means that HAMAXQUERYTIME controls execution time,
including query, fetch and processing time, per SQL query issued to satisfy an
OLAP query. HAMAXQUERYTIME (see Example 3-7)is a specific limit to an OLAP
Server query that spans the Hybrid Analysis Relational Source and is set in the
essbase.cfg file. The value set is dependent on how long an SQL query issued
on behalf of an OLAP query can take to complete.

Syntax: HAMAXQUERYTIME n

n: The value of n determines the time limit per query in seconds. The default is
zero, meaning that no time limit is applied.

An important distinction exists between the purposes of HAMAXQUERYTIME and


QRYGOVEXECTIME. Note that QRYGOVEXECTIME affects the entire query, such as from
the time a user double-clicks a cell to retrieve data in Spreadsheet Add-in to the
time the results are displayed. HAMAXQUERYTIME, on the other hand, affects only a
portion of the OLAP Server query, such as the individual SQL queries from the
Hybrid Analysis Relational Source. When a query spans Hybrid Analysis data,
QRYGOVEXECTIME is disabled for the rest of the overall query, and the query timer
controlled by HAMAXQUERYTIME takes effect.

66 DB2 OLAP Server V8.1: Using Advanced Functions


Example 3-7 HAMAXQUERYTIME set at 300
HAMAXQUERYTIME 300

If HAMAXQUERYTIME is exceeded, the following message appears as shown in


Figure 3-14. Retry the query.

Figure 3-14 HAMAXQUERYTIME exceeded message

This is a recommended setting to cope with frustrated end-users waiting for their
query to return a result.

3.6.6 Defining HARETRIEVENUMROW


HARETRIEVENUMROW determines the number of rows, resulting from an SQL query,
to process at one time. A low value may degrade performance and increase
query time, but reduce memory usage; while a higher setting will raise the
incremental fetch size and thereby improve query time on the expense of
memory usage.

Syntax: HARETRIEVENUMROW n

n: The value of n specifies how many rows to process at a time. The default is
100, and the maximum is n=200.

In Example 3-8, an OLAP server query processes rows from each SQL query in
sets of 50 rows.

Example 3-8 HARETRIEVENUMROW set at 50


HARETRIEVENUMROW 50

An important distinction exists between the purposes of HARETRIEVENUMROW and


HAMAXQUERYROWS. Where as HARETRIEVENUMROW affects memory consumption by
controlling how many rows to process at one time, HAMAXQUERYROWS controls the
number of total rows to return. HARETRIEVENUMROW and HAMAXQUERYROWS should not
be confused with QRYGOVEXECBLK, which sets the maximum number of blocks that
a query can access before the query is terminated.

Chapter 3. Hybrid Analysis 67


3.6.7 Conclusions: Hybrid Analysis configuration settings
The six configuration variables that we just covered can be set in the essbase.cfg
file are aimed at controlling the usage of the OLAP application, specifically the
Hybrid Analysis part of the application. They are set to control the number of
rows retrieved by SQL and the memory usage when doing so.

The effect of these settings is also aimed at controlling the behavior of the
end-user community indirectly.

These variables should be set up to optimize the response time from the Hybrid
relational part of the application.

3.7 Queries in the Hybrid Analysis environment


There are no clear rules of thumb as to when you will be getting better response
times when querying the Hybrid OLAP application. If you build a large cube
within the limits allowed by OLAP Server, but most of the time the users are only
querying the multidimensional part of the database, it might become an
advantage to use Hybrid Analysis on parts of the application that are seldom
queried. This way, the users will not be impacted by the relational part, and may
possibly achieve better average query and response time.

Query performance in the Hybrid Analysis environment varies greatly, influenced


by several factors:
򐂰 Amount and complexity of transformations and member names
򐂰 Number of members retrieved by large relational queries
򐂰 Number of rows involved in the query result set

You should consider making members in your Hybrid Analysis application


relational if:
򐂰 If the application you are building has thousands of members or more
򐂰 If the application holds a large amount of detailed data, for example
transactions on a detail level
򐂰 If this large amount of detailed data is seldom queried
򐂰 If you have limited calculation time and storage space

Important: Bear in mind, that with Hybrid Analysis, we are deferring work to
query time that could have been done at load/calculation time, because we
are querying a relational non-precalculated application.

68 DB2 OLAP Server V8.1: Using Advanced Functions


These considerations should not be applied blindly, but should be considered
carefully together with operations, application developers, and end-users, to
review the impact of Hybrid Analysis.

Before using Hybrid Analysis, you have to enable the functionality in the
essbase.cfg file. HAENABLE turns on or off the ability to retrieve members of a
Hybrid Analysis Relational Source.

Syntax: HAENABLE TRUE|FALSE

TRUE: OLAP Server retrieves all members of a Hybrid Analysis Relational


Source through APIs, reports, or Spreadsheet Add-in. If HAENABLE is on (see
Example 3-9), requests can transparently span across the Hybrid Analysis
Relational Source.

FALSE: OLAP Server turns off retrieval of members of a Hybrid Analysis


Relational Source for all clients. The default setting is FALSE.

Example 3-9 Enabling Hybrid Analysis in essbase.cfg


HAENABLE TRUE

The operations will span the relational portion when all of the following
conditions are met:
򐂰 Setting HAENABLE in “essbase.cfg” file as TRUE (default is FALSE)
򐂰 Relational portion of the outline dimension is enabled using Application
Manager
򐂰 HYBRIDANALYSISON in the report (default.)

The operations will NOT span the relational portion when any of these conditions
are met:
򐂰 HAENABLE in the essbase.cfg file has been set to FALSE (default).
򐂰 The relational portion of the outline dimension is disabled using Application
Manager.
򐂰 There is a HYBRIDANALYSISOFF somewhere above it in the report.

Here is the priority among the settings for Hybrid Analysis (highest to lowest):
1. Setting of “essbase.cfg” (HAENABLE=TRUE)
2. Setting in outline (see Figure 3-16)
3. Setting in reports (HYBRIDANALYSISON / HYBRIDANALYSISOFF)

Chapter 3. Hybrid Analysis 69


With Hybrid Analysis, it is also possible to enable Hybrid Analysis functionality on
a per-query basis as shown in Figure 3-15. Enabling it allows this particular
query to access relational data — in this case, from a spreadsheet. For
spreadsheets, this is enabled by choosing Essbase --> Options --> Zoom.

Figure 3-15 Enabling and disabling of Hybrid Analysis on a per-query basis

When you send a request to query the relational data source, the Hybrid Analysis
function does two things:
1. First, it resolves member names, which includes the reversing that makes it
possible to get the database values; and second, it runs the query against the
dimensional tables.
2. Gets the data from the cell, which means first running SQL queries against
the fact table. This is often done with joins to multiple dimension tables.
Getting data gives you the opportunity to combine queries together into one
query and thereby increase performance. Alternatively, large queries can be
broken into smaller parts, or sub-queries, and be run in sequence.

70 DB2 OLAP Server V8.1: Using Advanced Functions


As an example, for querying the hybrid cube, we use the Online Investment
application. If Organization has the hierarchy shown in Figure 3-16, and you want
to retrieve the Branch_ID of a specific branch from your Hybrid Online Investment
application, the following steps are performed. First, Branch_ID is reversed to get
the branch ID. Next, the branch is checked for residing in the Organization
dimension. See Example 3-10.

Example 3-10 Location of branches in the e-banking application


Organization
OIWEB_ORG.Regional_Branch
OIWEB_ORG.Area_ID
OIWEB_ORG.Branch_ID

The same example is shown in Figure 3-16 with Integration Server. It also shows
the way you control how many levels in your application are multidimensional,
and how many will become relational. An important notion is that all Hybrid
Analysis levels must be at the bottom of the member hierarchy as shown here.
For example, you cannot have Area_ID in the relational database and the child
Branch_ID in the multidimensional part of the application.

Figure 3-16 Shows the level at which HA is enabled

It is possible to have more than one level in the relational part of the application,
but for performance reasons, you typically only enable the lowest level for Hybrid
Analysis.

Member name lookup SQL statements are generated for each hybrid analysis
dimension until the member is found. Example 3-11 shows the SQL generated by
Hybrid Analysis retrieving transactions for specific branches in region East.

Chapter 3. Hybrid Analysis 71


Example 3-11 Hybrid Analysis generated SQL
$ PG ESSHA.LOG

SELECT DISTINCT A.REGBANK, A.AREA_ID, A.DEPT_ID


FROM DB2INST1.OIWEB_ORG A
WHERE (A.AREA_ID = 'AREA01' AND A.REGBANK = 'REGIONAL BANKS - EAST')

SELECT DISTINCT A.REGBANK, A.AREA_ID, A.DEPT_ID


FROM DB2INST1.OIWEB_ORG A
WHERE (A.AREA_ID = 'AREA02' AND A.REGBANK = 'REGIONAL BANKS - EAST')

SELECT DISTINCT A.REGBANK, A.AREA_ID, A.DEPT_ID


FROM DB2INST1.OIWEB_ORG A
WHERE (A.AREA_ID = 'AREA03' AND A.REGBANK = 'REGIONAL BANKS - EAST')

SELECT DISTINCT A.REGBANK, A.AREA_ID, A.DEPT_ID


FROM DB2INST1.OIWEB_ORG A
WHERE (A.AREA_ID = 'AREA04' AND A.REGBANK = 'REGIONAL BANKS - EAST')

SELECT DISTINCT A.REGBANK, A.AREA_ID, A.DEPT_ID


FROM DB2INST1.OIWEB_ORG A
WHERE (A.AREA_ID = 'AREA05' AND A.REGBANK = 'REGIONAL BANKS - EAST')

SELECT DISTINCT A.REGBANK, A.AREA_ID, A.DEPT_ID


FROM DB2INST1.OIWEB_ORG A
WHERE (A.AREA_ID = 'AREA06' AND A.REGBANK = 'REGIONAL BANKS - EAST')

SELECT DISTINCT A.REGBANK, A.AREA_ID, A.DEPT_ID


FROM DB2INST1.OIWEB_ORG A
WHERE (A.AREA_ID = 'AREA07' AND A.REGBANK = 'REGIONAL BANKS - EAST')

SELECT DISTINCT A.REGBANK, A.AREA_ID, A.DEPT_ID


FROM DB2INST1.OIWEB_ORG A
WHERE (A.AREA_ID = 'AREA08' AND A.REGBANK = 'REGIONAL BANKS - EAST')

SELECT DISTINCT A.REGBANK, A.AREA_ID, A.DEPT_ID, SUM(B.AMOUNT)


FROM DB2INST1.OIWEB_ORG A, DB2INST1.OIWEB_FACT B, DB2INST1.OIWEB_TIME C
WHERE B.REGNR = A.DEPT_ID
AND B.DATE = C.DATE
AND (((A.AREA_ID = 'AREA01' AND A.REGBANK = 'REGIONAL BANKS - EAST')))
GROUP BY A.REGBANK
, ROLLUP( A.AREA_ID , A.DEPT_ID )
ORDER BY 1 ASC, 2 ASC, 3 ASC

SELECT DISTINCT A.REGBANK, A.AREA_ID, A.DEPT_ID, SUM(B.AMOUNT)


FROM DB2INST1.OIWEB_ORG A, DB2INST1.OIWEB_FACT B, DB2INST1.OIWEB_TIME C
WHERE B.REGNR = A.DEPT_ID
AND B.DATE = C.DATE
AND (((A.AREA_ID = 'AREA02' AND A.REGBANK = 'REGIONAL BANKS - EAST')))
GROUP BY A.REGBANK
, ROLLUP( A.AREA_ID , A.DEPT_ID )
ORDER BY 1 ASC, 2 ASC, 3 ASC

SELECT DISTINCT A.REGBANK, A.AREA_ID, A.DEPT_ID, SUM(B.AMOUNT)


FROM DB2INST1.OIWEB_ORG A, DB2INST1.OIWEB_FACT B, DB2INST1.OIWEB_TIME C
WHERE B.REGNR = A.DEPT_ID
AND B.DATE = C.DATE
AND (((A.AREA_ID = 'AREA03' AND A.REGBANK = 'REGIONAL BANKS - EAST')))
GROUP BY A.REGBANK
, ROLLUP( A.AREA_ID , A.DEPT_ID )
ORDER BY 1 ASC, 2 ASC, 3 ASC

SELECT DISTINCT A.REGBANK, A.AREA_ID, A.DEPT_ID, SUM(B.AMOUNT)


FROM DB2INST1.OIWEB_ORG A, DB2INST1.OIWEB_FACT B, DB2INST1.OIWEB_TIME C
WHERE B.REGNR = A.DEPT_ID
AND B.DATE = C.DATE
AND (((A.AREA_ID = 'AREA04' AND A.REGBANK = 'REGIONAL BANKS - EAST')))
GROUP BY A.REGBANK
, ROLLUP( A.AREA_ID , A.DEPT_ID )
ORDER BY 1 ASC, 2 ASC, 3 ASC

SELECT DISTINCT A.REGBANK, A.AREA_ID, A.DEPT_ID, SUM(B.AMOUNT)


FROM DB2INST1.OIWEB_ORG A, DB2INST1.OIWEB_FACT B, DB2INST1.OIWEB_TIME C
WHERE B.REGNR = A.DEPT_ID
AND B.DATE = C.DATE

72 DB2 OLAP Server V8.1: Using Advanced Functions


AND (((A.AREA_ID = 'AREA05' AND A.REGBANK = 'REGIONAL BANKS - EAST')))
GROUP BY A.REGBANK
, ROLLUP( A.AREA_ID , A.DEPT_ID )
ORDER BY 1 ASC, 2 ASC, 3 ASC

SELECT DISTINCT A.REGBANK, A.AREA_ID, A.DEPT_ID, SUM(B.AMOUNT)


FROM DB2INST1.OIWEB_ORG A, DB2INST1.OIWEB_FACT B, DB2INST1.OIWEB_TIME C
WHERE B.REGNR = A.DEPT_ID
AND B.DATE = C.DATE
AND (((A.AREA_ID = 'AREA06' AND A.REGBANK = 'REGIONAL BANKS - EAST')))
GROUP BY A.REGBANK
, ROLLUP( A.AREA_ID , A.DEPT_ID )
ORDER BY 1 ASC, 2 ASC, 3 ASC

SELECT DISTINCT A.REGBANK, A.AREA_ID, A.DEPT_ID, SUM(B.AMOUNT)


FROM DB2INST1.OIWEB_ORG A, DB2INST1.OIWEB_FACT B, DB2INST1.OIWEB_TIME C
WHERE B.REGNR = A.DEPT_ID
AND B.DATE = C.DATE
AND (((A.AREA_ID = 'AREA07' AND A.REGBANK = 'REGIONAL BANKS - EAST')))
GROUP BY A.REGBANK
, ROLLUP( A.AREA_ID , A.DEPT_ID )
ORDER BY 1 ASC, 2 ASC, 3 ASC

SELECT DISTINCT A.REGBANK, A.AREA_ID, A.DEPT_ID, SUM(B.AMOUNT)


FROM DB2INST1.OIWEB_ORG A, DB2INST1.OIWEB_FACT B, DB2INST1.OIWEB_TIME C
WHERE B.REGNR = A.DEPT_ID
AND B.DATE = C.DATE
AND (((A.AREA_ID = 'AREA08' AND A.REGBANK = 'REGIONAL BANKS - EAST')))
GROUP BY A.REGBANK
, ROLLUP( A.AREA_ID , A.DEPT_ID )
ORDER BY 1 ASC, 2 ASC, 3 ASC

A simple query to Hybrid Analysis may result in more than one SQL query
against the data source, as shown in Example 3-11. This can be slower than the
multidimensional application, so if we can find space in the memory cache, this is
a way to improve the query response time. A way to deal with this is to use
member caching with HAMEMORYCACHESIZE.

3.7.1 Member caching for better query performance


For better query performance, DB2 OLAP Server has a built-in member cache to
help speed up member lookup. In general, the memory cache does the lookup in
the member cache where members have been cached for this same purpose. If
nothing is found, it moves on to check the relational data source. But be aware
that member caching cannot always detect member name duplicates. For more
on member caching, see 3.6.1, “Defining HAMEMORYCACHESIZE” on page 62.

3.8 Query performance


When you design a model that uses Hybrid Analysis, you need to take into
account both the benefits you get from a smaller cube and the potential impact
on query performance.

Leaving a level or two of the model in the relational source system instead of
loading them into the cube can dramatically reduce cube size. Smaller cubes
load and calculate faster and consume less disk space and processing power. If

Chapter 3. Hybrid Analysis 73


a grid, report, or query includes members from the relational part of the cube, it
will be resolved by the relational database using SQL generated by the OLAP
Server. In some cases, where the relational database must carry out significant
aggregation, query performance may be slower than the sub-second times DB2
OLAP Server offers.

If you are using DB2 UDB as the relational source, you can improve performance
by building DB2 UDB indexes and aggregates that the optimizer can use to
speed up query processing. Although the results can be significant, delivering
sub-second response times for many relational queries, you are now managing,
tuning and using resources for both DB2 UDB and DB2 OLAP Server
aggregates.

Hybrid Analysis was designed to meet the requirement for one more additional
level of detail so that users do not have to leave their OLAP client tool and use
another tool to get to the core of the problem or opportunity. At this point in the
analytical process the regular slice, dice, and drill OLAP analysis is done, the
final step is the drill that takes you from a set of dimensions at low levels down
one more level of detail to find the actual customers, products or time periods
involved. This means we expect SQL queries to be generated relatively
infrequently, we expect them to be low level across many or all dimensions and
we expect a relatively small result set.

An ideal example of the use of Hybrid Analysis is exception processing. Good


OLAP designers have always tried to identify and eliminate from their cube
design the most detailed level of data that will only be used to resolve occasional
exceptions. All the details are known for these queries: one shipment of one
product to one customer on a known date. In the past we argued that these
cases didn’t belong in the cube because they aren’t OLAP queries. It was
expensive and inefficient to build cubes to answer these queries. With Hybrid
Analysis, we have a solution that uses the strength of the relational database to
meets the user requirement without compromising the OLAP design.

Hybrid Analysis was not designed to offer consistently high speed interactive
ad-hoc slice dice and drill across both cube and relational data. Those areas of
the data where your users will explore summaries in true OLAP fashion belong in
the cube. Those areas of the data where the queries are infrequent, low level and
well qualified belong in the relational source for Hybrid Analysis.

In this rest of this section we document the results of some research we carried
out to determine the overall impact of Hybrid Analysis on the OLAP server and to
illustrate the effect of some good and bad design choices. We carried out these
tests using the same OLAP model discussed earlier in this chapter. For
comparison we built the complete cube as it is currently used in production and
we built a variant where we left one level of one dimension in DB2 UDB and
made it available through Hybrid Analysis.

74 DB2 OLAP Server V8.1: Using Advanced Functions


To investigate the overall impact of Hybrid Analysis on a server we used the
Scapa StressTest, a stress testing tool from Scapa technologies. You can learn
more about Scapa and Stress Test at:
http://www.scapatech.com

Scapa StressTest works by simulating multiple DB2 OLAP Server users in a way
that is, as far as the system is concerned, completely indistinguishable from real
users. By measuring the performance seen by virtual users, it is possible to
understand how the system would behave under a corresponding level of real
usage. Scapa StressTest works by first recording user interactions into test
scripts. The capture component interprets the “rules” that govern the application
interface so that the recorded user interactions can be represented as a
replayable script.

The core technology includes methods of analyzing the OLAP interactions that
were recorded to identify the relationships between objects. The outline is then
searched for similar relationships to find sets of objects with the same
relationships. This adds plausible variables to the initial user interactions that
were recorded. Generalization, the automatic generation of plausible variants of
actual user behavior, enables rapid, accurate simulation of the behavior of large
numbers of users doing different tasks on an OLAP application. The
generalization process allows entire applications to be thoroughly analyzed and
tested.

Our test scenario involved capturing a set of user interactions that began with a
spreadsheet template. Having logged in to DB2 OLAP Server, we retrieved data
into this grid and then drilled down from the top of the hybrid enabled dimension
into the relational data. Along the way we refined the analysis by using keep only
operations. Our drill path was from the cube into the relational data along one
dimension. All other dimensions were at level 0. This base scenario simulates
the type of focused drill down into the relational data that Hybrid Analysis was
designed to support.

We fed this basic scenario into the Scapa generalization engine and accepted
the default of 128 variants. Scapa analyzed the analysis pattern, matched it
against the outline and generated a generalized script of variants on our basic
scenario. We were able to use the same generalized script against both the cube
and the hybrid versions of the OLAP model.

Chapter 3. Hybrid Analysis 75


Using the generalized script with the Test Bench component of Scapa we drove a
number of workloads against the server. Test Bench simulated a number of
concurrent users drilling down to level 0 in various member combinations. Using
this test scenario we investigated both the time taken to complete the analytical
tasks and the point at which server performance started to degrade. Scapa
provides both a real time graphical display and summary statistics when the test
run is complete. These are shown in Figure 3-17.

Figure 3-17 Scapa workload running against the DB2 OLAP Server cube

Figure 3-17 shows 40 active tasks simulating 40 concurrent users running


variants of the analysis scenario against a server. At the time this screen capture
was taken, all 40 users are active, the workload has stabilized and we’re about to
start profiling and gathering statistics.

76 DB2 OLAP Server V8.1: Using Advanced Functions


Table 3-4 shows the statistics at the end of the run.

Table 3-4 End of the run statistics


molap2

Driver Task time Task rate Active tasks

Deviation (%)

Deviation (%)

Deviation (%)
Failures(%)
Think time

Average

Average

Average
Sample

Control
Mode

1 Active 40 19.709 19.76 0.072 0 2.018 605.669 39.998 0.163


tasks

Figure 3-18 shows a screen capture for the same test suite run against the hybrid
model.

Figure 3-18 Scapa workload running against the hybrid cube

Chapter 3. Hybrid Analysis 77


Table 3-5 shows the Scapa statistics for the hybrid tests.

Table 3-5 End of the run statistics


holap2

Driver Task time Task rate Active tasks

Deviation (%)

Deviation (%)

Deviation (%)
Failures(%)
Think time

Average

Average

Average
Sample

Control
Mode

1 Active 40 19.709 20.198 2.192 0 1.945 459.194 39.999 0.102


tasks

From these results we can see that when applied correctly Hybrid Analysis
performs very well. The change from cube to hybrid resulted in an increase in
average task time from 19.76 seconds to 20.198 seconds and a corresponding
increase in deviation from 0.072% to 2.192%. Similarly, the task rate decreased
from an average of 2.018 to 1.945. These increases are expected and are more
than manageable.

With the workloads established, we then increased the number of concurrent


users until the server started to show signs of stress. We found that the server
was able to support 10% more users when analysis ran against the cube alone.
Once again, this is an acceptable and manageable result considering the extra
work that Hybrid Analysis involves.

The results documented so far indicate that well designed use of Hybrid Analysis
can increase the scope of analysis with manageable impact on performance and
system load. The next series of tests were designed to illustrate some of the
dangers of bad design. For these tests we simply timed some spreadsheet
retrievals against the hybrid model when conducting slice dice and drill
operations at summary levels. These tests indicate possible results if hybrid
dimensions are included in general analysis. Key design points to consider
include these:
1. If a query includes a relational member, that entire query has to be resolved
through SQL run against the database. Imagine that you open up the default
spreadsheet view of a cube with all dimensions at the highest summary level
and then drill down on one dimension until you hit the relational members.
The last drill operation will be resolved by running a very large aggregation
using SQL.

78 DB2 OLAP Server V8.1: Using Advanced Functions


2. Since we expect Hybrid Analysis to be focused the number of relational
children a cube member has is also expected to be small. If the drill down
from the cube to relational data involves a large number of children, SQL will
be generated to aggregate the data for each child. This potential problem is
made worse if the data has to be highly summarized for a large number of
children.

Table 3-6 details response time for queries that illustrate these design points.

Table 3-6 Response times


Grid description OLAP operation Response
time

1 All dimensions at top level Drill down on hybrid dimension 395 seconds
into relational data for 30 level 0
members

2 All dimensions at top level Drill down on hybrid dimension 30 seconds


into relational data for 1 level 0
member with 37 children

3 All cube dimensions at top Drill down on one cube dimension 51 seconds
level to 10 level 2 children
1 relational member from
hybrid dimension

4 4 dimensions at top level Retrieve grid for 1 relational 19 seconds


4 dimensions at level 0 member from hybrid dimension

5 4 dimensions at top level Drill down on cube dimension to 7 49 seconds


4 dimensions at level 0 level 2 children
1 relational member from
hybrid dimension

These tests have shown that Hybrid Analysis can perform very well when
designed with care. The scope of OLAP analysis can be extended to include
additional level of detail with acceptable response times and little impact on the
server. We have also shown that badly designed applications of Hybrid Analysis
can result in large numbers of complex SQL queries that aggregate large
volumes of data to summary levels.

Used with care, Hybrid Analysis can offer users an easy way to complete
analytical tasks at a detail level, a requirement many users have asked for. OLAP
designers have struggled to balance the requirement for more detail against the
time and resources the resulting cubes consume. Hybrid Analysis offers
designers a way to allow users to seamlessly navigate to more detailed
information without causing massive cube explosion.

Chapter 3. Hybrid Analysis 79


3.9 Hybrid Analysis and Drill-Through Reports
Hybrid Analysis does not replace Integration Server Drill-Through Reports.

A Hybrid Analysis cube can still have Drill-Through Reports for its
multidimensional part of the application. Drill-Through Reports generate static
reports based on single dynamic SQL statement and it is a flexible tool when you
need reports for different intersections in the cube or you want to see other table
columns. The Hybrid Analysis is a live analytical environment, where multiple
dynamic SQL queries can be generated automatically (see Table 3-7), if needed.

Table 3-7 Hybrid Analysis and drill through reports — general comparison
Hybrid Analysis Drill-through

Multidimensional environment with a Customized SQL statement


relational part

Predefined relational hierarchy Predefined report

Predefined SQL with dynamic execution Predefined SQL with dynamic execution

Multiple SQL statements can be Single SQL statement is generated for


generated each Drill-Through Report

Cross dimensional analysis No cross dimensional analysis

Transformations, pivot, slice, dice allowed No pivot, dice slice allowed

Can use other source table columns that


are not part of the dimensions

Members of dimensions that have


enabled Hybrid Analysis cannot be part of
a Drill-Through Report

Easy to administrate compared to You need to create all SQL queries and
managing several drill through reports create each report

Even though there are some characteristics common to both Hybrid Analysis and
Drill-Through Reports, both serve different purposes in an OLAP application.

Drill-Through Reports is a customized SQL statement that can be executed


against the source relational database used to build the OLAP cube. It can
contain columns from all the tables that source data for the dimension in a
specific cube. Even if one specific column is not part of any dimension on the
OLAP cube, this column can be used on the Drill-Through Report.

80 DB2 OLAP Server V8.1: Using Advanced Functions


3.9.1 Characteristics of Drill-Through Reports
These are some characteristics of Drill-Through Reports:
򐂰 A Drill-Through Report is a single dimensional report.
򐂰 Drill-Through Reports can have other source table columns that are not part
of the dimensions. The source table needs to have at least one column in at
least one dimension.
򐂰 One OLAP cube can have many different Drill-Through Reports.
򐂰 Drill-Through Reports use the term Intersection Level. Intersection Level
represents the cells for each dimension on the OLAP cube that are used to
build the Where clause for the Drill-Through Report.
򐂰 You can have different Drill-Through Reports with different intersection level
on the same OLAP cube.
򐂰 You can apply SQL transformations on columns of Drill-Through Reports (via
Template SQL or Pass Through Database option of the model).
򐂰 Drill-Through Reports are dynamically generated. Every time that the end
user executes a Drill-Through Report, Integration Server builds the SQL
statement based on the current information being analyzed for all intersection
levels.
For example, if you have defined an Intersection Level for the member Month
on the Time and City dimensions for the Markets Dimension, and assuming
that the end user is analyzing sales for New York in January, then the Where
Clause for the Drill-Through Report will have, in addition to the pre-defined
joins on the OLAP model, the following information:
Where ...... City = ‘New York’ and Month = ‘January’ .....
򐂰 You cannot perform cross dimension analysis using columns of Drill-Through
Reports.
򐂰 You cannot Pivot, Slice, or Dice columns of Drill-Through Reports.
򐂰 Drill-Through Reports might help to decrease the size of OLAP Cubes. You
can, for example, leave one level for a specific dimension to be accessed only
via Drill-Through Reports. Keep in mind that you cannot make cross
dimension comparison with Drill-Through columns.
򐂰 Members of dimensions that have enabled Hybrid Analysis cannot be part of
a Drill-Through Report
򐂰 Drill-Through Reports are only supported by front end OLAP tools that have
implemented the Drill-Through API (as Analyzer and SpreadSheet Add-in)

Chapter 3. Hybrid Analysis 81


Hybrid Analysis is not a relational SQL report, it is an analytical multidimensional
environment, where part of the information is stored on a multidimensional
database and part of the information are stored on a relational database.

3.9.2 Characteristics of Hybrid Analysis


These are some characteristics of Hybrid Analysis:
򐂰 Hybrid Analysis is part of a multidimensional report.
򐂰 A Hybrid Analysis report is only supported on source table columns that are
part of one dimension.
򐂰 More than one dimension in an OLAP Database can have members stored on
a relational database.
򐂰 You can apply transformations on members of dimensions stored on the
relational database.
򐂰 Hybrid Analysis reports are dynamically generated. When the end user
performs an OLAP operation (drill-down, pivot, and so on) on a dimension
member stored on the relational database, DB2 OLAP Server builds the SQL
Statement based on the current information being analyzed (Integration
Server does not need to be running).
򐂰 You can make a cross dimension analysis using dimension members stored
on relational databases.
򐂰 You can pivot, slice, or dice dimension members stored on relational
Databases.
򐂰 Hybrid Analysis significantly reduces the size of OLAP databases.
򐂰 Members of dimensions that have enabled Hybrid Analysis cannot be part of
a Drill-Through Report.

3.9.3 Drill-Through Reports versus Hybrid Analysis


Basically, a Drill-Through Report is recommended in the following situations:
򐂰 Use Drill-Through Reports for Analysis where you need to extend an
multidimensional analysis to explain an out-of-line situation.
For example, suppose that you are performing a multidimensional analysis
and have determined that the Sales in New York had decreased in 50% in
February compared to January of the same Year for the Product Diet Coke.
Now, for a better understanding of this problem, you want to have additional
information, such as Quantity Sold, Sales Manager for New York, Average
Discount — but none on this information resides on the dimensions of your
OLAP Database. Assuming that this information is stored on the relational

82 DB2 OLAP Server V8.1: Using Advanced Functions


tables that were used to build the dimensions that you are analyzing, this
information can be retrieved by a pre-defined Drill-Through Report.
򐂰 Use Drill-Through Reports when you need to combine, into a single report,
the information from members of your OLAP cube and other columns of the
relational tables used to build the dimensions.
򐂰 Use Drill-Through Reports for dimension members, in cases where you need
to remove the lowest level, or to avoid including one more level with
thousands of members in one dimension of your OLAP Database. This is
being done to achieve performance gains for data load and calculation, and
also to reduce the size for the OLAP Database, and there is no need to
perform cross dimension analysis with this member and members of other
dimensions.

Basically, Hybrid Analysis is recommended in the following situations:


򐂰 In cases where you need to reduce the size of the OLAP database, but you
still need to perform cross dimension analysis with this member and
members of other dimensions.
򐂰 In cases where you need to achieve performance gains for data load or
calculation, but you still need to perform cross dimension analysis with
dimension members that reside on the relational database.

3.10 Data modeling for Hybrid Analysis


DB2 OLAP Server supports many different ODBC data sources to build an OLAP
application; this can be flat files (text files), spreadsheets, and ODBC data
sources (relational data sources). When using Integration Server and Hybrid
Analysis, only relational ODBC data sources are supported.

Note: DB2 OLAP Server V8.1 only supports DB2 UDB and ORACLE. Other
RDBMS access should be provided with fixpacks.

When creating an OLAP model, the ultimate goal is to create a multidimensional


database. For basic reminder on data modeling techniques, please refer to
Appendix D, “Data modeling basics” on page 495.

For a better performance and also for easy maintenance, the implementation of
Hybrid Analysis feature requires a star schema model. It also can be
implemented on snowflake data model or on a star-like model.

We define star-like model as a relational model that physically is not a pure star
schema model implementation. However, using features from the relational

Chapter 3. Hybrid Analysis 83


database — for example, views and summary tables — you can create new
objects and simulate a star schema model.

A star schema model makes very easy and simple to build an OLAP model with
Integration Server, because it has the same concept of a multidimensional
model. Snowflake models are more complex to keep (too many tables) when
compared to a star schema model. Many more joins will be required in order to
build the model, and consequently, the cube. When using a snowflake model to
build an OLAP cube using Integration Server, you can have performance
problems during the data load process, because more joins are required to
process.

Entity Relationship (ER) models may require more development effort to build
the OLAP model when using OLAP Integration Server. Additional tables or views
may be required.

If you already have a data warehouse or datamart on a relational database, but


you don’t have a star schema model, consider using Automatic Summary Tables
and Views, but be mindful of performance problems for complex join when using
views.

Important: Independently of the data model that you are using to build your
OLAP Model, for performance reasons, you need to have a very good
understanding of the joins and queries that you need to perform and then
define a very good index strategy for that.

Attention: DB2 OLAP Server V8.1 when using Hybrid Analysis and
Drill-Through does not support dimensions with parent child hierarchies.

It means that when creating a star schema model for dimensions with variable
hierarchies (different levels within the same dimension), you need to create a
model that will have one column for each level of the hierarchy.

In other words, the dimension table should use generation instead of parent
child.

84 DB2 OLAP Server V8.1: Using Advanced Functions


3.11 Security configuration for Hybrid Analysis
In this section we explore the security configuration settings for Hybrid Analysis.
For security, Hybrid Analysis allows two security modes to be set for accessing
relational data, as shown in Figure 3-20.

Important: When you start the OLAP Server, make sure DB2 UDB, where the
relational source is located, is running. Otherwise, you will need to do a
db2start, and after, that restart the OLAP Server.

In Integration Server, you choose the security settings dialog box by right-clicking
the top of the outline in the right panel of the metaoutline window and selecting
Properties as shown in Figure 3-19.

Figure 3-19 Properties selection in Integration Server Metaoutline

򐂰 Use the OLAP Server user name and password to connect to the data source
option. Select this option to use a common OLAP Server user name and
password to connect to the data source when the hybrid request is made.
򐂰 Use the user-defined user name and password to connect to the catalog and
server option. Select this option to use a user-defined user name and
password to connect to the OLAP Metadata Catalog and data source. With
this option, the administrator must keep OLAP servers userids and passwords
in synchronization with DB2 userids and passwords.

Chapter 3. Hybrid Analysis 85


Figure 3-20 OLAP metaoutline security options

3.11.1 Tracing Hybrid Analysis


There are two types of trace to use with Hybrid Analysis: CTrace and
performance trace.

CTrace is a keyword borrowed from Integration Server. It also works similarly to


Integration Server CTrace.
Syntax for both AIX and Windows platforms:
setHAtrace t=<tracetype> l=<tracelevel>

One drawback of both traces is that messages of all threads are logged to the
same file. It may be hard to filter the messages related to the error thread.

Differences in properties between both traces are shown in Table 3-8.

86 DB2 OLAP Server V8.1: Using Advanced Functions


Table 3-8 Ctrace and performance trace properties
CTrace Performance trace

CTrace is used for debugging Performance trace is lightweight and


purpose. aimed at investigating performance of
modules within Hybrid Analysis
internal function.

Log files are in ARBORPATH Log files are in ARBORPATH


directory. CTrace log filename is directory. Performance trace log
“essha.log” filename is “haperf.log”.

CTrace has 7 levels of message Performance trace has only 2 levels:


logging: 0 - 6. Setting CTrace level to
򐂰 0 - do not log performance trace
n will log all messages whose level is
messages
greater than or equal n. So with n=0
all messages are logged, with n=7 or 򐂰 255 - log all messages
greater no messages are logged.

By turning on the CTrace you can see By turning on performance trace you
what the SQL statement looks like, can see, in a query, how much time
what happened before the error. was spent for generating SQL
statement, for SQL execution, for
member lookup, for data lookup.

You use the ESSCMD command line to turn the CTrace and performance trace
ON or OFF, as shown in Example 3-12. Turning on traces will affect performance,
so remember to turn them off whenever you are not using them.

Example 3-12 Setting Ctrace to level 2 for application Oiha


:::[0]->login
Login:

Host Node >sicily


User >olapsi
Password >olapsi1

[Wed May 15 16:47:22 2002]Local////Info(1051035)


Last login on Wednesday, May 15, 2002 4:45:15 PM

Available Application Database:


Demo ==> Basic
Sample ==> Basic
onlinei ==> Onlinei
OI-IS ==> Onlinein
OI-ISall ==> Onlinein
OI-HA ==> Oiha

Chapter 3. Hybrid Analysis 87


OI-MD ==> Oimd

sicily:::olapsi[1]->select OI-HA Oiha


Select:

sicily:OI-HA:Oiha:olapsi[1]->sethatrace t=c l=2


SetHATrace:
sicily:OI-HA:Oiha:olapsi[1]->

To turn off the trace, use the following commands:


򐂰 Turn OFF CTrace: sethatrace t=c l=8
򐂰 Turn OFF performance trace: sethatrace t=p l=0

If you clear the log by deleting the essha.log, you will need to restart Integration
Server as well as DB2 OLAP Server, before a new essha.log is written.

88 DB2 OLAP Server V8.1: Using Advanced Functions


4

Chapter 4. Mining your OLAP cube with


OLAP Miner
In this chapter we explore how to mine a multidimensional OLAP application,
using the E-banking case study. We discuss:
򐂰 How and when to use OLAP Miner to mine multidimensional data
򐂰 How to interpret and deploy the mining results

© Copyright IBM Corp. 2002. All rights reserved. 89


4.1 OLAP Miner overview
OLAP Miner is a new feature of OLAP Server that expands the analytical
reporting possibilities, and which has been available since the release 7.1 fixpack
6. The OLAP Miner functionality mines multidimensional applications to find out
deviations or exceptional and atypical values in the cube data. The results are
shown as a weighted list of deviations, and you now have the opportunity to
investigate further.

A value in a cell is a deviation if it significantly varies from the expected value,


calculated by the OLAP Miner algorithm. The algorithm calculates the expected
value of a cell based on the context of the cell's position in the cube, and the
algorithm combines contributions from all dimensions to which the cell belongs.
OLAP Miner lists deviations, presents various views of each deviation, and
quantifies how big the difference is between the expected value and the actual
value (magnitude). OLAP Miner lists the deviations in the order of their
importance.

OLAP Miner helps:


򐂰 By discovering anomalies from the wealth of data analyzed
򐂰 By discovering notable fluctuations in sales numbers, budgets, or other data
in a customer’s business
򐂰 By detecting problem areas, or areas of excellent performance in the cube
data
򐂰 By saving the analyst’s time when looking for problem areas
򐂰 By highlighting problem areas that an analyst may not see

OLAP Miner provides a graphical interface to help creating deviation detection


definitions and display the results of these definitions.

When you mine an OLAP application, you will use the OLAP Miner Client, as
shown in Figure 4-1. From the OLAP Miner Client, you have access to the OLAP
Server via the OLAP Miner Server and the Essbase API. This gives you the
advantage of not only using the OLAP Miner Client, but also viewing, drilling, and
reporting your mining results in Excel or Lotus 1-2-3 through the spreadsheet
add-in. Furthermore, the OLAP Miner Client gives you the possibility to write
Linked Report Objects (LROs) directly back to your OLAP application so these
results will be accessible to other users of the OLAP application, but without the
need to perform the mining runs themselves via the OLAP Miner client.

90 DB2 OLAP Server V8.1: Using Advanced Functions


DLAP Miner TCP/IP
client application ODBC

DB2 OLAP Essbase Integration


Miner ODBC
Server Services

TCP/IP

DB2 OLAP Server Hyperion


8.1 API
Spreadsheet
TCP/IP
add-in

Query &
Reporting ODBC RDBMS

Hybrid Analysis

TCP/IP

ODBC
RDBMS

Figure 4-1 Generic OLAP Miner, OLAP Server and Hybrid Analysis architecture

OLAP Miner can ultimately save the information user much time typically spent
“just browsing” and actually go directly to the results when needed. It may even
highlight areas that have been overlooked by business analysts.

So let us move on and investigate what deviation detection actually is. We will
show when you can gain valuable information from using OLAP Miner, and
explain how to further interpret, investigate, and deploy your mining results.

4.2 Deviation detection in OLAP Miner


Deviation detection is known in the statistical world as a way to find the story
behind your data. Usually it is referred to as related to standard deviation, and is
linked to the concept of normal distribution of data — meaning that most of the
observations in a dataset are grouped around the average of the observations,
while a relative small amount of observations tends to one extreme or the other.

You may recognize the normal distribution graphically as the familiar bell-shaped
graph shown in Figure 4-2. The standard deviation tells you how tightly the
various observations are clustered around the mean in a dataset.

Chapter 4. Mining your OLAP cube with OLAP Miner 91


Figure 4-2 Bell shaped standard deviation graph

Deviations are the calculated unexpected observations that are significantly


different from the other observations in the normal distribution. The OLAP Miner
algorithm results depend on which dimensions you select and how many levels
or generations those dimensions include. You might get very different results
shown in magnitude and deviation simply by selecting more or fewer members of
a dimension, because the number of observations changes, so the algorithm has
more or less observations to work with.

OLAP Miner deviation detection looks through your data in your multidimensional
application for atypical or deviant values. Instead of trying to discover values in
your data that might be higher or lower than expected through comparing data
with slicing and pivoting, OLAP Miner does this automatically.

OLAP Miner is not built for hypothesis support or trend analysis, but it can
support and confirm if you have a hypothesis that some of your stores, for
example, are performing significantly lower or higher than usual. OLAP Miner can
also be used as starting point for further trend analysis, if there is a result of
significantly lower performance on some stores compared to others.

In Example 4-1 the definitions for the subcube are shown. We can see that the
subcube mined has 3 dimensions, 140 members, and 3 hierarchies. This is also
illustrated in Figure 4-3.

Example 4-1 Subcube definition for Online Investment


Cube Name /olap81/om_data/cayman/oismall/oismall/tests
small/2637825437/par_2634
6
Number of dimension 3
Dimension 0 20
Hierarchy 0 number of levels 2
Level 0 number of members 7

92 DB2 OLAP Server V8.1: Using Advanced Functions


Dimension 1 21
Hierarchy 0 number of levels 2
Level 0 number of members 5
Dimension 2 22
Hierarchy 0 number of levels 3
Level 0 number of members 112
Level 1 number of members 16

Collecting the data from the cube for the mining process creates the subcube as
shown in Figure 4-3. The deviation detection definition is similar to an OLAP
outline, and the OLAP database to an OLAP Mining subcube database; but it is
created by the OLAP Miner, and not the OLAP Server. Figure 4-3 shows how the
deviation detection definition created in the OLAP Miner client mines the specific
defined area called a sub-cube. After the creation of the deviation detection
algorithm, OLAP Miner applies to the subcube.

Figure 4-3 Extraction of a Sales subcube for OLAP Mining

Chapter 4. Mining your OLAP cube with OLAP Miner 93


When you specify a member from the measures as “member only”, you target
that member to be mined for deviations. The value is deviant only in comparison
to the values that surround the member in the subcube. This means that OLAP
Miner must compute the expected value for every cell in the subcube (see
Figure 4-4), and the algorithm combines contributions from all dimensions to
which the cell belongs. The expected value is then compared to the actual value
of each cell to determine if the cell value is deviating, and to what extent it is
deviant. If the difference between the expected value and the actual cell value is
relatively large, it is reported as a deviation, and is quantified through the
magnitude of each deviation with respect to other deviations in the same
subcube.

Figure 4-4 OLAP Miner calculates an expected value for each cell in the subcube

The characteristics of deviation detection are that, as the context changes — that
being the observations — the deviation will change. For example, if one product
sells higher than expected one week and therefore is shown as a deviation, it
may be shown with a lower magnitude the following week, or it may not even be
part of the highlighted deviations. As you can see, deviation detection requires a
lot of observations, and deviation detection on a few hundred observations is not
as reliable as applying OLAP Miner on tens of thousands or even millions of
observations. In other words, deviation detection is powered by data.

94 DB2 OLAP Server V8.1: Using Advanced Functions


Magnitude is the way OLAP Miner shows the significance between deviations,
by calculating the absolute difference between the actual cell value and the
expected cell value. This difference is also known as the residual. OLAP Miner
uses a scaled system so that it can find deviations more accurately in extreme
ranges of values, including negative and positive value ranges.

4.2.1 OLAP Miner performance


OLAP Miner is optimized to mine even large OLAP cubes. To show this, we have
set up a small test environment on the Cayman machine, where we ran four
deviation detections (see Table 4-1). Note that the first three mining runs (the
three smallest applications) are done on the AIX 2-way machine, while the last
mining run on the 20 GB online investment cube is done on a 4-way AIX. The
mining run for E-banking is different than for Online Investment, since the two
cubes hold different data, dimensions, and members. All the information in the
table can be found in the log file of OLAP Miner, except the size of the OLAP
application (see part of logoff in Example 4-1).

Table 4-1 OLAP Mining performance test


E-banking Online Online Online
Investment Investment Investment

Time used to mine in 5 5


seconds

Application in GB to be 0.25 2.9 10 20


mined

Dimensions in 9 11 11 11
application

Dimensions in mined 3 3
subcube

Members 140

The comparison of the E-banking application and the first Online Investment
application is significant because they are mined equally fast. But you can notice
that while E-banking is without missing values, Online Investment has a number
of missing values, even though relatively low compared to the total cube size.

For better performance, the retrieval buffer of the OLAP application you are about
to mine should be set to 2 KB. This is done by choosing the application and
database for which you want to apply this setting, and then from the menu bar, by
selecting Database —> Settings in Application Manager.

Chapter 4. Mining your OLAP cube with OLAP Miner 95


In the field of Retrieval Buffer Size, enter the value 2 (the default is 10) as shown
Figure 4-5). This setting cannot be set globally, but it can significantly reduce
computing time for deviation detection runs. To apply these settings, you must be
at least a designer user on the application.

Figure 4-5 2 Kilobytes set for the E-bank application in Application Manager

When mining the created subcube, additional space is needed. Make sure the
AIX is enabled for large files, and that you have increased your temporary file
space if necessary by changing the location of all data files and temporary files.
You do this in OMServer.cfg with the data_dir setting (see Example 4-2).

4.3 When to use OLAP Miner, and when not to use it


When you use OLAP Miner, it is important that the amount of data in your cube is
representative compared to the data that is not in the cube. Another way of
saying this could be, that if you are going to make decisions regarding your
business with OLAP Miner, make sure you have data enough to make sound
decisions.

96 DB2 OLAP Server V8.1: Using Advanced Functions


As an example, if we mine for E-banking transactions in the Online Investment
application, we can look for PC-banking usage for private customers. This will
give us a list of deviations in usage over the last quarter within some age-groups.
If we want to find the deviations — both the best and the worst results — we need
the data to support our hypothesis. This includes:
򐂰 Data going back for at least one year.
򐂰 Data that is representative, meaning enough observations out of the total
number of observations available in the cube. This applies only if your cube
and the dimensions you will mine are built on the background of sampled data
(for example, if it has been decided for space saving reasons not to have
every transaction saved). It is important to note that OLAP Miner’s algorithm
does not use or account for sampling, because this would give an incorrect
picture of the deviations detected in the data.
To make the selection of the members to mine, you mark the member on the
left side, expand the tree by clicking the +, and then you choose one of the
two types of selection: “Member only” or “Member and descendants”. The
selected member now appears on the right side with an icon next to it
showing what type of selection that was made. Selected members can be
removed from the right by clicking the Remove button as shown in Figure 4-6.
򐂰 Data should be aggregated to a level where you are able to pinpoint and track
the deviation back to a root cause.

Figure 4-6 OLAP Mining either just the member or the member and descendants

Chapter 4. Mining your OLAP cube with OLAP Miner 97


Before you create a deviation detection definition, there are some generic
requirements and restrictions:
򐂰 Determine which member that you want to search for deviations and select
that member as Member Only. Typically, this member is from the Measures or
Accounts dimension.
򐂰 Ensure that you use loaded and calculated OLAP cubes for deviation
detection definitions.
򐂰 Select members from dimensions that use either the addition operator (+) or
the no-consolidation operator (~).
򐂰 Ensure that the OLAP cubes have a sufficient amount of accurate data at the
lowest levels of the dimension hierarchy. If the subcube contains very little
data, the mining results might be less useful.
򐂰 OLAP Miner calculates values by starting from level zero, not from the first
generation. For example, if you select Member and Descendants for an entire
quarter to be calculated in a deviation detection definition, OLAP Miner first
calculates for deviations by scanning the values for January, February, and
March.
򐂰 Select label-only members as Member Only.

The following restrictions apply to creating deviation detection definitions:


򐂰 Avoid members that use calculation scripts unless all the values in the
subcube that you select are additive. For example, the parent member values
must be the sum of all child values.
򐂰 If you select a shared member, you are prompted to select the shared
member’s counterpart base member that has the same name, but is not
tagged as shared.
򐂰 On members with a non-additive associated formula, OLAP Miner performs
the deviation analysis only on the lowest level of data.
򐂰 Some members of a cube might be excluded because of their position in their
dimension’s hierarchy. For example, a member might be excluded because it
falls within a non-additive part of the hierarchy.

Important: All the data for mining needs to be in the multidimensional part of
the application.

98 DB2 OLAP Server V8.1: Using Advanced Functions


4.4 Mining and interpreting E-banking cube results
This chapter shows you step-by-step how to do OLAP Mining on your own OLAP
cubes, and how to investigate further through deviation viewer and Excel or
Lotus 1-2-3 spreadsheets.

We have created two scenarios on behalf of the E-bank cube to get different
views on the data in the E-banking application, which contains information about
the banks customers use of online banking. (For a further description, see 2.2.1,
“E-banking case study” on page 28). In Figure 4-7 you can see the outline of the
E-bank application used in the mining examples.

Figure 4-7 The E-bank application outline shown in Application Manager

Before we start, it is important to note that our measure is the Facility dimension.
This means that if we make a deviation definition in our OLAP Mining Wizard, but
leave out the Facility dimension or do not choose a single member from this
dimension, we will get no results returned.

4.4.1 Scenario 1: PC-banking usage by branch


In our first scenario we will look for deviations in transactions made by customers
using PC-banking from home. The customers are tied to a specific branch in the
banking organization, where the customer have their account, and where they
usually do business. We will look for deviations in regards to these members in
the first quarter of 2002.

Chapter 4. Mining your OLAP cube with OLAP Miner 99


On your first screen of your deviation detection (Figure 4-8), you should give it a
significant name for the deviation detection you are about to build. In this case we
have chosen to call it PC- banking, since this is what we are looking for. Also, it is
a good idea to add a description, so others after you can tell what this specific
deviation detection is mining for.

Figure 4-8 Adding descriptive metadata for your deviation detection

In the Deviation Detection Wizard (Figure 4-9) we are allowed to specify a region
of the cube to be mined, also producing the subcube mentioned earlier. This is
done with two types of selection.
򐂰 Member only: This selects only the member, and not its descendants.
򐂰 Member and Descendants: This select the member from the level you
choose, and its descendant.

To make the selection of the members to mine, you mark the member on the left
side, expanding the tree by clicking the +, and then you choose one of the two
types of selection: “Member only” or “Member and descendants”. The selected
member now appears on the right side with an icon next to it showing what type
of selection that was made. Selected members can be removed from the right by
clicking the Remove button.

100 DB2 OLAP Server V8.1: Using Advanced Functions


Figure 4-9 Selecting members with the deviation detection wizard

In this case we have initially chosen to mine the member “1. quarter of 2002” with
descendants, “Transactions” as member only, “PC-banking” as member and
descendants, and finally “Organizational unit” as member with descendants. We
move on to the next window and choose to view only the first top 10 results and
run the deviation detection right away.
In Figure 4-10 we can see the result set from our first mining run on the E-bank
application. By clicking the magnitude, we have selected and sorted the 10
results according to how great or small the difference between the expected
value and the actual value are.

Chapter 4. Mining your OLAP cube with OLAP Miner 101


Figure 4-10 E-banking 1. quarter 2002, transactions and PC-banking results

In order to better understand the magnitude, let us take a look at Figure 4-11.

C
Magnitude 4

A B

Actual Expecting
15.000 5.000 50.000
bricks used bricks used bricks used

Figure 4-11 Simple magnitude illustration

102 DB2 OLAP Server V8.1: Using Advanced Functions


Imagine that for the last pyramid you built, you used 5,000 bricks. For the next
pyramid you are going to build, you are expecting to use 50,000 bricks (B). But it
turns out that, after you build the pyramid, you actually only needed 15,000 bricks
(A). So the mining conclusion would be that the difference between the expected
amount of bricks to use (50,000) and the actual bricks used to build the pyramid
(15,000) is lower than expected rated, with an magnitude of 4.

The first results show branch DEPT2187 in January 2002 had 121 transactions,
which in this case was expected to be higher, with a magnitude of 11. The same
branch is also represented as the second result, but for March 2002, with 500
transactions, which was expected to be lower, with a magnitude of 9.

After saving and running your mining session, the deviation definition appears as
a branch underneath the database (cube). The results from the analysis appear
below the deviation detection definition in the tree view as seen in Figure 4-10.
If we look into the results from this first scenario, where we mined for the
deviation for PC-banking customers in the first quarter of 2002, you will notice
that the two first results are from the same branch in the bank. But where the first
result is shown to be expected higher than it actually is, the second result is
shown to be expected lower.

Now we need to investigate this further. We do this by right-clicking one of the


wanted result lines in the right frame (Figure 4-12), and choosing Display in
context..., and the Deviation viewer opens (Figure 4-13). The Deviation viewer
displays one or more relevant reports for the selected deviation, and the selected
result is shown highlighted in red.

Figure 4-12 Selecting Display in Context by right clicking result line

Chapter 4. Mining your OLAP cube with OLAP Miner 103


If we look at the results in the Deviation Viewer (Figure 4-13), it is evident that
branch DEPT2181 in the first quarter of 2002 had a very low number of
transactions, compared to the number of transactions from the other branches,
and the percentile deviation from the second quarter is significantly higher than
any of the other branches. For the third quarter, the number of transactions are
significantly higher than expected, but not by as many transactions as in the first
quarter. This is also shown by the Magnitude, which for the first quarter is 11, but
for the third quarter only is calculated as 9.

Figure 4-13 Results from mining E-bank shown in Deviation Viewer

Other deviations that might have been detected by OLAP Miner, but were not
selected, are also shown in red, but without the border. You have now the
possibility to investigate further by clicking the Spreadsheet button, and opening
the spreadsheet associated with either Excel or Lotus 1-2-3 as shown in
Figure 4-14.

Here it becomes obvious that Branch AFD2187 has performed below the
average. Notice that even though Branch AFD2187 has a low number of
transactions, two other branches have the same low numbers. However, their
deviations were not as significant as for Branch AFD2187, and therefore they are
not highlighted in the deviation viewer. For an explanation of how to associate
this with your favorite spreadsheet, see 4.6.2, “OLAP Miner client configuration”
on page 113.

104 DB2 OLAP Server V8.1: Using Advanced Functions


Figure 4-14 Graph built in spreadsheet and launched from the deviation viewer

When OLAP Miner decides whether a cell is exceptional or not, the calculation is
based on the standard deviation. This means that the surrounding cells that are
shown by the deviation viewer are used to calculate it.

4.4.2 Scenario 2: Equity trade and Net-banking in branches


In our second scenario we look for deviations in transactions in net banking and
equity trading. When these transactions are done by the customer, it is registered
at which branch of the bank the customer belongs to. We look for deviations in
the fourth quarter of 2001.

We now select “Transactions” as member only, and the rest as member and
descendants: fourth quarter 2001, Netbanking, Equity trading, Organizational
unit.

The final step of the OLAP Miner Wizard shows a summary of members
selected. It also allows you to set the sensitivity of the detection algorithm
through the number of maximum deviations, as well as saving and running the
definition.

Chapter 4. Mining your OLAP cube with OLAP Miner 105


Figure 4-15 Review detection, and set maximum deviations

After running our deviation detection, we get the following results (Figure 4-16). If
we sort the results by magnitude, we can see that branch DEPT1705 occupies
the first 4 seats, with respective ratings of 13 for December and 9 for November
on both Netbanking and Equity Trading.

Figure 4-16 Results from Equity Trade and Netbanking scenario.

106 DB2 OLAP Server V8.1: Using Advanced Functions


A way to enrich your existing OLAP application with your deviation results is
Linked Reporting Objects (LROs). LROs are objects you can associate with
specific data cells in an OLAP cube. With OLAP Miner you can write deviations
from the result file to the OLAP cube as LROs. This is done by right-clicking on
the .res file and choosing Create LROs. OLAP Miner does not overwrite other
LROs than the ones it added itself. Only one set of deviations from the result file
is written to the source cube at any time for any particular definition, and by
deleting the .res file, OLAP Miner removes any LROs associated with this
particular result set.

To look further into these results we will need to open the Deviation Viewer as
shown in Figure 4-17. Doing this gives us three different views of our results,
shown as tabs below the first result set:
1. Organizational Unit and Time
Here we view the Branch compared to the months in last quarter of 2001, and
the number of transactions covering both Net-banking and Equity trading.
Branch DEPT1705 is highlighted because of the high deviant score, where
the result was expected to be lower.
2. Facility and Time
This view shows us how Net-banking (F09) and Equity trading (F10)
transactions are distributed over the last three months of 2001. While
Net-banking grew significantly in December, Equity trading had no
transactions at all. This indicates other root causes, like failed data delivery or
this transaction segment has been removed from the application.
3. Organizational unit and Facility
Here we view the specific Branches broken down by number of transactions
for both Net-banking and Equity trading. Branch DEPT1705 stands out again
by having no transactions on Equity trading at all.

Chapter 4. Mining your OLAP cube with OLAP Miner 107


Figure 4-17 Results for E-bank scenario 2 shown in deviation viewer

4.5 OLAP Miner setup and architecture


If we look at the OLAP Miner architecture in detail, the client component consists
of a main window which can invoke the mining definition wizard. The wizard
allows the user to create and edit mining definitions. To do this, the wizard
communicates with the OLAP Server through the Essbase API. This allows the
wizard to retrieve information about the cube being mined and presents it to the
user.

Figure 4-18 shows how the client and the server communicate, and displays the
result sets through Excel or Lotus 1-2-3 spreadsheets.

108 DB2 OLAP Server V8.1: Using Advanced Functions


Scheduler Definition
Utility Wizard
5

OLAP Miner
Deviation Spreadsheet
1 Command Line
Viewer Excel/123
(OMRundef) 9
8

ESSBASE
API
OMClient.cfg OLAP Miner
Client (OMClient)

2 TCP/IP

OLAP Miner ESSBASE


OMServer.cfg
Server (OMServer) API
3
DB2 OLAP
Server
4

ESSBASE
Deviation API
File system
detection
.res files
kernel

7 6

Figure 4-18 OLAP Miner Server and client communication with DB2 OLAP Server

The step numbering in Figure 4-18 illustrates the flow of a mining process, as
follows:
򐂰 Step 1: You will be using OLAP Miner from the OLAP Miner client main
window using the command line client (OMRunDef).
From here you log on to the DB2 OLAP Server.
򐂰 Step 2: The DB2 OLAP Miner client (OMClient) uses the local OMClient.cfg
file and communicates through TCP/IP with the DB2 OLAP Miner server
component (OMServer).
The command line client (OMRunDef) also utilizes OMClient.cfg. It is also
possible for the OMRunDef to overwrite the settings by specifying parameters
directly on the command line.
򐂰 Step 3 and Step 4: The DB2 OLAP Miner Server communicates and verifies
user ID and password to the OLAP Server application on the DB2 OLAP
Server through the Essbase API

Chapter 4. Mining your OLAP cube with OLAP Miner 109


򐂰 Step 5: You are now ready to mine. This is done with the Definition Wizard,
where you select what members and dimensions you want to mine on. When
the user saves a OLAP Mining definition it is communicated to the OMServer
and saved in the file system where the OMServer is running.
򐂰 Step 6: When you execute the mining definition the deviation detection kernel
communicates with DB2 OLAP Server and the multidimensional application
you are mining on. The kernel then generates the subcube based on the data
in the DB2 OLAP Server application. It extracts data from the OLAP cube to
be mined and creates a list of deviations found which are then stored in the
server's file system.
򐂰 Step 7: This file system consists of *.res files
򐂰 Step 8: When the user wants to view the deviations this file is returned from
the server to the client and is displayed in the OLAP Miner window. A specific
deviation can be viewed using the Deviation Viewer which is invoked from the
OLAP Miner main window.
򐂰 Step 9: The viewer displays various reports on the deviation by extracting
data from the OLAP server cube again using the Essbase API. The
spreadsheet (either Excel or Lotus 1-2-3) can also be started from the
Deviation Viewer. This also communicates through the Essbase API with the
OLAP server if the user chooses to use the spreadsheet add-in capabilities to
pivot, slice and dice.

4.6 Running and monitoring OLAP Miner


The environment for running OLAP Miner is either Windows or AIX. The exact
preferences are shown in table Table 4-2. Java and OLAP API for the OLAP
Server must be installed prior to installing OLAP Miner Server.

Table 4-2 OLAP Miner installation preferences.

Server OS Client OS Hardware Internationalization

Windows NT 4.0 Windows NT 4.0 Similar hardware Supports OLAP


Windows 2000 Windows 2000 as for DB2 OLAP language sets
AIX 4.33 L5 Windows 2000 ME Server

Running and monitoring your OLAP Miner Server and client is fairly simple. The
OLAP Miner Server is started with the following command on the AIX that will
keep it running in the background, and write the server activities to the
omactiv.log log:
omserver.sh -b omactiv.log &

110 DB2 OLAP Server V8.1: Using Advanced Functions


To monitor mining activities on the OLAP cube there are different options that can
be set in the OLAP Miner configuration file - OMServer.cfg (See Example 4-2).
The OMServer.cfg and OMClient.cfg files are in XML and the value that
surrounded quotation marks is case sensitive. Add the server log line and set the
verbose level to high. All requests and connections to the different applications
will be logged.

To find out how long a mining run lasted on a specific application, subtract the
start time from the end time shown in the .log file. If you have multiple OLAP
applications residing on different OLAP servers, you need to add these to your
OMServer.cfg file as shown in Example 4-2. Here the servers, cayman and sicily,
are added. For further information regarding options for the OMServer.cfg file,
see OLAP Miner User Guide V8.1, SC27-1611-00.

Example 4-2 OMServer.cfg file: client log verbose level set to high
<?xml version="1.0"?>
<OMServerConfig>
<olap_server alias ="cayman" address="cayman.almaden.ibm.com"/>
<olap_server alias ="sicily" address="sicily.almaden.ibm.com"/>
<port value = "1976"/>
<max_connections value = "-1"/>
<max_kernel_runs value = "2"/>
<power_user value = "CALC"/>
<clientlog path="/tmp/omactiv.log" max_size="1000000" verbose="HIGH"/>
<data_dir path="/olapfiles”/>
</OMServerConfig>

An effective way to get an overview of your OLAP Miner Server configuration


settings is via OLAP Miner Server console. To have the console available you will
need to start OLAP Miner Server in the foreground to enable the Command
Console. If you let OLAP Miner Server run in the background and later need the
console, you will have to bring your OLAP Miner Server down, and bring it up
again in the foreground.

4.6.1 Getting OLAP Miner to run, and stopping it


Once you have the OLAP Miner Server and the Client installed and running,
there are a few things you have to be aware of, and that might show up once you
started mining your applications.

If you need to stop your OLAP Miner server on the AIX, use the kill command
(find the jobs running with the AIX command jobs, or by using ps -ef | grep
OMServer.jar).

Chapter 4. Mining your OLAP cube with OLAP Miner 111


Figure 4-19 Starting OLAP Miner in the foreground: Command Console options.

The sync olap command, used from the OLAP Miner Command Console, is the
one command that is not self-explanatory. This command synchronizes the
OLAP Miner files with the current DB2 OLAP Server that is identified by
olap_alias. The user ID and password must be for a supervisor user for the DB2
OLAP Server that is identified by an olap_alias.

You can use the sync olap command when applications or databases are
deleted from the DB2 OLAP server system. The command ensures that all OLAP
Miner files have a corresponding application and database combination on the
DB2 OLAP Server system. It deletes any OLAP Miner files that do not have a
corresponding application and database combination. The log from running the
sync olap command is shown in Example 4-3.

Example 4-3 Running sync olap command


CONSOLE COMMAND>
sync olap cayman olapcay olapcay1

Connecting to OLAP Server [cayman]...


The application [Sample] no longer exists.
Deleting the application [Sample]...
The application [e-bank] still exists.
The database [e-bank:e-bank] still exists.
The database [e-bank:Online] still exists.

112 DB2 OLAP Server V8.1: Using Advanced Functions


The application [oismall] still exists.
The database [oismall:oismall] still exists.
CONSOLE COMMAND>

Important: You can use the shutdown command from the console, but be
aware that if used outside the OLAP Miner Command Console, it can shut
down your AIX system.

4.6.2 OLAP Miner client configuration


OLAP Miner Client has as the OLAP Miner server a configuration file, where you
have the possibility to set different parameters for the client. The OMClient.cfg file
is located in the x:\ibm\db2olap\bin directory and is shown in Example 4-4.

Example 4-4 OMClient.cfg file.


<?xml version="1.0"?>
<!-- IBM OLAP Miner Client Config 4-25-2002 -->
<OMClientConfig>
<olap_miner_server value = "cayman.almaden.ibm.com"/>
<port value = "1976"/>
<sup_missing_rows value = "true"/>
<spreadsheet value="c:\lotus\123\123w.exe" parms=”-L SV/>
<clientlog path=”\” max_size=1000000” verbose=”high”/>
</OMClientConfig>

The spreadsheet element of the OMClient.cfg file has an optional parameter


called “parms”. It is used to provide extra parameters to the spreadsheet program
that is to be launched. This can be helpful if a local national language version of
the spreadsheet needs to be started. If the client log pointing to a specific
spreadsheet is not present in the OMClient.cfg file, the default spreadsheet in the
Windows registry is launched.

Another way of doing Deviation detection is by running the definitions you already
created, from the command line, using the OMRunDef. Be aware that the name of
the application to run must not contain blanks, and if they do, you need to use
quotation marks around the name, for example, “home banking”.

In Example 4-5 we are running the PC-banking deviation detection, creating


LROs, and writing the mining run log output to the file e-bank_om.txt. This is also
the file where you will find any error messages associated with the mining run.

Example 4-5 Running OLAP Miner on PC-banking


call omrundef.bat -login Cayman olapcay olapcay1 -use Cayman 1976 -start e-bank
e-bank PC-banking -createlro -output c:\e-bank_om.txt

Chapter 4. Mining your OLAP cube with OLAP Miner 113


The call in the command line in Example 4-5 will work only if we put the entire
command inside batch files. If we are to run from the command line directly, we
can not use call.

Note: Windows 98/Me imposed a maximum length string of 128 characters


(DOS shell).

OMRunDef gives you the advantage of creating a batch file for invoking multiple
OLAP mining runs, for example when the cube has been updated with new data.
This also gives you the possibility to start multiple mining runs from within the
process flow of an ETL tool, like IBM DB2 Warehouse Manager, Ascential
DataStage or ETI Extract.

4.7 OLAP Miner results and logs


When running the OLAP Miner deviation detection, the process is being logged
on the server. For administration, it is relevant to take this into consideration.
Below are the files that OLAP Miner generates on the server. You will find them in
directory:

$ARBORPATH/om_data/svralias/ApplName/DatabaseName/OMDeviationName

The files located here are the following:


򐂰 log: The log file (see Example 4-6) contains information on both the
application to be mined (name of application and database, number of
dimensions, names of dimensions), but also the description of the sub-cube
that actually has been mined. As you might recognize below from the log, it
holds the information of the sub-cube name (PC-banking), and the 2
dimensions of the sub-cube that was mined.

Example 4-6 Log file describing the subcube that was mined
Cube Name
/olap81/om_data/cayman/e-bank/e-bank/PC-banking/3312810277/par_27115
Number of dimension 2
Dimension 0 141
Hierarchy 0 number of levels 3
Level 0 number of members 413
Level 1 number of members 8
Dimension 1 429
Hierarchy 0 number of levels 4
Level 0 number of members 36
Level 1 number of members 12
Level 2 number of members 3

114 DB2 OLAP Server V8.1: Using Advanced Functions


򐂰 sts: This file is a check file used internally during the OLAP Mining process.
򐂰 xml: The XML file holds the complete definition of the deviation detection
definition, and therefore information about each dimension in the application,
and whether the dimension is tagged as sparse or dense. This file can be
used to move defined deviation detections to other servers, where mining can
take place. Be aware that dimension and member names, database and
application names need to be adjusted to the new mining environment, if the
file is moved to another environment. The XML file viewed in a Web browser
is shown in Figure 4-20, and serves the purpose of illustrating the contents of
the OLAP Mining generated XML file.

Figure 4-20 OLAP Miner XML files shown in the Web browser

򐂰 xml.vfy: XML verify files. Used temporarily for verifying XML file.
򐂰 .err : The .err files are error files from the OLAP mining process, and will
contain error messages if the mining run failed.
򐂰 yyyy-mm-dd-hh-mm.res: The name of the deviation detection result file,
concatenated by full date down to minutes.

Chapter 4. Mining your OLAP cube with OLAP Miner 115


116 DB2 OLAP Server V8.1: Using Advanced Functions
Part 3

Part 3 Advanced functions


of Enterprise
Services
In this part of the book, we discuss Enterprise Services, the feature that provides
the means to create a reliable infrastructure and to maximize performance under
all system conditions.

This feature makes it possible to deliver large scale Internet, DB2 OLAP Server
applications to large user communities, providing high availability, high
concurrency, and optimum query response time in enterprise-level environments.

© Copyright IBM Corp. 2002. All rights reserved. 117


118 DB2 OLAP Server V8.1: Using Advanced Functions
5

Chapter 5. Enterprise Services


In this chapter we explain what Enterprise Services consists of, and how it works.
To demonstrate how you can start with Enterprise Services, we explore some
sample scenarios that show the clustering, load balancing, fail-over, and
connection pooling functionalities.

We also describe how to install, configure, and start using Enterprise Services.
This information is presented in a step-by-step format for a better and more
detailed comprehension.

We focus on these topics:


򐂰 Enterprise Services overview
򐂰 Enterprise Services configurations
򐂰 Enterprise Services deployment scenarios:
– Scalability
– Workload balancing
– Fail-over
– Connection pooling
– Managing Enterprise Services users
򐂰 Implementing Enterprise Services with TCP/IP step by step

© Copyright IBM Corp. 2002. All rights reserved. 119


5.1 Enterprise Services overview
Enterprise Services is a middle tier feature that provides large-scale, distributed
and Web-enabled platform for DB2 OLAP Server applications. It also provides a
J2EE compliant, middle tier framework to develop and customize JAVA based
API client applications. Enterprise Services brings DB2 OLAP Server application
to large user communities by providing these advantages:
򐂰 Scalability:
– Enterprise Services allows client requests to share connections
maximizing resource utilization and improving performance.
The client application does not connect to any OLAP server, but only to
Enterprise Services, which holds the connection with the OLAP Servers.
Enterprise Services can use the same OLAP Server port for different
client applications. For example, instead of keeping an OLAP server
connection open for a Web user browsing Web pages, the connection can
be shared with other users.
– Enterprise Services allows consistent query response time and can
improve it by implementing clustering (logical group of different physical
servers) and load balancing.
Distributing the client requests (load balancing) to all OLAP Servers that
are part of the cluster can improve query response time as more OLAP
servers and more processors are serving client requests. The query
response time can also be more consistent because you avoid a single
OLAP Server to be overloaded.
򐂰 Availability:
– Enterprise Services provides transparent server and cube failover. An
administrator can take a cube or an entire OLAP server off-line from the
cluster for maintenance and it is transparent to the user. Further it allows
to implement an automatic failover to run analytical applications 24x7
specifically when deploying Web based analytical services for the
customers and partners of your enterprise.
򐂰 Security across servers:
– Enterprise Services allows single sign-on to a domain of servers.
– Enterprise Services provides security information as how many
connections are active, who is connected, names and IP addresses of the
users connected and password related information.

Enterprise Services has been designed to support today’s business


requirements of high concurrency, scalability, and reliability.

120 DB2 OLAP Server V8.1: Using Advanced Functions


Figure 5-1 shows the Enterprise Services environment and architecture.

Client Tier Middle Tier Database Tier


OLAP Server Clients Services OLAP Servers
Spreadsheet Add-in
Application Manager
ESSCMD
CAPRI or VB API application
Partner tools
Objects TCP/IP
OLAP Analyzer

Enterprise
Services Console
(Java Client) Essbase JAVA API

Spreadsheet
HTTP, RMI, TCP/IP
Services or HOP
Analyzer v6.1.1
Enterprise
Services

Custom JAVA
client

ODBC/Native driver ODBC/Native driver

OLAP RDBMS
Metadata source
Catalog ODBC/Native driver
Domain Storage

Figure 5-1 OLAP system architecture overview

Attention: In order to be able to use Enterprise Services, for example, for


clustering and connection pooling, the client application (spreadsheet add-in,
and so on) needs to use the new JAVA API provided by Enterprise Services.

Enterprise Services is delivered with its own sample JAVA client programs to
provide a fast start, developing environment and you can also develop your
own custom client programs.

Enterprise Services supports multiple types of communication protocols between


the JAVA API and the Enterprise Services server. By default this communication
is through TCP/IP.

Chapter 5. Enterprise Services 121


The technologies supported are:
򐂰 Transmission Control Protocol/Internet Protocol (TCP/IP): A sample
implementation of this protocol is covered in this book, through the use of the
sample programs that come with Enterprise Services. The sample programs
use the TCP/IP environment by default, and include programs for connection
pooling and cluster creation, loading and retrieving data.
򐂰 Hypertext Transfer Protocol (HTTP): To develop an environment using the
HTTP protocol, you can use end-user tools to access the information, like
Essbase Spreadsheet Services V6.1.1, which is the spreadsheet add-in
version supporting the new JAVA API provided by Enterprise Services.
򐂰 Enterprise JAVA Beans (EJB): To use this protocol, it is necessary to
develop the programs to access the information stored in the cubes. This
process is not covered in this book.
򐂰 Common Object Request Broker Architecture (CORBA): To use this
technology, you must develop the programs to access the information in DB2
OLAP Servers. This process is not covered in this book.

For more information about the supported protocols, see 5.2, “Enterprise
Services configurations” on page 124.

5.1.1 Enterprise Services components


Enterprise Services requires two software components:
򐂰 IBM DB2 OLAP Server: Used to build, maintain and administer the cubes
򐂰 Java API client programs: Used to run against Enterprise Services and to
access the information stored in the cubes.

You must have DB2 OLAP Server cubes up and running and connected with
Enterprise Services. We will user the term OLAP JAPI in the following for any
kind of client access. To access information in the OLAP cubes through
Enterprise Services, you can use Essbase Spreadsheet Services, any client
application supporting the new JAVA API, or custom developed JAVA API
programs.

The relationship between the different components is shown in Figure 5-2.

122 DB2 OLAP Server V8.1: Using Advanced Functions


OLAP JAPI Olap Server
Client Programs Cluster

Olap
Server

Enterprise Olap
Services Server
Server
Olap
Server

Domain
Storage

Figure 5-2 Enterprise Services System

Enterprise Services also uses a domain storage, to store control information,


which can be a flat file, an LDAP file, or a Java Database Connectivity
(JDBC)-compliant relational database (which does not come with Enterprise
Services).

Although the flat file domain storage is the default configuration, it is only
recommended for development and testing purposes. For a production
environment, you must configure a relational database such as DB2 UDB,
Oracle, or SQL Server to be used as domain storage.

For the examples and the case study used in this book to illustrate the
functioning of Enterprise Services, we use DB2 UDB v7.2.

Chapter 5. Enterprise Services 123


Enterprise Services acts as a broker for client program requests to OLAP
servers. There are four major components in the Enterprise Services family:
򐂰 Enterprise Services Server: Acts as a gateway for OLAP server requests
and provides user authentication, load balacing, failover support, event
handling and messaging service.
򐂰 Enterprise Services Console: A graphical interface for administrators and
users, who, based on access rights, can perform tasks such as administering
Enterprise Services servers, OLAP servers, user accounts and security
information.
򐂰 Enterprise Services Command Shell: A command line interface for
administering Enterprise Services servers, OLAP servers, user accounts and
security information.
򐂰 DB2 OLAP Server JAPI: Provides Java programming interface for
developing custom, Web-enabled programs that use Enterprise Services.

These components work together with DB2 OLAP Server servers and Enterprise
Services client programs to provide the functionality of Enterprise Services
product.

5.2 Enterprise Services configurations


There are four types of technologies that you can use to connect DB2 OLAP
Server JAPI client programs to Enterprise Services:
򐂰 TCP/IP: To start implementing a test environment with the sample programs
already provided with Enterprise Services. TCP/IP is one of the most
common working environments when you are inside the company firewalls.
򐂰 HTTP: When trying to expand your enterprise information to the outside of the
company firewalls.
򐂰 EJB: When the company already has expertise in developing with this
protocol and with application servers.
򐂰 CORBA: When looking for a fast response environment and there are skills in
the company.

These technologies are shown in Figure 5-3.

124 DB2 OLAP Server V8.1: Using Advanced Functions


Java
Java AA PI
PI O lap S erver C lu ster
T
Tcp /ip
cp/ip
clien
clientt

O L AP
Serv er
Java A PI
HTTP
clien t
E nterprise O L AP
S erver
S ervices
Ja va A pp lication S erver S erver
O L AP
Java A PI
Server
EJB
clien t

O L AP
S erve r
J ava App lication S erver

Java A PI RDBM S
C orba
clien t Do m ain S to rag e

Figure 5-3 Client program technologies

In order to access information through Enterprise Services, client programs must


use the DB2 OLAP Server JAVA API. These programs can be developed in JAVA
if needed, either as a servlet, applet, EJB or stand-alone application. The type of
Java program you develop depends on the technology you need to work with
Enterprise Services, chosen from the ones described above.

In the following sections you will find an overview of each of these supported
technologies, as well as some of their advantages and disadvantages.

5.2.1 TCP/IP Client Programs


Client Programs can use TCP/IP to communicate with Enterprise Services.
TCP/IP is a well known and widely supported communication protocol used for
computer to computer communication over the Internet. Figure 5-4 shows an
example of this configuration.

Enterprise Services provides by default the TCP/IP configuration and the sample
programs are based in this technology. These sample programs can be a useful
starting point to simulate a client scenario, as well as to build a testing
environment and start using Enterprise Services.

Chapter 5. Enterprise Services 125


Client programs that use TCP/IP are usually stand-alone Java programs.
However, these client programs can also run as Java servlets. If the client
program uses TCP/IP, Enterprise Services must run as a stand-alone Java
program.

Olap Server Cluster

OLAP
Server

Enterprise
TCP/IP
client JAPI Services OLAP
program libraries Server Server

OLAP
Server

Domain
Storage

Figure 5-4 Java applet client program using TCP/IP

The advantage of implementations of Enterprise Services client programs using


TCP/IP is that the client programs are small. Such clients are somewhat more
difficult to program than HTTP clients, since they must be able to communicate
with the Enterprise Services server using the lower-level TCP/IP communication
protocol.

5.2.2 HTTP client programs


HTTP Client Programs have the advantage of being the lightest client programs.
An HTTP configuration also enables these programs to use Secure Sockets
Layer (SSL) communication protocols.

Client programs that use this configuration usually are Java applets running in a
Web browser, as shown in Figure 5-5. However, the client program can also run
as a stand-alone Java program or servlet.

If the client program uses HTTP, Enterprise Services must run as a Java servlet
in a Java application server, which is not included with the product.

126 DB2 OLAP Server V8.1: Using Advanced Functions


Web Container Olap Server Cluster

Web browsers
OLAP
Enterprise Server
HTTP Services
client JAPI Server
program libraries OLAP
Server

OLAP
Server

Dom ain
Storage

Figure 5-5 Java applet client program using HTTP

Essbase Spreadsheet Services, one of the end user tools you can use to access
information through Enterprise Services, connects to Enterprise Services Server
through HTTP. Figure 5-6 shows the architecture for Essbase Spreadsheet
Services.

Client Middle Tier Data Layer

OLAP Server Cluster


Essbase JAVA API
Spreadsheet Web

Excel
Addin
Excel Applications

OLAP
Service

Server

Excel VBA Enterprise


toolkit Services OLAP
HTTP - SOAP Server
Excel VBA
RPC
Module OLAP
Server

User
Context

Repository

Figure 5-6 Spreadsheet architecture

Chapter 5. Enterprise Services 127


Client programs using HTTP and communicating with Enterprise Services tend
to be a little bit slower, because this protocol is not optimized for
software-to-software communication.

5.2.3 EJB client programs


Another technology client programs can use to communicate with Enterprise
Services is EJB technology and Remote Method Invocation (RMI). This protocol
is specifically designed to Java-to-Java communication and is meant for use
within a context of Java application servers.

If you choose to use EJB technology, both client programs and Enterprise
Services must run as EJBs within a Java application server as shown in
Figure 5-7.

Olap Server Cluster


Java application
Server
Enterprise
EJB/RM I
Services OLAP
Server
client Server
JAPI
EJB libraries runing as
program
Web Browsers an EJB OLAP
Server

OLAP
Server
Domain
Storage

Figure 5-7 Client program using EJB

When you choose this kind of technology, you must develop the end user
programs that will have access to the information through Enterprise Services
and any other application that you want to run against the ES server.

These kinds of implementations using EJB technology have the advantage of


running both the client and the server in a single Java application server
environment. However, a service interruption in either the client or server
component can stop the Enterprise Services system. This problem can be
addressed by clustering Java application servers; that is, by running additional
copies of the Enterprise Services client and server on separate, connected Java
application servers.

128 DB2 OLAP Server V8.1: Using Advanced Functions


5.2.4 CORBA client programs
If the chosen technology to communicate with Enterprise Services is CORBA,
then you require CORBA Object Request Broker (ORB) software, such as
Borland VisiBroker, to be present for both the client program and the Enterprise
Services server. This product does not comes with Enterprise Services.

As shown in Figure 5-8, if a client program uses CORBA, it is usually a Java


servlet running in a Java application server, communicating with Enterprise
Services through Internet Inter-Orb Protocol (IIOP). However, it can be also a
stand-alone Java applet or Java program. A Java servlet client program is the
most likely configuration, because it enables the creation of thinner,
browser-based, end-user client programs.

Olap Server Cluster


OLAP JAPI Program
using CORBA
Java application server OLAP
Enterprise Server
Services
custom IIOP Server
JAPI
Java servlet libraries as a OLAP
Web Browsers program stand-alone Server
Java program

OLAP
Server

Domain
CORBA ORBs Storage

Figure 5-8 Java servlet client program using CORBA

CORBA client programs connecting with Enterprise Services usually provide the
fastest performance, depending on the size and complexity of the client program
logic. In these kinds of implementations, if the client program and the Enterprise
Services server are separated by a security firewall, the client program must use
tunneling protocols to communicate with Enterprise Services Servers. These
client programs must be developed in order to work with CORBA and Enterprise
Services.

5.3 Enterprise Services deployment scenarios


This section helps to understand what scalability means in an OLAP environment
and the benefits of clustering and connection pooling. It also describes some
scenarios to start using and deploying clustering and connection pooling when
the OLAP server or the application is failing over, or to balance the analytical
requests workload.

Chapter 5. Enterprise Services 129


5.3.1 Scalability overview
Because organizations gained access to broader and deeper sets of information,
data warehousing experienced explosive growth during the past decade. Today,
most of the corporations base decisions at all levels upon a richer set of data.

The evolution of analytical tools provided more flexible access to new


information. OLAP technologies allow users to pivot data, drill-down to a fine
level of granularity, and determine the data paths leading to meaningful answers
at query time.

Scalability is an important feature for most of the applications. It is especially


important and essential for enterprise wide analytic requiring large number of
concurrent users accessing large-scale data warehouses. Today, a large 50 GB
OLAP cube can be considered very small in the near feature.

Some important attributes necessary to successfully manage a high-volume


analytic system include the following:
򐂰 Ability to process a large volume of data
򐂰 Ability to support thousands of users
򐂰 Ability to distribute and aggregate data from large server clusters
򐂰 Ability to deliver real-time information
򐂰 Ability to be managed centrally
򐂰 Ability to scale linear (adding new server)

The Enterprise Services enables scalability for large enterprise analytic


application on DB2 OLAP Server. A cluster architecture allows you to distribute
the workload (users requests) across multiple physical resources (DB2 OLAP
Servers installations). The requests to access information from the OLAP Server
are equally distributed through this multiple physical resources to ensure a
consistent response time.

5.3.2 Clustering
Enterprise Services cluster is a logical definition for a group of DB2 OLAP
Servers running copies or replicas of the same DB2 OLAP Server application
and database to serve all users requests as an single logical unit.

Note: A cluster requires a full (identical ) copy of the same DB2 OLAP Server
Application and Database. On the following, we are using the term copy or
replica for the same purpose.

130 DB2 OLAP Server V8.1: Using Advanced Functions


The main characteristics of a DB2 OLAP cluster are:
򐂰 It can contain a single DB2 OLAP Server installation running multiple copies
of the same DB2 OLAP Server application and database.
򐂰 It can contain multiple DB2 OLAP Server installations running multiple copies
of the same DB2 OLAP Server application and database.
򐂰 The DB2 OLAP Server installations that are part of the same cluster need to
reside on different machines.
򐂰 All the DB2 OLAP Server applications and databases defined on the cluster
must be identical copies.

Restrictions:
򐂰 On this tested version of Enterprise Services, a cluster only support DB2
OLAP Server Version 8.1 (Hyperion Essbase 6.5)
򐂰 Enterprise Services does not support multiples installations of DB2 Sever
on the same machine
򐂰 Enterprise Services only support read access to DB2 OLAP Server
applications and databases

The main benefits of implementing a cluster of DB2 OLAP Server databases are:
򐂰 Linear scalability by adding new physical resources to the cluster:
– The scalability of the solution supports linear growth. As the user
community grows or become more active (the workload increase), then
you just need to add more DB2 OLAP Servers to the cluster to improve
response time.
򐂰 Workload balancing by distributing the load across multiple physical
resources:
– Distributing the workload across multiple servers, provides consistent
response time for the users requests and enables you to implement large
and enterprise OLAP solutions over the Web.
򐂰 Eliminate a single point of failure in a system:
– If a failure occurs in one application and database in the cluster, Enterprise
Services automatically tries to re-start the application and database.
– If an application and database is disabled by the OLAP administrator or by
a system failure, Enterprise services re-directs the user’s requests to other
active databases in the cluster.
– If a failure occurs in one of the DB2 OLAP servers installations in the
clusters, the system is able to continue processing by re-directing users
requests to others DB2 OLAP Servers in the cluster.

Chapter 5. Enterprise Services 131


For more information on failover, see “Server and application failure and
failover” on page 151.
򐂰 Improve availability of the DB2 OLAP Server applications
– Implementing a cluster with multiple copies of the same DB2 OLAP Server
application and database on different servers, allows you to perform a data
load or calculation in one of the databases in the cluster, while the users
keep accessing others copies of the same DB2 OLAP Server application
and database.

Figure 5-9 shows a basic sample scenario of DB2 OLAP Server cluster on two
different AIX servers (cayman and sicily).

ES - Clustering Scenario 1
AIX Server - Cayman
DB2 OLAP Server

Sample
Basic
Users Windows 2000/NT or Unix
Group
1 Enterprise Services Server
TCP/IP e-Bank
e-Bankdb
e-BankCluster
Cluster

OLAP OLAP Sessions


TCP/IP AIX Server - Sicily
Requests
via Java API DB2 OLAP Server

Users
Group e-Bank
2 e-Bankdb

TCP/IP

Demo
Basic

ES ADM Console

Figure 5-9 Clustering sample scenario: single OLAP database per server

Notice that:
򐂰 The OLAP application e-Bank and database e-Bankdb is defined on both
servers (Cayman and Sicily) and they are identical (have the same
information).

132 DB2 OLAP Server V8.1: Using Advanced Functions


Note: For information on how to define a cluster, see 5.4.7, “Creating clusters”
on page 195.

In general, for a basic cluster implementation, you have only one copy of the
same application and database within the same DB2 OLAP server installation.

For some cases, where you have resources (memory, CPU) available, you might
decide to have multiple copies of the same application and database within the
same DB2 OLAP Server installations that are part of the cluster (see
Figure 5-10). The outline must be the same (hierarchies, members, dimensions),
but the application/database name can be different.

Note: When defining a cluster, you have to specify all applications/database


names that belongs to the cluster and they should have exactly the same
outline.

ES - Clustering Scenario 2
AIX Server - Cayman
DB2 OLAP Server

Sample
Basic
Users Windows 2000/NT or Unix
Group
Enterprise Services Server
1
TCP/IP e-Bank
e-Bankdb
e-BankCluster
Cluster

OLAP Sessions
OLAP TCP/IP AIX Server - Sicily
Requests
DB2 OLAP Server
via Java API

Users
Group e-Bank e-Bank1
e-Bankdb e-Bankdb
2
TCP/IP

Demo
Basic

ES ADM Console

Figure 5-10 Clustering sample scenario: Multiple databases copies per server

Chapter 5. Enterprise Services 133


Note: The OLAP application e-Bank and database e-Bankdb and the
application e-Bank1 and database e-Bankdb on the Sicily Server are
identical copies of the application e-Bank and database e-Bankdb on
Cayman.

When making copies of the same OLAP application and database within the
same DB2 OLAP Server installation, you need to have a balance between the
benefits and the administration costs of having multiple copies of the same
application and database.

The benefit of having copies of the same OLAP application and database within
the same DB2 OLAP Server installation can be a better utilization of memory and
CPU on a large SMP server.

5.3.3 Connection pooling


A connection pool is a set of login sessions from Enterprise Services to a DB2
OLAP Server.

Enterprise Services uses this set of login sessions to process users requests
(retrieve data) to a specific DB2 OLAP Server application and database.

When Enterprise Services receives a user request to retrieve data from an OLAP
application and database, Enterprise Services tries to re-use existing
connections that are already open to DB2 OLAP Server. New connections are
only open when all existing connections are in use.

These are the main benefits of implementing connection pooling:


򐂰 Maximizes the utilization of the DB2 OLAP Servers Ports (connections):
– Existing connections to DB2 OLAP Server can be re-used for clients
requests
– More users can access the DB2 OLAP Server Ports, because they are
sharing connections
򐂰 Provides support for implementation of large Web OLAP applications on DB2
OLAP Server:
– The connection pool optimizes the utilization of connections, epecially for
large Web applications, where users can make a single request to access
information that is stored in an OLAP cube and then move it to different
pages on the Web site. In this case, without using the connection pool, the
connection to DB2 OLAP Server remains active until reaching the
time-out, but when using connection pool, the session can be re-used by
other user requests.

134 DB2 OLAP Server V8.1: Using Advanced Functions


򐂰 Restricts the use of a specific OLAP application and database:
– By defining a maximum number of connections that are allowed to an
application and database, you are restricting the use of this application
and database
򐂰 Provides transparency of access to OLAP applications and databases on the
DB2 OLAP Server:
– The client application does not need to have a direct connection to the
OLAP Server’s application and database; it has only reference to a
connection pool name that is a logical definition linked to a specific OLAP
Server application and database. If you move the OLAP application from
one server to another, you only need to change the definition on the
connection pool; nothing is required to change it on the client application.

To take advantage of using the connection pool, you need to implement a 3-tier
environment, installing Enterprise Services to act as an application server for all
clients requests to DB2 OLAP Server. The client application should be defined
using the Java API provided by Enterprise Services.

When a client application requesting to access an OLAP application and


database is using the Enterprise Services Java API and specifies that the
connection can be made via a connection pool, then Enterprise Services does
one of the following:
򐂰 If the connection pool does not exist, then the client application accesses DB2
OLAP directly.
򐂰 If the connection pool exists, then the client application will access DB2 OLAP
Server application and database in one of the following ways:
– Via an existing connection
– Via a new connection (if there are no available connections to use)

Figure 5-11 shows a basic sample scenario for a connection pool configuration.
In this example, we have two connection pool definitions:
1. The connection pool e-BankConnPool has two OLAP connections open to
DB2 OLAP Server on Cayman for the application e-Bank and database
e-bankdb.
2. The connection pool OnlineIConnPool has two OLAP connections open to
DB2 OLAP Server on Sicily for the application e-Bank and database
e-bankdb.

Chapter 5. Enterprise Services 135


The number of simultaneous connections to DB2 OLAP Server will be
determined by the maximum number of connections defined on the connection
definition. For more information on how to define a connection pool, see 5.4.8,
“Creating connection pools” on page 199.

ES - Connection Pooling Scenario


AIX Server - Cayman
DB2 OLAP Server

e-Bank
Users Windows 2000/NT or Unix
e-Bankdb
Group
Enterprise Services Server of s
ol
1 Po ction
e
TCP/IP nn Sample
Co
Connection Basic
Pool
e-BankConnPool
OLAP Sessions
OLAP AIX Server - Sicily
TCP/IP
Requests
Connection DB2 OLAP Server
via Java API
Pool
OnlineIConnPool
Users Co Poo Demo
nn l o
Group ec f Basic
tio
2 ns

TCP/IP
OnlineI
Onlinedb

ES ADM Console

Figure 5-11 Connection pooling sample scenario

To take full advantage of all the features provided by Enterprise Services via a
connection pool and cluster, you need to define a cluster in your connection pool.
Figure 5-12 shows a sample scenario of a cluster and connection pool.

136 DB2 OLAP Server V8.1: Using Advanced Functions


ES - Connection Pooling and Clustering Scenario
AIX Server - Cayman
DB2 OLAP Server

Sample
Basic
Users Windows 2000/NT or Unix
Group
Enterprise Services Server
1
AP e-Bank
TCP/IP 2 OL ons
necti e-Bankdb
Con

e-BankConnPool
Connection Pool

e-BankCluster
Pool of Maximum
4 Connections

Cluster
OLAP OLAP Sessions
TCP/IP AIX Server - Sicily
Requests
via Java API DB2 OLAP Server

2O
Users Con LAP
nec e-Bank e-Bank1
tion
Group s
e-Bankdb
e-Bankdb
2
TCP/IP

Demo
Basic

ES ADM Console

Figure 5-12 Connection pooling and clustering scenario

When combining connection pooling and clustering, you will have all the benefits
from connection pooling and from clustering, like improved availability, consistent
query response time, workload balance, support for application and server
failover, optimization of the DB2 OLAP connections.

On the sample scenario for cluster and connection pool (see Figure 5-12), there
are 3 identical copies of the OLAP application e-Bank and database e-BankDB,
the server Cayman has one copy of this Cube and the Server Sicily has two
copies of the same Cube.

Also, on the sample scenario for a cluster and connection pool (see Figure 5-12),
there is a representation for two OLAP (Sessions) from the Enterprise Services
Server to each one of the OLAP Servers (Sicily and Cayman), and these
connections are shared by all user requests done via Java API to retrieve data
from the application e-Bank and database e-BankDB.

The workload (clients requests) will be distributed to both servers (Sicily and
Cayman) and to all DB2 OLAP Server Applications and Databases that are
defined on the cluster (for example, Cayman/e-Bank/e-BankDB,
Sicily/e-Bank/e-BankDB, Sicily/e-Bank1/ e-BankDBB).

Chapter 5. Enterprise Services 137


Refer to Table 5-1 for a better understanding of the functions and limitations of
connection pooling and clustering.

Table 5-1 Main characteristics of connection pool and cluster


Characteristics Cluster Connection Both
without pool connection
connection without pool and
Pool cluster cluster

Connect to a single DB2 OLAP true true true


Server installation
Connect to a single OLAP Cube true true true

Connect to multiple DB2 OLAP true false true


Server installations
Connect to multiple identical true false true
OLAP Cubes
Support for workload balance true false true

Support for failover true false true

Share DB2 OLAP Server connections false true true


(Sessions)

5.3.4 Workload balancing


The Enterprise Services has the ability to perform a kind of workload balancing.
We define the term workload balancing in Enterprise Services as the distribution
of all the clients requests to all servers that are part of the DB2 OLAP Server
cluster. Enterprise Services uses a round robin scheme and distributes requests
equally between all OLAP servers in the cluster, without taking specifically into
account the workload of each request or how busy a particular server actually is.

Enterprise Services receives all the clients requests to access one specific DB2
OLAP application and database and distribute equally across all DB2 OLAP
Servers that belong to the connected cluster and that are running copies of the
requested application and database.

Enterprise Services distributes the client requests to the servers in the sequence
that each DB2 OLAP Server, Application, and Database is defined in the cluster
property definition Service component names. The reference for one specific
DB2 OLAP Server, Application, and Database can be defined more than once on
the same cluster. For more detailed information on the definition of Service
component names cluster properties, see 5.4.7, “Creating clusters” on
page 195.

138 DB2 OLAP Server V8.1: Using Advanced Functions


Load balance is only performed when the client request to access a DB2 OLAP
application and database is done via a cluster and using the Enterprise Services
Java API.

Figure 5-13 shows a sample scenario for load balance. In this scenario, there is a
connection pool (e-BankConnPool) defined to a cluster (e-BankCluster). The
connection pool e-BankConnPool is defined with a minimum of 2 and a
maximum of 4 connections. When Enterprise Services activates this connection
pool, two sessions are established to the OLAP Servers (Sicily and Cayman).

ES - Workload Balance - Initial Workload


AIX Server - Cayman
DB2 OLAP Server

Demo
Basic
Users Windows 2000/NT or Unix
Group
Enterprise Services Server
1
AP e-Bank
1 O L ons
Minimum
Maximum

TCP/IP
e-BankConnPool

ti e-Bankdb
Connection Pool

nec
Con
e-BankCluster
Cluster
2

OLAP Sessions
4

OLAP
TCP/IP AIX Server - Sicily
Conne ctions
Connections

Few Client requests Requests


via Java API DB2 OLAP Server

1O
Users Con LAP
ne c
tion
Group s e-Bank
2 e-Bankdb
TCP/IP

Demo
Basic

ES ADM Console

Figure 5-13 Workload balance: Initial sessions established to DB2 OLAP Servers

The sample scenario defined in Figure 5-13 represents an environment with few
users requesting access to the cluster e-BankCluster. In this scenario, only two
connections (sessions) from Enterprise Services Server to DB2 OLAP Server on
Cayman and Sicily are required to supply the requests from a few client requests.

Chapter 5. Enterprise Services 139


Initial workload distribution
When you start Enterprise Services Server, the following activities are
performed:
1. All enabled clusters are activated (see Figure 5-16 on page 142 and
Figure 5-17 on page 143).
2. All enabled connections pools are activated (see Figure 5-16 on page 142
and Figure 5-17 on page 143).
3. Connections (sessions) are established to DB2 OLAP Server (see
Figure 5-17 on page 143).
a. The connections are open to all DB2 OLAP Servers that are defined in the
cluster in order that they appear on the cluster definition.
b. During the startup of Enterprise Services, only the minimum number of
connections is opened (see properties Initial capacity in Figure 5-14).
c. The minimum number of connections is distributed to all DB2 OLAP
Servers defined in the cluster.

Minimum # of # of incremental Minimum and Maximum


connections connections to be # of connections for the
opened to DB2 opened connection pool
OLAP Server e-BankConnPool

Figure 5-14 Enterprise Services: connection pool definition for e-BankConnPool

140 DB2 OLAP Server V8.1: Using Advanced Functions


Cluster definition for the application e-Bank
and database e-BankDB on Sicily and Cayman
DB2 OLAP Servers.

Figure 5-15 Enterprise Services: Cluster definition for e-BankCluster

Chapter 5. Enterprise Services 141


Cluster to be Connection pool
activated during to be activated
EES startup during EES startup

Figure 5-16 Enterprise Services: Enable cluster and connection pool

In Figure 5-17, on the log for the console, you can see the number of connections
opened to the cluster e-BankCluster.

142 DB2 OLAP Server V8.1: Using Advanced Functions


Minimum # of User that open all Minimum and Maximum
connections the connections to # of connections for the
opened to DB2 DB2 OLAP Server connection pool
OLAP Server e-BankConnPool

Figure 5-17 Opening connections to DB2 OLAP Server

To see the number of connections opened on all DB2 OLAP Servers that are part
of the cluster, use the Application Manager (AM) that is the client application for
DB2 OLAP Server:

On the Windows Start Menu:


򐂰 Select Programs —> IBM DB2 OLAP Server 8.1 —> Application Manager

On the Application Manager menu:


򐂰 Select Security —> Connections (see Figure 5-18).

On our sample scenario for a connection pool and cluster, in Figure 5-19 and
Figure 5-20, you can see the initial connections opened for both servers (Sicily
and Cayman).

Chapter 5. Enterprise Services 143


Figure 5-18 AM: Connections

1 Initial Session opened to Cayman


Server

Figure 5-19 AM connections panel: DB2 OLAP Server on CAYMAN server

144 DB2 OLAP Server V8.1: Using Advanced Functions


1 Initial Session opened to Sicily Server

Figure 5-20 AM connections panel: DB2 OLAP Server on SICILY server

Incremental requests distribution


When all the initial connections (see Initial capacity) defined in the connection
pool are in use with the current load (current users requests) and the new users
request require additional connections to DB2 OLAP Server, Enterprise Services
open new connections to the DB2 OLAP Servers that are part of the cluster. The
number of additional connections can increment up to the Maximum number of
connections allowed. See Maximum capacity properties on Figure 5-14 on
page 140.

The additional connections are distributed to all DB2 OLAP Servers that are part
of the cluster, and the distribution is done in order that they are defined on the
cluster definition.

Figure 5-21 shows a sample scenario where the maximum number of


connections that is allowed for all DB2 OLAP Servers in the cluster is in use. In
this scenario, you can see that the requests are equally distributed for both
servers (Cayman and Sicily)

Chapter 5. Enterprise Services 145


ES - Workload Balance - Incremental Workload
AIX Server - Cayman
DB2 OLAP Server

Demo
Basic
Users Windows 2000/NT or Unix
Group
Enterprise Services Server
1
AP e-Bank
TCP/IP 2 OL tions

Minimum
Maximum

DemoBasicCluster
n nec e-Bankdb

DemoBasicPool
Connection Pool
Co

Cluster
2
4
OLAP OLAP Sessions
TCP/IP AIX Server - Sicily

Connections
Connections
Many Client requests Requests
via Java API DB2 OLAP Server

2O
Users Con LAP
nec
tion e-Bank
Group s
2 e-Bankdb

TCP/IP

Demo
Basic

ES ADM Console

Figure 5-21 Workload balance: Incremental sessions established to OLAP servers

Balanced workload
We define balanced workload as a situation where the client requests to access
a specific DB2 OLAP Server application and database are equally distributed to
all DB2 OLAP Servers that are part of the cluster.

In an OLAP Server installation, you can have multiple cluster definitions for the
same DB2 OLAP Server application and database, and also, you can have
different cluster definitions for a different application and database.

In this case, if you want to equally distribute the requests across all servers
defined on all clusters, all the cluster definitions need to have a single definition
for a combination of DB2 OLAP Server, Application, and Database. See the
example shown in Figure 5-22.

146 DB2 OLAP Server V8.1: Using Advanced Functions


Cluster Definition with two DB2 OLAP
Server, each one having only one
application and database entry

Figure 5-22 Sample cluster definition: Without repetition

Figure 5-22 has a sample definition for the Service component names field of the
cluster definition properties without repetition of DB2 OLAP Server, application
and database. In this example, Enterprise Services distributes all the client
requests equally to both servers (Sicily and Cayman), and the distribution will be
in the following order:
1. Cayman/e-Bank/e-BankDB
2. Sicily/e-Bank/e-BankDB

Unbalanced workload
To give a different workload to a specific OLAP Server, the definition for a
combination of DB2 OLAP Server, Application, and Database needs to appear
repeated in the cluster properties definition Service component names.
See the example in Figure 5-23.

Chapter 5. Enterprise Services 147


Cluster definition for two DB2 OLAP Servers
and the Server Sicily is repeated 3 times

Figure 5-23 Sample cluster definition: With repetition

In the example shown in Figure 5-23, the server Sicily will receive 3 times more
requests or workload than the server Cayman, because on the cluster definition,
the application e-Bank and the database e-BankDB appears defined 3 times for
the server Sicily and only once for the server Cayman .

In the example shown in Figure 5-23, Enterprise Services distribute all the client
requests not equally to both servers (Sicily and Cayman) and the distribution will
be in the following order:
1. Cayman/e-Bank/e-BankDB
2. Sicily/e-Bank/e-BankDB
3. Sicily/e-Bank/e-BankDB
4. Sicily/e-Bank/e-BankDB
Another way to give more workload to a server in a cluster configuration, is by
doing copy of the same application in one of the servers. The example on
Figure 5-24, the server Sicily has two OLAP applications and database
(e-Bank/e-BankDB and e-Bank1/e-BankDB).

148 DB2 OLAP Server V8.1: Using Advanced Functions


These two applications are identical copies of the application e-Bank/e-BankDB
defined on the Cayman Server.

ES - Work Load Balance - Unbalanced Work Load


AIX Server - Cayman
DB2 OLAP Server

Demo
Basic
Users Windows 2000/NT or Unix
Group
1 Enterprise Services Server
AP e-Bank

Minimum 2 Connections
2 OL tions

Maximum 6 Connections
TCP/IP

DemoBasicCluster
ne c e-Bankdb

DemoBasicPool
Connection Pool
C on

Cluster
OLAP OLAP Sessions
TCP/IP AIX Server - Sicily
Many Client requests Requests
via Java API DB2 OLAP Server
4O
Con LAP
nec
Users tion
s
Group e-Bank e-Bank1
2 e-Bankdb e-Bankdb

TCP/IP

Demo
Basic

ES ADM Console

Figure 5-24 Workload balance: Unbalanced load sample scenario

In the sample scenario shown in Figure 5-24, the Server Sicily can receive twice
as many requests as the Server Cayman. The cluster definition for this scenario
is shown in Figure 5-25.

Chapter 5. Enterprise Services 149


Copy of the application
e-Bank and database
e-BankDB on the same
DB2 OLAP Server

Figure 5-25 Sample cluster definition: Duplicating an application and database

Considerations for connection pooling and clustering


Here we discuss some considerations for connection pooling and clustering:
򐂰 When Enterprise Services is activating the connection pool for a cluster and
you have defined a minimum number of connections (minimum capacity)
that is lower than the number of servers definitions in the cluster, it might
happen that not all DB2 OLAP servers will have pre-established sessions
during the activation of the connection pool.
Sessions to non-used DB2 OLAP Servers that are part of the cluster can be
opened when user requests increase to a number requiring more sessions.
Enterprise Services opens new sessions based on the number specified in
the connection pool properties Maximum capacity and Capacity Increment.
򐂰 The maximum number of connection allowed to all DB2 OLAP Servers in the
cluster is the number specified in the connection pool definition (Maximum
capacity properties) or when the client requests reach the maximum number
of ports available on all DB2 OLAP Servers that are part of the cluster.

150 DB2 OLAP Server V8.1: Using Advanced Functions


򐂰 If the maximum number of connections defined in the connection pool
definition properties is lower than the number of DB2 OLAP Servers
installations defined in the cluster field definition Service component names,
than not all DB2 OLAP Servers installations are used to distribute the
workload (client requests)
򐂰 Since the number of connections for each DB2 OLAP Server is defined at the
application and database level, then the workload for the entire server depend
in the distribution of the workload for all clusters.

Run Sample Query Program — runtest command shell


Enterprise Services provide a command shell runtest to retrieve data from the
sample DB2 OLAP Server application Demo and Database Basic. The runtest
command is a non documented command, but it is very useful to test workload
simulation scenarios.

To invoke the runtest command shell, you need to follow these steps:
򐂰 Start the Command Shell Console.
򐂰 Signon to the Enterprise Services Server, for example, signon system,
password.
򐂰 Perform runtest numIteration, numThreads, orbType, port, prefHost,
olapSvr, user, password, useConnPool, connPerOp, useCluster,
readOnly.
Where:
numiteration = Number of client request to be issued
numThreads = Number of threads for each iteration
orbType = Protocol (as tcpip or http, and so on)
port = tcpip port configured for Enterprise Services. Default is 5001
prefHost = Enterprise Services Server hostname
olapSvr = The DB2 OLAP Server
user = Enterprise Services User
password = Enterprise Services User Password
useConnPool = Specify true to use connection pool
connPerOp = Define true to use connection pool per operation
userCluster = Define true to use cluster
readOnly = Define true for read only operation

5.3.5 Server and application failure and failover


The Enterprise Services provide transparent failover support for a DB2 OLAP
environment where the client request to access data from OLAP applications and
cubes is done by JAPI applications.

Chapter 5. Enterprise Services 151


The failover support on Enterprise Services is enabled via cluster and connection
pool definition.

There are three different levels of failover support:


1. JAPI fault tolerance:
If Enterprise Services Server is stopped (normal or abnormal) and restarted
while JAPI client sessions are already in progress, JAPI will automatically
restore the sessions.

Note: This feature is currently not supported for outline operations and cube
view operations, and is supported for all the rest of the functionality. For
information on JAPI operations (as cube view, outline and other functions),
see the Enterprise Services online documentation, Essbase JAPI Reference.

2. Application and database fault tolerance:


Enterprise Services detects DB2 OLAP Server services interruption in a
cluster and automatically re-starts the service component (application or
database)
3. Server fault tolerance:
Enterprise Services detects DB2 OLAP Server interruption in a cluster and
automatically re-directs the client request to another service component
(Server, Application, and Database) available on the cluster.

Application and database fault tolerance


The setting reconnectRetryOnSameSvcComponErrorCodes defined in the
essbase.properties file allows custom fault tolerance actions. This setting is
defined to handle error conditions situations on the same service component
(see Example 5-1). In case of failure event in a cluster component (application or
database), Enterprise Services retries the request to the same DB2 OLAP Server
application and database.

Example 5-1 Fail tolerance actions on same service component


system.faultTolerance.reconnectRetryOnSameSvcComp.onErrorCodes=1013095,1042006

152 DB2 OLAP Server V8.1: Using Advanced Functions


To reconnect and retry data query operations (read-only) on the same OLAP
server, the following is required:
򐂰 Configuration:
– Enterprise Services needs to be configured with the connection pool
(in connection per operation mode or connection per session mode) over a
cluster or over a component (cube).
– The JAPI client performing data query using IEssDomain.openCubeView
(String cubeViewName, String olapSvrName, String appName, String
cubeName, boolean useConnPool, boolean connPerOp, boolean
useCluster, boolean readOnly) has to make sure that a value of true is
passed to the last four parameters. In addition, make sure the connection
pool is configured for the specified Application Name and Cube Name.
򐂰 Failure conditions:
– User logged out by Supervisor (1013095)
– Essbase agent restarted (1042006 )
– Invalid login id (1013136)
– Logged out due to inactivity (1051021 )
– System temporarily busy (1051010 )
– Client timed out to receive data via TCP (1042017)
– Cannot receive data (1042013)
򐂰 Other conditions (externally specified):
– For example, specify the following in the essbase.properties file, before
starting the Enterprise Services server:
system.faultTolerance.reconnectRetryOnSameSvcComp.onErrorCodes
=1013095 .

Server fault tolerance


The setting reconnectRetryOnNextSvcComponErrorCodes defined in the
essbase.properties file, allows custom fault tolerance actions. This setting
(see Example 5-2) is defined to handle error condition situations on a different
service component. Enterprise Services automatically retries the request to
another DB2 OLAP Server application and database defined on the cluster.
Example 5-2 Fault tolerance actions on a different service component
system.faultTolerance.reconnectRetryOnNextSvcComp.onErrorCodes=1013009,1013204,
1054009,1054010,1013110

Chapter 5. Enterprise Services 153


To retry data query operations (read-only) on a different OLAP server in the
cluster, the following is required:
򐂰 Configuration:
– Enterprise Services needs to be configured with connection pool (in
connection per operation mode) over a cluster.
– The JAPI client performing data query sample using
IEssDomain.openCubeView(String cubeViewName, String olapSvrName,
String appName, String cubeName, boolean useConnPool, boolean
connPerOp,boolean useCluster, boolean readOnly) has to make sure that
true is passed to the last four parameters. In addition, make sure the
connection pool over the cluster is configured with at least one component
matching the specified Application Name and Cube Name.
򐂰 Failure conditions:
– Disabled user commands (1013009, 1013204, 1054009, 1054010)
– Active database stopped by supervisor (1013110)
򐂰 Other conditions (externally specified):
– Specify the following in the essbase.properties file, before starting the
Enterprise Services server:
system.faultTolerance.retryOnNextSvcComp.onErrorCodes=
1013009,1013204,1054009,1054010,1013110

Figure 5-26 shows a sample scenario with a connection pool defined to support
a maximum of four connections to a cluster of two DB2 OLAP Servers (Sicily and
Cayman). In this scenario, the connection pool named as e-BankConnPool,
open at the maximum four connections via the cluster e-BankCluster that
contain two DB2 OLAP Servers on AIX (Cayman and Sicily).

154 DB2 OLAP Server V8.1: Using Advanced Functions


For information on definition of this connection pool and cluster, see 5.4.7,
“Creating clusters” on page 195 and 5.4.8, “Creating connection pools” on
page 199.

The maximum number of connections (four in this example) will be distributed


between the two servers (Cayman and Sicily) as shown in Figure 5-26.

ES - Application Failover Scenario


AIX Server - Cayman
DB2 OLAP Server

Sample
Basic
Users Windows 2000/NT or Unix
Group
Enterprise Services Server
1
AP
TCP/IP 2 OL tions e-Bank
nec e-Bankdb
Con
e-BankConnPool

Pool of Maximum
Connection Pool

e-BankCluster
4 Connections

Cluster
OLAP OLAP Sessions
TCP/IP AIX Server - Sicily
Requests
via Java API DB2 OLAP Server

2O
Users Con LAP
nec
tion
Group s e-Bank
2 e-Bankdb

TCP/IP

Application Demo
Failure Basic

ES ADM Console

Figure 5-26 Failover scenario

Chapter 5. Enterprise Services 155


In the scenario in Figure 5-27, if a failure occurs in an application or database
defined in the cluster, Enterprise Services will redirect the requests to the
remaining applications/databases on the cluster.
.

ES - Application Failover Scenario


AIX Server - Cayman
DB2 OLAP Server

Sample
Basic
Users Windows 2000/NT or Unix
Group
1 Enterprise Services Server
AP e-Bank
TCP/IP 2 OL tions

Pool of Maximum
ne c

e-BankConnPool
e-Bankdb

Connection Pool

e-BankCluster
4 Connections
Con

Cluster
OLAP OLAP Sessions
TCP/IP AIX Server - Sicily
Requests
via Java API DB2 OLAP Server

2O
Users Con LAP
ne c
tion e-Bank
Group s
e-Bankdb
2
TCP/IP

Application Demo
Re-Start
Basic

ES ADM Console

Figure 5-27 Application failover scenario

156 DB2 OLAP Server V8.1: Using Advanced Functions


In the scenario shown here in Figure 5-28, if a failure occurs in any of the DB2
OLAP Servers defined in the clusters, Enterprise Services will re-route all the
client requests to the other servers in the cluster, as shown next in Figure 5-29.

ES - Server Failover Scenario


AIX Server - Cayman
DB2 OLAP Server

Sample
Basic
Users Windows 2000/NT or Unix
Group
1 Enterprise Services Server
TCP/IP LAP e-Bank
2 O tions

e-BankConnPool
Connection Pool
e-Bankdb

e-BankCluster
onnec
C

Pool of Maximum
4 Connections

Cluster
OLAP OLAP Sessions
TCP/IP AIX Server - Sicily
Requests
via Java API DB2 OLAP Server

2O
Users Con LAP
nec
tion
Group s e-Bank
2 e-Bankdb

TCP/IP
Server
Failure Demo
Basic

ES ADM Console

Figure 5-28 Server failover scenario

Chapter 5. Enterprise Services 157


Notice in Figure 5-29 that all the connections were automatically re-routed to the
Cayman Server because the Sicily Server is not available.

ES - Server Failover Scenario


AIX Server - Cayman
DB2 OLAP Server

Sample
Basic
Users Windows 2000/NT or Unix
Group
Enterprise Services Server
1
TCP/IP e-Bank
AP
4 OL tions e-Bankdb

e-BankConnPool

Pool of Maximum
Connection Pool
nec

e-BankCluster
4 Connections
Con

Cluster
OLAP OLAP Sessions
TCP/IP AIX Server - Sicily
Requests
via Java API DB2 OLAP Server

Users
Group e-Bank
2 e-Bankdb

TCP/IP
Re-Route
Requests Demo
Basic

ES ADM Console

Figure 5-29 Server failover scenario

Notice that all the connections were automatically re-routed to the Cayman
Server because the Sicily Server is not available.

158 DB2 OLAP Server V8.1: Using Advanced Functions


5.3.6 Enterprise Services: the whole picture
The complete scenario picture, including clustering, connection pooling, failover
situations, and client applications when using Enterprise Services, is described
in Figure 5-30.

ES - Connection Pooling and Clustering Scenario


And Client Applications
AIX Server - Cayman
DB2 OLAP Server 8.1

Excel
Sample
Addin and VBA
Basic
HTTP Windows 2000/NT or Unix
SOAP Middle Tier Enterprise Services Server 6.5
AP e-Bank
2 O L tions
Web Services

Pool of Connections
SpreadSheet

e-BankConnPool
nec e-Bankdb

Connection Pool
Co n

e-BankCluster
Java API
Essbase

Cluster
OLAP
Sessions
TCP/IP AIX Server - Sicily
DB2 OLAP Server 8.1
Developed
Applications 2O
Con LAP
nec
using Java API tion
s e-Bank
TCP/IP
HTTP e-Bankdb
IIOP
RMI Directly
Access
Demo
Basic
Analyzer 5.0,
Analyzer Version Excel Addin,
6.1.1 123 Addin,
Brio, BO, etc.

Existing OLAP Applications

Figure 5-30 Enterprise Services: the whole picture

5.3.7 Guidelines for implementing a full cluster of OLAP servers


To implement a cluster of OLAP servers and take full advantage of the Enterprise
Services features such as load balance and failover, you need to implement both
clustering and connection pooling as follows:
1. Create a cluster :
a. Define at least two different DB2 OLAP Server installations being part of
the cluster to make one server act as a backup for the other, and vice
versa.
b. Create identical copies or replicas of the same DB2 OLAP Server
application and database across all DB2 OLAP Servers installations on
the cluster.

Chapter 5. Enterprise Services 159


c. Keep synchronized the data on all DB2 OLAP Server applications and
databases across all DB2 OLAP Servers on the cluster.
Every time that you change the source application and database, you
need to update the other copies of this application and database that are
part of the cluster in order to keep data integrity and information accuracy
for the users requests.
2. Create a connection pool.
a. Link this connection pool definition to a cluster definition (see 5.4.8,
“Creating connection pools” on page 199).
b. Define number of connections and user access.
3. Define security (users and users group) to Enterprise Service.
a. Import (load) the DB2 OLAP Servers users and password into Enterprise
Services.
b. Keep synchronize the security (users and password) between the
Enterprise Services Server and all DB2 OLAP Servers that are part of the
cluster.
4. Define security (users, users group and permissions) to DB2 OLAP Server.
a. Define users and users permissions to all applications and databases on
all DB2 OLAP Servers installations that are part of the cluster.
b. Keep the security synchronized (users, password and permissions) across
all DB2 OLAP Servers on the cluster.

Restriction: When using a connection pool, the access to the DB2 OLAP
Server application and database is done by a single user (the user who
opened the connection to DB2 OLAP Server). It means that on all DB2 OLAP
Server that are part of the cluster, you need to define only a single user with
read access to the OLAP applications.

Note: The source application/database is the OLAP application/database that


has originated the copies or replicas for all other applications/databases in the
cluster.

5. Run your client application or create your own client application using the
DB2 OLAP Server Java API.

160 DB2 OLAP Server V8.1: Using Advanced Functions


5.3.8 Copy DB2 OLAP applications and databases across servers
Enterprise services provide three ways to copy OLAP applications and
databases within and across DB2 OLAP Servers:
򐂰 Via Enterprise Services Graphical Console
򐂰 Via sample programs CopyOlapAppAndCube.java and copyCube.java
򐂰 Via Command Shell
– CopyOlapApp
– CopyCube

Using Enterprise Services graphical console


Using the Enterprise Services graphical console, you can copy applications and
databases within the same DB2 OLAP Server Installation and across DB2 OLAP
Servers installations.

To copy applications and databases using the graphical console, execute the
following steps (see example in Figure 5-31):
򐂰 Select Start —> Programs —> Essbase Enterprise Services Console.
򐂰 Signon to your Enterprise Services Domain.
򐂰 Expand the OLAP Servers tree.
򐂰 Select the Source DB2 OLAP Server Application and Database.
򐂰 Right-click the Source Application
򐂰 Select Copy
򐂰 Type the Destination Application Name and Destination Server.
򐂰 Press Enter.

Chapter 5. Enterprise Services 161


Figure 5-31 Copying application and databases across OLAP servers

Using sample Java programs


Enterprise Services provide two Java APIs (JAPIs) that can be used to copy your
DB2 OLAP applications and database:
򐂰 The JAPI dom.copyOlapApplication enables you to copy applications and
databases within and across DB2 OLAP Servers.
򐂰 The JAPI dom.copyCube enables you to copy the database within and across
DB2 OLAP Servers.

You can create your own programs to make copies of the OLAP applications and
database, or you can use the supplied sample programs from Enterprise
Services. These sample Java programs are installed automatically with the
Enterprise Services installation in the sample folder under the Enterprise
Services installation directory.

Use the sample program copyOlapAppAndCube.java to perform copies of


applications and databases within the same server or across servers.

162 DB2 OLAP Server V8.1: Using Advanced Functions


Also, Enterprise Services provides a sample program (script) to compile and
execute the sample Java programs. This script is named runsamples.cmd.

To see the two sample programs, CopyOlapAppAndCube.java and


runsamples.cmd, refer to Appendix C, “Enterprise Services sample programs” on
page 489.

To use the sample Java program to copy OLAP Applications/Databases, execute


the following steps:
򐂰 Use a program editor (as notepad, wordpad or your Java editor) and open the
supplied sample program CopyOlapAppAndCube.java
– Change the parameters for dom.copyCube to match your installations:
• DB2 OLAP Servers
• OLAP Applications
• OLAP Databases
– Save the new settings.
򐂰 Use a program editor (such as Notepad or Wordpad) and open the sample
script runsamples.cmd.
– Find the following command in this file, and change it to match the
definition of the sample program CopyOlapAppAndCube.java:
%JAVA_HOME%\bin\java com.essbase.samples.CopyOlapAppAndCube
%USER% %PASSWORD% %DOMAIN% %EES_SERVER% %ORB% %PORT% %OLAP_SERVER%
– Save the new settings.
򐂰 Run the script runsamples.cmd in a command window.

Using command shell


To copy applications and databases using the command shell, execute the
following steps (refer to Example 5-3):
򐂰 Open the Enterprise Services command shell console.
򐂰 Type Signon —> Enter the Enterprise Services admin user and password that
is system,password)
򐂰 Type Help.

To copy applications and databases (see Example 5-3):


򐂰 Select option 18 (copyOlapApp)
򐂰 Type the following command:
Source OLAP Server, Source OLAP application, Target OLAP Server,
Target OLAP application

Chapter 5. Enterprise Services 163


Example 5-3 Copy OLAP application across servers
copyOlapApp Cayman,e-Bank,Sicily,e-Bank1

To copy a database (see Example 5-4):


򐂰 Select option 19 (copyCube)
򐂰 Type the following command:
Source OLAP Server, Source OLAP application, Source OLAP database,
Target OLAP Server, Target OLAP application, Target OLAP datatabase

Example 5-4 Copy OLAP database across servers


copyCube Cayman, e-Bank, e-BankDB, Sicily, e-Bank1, e-BankDB
Figure 5-32 shows an example of how to copy a DB2 OLAP Server application
and database from a DB2 OLAP Server (Cayman) to another DB2 OLAP Server
(Sicily).

Figure 5-32 Copy OLAP application across servers via Command Shell

164 DB2 OLAP Server V8.1: Using Advanced Functions


5.3.9 Synchronizing data across DB2 OLAP Servers in a cluster
If you are making copies of your DB2 OLAP Server applications and database to
support the load balance and failure over, you need to keep the data
synchronized on all DB2 OLAP Servers applications and databases that are part
of the cluster.

There are several ways to synchronize data on DB2 OLAP Server. You can
choose to use one of the following approaches:
򐂰 Use the Partitioning feature of DB2 OLAP Server to create replicated
partitions of the served application on each DB2 OLAP Server:
– DB2 OLAP Server Partitioning feature: This enables you to create
replicated partitions of a database over multiple DB2 OLAP Servers. By
creating partitions that will mirror each the servers defined in a cluster, you
can synchronize data across multiple DB2 OLAP Servers.
For information on how to implement DB2 OLAP Server Partitions, see the
DB2 OLAP Server Database Administrator’s Guide.
򐂰 Use DB2 OLAP Integration Server to load data onto each server on the cube:
– DB2 OLAP Integration Server: This enables you to load data into DB2
OLAP Serves databases quickly and easily. To synchronize DB2 OLAP
Servers databases using DB2 OLAP Integration Server, load and update
your master application and database on the cluster, and also use it to
load and update the other mirror application and database for the other
DB2 OLAP Servers installations in the cluster.
򐂰 Export data from the master application and database and load it into each
application and database on all DB2 OLAP Server installations in the cluster.
To synchronize data using export and import functions, you can use one of
the following methods:
– Export and Import features: DB2 OLAP Server provides a basic solution
for synchronizing data between servers via data export and import
features. You can export the data from a master application and database
and import into the other servers in the cluster. For information on how to
export and import data, see the DB2 OLAP Server Database
Administrator’s Guide.
– Enterprise Services Java API: Enterprise Services provides data
synchronization via Command Shell. This command uses the JAPI
methodIEssDomaing.SyncCubeReplicas().
– On the Enterprise Services installation directory, there is a sample
program file named SyncCubeReplicas.java supplied with Enterprise
Services installation.

Chapter 5. Enterprise Services 165


5.3.10 Synchronizing security across all OLAP Servers in a cluster
When you create a cluster of DB2 OLAP Servers with Enterprise Services, you
must add users and their relevant access permissions on all DB2 OLAP Servers
in the cluster.

If you have a large number of users to migrate, you might consider using a
command shell supplied on Enterprise Services that can load users names and
passwords from a DB2 OLAP Server and push them onto another DB2 OLAP
Server.

Note: When using connection pool and cluster, you only need to define — on
each DB2 OLAP Server installation that is part of the cluster — a single user
with read access to all applications and databases specified on the cluster.

Another way to keep users and passwords synchronized on all DB2 OLAP
Servers in a cluster is by creating a script using MaxL or ESSCMD that define the
new users/password, and run this script in all DB2 OLAP Servers that belong to
the Enterprise Services cluster.

Refer to sample programs in Appendix C, “Enterprise Services sample


programs” on page 489.

5.4 Implementing Enterprise Services with TCP/IP


This roadmap provides the guidelines to install Enterprise Services and
configure it to access DB2 OLAP Server cubes through a connection pool, a
cluster, or a combination of both.

In this description, we use a TCP/IP environment that is one of the most common
architectures when working inside enterprise firewalls. We also use the sample
Java programs that come with Enterprise Services to demonstrate connection
pooling, clustering, and request workload balancing. These programs are
designed to provide a fast start using and testing Enterprise Services.

To implement Enterprise Services, these steps must be completed:


1. Install Enterprise Services.
2. Set up a domain storage.
3. Start Enterprise Services server, graphical console, and the command shell.
4. Define a domain.
5. Define users.

166 DB2 OLAP Server V8.1: Using Advanced Functions


6. Define DB2 OLAP Server and Enterprise Services servers.
7. Create clusters.
8. Create a connection pool.
9. Use the sample programs.

Table 5-2 contains a checklist of steps to install and configure Enterprise


Services. Follow this checklist to be sure that you are completing every step.
There is also a reference to the section of the book where that step is explained.

Table 5-2 Step-by-step implementation checklist


PHASE STEP

Install Enterprise Use installation guide


Services
Check hints and tips on Windows 5.4.1, “Installation tips for
Check hints and tips on AIX Enterprise Services: Windows
and AIX” on page 168

Configure as Windows NT service? 5.4.10, “Additional tasks” on


(Optional) page 215

Set up the domain Create a relational database 5.4.2, “Setting up the domain
storage storage” on page 171

Update essbase.properties 5.4.2, “Setting up the domain


– Update domain storage information storage” on page 171

– If needed, update location service


and logging variables

Update classpath variable in the 5.4.2, “Setting up the domain


startees.cmd file storage” on page 171

Start Enterprise Start the Enterprise Services Server “Starting and stopping the
Services Enterprise Services server” on
page 176

Start the Graphical Console “Starting and stopping the


Enterprise Services Console” on
page 177

Start the Command Shell (optional) “Starting and stopping the


Enterprise Services Command
Shell” on page 179

Chapter 5. Enterprise Services 167


PHASE STEP

Define Enterprise Define domains (Optional) 5.4.4, “Creating a domain” on


Services objects page 182

Define users 5.4.5, “Defining users” on


– Create users page 183

– Create groups

Define at least one Enterprise Services “Defining an Enterprise Services


Server Server” on page 189

Define OLAP Servers “Defining DB2 OLAP Server


servers” on page 191

Create clusters 5.4.7, “Creating clusters” on


page 195

Create connection pools 5.4.8, “Creating connection


pools” on page 199

Using the Sample Configuring the runsample script file “Configuring the runsamples
Programs script file” on page 209

Running the runsample program “Running the runsamples script


file” on page 210

Executing the DataQuery Sample Program “Executing the DataQuery


Sample program” on page 211

Additional Tasks 5.4.10, “Additional tasks” on


page 215

5.4.1 Installation tips for Enterprise Services: Windows and AIX


If you need information about Windows systems requirements or AIX system
requirements, or about how to install Enterprise Services software on these
platforms, follow the instructions detailed in the Enterprise Services Installation
Guide. IBM DB2 OLAP Server Enterprise Services is available on its own
CD-ROM.

Also, during the installation process, check the tips described in the following
sections for Windows and AIX, respectively.

168 DB2 OLAP Server V8.1: Using Advanced Functions


Tips on the installation process for Windows platforms
On Windows platforms, during the installation process, you must choose which
software components to install. As shown in Figure 5-2, you can choose between
installing the server and the client components, or only the client component,
which is the graphical interface and the command shell. It is preferable to install
the client and server on different machines, or if working in the same machine, in
separate directories.

Before installing Enterprise Services server software, done by running the


self-extracting installation program located on the “DB2 OLAP Server Enterprise
Services” CD-ROM, make sure you have Java installed on your system, since
Enterprise Services installation is Java-based.

Note: If you don’t have Java, you may download a free copy from:
http://java.sun.com

Figure 5-33 Software components

Chapter 5. Enterprise Services 169


The Choose Java Virtual Machine dialog box has not been fully implemented.
Enterprise Services will use the Java Runtime Environment (JRE) installed with
the DB2 OLAP Server Enterprises Services V8.1 as the default.

Tips on the installation process for AIX platforms


To install Enterprise Services on an AIX machine, check the prerequisites in the
Enterprise Services Installation Guide.

You install Enterprise Services server software on UNIX platforms by running the
self-extracting installation program located on the DB2 OLAP Server Enterprise
Services CD-ROM. This program requires a system with the Java Runtime
Environment installed and graphical windowing software such as X-Windows or
Motif.

To install Enterprise Services, use the root user. Make sure that you are the
owner and that you have execute permissions on the installer program. If you are
not the owner and do not have permissions of executing on the file, you will not
be able to install Enterprise Service. Change the permissions by executing the
chmod and the chown commands in AIX.

Run the EES_installer.bin file by executing:


./EES_installer.bin

Then follow the prompts and provide any information requested. For more
information, refer to the Enterprise Services Installation Guide.

Note: The installation program creates some files in the tmp directory. Make
sure you have enough space in this directory. Otherwise, the installation
process finishes with an error.

Just as with Windows systems, you will need to choose if you want to install
Client and Server in the same machine, or if you only want the client.

170 DB2 OLAP Server V8.1: Using Advanced Functions


The last step is to decide if you want to create links. These links enable the
possibility of starting the server in any directory that you choose without going to
the installation directory. The options are:
򐂰 In your home folder: These options create a link to the user home folder. In
this case, it is the root home folder.
򐂰 Other: Choose any directory that you want and either type the path or click
the Choose... button to select a directory.
򐂰 Don’t create links: With this option, you will have to start the server from the
installation directory.

Choose the best option for your environment, and continue with the installation.

Once the installation is finished, you can start configuring Enterprise Services
domain storage.

5.4.2 Setting up the domain storage


Enterprise Services requires a place to store control information or ES metadata
about DB2 OLAP Server servers, Enterprise Services servers, users, and
groups. This is called domain storage. Two mechanisms are available as a
domain storage:
򐂰 Java Database Connectivity (JDBC)-compliant Relational Database
Management System (RDBMS)
򐂰 Flat file database, domain.db

Enterprise Services is configured to use a flat file as a domain storage by default.


This mechanism can only be used for developing and testing purposes. For
production environments, a relational database must be used as a domain
storage.

Although you can use other relational databases as a domain storage, in the
following examples we use DB2 UDB v7.2.

To configure Enterprise Services to use a relational database as a domain


storage, is necessary to:
1. Go to DB2 UDB v7.2 Control Center and create a database, for example,
eservice. You can use the wizard as shown in Figure 5-34.

Chapter 5. Enterprise Services 171


Figure 5-34 Creating a database in DB2 Control Center

2. Create a user with full administrative rights, for example, db2admin.


3. Edit the essbase.properties file. Find the essbase.properties file in the
EES_ES_HOME\bin directory and open it in a text editor.
4. In the essbase.properties file, modify the domain storage variable to configure
a relational database to be used as the storage domain. See Figure 5-35 for
further details. By default, this variable is set to use a flat file as a domain
storage. Set this variable to rdbms:
domain.store.type=rdbms
After this, you will need to set the variables in the essbase.properties file to
use DB2 as a domain storage. For example:
domain.store.rdbms.product=DB2
domain.store.rdbms.jdbc.driver=COM.ibm.db2.jdbc.net.DB2Driver
domain.store.rdbms.jdbc.url=jdbc:db2:localhost:eservice
domain.store.rdbms.user=dbadmin
domain.store.rdbms.password=password
domain.store.rdbms.connectionPool.capacity=2

172 DB2 OLAP Server V8.1: Using Advanced Functions


The essbase.properties file comes with variable examples for additional
database providers. To use the DB2 variables, you need to remove the comment
sign (#) at the beginning of each of the lines provided above. Use these
examples as a starting point. Figure 5-35 shows the essbase.properties file after
been modified.

Configuration Variables Domain Storage


for DB2 type
Figure 5-35 DB2 configuration variables in the essbase.properties file

Attention: A domain storage is a physical storage, and is directly related to


the definitions in the essbase.properties file. A domain, is a logical grouping
of objects, such as users, groups, and OLAP and Enterprise Services servers.
These have to be defined using the Enterprise Services graphical console,
and you can group objects in that domain such as servers, users and groups.

Optionally, you may have to update other variables in the essbase.properties file.
Figure 5-35 shows a couple of variables that may be interesting. These variables
are the Location Variable and the logging variable, located in the file,
essbase.properties.

Chapter 5. Enterprise Services 173


Location Service Log Variables
Variable
Figure 5-36 Configuration variables in the essbase.properties file

The Location Service variable allows this Enterprise Services server (and other
ES servers on the local intranet) to be located and listed by the Enterprise
Services Console. To enable this function, set the variable to true.
service.location.start=true

The logging variables enables the Enterprise Services to send messages to a


log file. There are three levels of message logging: log information, error, and
request. The kind of messages that you will find in the log file depend on the
variable that you enable. You can activate the system.log.file.enable variable to
send these log messages to a file located where the system.log.file.name is set.
For example:
system.log.file.enable=true
system.log.file.name=C:/ibm/db2olap/data/essbase.log.txt

174 DB2 OLAP Server V8.1: Using Advanced Functions


5. Check the startees.cmd file. This file is the one used to start up the Enterprise
Server. This file has the environment variables for the server, the JAVA
runtime environment, and the protocols used to start the server. Check that
the variable ClassPath is pointing to the file C:\Program
Files\SQLLIB\java\db2java2.zip or wherever DB2 is installed.
6. If it is not already set, copy this path from the ClassPath variable from Control
Panel-> System->Advanced->Environment Variables of your Windows
server and add it to the CLASSPATH variable in the starteed.cmd file.

Figure 5-37 shows the new configuration of the startees.cmd file.

Figure 5-37 Configuration of the ClassPath in startees.cmd file

If you need more information concerning the essbase.properties file, refer to the
Essbase Enterprise Services Properties File Documentation.

5.4.3 Starting Enterprise Services


Once the configurations detailed above have been made, you are ready to start
the Enterprise Services server, the Enterprise Services Console, and the
Enterprise Services Command Shell.

Chapter 5. Enterprise Services 175


Enterprise Services servers can be configured in multiple ways. Each
configuration uses different technology and supporting software. In this section
we explain how to start and stop the Enterprise Services components with
TCP/IP.

Starting and stopping the Enterprise Services server


In this section we explain how to start and stop the Enterprise Services server.
1. To start the server, you can perform one of the following options:
a. Go to Start -> Programs -> IBM DB2 OLAP Server 8.1 -> Essbase
Enterprise Services -> Enterprise Services Server.
b. From a command line window, execute the startees program (.cmd on
Windows systems, .sh on UNIX systems), located in the directory
ESS_ES_HOME\bin and the server will start.

Once the server has been started, it will appear in a command window like the
one shown in Figure 5-38. Leave it open.

Figure 5-38 Enterprise Services server window

2. To stop Enterprise Services server, click the command window and press
Enter. At the prompt, type exit and press Enter.

176 DB2 OLAP Server V8.1: Using Advanced Functions


Starting and stopping the Enterprise Services Console
The Enterprise Services Console is a graphical interface that enables you to
manage Enterprise Services domains, servers, users, and groups. There must
be an Enterprise Services server running to start the console.
1. To start the graphical interface, execute one of the following options:
a. In the ESS_ES_HOME\bin directory, locate the startgui file (.cmd on
Windows systems, .sh on UNIX systems) and run it. Then complete the
information as prompted. See Figure 5-39.
b. Go to Start -> Programs -> IBM DB2 OLAP Server 8.1 -> Essbase
Enterprise Services -> Enterprise Services Console. You will be
prompted to enter some information. Figure 5-39 shows the Enterprise
Services Console log on screen.

Figure 5-39 Enterprise Services Console

Chapter 5. Enterprise Services 177


2. When starting the graphical interface, you are asked to enter the user name,
password, domain file, preferred server, orb type, and port number.
For the first time, you can use the default selections, which are:
– Username: system
– Password: password
– Domain: essbase
The domain specified in this part is very different from the domain storage
specified in 5.4.2, “Setting up the domain storage” on page 171. This
domain is a logical definition that administrators can use to group objects,
such as servers, users, and groups for easier administration. A domain
can consist of other domains. A distributed environment can even consist
of several domains. You always have to connect to essbase domain to
start the graphical console.

Attention: You can have more than one domain created in your environment,
but only one domain can be a root domain, which means that it cannot be
contained within another domain. The root domain is created automatically
with Enterprise Services installation, and the default name is essbase.

– Preferred Enterprise Services server: You should specify the Enterprise


Services server machine name, or the IP number. If your server and client
are installed in the same machine, specify Localhost.
You can also use the Locate function to locate every Enterprise Server
server running in the network. To get this Locate function working, you
must change the service.location.start variable to true, previously
explained in 5.4.2, “Setting up the domain storage” on page 171. If you
need more information about setting up the essbase.properties file, refer
to the online Essbase.properties reference in the Enterprise Services
DOCS directory.
– Orb Type: in our case, this is TCPIP, but if there is another environment
implemented, you can choose between TCPIP, HTTP, EJB and CORBA.
– Port No. for Enterprise Services: By default, this is 5001.
Once you fill in this information, the Enterprise Services Console starts.
Figure 5-40 shows the console.

178 DB2 OLAP Server V8.1: Using Advanced Functions


Navigation Panel
Workspace

Figure 5-40 Enterprise Services Console

3. To stop the graphical interface, go to File ->Exit.

Starting and stopping the Enterprise Services Command Shell


The Enterprise Services Command Shell is a command-line interface that
provides an alternative way to the graphical console to manage Enterprise
Services servers and users. It is necessary to have an Enterprise Server running
to start the Command Shell. To start it, follow these steps:
1. Start the Command Shell by executing the startcmd file.
a. In the ESS_ES_HOME\bin directory, find the startcmd file (.cmd in
Windows platforms, .sh in UNIX systems) and run it.
b. Type the command signon.
c. After typing the commands, the prompt returns the parameters that are
necessary to execute that command. At the next prompt, type the
Enterprise Services user name, password, domain name, server name,
and server type, separated by commas, for example: system, password,
essbase, localhost, tcpip, 5001.
d. Press Enter to log on.

Chapter 5. Enterprise Services 179


Figure 5-41 shows the Enterprise Services Command Shell signon.

Figure 5-41 Command Shell signon

2. To see all the commands available in the Command Shell, type help. It is
possible to issue the commands by typing the command or the number
associated with it. See Figure 5-42 for a detailed list of all commands
available in Enterprise Services Shell.

180 DB2 OLAP Server V8.1: Using Advanced Functions


Figure 5-42 Command Shell available commands

3. Start the Command Shell by going to Start -> Programs -> IBM DB2 OLAP
Server 8.1 -> Essbase Enterprise Services -> Enterprise Services Shell.
a. Type signon or type the number 4.
b. Provide the information to the signon command.
4. To stop the command shell:
a. At the prompt, type exit or quit, or type the number 5.
b. Press Enter.

Note: When you start the Enterprise Services Server, the window displayed is
the Command Shell itself. But you can also start the Command Shell as a
program separate from the Enterprise Services server. Just follow the steps
explained above.

Chapter 5. Enterprise Services 181


5.4.4 Creating a domain
After initializing the graphical console, you can create a domain to store all the
information concerning users, groups and servers. You can still use the default
domain which is essbase. Remember that only one domain is the root domain
and is the default domain.

To create a domain, follow these steps:


1. Click the root domain (essbase)
2. Go to Domain —>Create —>Domain in the Menubar. With this task you are
creating a domain inside the root domain essbase. See Figure 5-43 for more
details.

Figure 5-43 Creating domains

3. When the Please enter a subdomain name screen appears, enter a name
for the domain you are creating, for example, db2domain.
4. Click OK.

Now, the new domain db2domain is created. Figure 5-44 reflects the change.

182 DB2 OLAP Server V8.1: Using Advanced Functions


Figure 5-44 The console with the new domain created

Look on the Properties tab in the workspace area, in the right part of the screen.
The new domain has no users, groups, OLAP servers, Enterprise Services
server or domains yet within it. As long as you start creating objects in these
domains, you will see these parameters updated.

This objects will be created in the steps described later in this chapter. The
objects in the Navigation Panel, on the left side of the screen, are objects that
belong to the essbase domain.

Although the objects created in this chapter belong to the root domain essbase,
you can create them in the domain just added or in a new domain.

5.4.5 Defining users


Enterprise Services Console lets you define users, and groups of users that will
have access to the root domain. First you define the users, and then you decide
to which group they belong.

Chapter 5. Enterprise Services 183


There are two kinds of users to create in Enterprise Services. The users can be
administrators or regular users. You define this right through the graphical
console. An administrator can perform every possible action in Enterprise
Services, like creating other users, domains, groups, connection pools, and so
on, and can modify the existing objects. A regular user cannot create any new
object, but can modify its password and can use the defined objects like clusters,
connection pools, and servers.

In order for your users to use Enterprise Services clustering and connection
pooling, these users must be defined in Enterprise Services server.

These users do not necessarily have access to DB2 OLAP Server servers. In
order to have access to the OLAP server from the console and control it, these
users must be defined in DB2 OLAP Server. Users have access to the
applications in Enterprise Services based on the rights that they have on DB2
OLAP Server.

Creating users
There are two options for creating users:
򐂰 From the Graphical Console
򐂰 From the Enterprise Services Command Shell

Creating users from the graphical console


To create users in the root domain from the Enterprise Services Console, follow
these steps:
1. Click in the root domain (essbase) or in the domain you want to create the
users. A domain can have its own users.
2. Go to Domain —>Create —> User. See Figure 5-45 for further details.

184 DB2 OLAP Server V8.1: Using Advanced Functions


Figure 5-45 Creating users in the domain

3. Enter the name of the user you want to create, for example, db2user
4. Click OK.

The user db2user is created and you can see it by clicking on the + sign next to
Users in the Accounts folder.

Creating users from the Command Shell

To create users from the Command Shell, issue these steps:


1. Start the Command Shell and sign on.
2. Issue the command adduser or type the number 8. The prompt ask the
parameters for executing the command.
ESS> adduser
Enter input as userName, password:
3. Type the name of the user and press Enter, for example:
db2olapuser, password

Chapter 5. Enterprise Services 185


4. Go to the graphical console and make a Refresh. The console shows the new
user. In the workspace area, there are the properties of the user. These
properties are:
– The name of the user.
– An informative description.
– The authentication server you are using. See security.
– The password of the user, which you must edit when creating the user
from the graphical console. When creating the user from the command
shell, you can state the password. In both cases you can modify the
password anytime.
– The E-mail address, for notification purposes.
– A count of the groups to which the user belongs.
– The names of the groups to which the user belongs.
– The administrator parameter, to be enabled if the user is an administrator.
Check it if the user is an administrator. Leave it blank for a regular user.

Add as many users as you want, following the same procedure. Figure 5-46
shows the new users in the graphical console.

Figure 5-46 Adding users to the root domain

186 DB2 OLAP Server V8.1: Using Advanced Functions


There are more commands related to the manipulation of users. See Table 5-3,
which states the commands, the parameters for every command, and their
description.

Table 5-3 Additional commands


Command (parameters) Description

adduser (userName, password) Adds a user to the root domain

changepwd (password) to change the Changes the password for a user


password for the user already connected.
changepwd(userName, password) to
change the password of a different user.

listusers Displays a list of all users that are


registered in the root domain of the
Enterprise Services server

removeuser (userName) Removes a user from the root domain

For more information about the commands you can perform, see the Installation
Guide.

Creating and managing groups


Once the users are created, you can create groups and include users in them.
Group of users, must only be created trough the graphical console.

To create groups, follow these steps:


1. Click the root domain (essbase) or click the domain in which you want to
create the group.
2. Go to Domain —> Create —> Group. See Figure 5-47 for more details.

Chapter 5. Enterprise Services 187


Figure 5-47 Creating groups

3. Enter a name for the group, for example, group_OLAP.


4. Click OK.

Now, the console shows the group recently created. If you right-click group_OLAP,
you will see the options for the group, such as Manage Group. This option
enables a panel to add or remove users from the group.

Add users to the group as follows:


1. Right-click the group name.
2. Select Manage Group.
3. Click the name of the user in the Non Member panel, and with the arrow,
move it to the Members panel.
4. Click Save, to reflect the changes.

Figure 5-48 shows the Manage Group option.

188 DB2 OLAP Server V8.1: Using Advanced Functions


Figure 5-48 Adding users to groups

You can also add users to a group by dragging and dropping the user name you
want to move, onto the selected group.

Now, in the Navigation Panel, the group has its own users.

5.4.6 Defining DB2 OLAP Server and Enterprise Services servers


To define an Enterprise Services server (or Enterprise server), you must go to
the graphical console and create it from there. But for defining DB2 OLAP Server
servers, you also can do it from the Command Shell.

Defining an Enterprise Services Server


To define an Enterprise Services Server, follow these steps:
1. Click the root domain (essbase).
2. Go to Domain —> Create —> Enterprise Server as shown in Figure 5-49
(or right-click in essbase).
3. Enter the host name of the computer or its numeric IP address.

Chapter 5. Enterprise Services 189


4. Click OK.

Figure 5-49 Creating Enterprise Server

Figure 5-50 shows the new Enterprise Server. Check to see that the server does
not have yet a connection pool or a cluster defined. Later in this chapter, the
creation of connection pools and clusters will be explained. After their creation,
those objects must be added in the Enterprise Server properties tab.

If you want to make a change in any of the Enterprise Server settings, like the
description, just click the line to change in the column value and make the
change. Then, click Save and Refresh, to reflect the changes in the domain
storage immediately.

There are some changes that are not reflected immediately, like the connection
pool and cluster. In order to take advantage of these definitions you must shut
down Enterprise Services Server and start it up again. For more information, see
5.4.3, “Starting Enterprise Services” on page 175 and 5.4.8, “Creating
connection pools” on page 199.

190 DB2 OLAP Server V8.1: Using Advanced Functions


Figure 5-50 Enterprise Server added

Defining DB2 OLAP Server servers


Even though it is not necessary to define an OLAP server to take part in a
connection pool or in a cluster, it is highly recommended for administration
purposes.

It is necessary to define every DB2 OLAP Server that is going to be accessed


from Enterprise Services in order to analyze information.

To define a DB2 OLAP Server you must issue one of the following options:
򐂰 Add an OLAP Server from the graphical console.
򐂰 Add an OLAP Server from the command shell.

Adding a DB2 OLAP Server server with the graphical console


To add a DB2 OLAP Server server, do the following:
1. Click the root domain (essbase)
2. Go to Domain —> Create —> OLAP Server (or right-click in essbase).

Chapter 5. Enterprise Services 191


3. Enter the name of the DB2 OLAP Server machine or its IP number, for
example, Cayman.
4. Click OK.

Now the OLAP Server is added. Click the server and you are connected to it.

Note: In order to get a connection to the OLAP Server that you are defining,
the user name which is used to connect to the Enterprise Services Console
also needs to have access to the OLAP Server.

Click the + sign besides the name of the server. The list shows the different
applications in that server which the user is entitle to see. Continue clicking the +
sign, and the databases, dimensions, and members are listed. Figure 5-51
shows the OLAP cube that has been added to the Navigation Panel.

Figure 5-51 OLAP cube parameters

Once connected, Enterprise Services lets you see the configuration parameters
for that application in the Workspace area.

192 DB2 OLAP Server V8.1: Using Advanced Functions


If you click the cube (or database) you will see the parameters for that cube.
Notice that, that in the workspace area, another tab named Statistics appears.
Click the tab to see the cube statistics.

Note: The information of parameters and statistics is the same as provided in


the DB2 OLAP Server Application Manager

Then, if you click the + sign for the database, the outline appears. Now it is
possible to look at the dimensions in that outline.

If you want to analyze information stored in that cube, right-click the name of the
database or cube and create a cube view. A cube view allow you to analyze
information from the cube depending on the rights the user has. Once the cube
view has been created, it is possible to analyze information by double-clicking in
the dimensions or by using the menu bar.

Adding a DB2 OLAP Server server with the command shell


To add an OLAP server with the command shell, follow these steps:
1. Start the command shell and sign on.
2. Issue the command addolapserver or type the number 12.
3. Type the name of the OLAP server machine or its IP address, for example,
Sicily.
4. Click OK.
Figure 5-52 shows the Enterprise Services Command Shell after having added
an OLAP Server.

Chapter 5. Enterprise Services 193


Figure 5-52 Enterprise Services Command Shell: adding an OLAP server

Now, if you look the graphical console it shows the new OLAP server.

There are several commands related to DB2 OLAP Server. See Table 5-4.

Table 5-4 Addition commands related to DB2 OLAP Server


Command (parameters) Description

addolapserver (olapSvrName) Adds a DB2 OLAP Server to the root


domain

listolapservers List the DB2 OLAP Servers in the root


domain

removeolapserver (olapSvrName) Removes a DB2 OLAP Server from the


root domain

synccubereplicas (primary, replica1, Synchronizes data among replicas of


replica2 - each entry is olapSvrName, OLAP application
appName, cubeName)

syncsectoees (domName, olapSvrName, Synchronizes security information from an


olapSvrAdminName, OLAP Server to the Enterprise Services
olapSvrAdminPassword) server.

copyOlapApp (srcOlapsvrName, Copies OLAP application from one host to


srcOlapAppName, destOlapSvrName, another
destOlapName)

194 DB2 OLAP Server V8.1: Using Advanced Functions


Command (parameters) Description

copyCube (srcOlapSvrName, Copies cube from one host to another


srcOlapAppName, srcCubeName,
destOlapSvrName,
destOlapAppName, destCubeName)

5.4.7 Creating clusters


A cluster of DB2 OLAP Server servers is a logical set of:
򐂰 Servers running on different computers (different CPUs, on multi-processor
systems) that run copies, or replicas of the same OLAP application (or master
application)
򐂰 A single OLAP server that runs replicas of the same application, like Demo and
Demo1.
򐂰 Or a combination of both.

For more information, see 5.3, “Enterprise Services deployment scenarios” on


page 129.

This functionality of Enterprise Services must be used through the Java client
programs developed. If the client programs do not take advantage of the
clustering and the connection pool functionality, you are not using the main
functions of Enterprise Services. You must specify in your client programs which
cluster or connection pool to use.

It is convenient that client programs take advantages of clusters and connection


pools by using connection pools that include clusters, even though this is not a
prerequisite. By using the combination of both, you can take advantage of
failover, sharing connections and load balancing. The creation of connection
pooling in discussed forward in this chapter.

There are three ways of defining clusters in Enterprise Services:


򐂰 Through the graphical console
򐂰 Through the Command Shell
򐂰 Through the sample program that comes with Enterprise Services

Creating a cluster through the graphical console


We will create a cluster between two AIX servers: Cayman and Sicily, and the
Enterprise Services Server is located in a W2000. The two servers are already
defined in the console, and so are the applications to be used.

Chapter 5. Enterprise Services 195


To create a cluster in the console, perform the following steps:
1. Click the root domain (essbase)
2. Go to Domain —> Create —> Cluster. See Figure 5-53 for more details.
3. Enter a name for the cluster, for example, e-BankCluster.
4. Click OK.

Figure 5-53 Creating clusters

Now the cluster must been added in the Console Navigation Panel:
1. Click the name of the cluster. The Properties for that cluster will appear. You
need to modify the Service Components Name to declare the cubes that will
be part of the cluster. See Figure 5-54.
2. Click the box next to Service Components Names and add the cubes to be
part of the cluster in the format olapSvrName/appName/CubeName, for
example, Cayman/e-Bank/e-BankDB;Sicily/e-Bank/e-BankDB;
Sicily/e-Bank1/e-BankDB. Complete this box with every application that you
need to participate in the cluster. Separate them with a ;. Figure 5-55 shows
these definitions.

196 DB2 OLAP Server V8.1: Using Advanced Functions


3. Click Save.

Figure 5-54 Defining applications to participate in the e-BankCluster cluster.

The cluster definition is complete. It is necessary to enable the cluster in the


Enterprise Services server:
1. Click the Enterprise Services server.
2. Click the box next to Enabled cluster names and enter the name of the
cluster created before.
3. Click Save.

Figure 5-55 shows the cluster enabled in the Enterprise Services server.

Chapter 5. Enterprise Services 197


Figure 5-55 Enabling the cluster to be used by the Enterprise Services server

The cluster is ready to be used by client programs.

Creating clusters through the Command Shell


To create a cluster from the Command Shell, follow these steps:
1. Start the Command Shell and sign on.
2. Execute the command createCluster or type the number 20.
3. Enter the information asked in the format clusterName, description,
serviceComponentName. For example: db2cluster, testcluster,
Localhost/Demo/Basic; Localhost/Demo2/Basic.
4. The cluster is created.

Figure 5-56 shows the executed command.

198 DB2 OLAP Server V8.1: Using Advanced Functions


Figure 5-56 Creating a cluster in the Command Shell

After creating the cluster, you must enable it for Enterprise Service to use it. To
enable it, go to the console, and follow the steps explained in the previous
section, “Creating a cluster through the graphical console” on page 195.

There are other commands related to the creation of cluster in the Command
Shell. See Table 5-5.

Table 5-5 Additional commands related to cluster


Command (Parameters) Description

createCluster (clusterName, description, Creates a cluster


serviceComponentNames)

deleteCluster (clusterName) Deletes a cluster

listClusters Lists all clusters

getCluster (clusterName) Gets the properties for the specified


cluster

5.4.8 Creating connection pools


Enterprise Services enables you to optimize the requests to OLAP databases
through connection pooling. With a connection pool, users can share
connections, which conserves software and network resources and improves
performance.

Chapter 5. Enterprise Services 199


When there is a connection pool defined in the system, OLAP users can connect
to that connection pool and access OLAP server information. This connection
pool will establish only the amount of connections desired, for example, 2, and
the users, no matter how many they are will share only those 2 connections.

You can create connection pools from:


򐂰 The Enterprise Services Console
򐂰 The Enterprise Services Shell

Creating connection pools from the graphical console


To create a connection pool from the console, follow this steps:
1. Click the root domain (essbase).
2. Go to Domain —> Create —> Connection Pool. See Figure 5-57 for further
details.

Figure 5-57 Creating a connection pool

3. Enter a name for the connection pool, for example, e-bankconnpool.

200 DB2 OLAP Server V8.1: Using Advanced Functions


The connection pool has been created. Now it is necessary to configure the
connection pool and to enable it in the Enterprise Services server.
4. Click the connection pool recently created, and edit the properties in the
Workspace area. Figure 5-58 shows the properties for the connection pool.

In this part of the procedure, you can add a cluster to be used with the
connection pool, even though this is not necessary. For our example, we will
define the cluster created in the previous section. There are certain parameters
that need to be define is you are going to use a cluster.
1. To include a cluster to be used by a connection pool, define these
parameters:
– Service Component Name: with this parameter, you specify a cluster
previously defined to be used in the connection pool, for example,
e-BankCluster.
– Service Component is Cluster: this variable enables the connection pool to
use the cluster, check it.
– User name: this is a user that the connection pool uses to create the
connections to the DB2 OLAP Server. This user must have access to
OLAP Server. The rights of this user are the rights that all users will have
when using this connection pool, for example, system.
– Password: password of the user, in this case password
– Initial capacity: connections opened initially, for example, 2.
– Maximum capacity: maximum connections allowed to open, for example,
4.
– Capacity increment: incremental value used to open connections. This
value varies between the initial capacity and the maximum capacity. For
example, 1
– Allow everyone: by enabling this variable every user defined in Enterprise
Services will have rights to use the connection pool.
– Allowed users: instead of allowing everyone, you can specify the users
that can use the connection pool
– Allowed groups: instead of specifying users you can specify the groups of
users that can use the connection pool.

Figure 5-58 shows the parameters needed to define a connection pool that uses
a cluster.

Chapter 5. Enterprise Services 201


Figure 5-58 Parameters definition for connection pool with cluster

2. To define a connection pool without a cluster, define these variables:


– Service Component Name: In this case, define every OLAP application
you want to be part of the connection pool in the format
olapSvrName/appName/CubeName;olapSvrName/appName/CubeName;
olapSvrName/appName/CubeName (note that these applications are
separated by semicolons).
– Service Component is Cluster: In this case, do not check this variable.
The Service Component Name you define previously is not a cluster. It is a
set of OLAP servers. Leave this variable unchecked.
– User name
– Password
– Initial capacity
– Maximum capacity
– Capacity increment
– Allow everyone
– Allowed users
– Allowed groups

202 DB2 OLAP Server V8.1: Using Advanced Functions


Figure 5-59 shows the parameters definition without a cluster.

Figure 5-59 Connection pool properties without a cluster definition

Once you have created and configured the connection pool, it must be declared
or enabled in the Enterprise Services server.
1. Click the Enterprise Services server and add the connection pool in the
Enabled connect pool names box. See Figure 5-60 for more details.
2. Click Save.

Chapter 5. Enterprise Services 203


Figure 5-60 Enabling the connection pool in the Enterprise Services server

The connection pool is created. Now, client Java programs can make use of the
connection pool whether it uses the cluster or not.

Creating connection pools from the Command Shell


There are various commands related to connection pool, to execute from the
Shell. One of them is for connection pools creation.

To create a connection pool, do the following:


򐂰 Start the Command Shell and signon.
򐂰 Execute the command createConnPool or type the number 24.
򐂰 Enter the information in the format Enter input as connPoolName, desc,
svcCompName, svcCompIsCluster,user,password, inititialCapacity,
maxCapacity,capacityIncrement,allowEveryone,allowUsers,allowGroups,
for example, demoBasicPool, testpool, demoBasicCluster, true, system,
password, 2, 4, 1, true, , .
򐂰 The connection pool is created.

204 DB2 OLAP Server V8.1: Using Advanced Functions


To enable the connection pool in the Enterprise Services server, it is necessary
to go to the graphical console and enable it as in the previous section.

The commands related to connection pools that you can execute from the
Command Shell are shown in Table 5-6.

Table 5-6 Connection Pool commands


Commands (Parameters) Description

createConnPool ( connPoolName, desc, Creates a connection pool.


svcCompName, svcCompIsCluster, user,
password, inititialCapacity, maxCapacity,
capacityIncrement, allowEveryone,
allowUsers, allowGroups)

deleteConnPool (connPoolName) Deletes a connection pool.

listConnPool Lists all connection pools defined.

getConnPool (connPoolName) Gets the properties for the connection


pool specified.

Using the CreateConnPoolAndCluster sample program


Enterprise Services comes with sample Java programs such as
CreateConnPoolAndCluster.java to provide faster development of a test
environment. This program allows you to create a cluster and a connection pool
that uses the cluster.

To use these sample programs, there is an executable program named


runsamples (.cmd on Windows, .sh on UNIX platforms) designed for compiling
the sample programs. This script must be configured to work with your computer
environment. To configure this program, refer to 5.4.9, “Using the sample
programs” on page 208.

The runsamples program can only run one Java program at a time. It is
necessary to modify this parameter in the runsamples file or to create another
script to execute the program you want to test.
1. Edit the runsamples file.
2. Look for the sentence that begins with “echo step 2” and change the name
of the program to be executed, in the two lines as shown below, for example:
echo Step-2: Ready to run CrateConnPoolAndCluster example ...
pause
%JAVA_HOME%\bin\java com.essbase.samples.CreateConnPoolAndCLuster %USER%
%PASSWORD% %DOMAIN% %EES_SERVER% %ORB% %PORT% %OLAP_SERVER%.
3. Save the file.

Chapter 5. Enterprise Services 205


4. Verify that the Enterprise Services server is running.
5. Go to a command line and run the runsamples script file by typing:
runsamples tcpip
If you are not using the TCPIP protocol, type the protocol you are using.
6. Follow the on-screen prompts to compile and run the sample programs.
The sample program in Example 5-5 runs the CreateConnPoolAndCluster
sample program which creates a cluster, a connection pool that does not uses
this cluster, and a connection pool that uses the cluster.
You can modify the execution of this program by commenting the correct
lines. for example, if you do not want to create a connection pool over a
cluster definition, add the comment character (//) to each related line in the
Java program.

Example 5-5 CreateConnPoolAndCluster sample program


// Create definition for connection pool over a cluster component.
//System.out.println("Creating conn pool (demoBasicPoolUsingCluster)
definition...");
//IEssConnectionPool pool_2 =dom.createConnectionPool
("demoBasicPoolUsingCluster");
//pool_2.setDescription("Connection conn pool on demoBasicPoolUsingCluster");
//pool_2.setServiceComponentName("demoBasicCluster");
//pool_2.setServiceComponentCluster(true);
//pool_2.setUserName("guest");
//pool_2.setPassword("password");
//pool_2.setInitialCapacity(4);
//pool_2.setMaximumCapacity(10);
//pool_2.setCapacityIncrement(2);
//pool_2.setAllowEveryone(false);
//pool_2.setAllowedUserNames("system;guest");
//pool_2.setAllowedGroupNames("grp-1;grp-2");
//pool_2.updatePropertyValues();

Follow the same procedure to comment other lines instead of the ones shown
before.

Attention: CreateConnPoolAndCluster creates a cluster and a connection


pool with the same name used in the section above, and is designed to
remove those objects if they exist. For your environment, you can change
these names before using the sample program or change the sample program
itself.

206 DB2 OLAP Server V8.1: Using Advanced Functions


In order to enable Enterprise Services and to use the connection pool and the
cluster created, you must shut down the ES server and start it again. When
starting the server, you will see in the command line window that the connection
pool and the cluster has been initialized. See Figure 5-61.

Figure 5-61 Opening connection pool and cluster

In Figure 5-61, you can see that the two connections defined in the connection
pool have been opened and that they are using the defined cluster. Go to DB2
OLAP Server, and check the connections opened to the cubes. There must be at
least one connection to each cube defined in the cluster.

Try to modify the parameters for the connection pool, and specify to open a
minimum of 9 connections and check DB2 OLAP Server again. DB2 OLAP
Server shows the connections for the e-Bank and e-Bank1 applications in the
Sicily server. As shown in Figure 5-62, each application has three connections,
and the rest have been made to the e-Bank application in Cayman.

During startup, Enterprise Services establishes the minimum number of


connections. As long as the workload or number of requesters grow, Enterprise
Services will increase the number of connections to the maximum defined in the
connection pool.

Chapter 5. Enterprise Services 207


Figure 5-62 Connections opened to DB2 OLAP Server

For more information about the available classes and methods in the DB2 OLAP
Server JAPI, see the online DB2 OLAP Server JAPI Reference in the Enterprise
Services DOCS directory.

5.4.9 Using the sample programs


Enterprise Services comes with a set of sample Java programs to provide a fast
development of a test environment. There are programs to access data, to create
objects, to define OLAP servers, to load data into cubes, and so on.

To use these sample programs, there is an executable program named


runsamples (.cmd on Windows, .sh on UNIX platforms) designed for compiling
the sample programs. This script must be configured to work with your computer
environment. Once this script is working in the environment, it can be use as a
template for creating and run scripts for the other sample programs.

To use the sample programs you need to:


1. Configure the runsamples script file
2. Run the runsamples script with one of the JAVA programs.

208 DB2 OLAP Server V8.1: Using Advanced Functions


Configuring the runsamples script file
To configure the runsamples script file to work in your computer environment, it is
necessary to modify some environment variables to suit the current environment.

Note: The sample programs are located in the ESS_ES_HOME\samples


directory in both, your server and your client machine. Try to use always the
ones located in the server machine to facilitate the pointing to the directories.

To set up the runsamples script file to work with your environment, follow these
steps:
򐂰 In the ESS_ES_HOME\samples\japi directory, locate the file named
runsamples script (.cmd on Windows platforms, .sh on UNIX platforms).
򐂰 Open the file in a text editor.
򐂰 Verify that the ESS_ES_HOME is pointing to the directory where your
Enterprise Services is, for example, c:\ibm\db2olap\ees.
򐂰 Verify that the variable JAVA_HOME points to a supported version of Java
Runtime Environment. You must update this variable with a full path to the
Java installation, for example
set JAVA_HOME= “C:\ibm\db2olap\ees\jre”
For the example, we are using the JAVA installation that comes with
Enterprise Services.
򐂰 Replace the variable values for user, password, domain, EES_SERVER, and
OLAP_SERVER as necessary to suit your environment, for example:
set USER=admin
set PASSWORD=password
set DOMAIN=essbase
set EES_SERVER=9.1.151.16
set OLAP_SERVER=sicily
The user must have access to OLAP Server and must be created in the
Enterprise Services server. Figure 5-63 shows the environment variables in
the runsamples file.

Chapter 5. Enterprise Services 209


Environment settings JAVA environment
variable
Figure 5-63 Runsamples variables

Note: If you use the SampleBasic, the DemoBasic, and Demo2Basic (which is
a copy of Demo), create a user named “admin” with a password named
“password”, and have DB2 OLAP Server and Enterprise Services on the same
machine, you do not need to modify the default setting of the sample client
program.

򐂰 Save the runsamples script file.

Running the runsamples script file


Once the runsamples script file is configure to suit your environment, you can run
it. The runsamples program can only run one Java program at a time. Those are
the .java extension programs. It is necessary to modify this parameter in the
runsamples file or to create another script to execute the program you want to
test.

210 DB2 OLAP Server V8.1: Using Advanced Functions


Follow these steps:
1. Edit the runsamples file again.
2. Look for the sentence that begins with “echo step 2” and change the name
of the program to be executed, in the two lines as shown below, for example,
in our case, this program would be the DataQuery sample program.
echo Step-2: Ready to run DataQuery example ...
pause
%JAVA_HOME%\bin\java com.essbase.samples.DataQuery %USER% %PASSWORD%
%DOMAIN% %EES_SERVER% %ORB% %PORT% %OLAP_SERVER%.
If you want to test another program, just substitute the name of the program
as explained before, and run it.
3. Save the file.
4. Verify that the Enterprise Services server is running.
5. Go to a command line and run the runsamples script file by typing:
runsamples tcpip
If you are not using the TCPIP protocol, type the protocol you are using.

Executing the DataQuery Sample program


The DataQuery Sample program performs several actions: It signs on to the
essbase domain, opens a cube view, performs retrieve, zoomIn, zoomOut,
keeponly, removeonly, pivot, and signs off. In order to do this, you must configure
the DataQuery program to fit in your environment. Follow these steps:
1. Edit the DataQuery program
2. Find the sentences as in Example 5-6 and change the information with the
one corresponding with you environment:

Example 5-6 DataQuery program


public class DataQuery {
// NOTE: Change the following variables to suit your setup.
private static String s_userName = "system";
private static String s_password = "password";
private static String s_domainName = "essbase";
private static String s_prefEesSvrName = "localhost";
private static IEssbase.EEssOrbPluginType s_orbType =
IEssbase.EEssOrbPluginType.TCPIP;
private static int s_port = 5001;
private static String s_olapSvrName = "localhost";
private static String s_appName = "demo";
private static String s_cubeName = "basic";

Chapter 5. Enterprise Services 211


3. Notice that the three last sentences are the ones to refer the OLAP Server,
the application and the cube you will access. All the parameters described
Example 5-6 can be modified to suit your environment as shown in
Example 5-7.

Example 5-7 Data Query program updated


public class DataQuery {
// NOTE: Change the following variables to suit your setup.
private static String s_userName = "admin";
private static String s_password = "password";
private static String s_domainName = "essbase";
private static String s_prefEesSvrName = "9.1.151.24";
private static IEssbase.EEssOrbPluginType s_orbType =
IEssbase.EEssOrbPluginType.TCPIP;
private static int s_port = 5001;
private static String s_olapSvrName = "cayman";
private static String s_appName = "e-Bank";
private static String s_cubeName = "e-BankDB";

4. If you want to run the DataQuery program using a connection pool, follow
these steps:
a. Uncomment the following line:
cv = dom.openCubeView("Data Query Example", "demoBasicPool", true);
b. Change the second parameter with the name of the connection pool you
wan to use, for example:
cv = dom.openCubeView("Data Query Example", "e-bankconnpool", true);
c. Comment the following line (//)
cv = dom.openCubeView("Data Query Example", s_olapSvrName, s_appName,
s_cubeName, true, true, true, true);

212 DB2 OLAP Server V8.1: Using Advanced Functions


Figure 5-64 shows the DataQuery program edited.

Comment these two lines.


Remove the comment signs(//) in this line.
Figure 5-64 DataQuery program

5. Save the program.


6. Execute the DataQuery program by executing the runsamples program.

Figure 5-65 shows the result of the execution of the DataQuery program.

Chapter 5. Enterprise Services 213


Figure 5-65 Data Query result

This program is only one of the many sample programs that comes with
Enterprise Services. Table 5-7 shows the most commonly used sample
programs and a description of them.

Table 5-7 Most common sample programs


Program Name Description

Connect.java Demonstrate a simple connection and disconnection


from a DB2 OLAP Server.

DataQuery Demonstrates basic retrieval of data from a DB2


OLAP Server database

RunReport Demonstrate the running of a report from a DB2


OLAP Server database.

SyncCubeReplicas Demonstrates the replication of data between two


OLAP Server cubes

CopyOlapAppAndCube Copies an application and a database from one OLAP


Server to another.

214 DB2 OLAP Server V8.1: Using Advanced Functions


For a complete list of the sample programs go to ees\sample\japi directory. All
the sample programs are located there.

For more information about the available classes and methods in the DB2 OLAP
Server JAPI, see the online DB2 OLAP Server JAPI Reference in the Enterprise
Services DOCS directory.

5.4.10 Additional tasks


After performing the steps explained above there are some additional tasks that
you can do. Some of these tasks are optional, but highly recommended for
administration purposes and some are obligatory for good functioning. These
tasks are:
򐂰 Configuring DB2 OLAP Server for optimum performance with Enterprise
Services
򐂰 Configuring DB2 OLAP Server for remote activation
򐂰 Configuring Enterprise Services as a Windows NT Service
򐂰 Synchronizing Data across a cluster
򐂰 Synchronizing users and Security across a cluster.
򐂰 Creating a cube view for accessing DB2 OLAP Server cubes.

Configuring DB2 OLAP Server for Enterprise Services


For DB2 OLAP Server to better support Enterprise Services functionality, it is
highly recommended to perform the following actions.
1. Update the essbase.cfg file with these parameters:
– AGENTLOGMESSAGELEVEL ERROR
– LOGMESSAGELEVEL ERROR
– CLEARLOGFILE TRUE
a. The first two settings reduce the amount of messages that are logged by
the DB2 OLAP Server. Under heavy use, logs can become very large and
unusable by the server, requiring that you delete the log or reduce its size.
Adding these settings will reduce the amount of information recorded in
the logs and, consequently, reduce the need to manage the logs.
b. The other setting causes DB2 OLAP Server to clear the log file before
recording any new message, so that only the last message is available in
the log file. This task is not a prerequisite but highly recommended for
Enterprise Services purposes. The DB2 OLAP Server administrator can
still need this information. Check with him before making the changes. For
complete information about how to make the changes, refer to the
Enterprise Services Installation Guide.

Chapter 5. Enterprise Services 215


2. When defining a cluster, you must make copies of the OLAP applications that
the cluster will serve. To gain minimal benefit of load balancing and failover
from Enterprise Services, you must set up at least a main application with a
database and one replica application with an identical database. For further
information refer to “Copy DB2 OLAP applications and databases across
servers” on page 161.
3. Create users and their access permissions on each of the DB2 OLAP Server
to use with Enterprise Services. For more information see “Synchronizing
users and security across a cluster” on page 217.

Configuring DB2 OLAP Server for remote activation


You can enable Enterprise Services to start DB2 OLAP Server on a remote
Windows NT system. You need to have the appropriate privileges and you must
specify the exact path of the OLAP Server on the remote machine. This feature
uses the DCOM activation on both machines.

This functionality enables the possibility of starting and stopping DB2 OLAP
Servers and Enterprise Services Servers from the graphical console. This task is
optional, but recommended for an easier administration from Enterprise
Services. For a complete description of how to configure remote activation, refer
to the Enterprise Services Installation Guide.

Configuring Enterprise Services as a Windows NT Service


Enterprise Services can be installed to run as a service under Windows NT. As a
service, Enterprise Services uses the native TCP/IP communications protocols.

This step must be done after the standard installation on Windows NT. Then you
must reboot you machine effect all the changes made to the Path and Classpath
variables. This task is optional.

For complete details on how to configure Enterprise Services as a service, refer


to the Enterprise Services Installation Guide.

216 DB2 OLAP Server V8.1: Using Advanced Functions


Synchronizing data across a cluster
When using clusters in Enterprise Services, you must have a master cube and
full copies of that cube. Then you must have the data of those cubes
synchronized for a consistent request of information. There are three general
strategies for replicating data across a cluster:
򐂰 Using the partitioning feature of DB2 OLAP Server to create replicated
partitions of the served application on each DB2 OLAP Server.
򐂰 Use DB2 OLAP Integration Server to load data onto each server on the cube
򐂰 Exporting data from the master application and database and loading into
each application and database on all DB2 OLAP Server installations in the
cluster.

Note: A master cube, is the principal cube in the environment. You load and
calculate the master cube and then you may full copies of that cube.

For further information, see “Synchronizing data across a cluster” on page 217.

Synchronizing users and security across a cluster


When working with clusters of DB2 OLAP Server servers with Enterprise
Services, you must add users and their relevant access permissions to all DB2
OLAP Server servers in the cluster. Is there is a large number of users, this must
time consuming.

Enterprise Services provides a command for loading OLAP Server users into its
domain storage. For more information see “Synchronizing users and security
across a cluster” on page 217.

Chapter 5. Enterprise Services 217


Creating a cube view for accessing DB2 OLAP Server cubes
A cube view is a spreadsheet representation of the data contained in a DB2
OLAP Server database. Retrieving data into an empty spreadsheet returns the
dimensions of the OLAP Server database. Use the cube view to verify that data
exists in the OLAP Server database.

To create a cube view:


1. Select an OLAP Server database in the navigation panel, by clicking in the +
sign in Servers and OLAP Servers and until you see the database you want to
access.
2. In the menu bar, go to Cube —> Create —>Cube View. See Figure 5-66.

Figure 5-66 Creating Cube View

218 DB2 OLAP Server V8.1: Using Advanced Functions


3. In the dialog box that is displayed, enter the information required:
a. Cube View Name: For example, Monthly Report.
b. Use Conn. Pool: Uses a connection from the available pool for the
duration of a session or until the connection is closed. Check it if you want
to use an available connection pool.
c. Use Conn. Per Op: Uses a connection from the available pool for the
duration of an operation. After each operation is completed, the
connection returns to the pool so that others can use it.
d. Use Cluster: Specifies using a cluster.
e. Press Enter. See Figure 5-67.

Figure 5-67 Cube View screen

Chapter 5. Enterprise Services 219


A spreadsheet is displayed in the workspace panel of the Enterprise Services
Console window. The spreadsheet displays the members of the OLAP Server
database that you selected. In the spreadsheet, you can perform tasks, such as
retrieve, pivot, and drill down. Check the toolbar in the upper part of the
workspace area. See Figure 5-68.

Figure 5-68 Cube View spreadsheet

The cube view is a temporary view. When you disconnect from the server, you
lose this view. But you can create it again as soon as you reconnect to Enterprise
Services.

220 DB2 OLAP Server V8.1: Using Advanced Functions


Part 4

Part 4 Advanced
administrative
functions
In this part of the book, we provide practical examples and detailed guidelines to
implement and use additional advanced administrative functions of DB2 OLAP
Server version 8.1, such as these:
򐂰 Parallel calculation, load, and export functions
򐂰 The Administration Services feature
򐂰 Additional advanced functions:
– Direct I/O
– Security Migration Tool
– Multiple OLAP agents on the same machine
– Custom Defined Functions

© Copyright IBM Corp. 2002. All rights reserved. 221


222 DB2 OLAP Server V8.1: Using Advanced Functions
6

Chapter 6. Parallel calculation, data


load, and export
In previous versions of DB2 OLAP Server, the calculation, load, and export
processes were executed serially. In serial mode, each task is performed in
sequence and cannot take advantage of multiprocessor hardware.

DB2 OLAP Server version 8.1 allows these critical operations — calculation,
load, and export — to run in multi-threaded mode.

The parallel functions of DB2 OLAP Server improve performance and reduce the
batch window to build the DB2 OLAP Server cube or to export the DB2 OLAP
Server databases.

In this chapter we describe how to enable and perform parallel calculation,


parallel load, and parallel export, using the multi-processing capability of the
hardware — for example, in an SMP environment.

© Copyright IBM Corp. 2002. All rights reserved. 223


6.1 Performing parallel calculation
In previous versions of DB2 OLAP Server, the calculation, load and export
processes were executed serially. In serial mode, each task is performed in
sequence and cannot take advantage of multiprocessor hardware.

DB2 OLAP Server version 8.1 allows these critical operations — calculation,
load, and export — to run in multi-threaded mode.

The parallel functions of DB2 OLAP Server improve performance and reduce the
batch window to build the DB2 OLAP Server cube or to export the DB2 OLAP
Server databases.

6.1.1 Understanding parallel calculation


In addition to the standard means of performing a calculation, where each task is
performed in sequence or serially, DB2 OLAP Server version 8.1 supports
parallel calculation.
򐂰 Serial calculation: All the steps in a calculation run on a single thread. Each
task is completed before the next is started. The serial calculation cannot take
advantage of a multi-processed machine. Each task is performed once a time,
causing one CPU to be busy while the others can be idle.
򐂰 Parallel calculation: DB2 OLAP Server analyzes the tasks that can run
concurrently and breaks them in subtasks. The subtasks can run
independently of each other, simultaneously on up to four threads.
The DB2 OLAP Server passes these threads to the operational system. The
operating system can schedule each thread on separate CPUs.

Figure 6-1 shows the differences between serial and parallel calculation in a
machine that has two CPUs. In the Parallel calculation example, we are
executing the calculation process using two threads.

224 DB2 OLAP Server V8.1: Using Advanced Functions


S e r i a l C a lc u l a t i o n P a r a l le l C a l c u la t io n
C a lc u la t e C a lc u la t e
p ro c e s s p ro c e s s

C ALC P AR A LLE L 2

waiting
task5
or
SE T C ALC P AR A LLE L
2

Th
d1
waiting

rea
task4

r ea

d2
Th
O n ly 1

waiting
waiting

task4
task6
T h re a d
waiting
task3
task4

waiting
waiting
task5

task3
waiting
task2

O p e r a t in g S y s t e m O p e ra tin g S y s te m
e x e c u tin g : ta s k 1 e x e c u tin g : ta s k 1 , ta s k 2

CPU 1 CPU 2 CPU 1 CPU 2


p r o c e s s in g id le p r o c e s s in g p r o c e s s in g

Figure 6-1 Serial calculation and parallel calculation

6.1.2 Parallel calculation architecture


This section presents a detailed illustration of the steps DB2 OLAP Server uses
to calculate a database in parallel mode. We will use a practical example for a
better comprehension.

Figure 6-2 represents the four major steps DB2 OLAP Server performs during a
calculate process in parallel.

Chapter 6. Parallel calculation, data load, and export 225


Calculate
process
in parallel using 2
threads

1 no Execute
Will the
parallel mode calculation in
improve serial mode
performance?

yes

2 Analyze the number of


tasks necessary to
calculate.

25
3
Analyze tasks that can Operating System
run concurrently and
break them in subtasks.

d1 cpu1
ea
4 20 th r
1 task
tasks tasks thr
e ad2

cpu2 cpu3
4
subtasks

Figure 6-2 Parallel calculation steps

These are the four steps shown in Figure 6-2:


1. If you requested a calculation process in parallel, DB2 OLAP Server analyzes
the outline and the calculation request. If DB2 OLAP Server determines that
the parallel calculation will not improve performance, or if there are complex
formula interdependencies in the outline or calculation script, DB2 OLAP
Server will force serial calculation mode.
The outline structure and the application design determine whether enabling
parallel calculation. To review the list of all requirements to execute parallel
calculation, see 6.1.3, “Requirements” on page 230.

226 DB2 OLAP Server V8.1: Using Advanced Functions


2. The DB2 OLAP Server will analyze the number of tasks necessary to
calculate the database.
A task contains a set of blocks to be calculated, with a common suffix in block
identifier. The task weight depends on the data loaded, the outline structure,
and the formulas involved.
Examples:
– Task1
• “100-10”-> “East”
• ”100-20”->”East”
– Task2
• “300”->”NY”->”Cust1”
• ”Diet”->”NY”->”Cust1”
In Figure 6-2, for example, 25 tasks are needed to calculate the database in
parallel.
3. DB2 OLAP Server analyzes the dependencies on the outline (and the
dependencies on the script if you are using a calculation script) and divides
the tasks into subtasks. Each subtask has independent tasks that can run
concurrently.
Figure 6-3 represents the outline of the Sample Basic database that will be
calculated in parallel.

Chapter 6. Parallel calculation, data load, and export 227


Figure 6-3 Sample.Basic outline

By default, DB2 OLAP Server uses the last sparse dimension in an outline to
identify the subtasks (tasks that can be performed concurrently). You can
also enable DB2 OLAP Server to use additional sparse dimensions in the
identification of tasks for parallel calculation using the CALCTASKDIMS
essbase.cfg setting (or SET CALCTASKDIMS calculation command). See 6.1.5,
“Identifying concurrent tasks for parallel calculation” on page 234 for more
information.
For this example, let us suppose that the database will be calculated using
only the last sparse dimension in the outline to identify the subtasks
(CALCTASKDIMS 1).
In the Sample.Basic application, the last sparse dimension is “Market”. The
members in the “Market” dimension are grouped into execution levels based
on outline relationships and formulas. Three subtasks are generated in levels:

228 DB2 OLAP Server V8.1: Using Advanced Functions


– Level 0: New York, Massachusetts, Florida, Connecticut, New Hampshire,
California, Oregon, Washington, Utah, Nevada, Texas, Oklahoma,
Louisiana, New Mexico, Illinois, Ohio, Wisconsin, Missouri, Iowa,
Colorado.
This subtask contains 20 tasks.
– Level 1: East, West, South, Central.
This subtask contain four tasks.
– Level 2: Market.
This subtask contains only one task.
Each level has a number tasks that can be executed concurrently at any one
time. DB2 OLAP Server first executes the subtask level 0. The subtask level 0
doesn’t have any dependency. The subtask level 1 depends on the calculation
results of the subtask level 0. The level 2 subtask depends on the results of
the calculation of the level 1 subtask.
In this example, DB2 OLAP Server will execute 20 tasks concurrently. After
these tasks complete, four more can be performed concurrently, and then one
task is executed.
Compare this example with Figure 6-2 on page 226.
The following message is generated in the application log file after DB2 OLAP
Server completes this step:
(1012679) Calculation task schedule [20,4,1]
You can use this message to identify the number of tasks DB2 OLAP Server
will use in each level (subtask) and the number of subtasks necessary.
4. In this example we are using two threads to calculate in parallel (set
CALCPARALLEL 2 in the calculation script or CALCPARALLEL 2 in the
essbase.cfg). See 6.1.4, “Enabling parallel calculation” on page 232 for more
information to enable parallel calculation.
DB2 OLAP Server sends the tasks that are ready to be executed to the
operating system using two threads. Each thread contains a set of tasks
ready to be executed.
A task is ready to be executed when all dependencies are finished. The DB2
OLAP Server identifies the tasks that are ready to be executed at the
beginning of the calculation and upon competition of a task.
The operating system can run these tasks concurrently in two different
processors. Using two threads, DB2 OLAP Server can perform two tasks at
the same time.

Chapter 6. Parallel calculation, data load, and export 229


Note: DB2 OLAP Server just passes the many threads to the operational
system. The operational system is responsible to schedule each thread.
The operational system determines if each thread will execute on a
separate CPU.

It is recommended to set the number of calculation threads to the number of


CPUs available, minus one. See 6.1.7, “Parallel calculation performance” on
page 240.

6.1.3 Requirements
We have explained briefly that DB2 OLAP Server will use serial calculation
instead parallel calculation if it evaluates that the parallel calculation will not
improve performance, or if there are complex formulas that cause
interdependencies in the outline or calculation script. Now we will discuss in
more detail all the requirements to run a parallel calculation.

Before you enable parallel calculation, review this list of requirements. If your
application does not satisfy these requirements, it will use serial calculation
instead parallel calculation, even though parallel calculation is configured.
򐂰 Isolation level:
The parallel calculation cannot be executed if you are using the committed
access isolation level. You should set an uncommitted isolation level for the
databases for which you are planning to use parallel calculation.
During a parallel calculation, DB2 OLAP Server automatically checks that the
commit threshold (synchronization point) defers commits until 10 MB of data
has been written, and increases the commit threshold if necessary for the
duration of that calculation pass only.
If you can allocate more than 10 MB extra disk space for calculation, consider
increasing your commit threshold value to a very large number for better
performance.
To set the isolation level of your database to uncommitted mode, use one of
the tools in Table 6-1.

Table 6-1 Setting the database isolation level


Tool Instructions

Administration Services Database Properties window —> Database


Properties —> transactions tab

MaxL alter database db_name disable committed_mode

230 DB2 OLAP Server V8.1: Using Advanced Functions


Tool Instructions

ESSCMD SETDBSTATEITEM 18

Application Manager Database —> settings —> Transaction tab

If you try to execute a parallel calculation, using the committed isolation level in
your database, the calculation is executed in serial, and the following message is
generated in your application log file:
(1012677) Calculating in serial
򐂰 Formulas:
One or more formulas present in a calculation may prevent DB2 OLAP Server
from using parallel calculation. These formula placements are likely to force
serial calculation:
– A formula on a dense member, including all stored members and any
Dynamic calculation members upon which the stored member may be
dependent, causes a dependency on a member in the dimension used to
identify tasks for parallel calculation.
– A formula contains references to variables declared in a calculation script
using @VAR, @ARRAY, or @XREF.
– A formula on a member causes a circular dependency. For example,
member A has a formula referring to member B, and member B has a
formula referring to member C, and member C has a formula referring to
member A.
– A formula on a dense or sparse member with a dependency on the
member or members from the dimension is used to identify tasks for
parallel processing.
If a formula prevents DB2 OLAP Server from executing parallel calculation,
one of the following messages is generated in the application log file:
(1012569) Formula on member memberName forces calculation to execute in
serial mode.
(1012570) A circular or recursive dependency along dimension
dimensionName forces calculation to execute in serial mode.
(1012571) Presence of variables or formulas with @XREF function forces
calculation to execute in serial mode.
These messages can help to determine which formula is forcing the serial
calculation.
If you need to use a formula that might prevent parallel calculation, you can
consider tagging the relevant member or members as Dynamic Calc if
possible so they are not featured in the calculation pass.

Chapter 6. Parallel calculation, data load, and export 231


򐂰 Parallel calculation in transparent partitions:
A transparent partition allows you to access data from the data source as
though it were stored in the data target. The data is, however, stored at the
data source, which can be in another application, or in another DB2 OLAP
Server database, or on another DB2 OLAP Server.
Parallel calculation with transparent partitions has these limitations:
– You cannot use parallel calculation across transparent partitions unless
the calculation occurs at the target.
– When using transparent partitions, the number of sparse dimensions used
to identify the subtasks for the parallel calculation process should be set to
1. Specify CALCTASKDIMS 1 in the essbase.cfg setting or use the calculation
command set CALCTASKDIMS 1 in the calculation script (this is the default).

Note: Other types of partitions (such as replicated and linked partitions)


do not have these limitations.

򐂰 Incremental restructure:
If you have selected incremental restructure for a database and you have
made outline changes that are pending a restructure, do not use parallel
calculation. Unpredictable results may occur. Parallel calculation doesn’t
support incremental restructure.
򐂰 Calculator hash tables:
During a parallel calculation, the hash tables are not used. You can leave any
of these items in your essbase.cfg configuration file, but they are ignored
during a parallel calculation:
– SET CALCHASHTBL
– CALCOPTCALCHASHTBL
– CALCHASHTBLMEMORY
If you really need to use hash tables in the calculation process, consider using
serial calculation instead parallel calculation.

6.1.4 Enabling parallel calculation


To enable parallel calculation in place of the default serial calculation, you can
use the following methods:
1. Use the new configuration setting CALCPARALLEL, specifying the number of
threads you want to use in parallel.
Syntax:
CALCPARALLEL [appname [dbname]] n

232 DB2 OLAP Server V8.1: Using Advanced Functions


You can specify CALCPARALLEL individual databases, all databases within
an application, or for all applications and databases on the server in
essbase.cfg.
In Example 6-1, DB2 OLAP Server is executing the calculation in parallel,
using two threads, only for the databases that are in application onlinea.

Example 6-1 Using two threads


1)CALCPARALLEL onlineia 2

In Example 6-2, DB2 OLAP Server is executing the calculation in parallel,


using three threads, only for the database onlineid in application onlinea.

Example 6-2 Using three threads


2)CALCPARALLEL onlineia onlineid 3

In Example 6-3, the DB2 OLAP Server is executing the calculation in parallel
using four threads, for all databases in all applications.

Example 6-3 Using four threads


3)CALCPARALLEL 4

The CALCPARALLEL configuration setting can be used only in the server


essbase.cfg. You cannot set it on essbase.cfg client.

Note: Changes in the essbase.cfg configuration file are not effective until
the ESSBASE service is restarted.

2. Use the command SET CALCPARALLEL in your calculation script, specifying


the number of threads you want to use in parallel.
When using the command SET CALCPARALLEL in your calculation script,
the value specified in the CALCPARALLEL configuration setting
(essbase.cfg) is ignored. (See Example 6-4.)

Example 6-4 Using SET CALCPARALLEL command

– In the calculation script:


set calcparallel 4;
calc all;
– In essbase.cfg:
CALCPARALLEL 3

Chapter 6. Parallel calculation, data load, and export 233


In Example 6-4, DB2 OLAP Server executes the calculation script using four
threads to calculate all members in all dimensions, ignoring the value 3 in
CALCPARALLEL (essbase.cfg).
Syntax:
SET CALCPARALLEL [appname [dbname]] n
You can use the command SET CALCPARALLEL in your calculation script
multiple times, allowing you specify a different number of threads for each
step of your calculation process. You can also execute a part of your
calculation process using parallel calculation and other part using serial
calculation.

Example 6-5 Calculation script


set calcparallel 4;
calc dim (Product,Market);
set calcparallel 1;
calc dim (Scenario);

In Example 6-5, DB2 OLAP Server calculates all members for the dimensions
Product and Market using four threads, and it calculates all members for the
dimension Scenario using serial mode (one thread).

6.1.5 Identifying concurrent tasks for parallel calculation


You can enable the use of additional sparse dimensions in the identification of
tasks for parallel calculation using the CALCTASKDIMS configuration setting or
using the SET CALCTASKDIMS calculation command.

Each unique combination of members from the selected sparse dimensions is a


potential task, the potential number of parallel tasks is the product of the number
of members of the selected dimensions. See 6.1.2, “Parallel calculation
architecture” on page 225 (step 3) for more information about how DB2 OLAP
Server identify the tasks that can be performed concurrently.

By default, DB2 OLAP Server uses the last sparse dimension in an outline to
identify tasks that can be performed concurrently.

Sometimes the distribution of data may cause one or more tasks to be empty,
that is, there are no blocks to be calculated in the part of the database identified
by a task, causing uneven load balancing. Empty tasks in the calculation process
are normal, although a high number of empty tasks can reduce the effectiveness
of parallel calculation.

You can verify the number of empty tasks in the application log like this:
(1012681) Empty tasks [907,1,0,0]

234 DB2 OLAP Server V8.1: Using Advanced Functions


In this example message, there are 907 empty tasks in the first subtask, and
there is one empty task in the second subtask. The third and the fourth subtasks
don’t have empty tasks.

A high number of empty tasks can be caused, for example, if you have a FIX
statement on a member of the last sparse dimension.

The FIX command is often used to calculate a subset of the database. This is
useful because it allows you to calculate separate portions of the database using
different formulas, allowing calculate the sub-section much faster than you would
otherwise. FIX commands can only be used in calculation scripts, not in outline
formulas.

But when using the FIX command in the last sparse dimension that DB2 OLAP
Server uses to identify concurrent tasks for the parallel calculation, it can
generates high empty tasks number.

To resolve the high empty tasks number situation caused by the FIX statement,
you can enable DB2 OLAP Server to use additional sparse dimensions in the
identification of tasks for parallel calculation. In this case, more and smaller tasks
would be created, increasing the opportunities for parallel processing and
providing better load balancing.

Note: Unless you are actually fixing on the last sparse dimension, generating
many empty tasks, there is not a benefit in increase the CALCTASKDIMS so
much. If you increase the CALCTASKDIMS, DB2 OLAP Server can generate such
a large number of tasks that performance may decrease instead of increase.
In most tests, increasing task dimensions so much created much task
management overhead.

To increase the number of sparse dimensions used to identify tasks for parallel
calculation, use this procedure:
1. Add or modify CALCTASKDIMS in the essbase.cfg server configuration file,
or use the calculation script command SET CALCTASKDIMS at the top of the
script.
– Essbase.cfg:
CALCTASKDIMS [appname [dbname]] n
Example:
CALCTASKDIMS Onlinei Onlinei 2
– Calculation command:
SET CALCTASKDIMS [appname [dbname]] n;

Chapter 6. Parallel calculation, data load, and export 235


Example:
set calctaskdims 2;
calc all;
You should specify the set calctaskdims entry before the calculation
command. Table 6-2 describes the parameters to use with CALCTASKDIMS
or SET CALCTASKDIMS

Table 6-2 Parameters of CALCTASKDIMS or SET CALCTASKDIMS


Parameter Description

appname Specify that CALCTASKDIMS applies to all databases on the named


application.
If you specify a value for appname and do not specify a value for
dbname, the setting applies to all databases in the specified application.
If you do not specify an application, you cannot specify a database, and
the setting applies to all applications and databases on the DB2 OLAP
Server. This is an optional parameter.

dbname Specify that CALCTASKDIMS applies only to the database named. If


you specify a value for dbname but do not include appname, the
parameter is ignored, and parallel calculation is enabled for all
applications and databases on the OLAP Server. This is an optional
parameter.

n An integer value that specify the number of sparse dimensions to be


included when DB2 OLAP Server identifies tasks that can be performed
at the same time.
The default value, 1, indicates that only the last sparse dimension in the
outline will be used to identify tasks. A value of 2, for example, indicates
that the last and second-to-last sparse dimensions in the outline are
used.
The maximum value is the number of sparse dimensions in the outline.
DB2 OLAP Server issues an error if the value is less than 1. A value
greater than the number of sparse dimensions in the outline is
interpreted as the largest valid value.
This is a required parameter, a

2. Restart DB2 OLAP Server if you added or modified CALCTASKDIMS in the


essbase.cfg server configuration file.
3. If you are using a calculation script it is not necessary restart the DB2 OLAP
Server. In this case only run the calculation script.

236 DB2 OLAP Server V8.1: Using Advanced Functions


6.1.6 Running parallel calculation
If parallel calculation is enabled, using one of the methods presented in the 6.1.4,
“Enabling parallel calculation” on page 232, all the tools that can perform a
calculation in the DB2 OLAP Server databases will obtain benefits from parallel
calculation.

The parallel calculation process can be executed using the Application Manager,
the ESSCMD commands, Integration Server, or Administration Services:
򐂰 Application manager:
To execute a calculation process using the data load in the Application,
perform the following steps:
a. Connect to DB2 OLAP Server (Server -> Connect).
b. Select the application and database.
c. Go to Database —> Calculate.
d. Choose if you want to use the default calculation or if you want to use a
calculation script pre defined
If you want to use default calculation, you should use the first method
presented in 6.1.4, “Enabling parallel calculation” on page 232
(CALCPARALLEL in essbase.cfg), because the default calculation can’t
enable any calculation script.
e. Click OK.
Figure 6-4 shows an example of the calculation process using Application
Manager.

Chapter 6. Parallel calculation, data load, and export 237


You can choose a
calculation script
pre created to
execute the
calculation
process. Using the default
option, DB2 OLAP
Server executes the
command calc all,
calculating all
members in all
dimensions.

Figure 6-4 Calculation process using Application Manager

You cannot execute other processes in the Application Manager session


while it is executing the calculation process.

򐂰 ESSCMD:
To call the ESSCMD command interface, on Windows platforms:
a. Go to Start —>Programs —>IBM DB2 OLAP Server 8.1 —> ESSCMD
command interface.
To call the ESSCMD command interface, on UNIX platforms:
a. Login with a DB2 OLAP Server user. This user should have the DB2 OLAP
Server environment variables configured. See the DB2 OLAP Server
installation Guide - “Setting up the environment to run the DB2 OLAP
Server”, on page 66.
b. Execute ESSCMD on an AIX command session.
Table 6-3 shows the different methods that can be used to enable parallel
calculation for each calculation ESSCMD command.

238 DB2 OLAP Server V8.1: Using Advanced Functions


Table 6-3 ESSCMD commands to calculate
Command What it does Example Methods that can be
used to enable
parallel calculation

CALC "calcString; Executes one or more CALC "Jan; CALCPARALLEL


[calcString;]” calculation strings. Product;" (essbase.cfg)

CALCDEFAULT Calculates the default CALCDEFAULT; CALCPARALLEL


database calculation (essbase.cfg)

CALCLINE "calcString;” Executes a single CALCLINE "Jan;” CALCPARALLEL


calculation string (essbase.cfg)

RUNCALC numeric calcScript. Runs a calculation RUNCALC 2 CALCPARALLEL


Numeric is location of the script "FAM100"; (essbase.cfg) or
calculation script data file SET
(1 - Local/client-based, CALCPARALLEL
2 - Remote/server calculation (calculation
script, 3 - File that is not a DB2 command).
OLAP Server object).

See the Technical Reference guide for the complete syntax of these
commands.

򐂰 Integration Server:
Using Integration Server, you can only run a calculation process after a load
process (see Figure 6-5).
To execute a calculation using the Integration Server, follow these steps:
a. Open your OLAP Metaoutline, informing the data source name, user and
password to access the data source.
b. Go to Outline —> Data Load.
c. Select one of the options: “Use default calc script” or “Specify calc script”.
If you want to use default calculation you should use the first technic
presented in the 6.1.4, “Enabling parallel calculation” on page 232
(CALCPARALLEL in essbase.cfg) because the default calculation doesn’t
use calculation script.

Chapter 6. Parallel calculation, data load, and export 239


Use this option to
execute a default
calculation option
(calc all).

Use this option if you want to run a pre defined calculation


script.

Figure 6-5 Integration Server data load

d. In the next screen you can schedule your load process. If you don’t want to
schedule it, select the option Now.
e. Click Finish.

򐂰 Administration Services:
You can use Administration Services to calculate DB2 OLAP Server
databases. You can execute the calculation process in the background and
continue using Administration Services for other purposes. (See “Managing
databases” on page 316, the number list 3 on page 330.).

6.1.7 Parallel calculation performance


Customers already using DB2 OLAP Server version 8.1 have reported batch
processing average cycle time reductions of 30%. The ability to use the
functionality of parallel calculation greatly depends on the model design, the
calculation functions used, the number of threads given to the calculator, and the
machine characteristics.

240 DB2 OLAP Server V8.1: Using Advanced Functions


Parallel calculation may not improve performance if you don’t configure your
environment properly. The following recommendations should be considered
before you enable parallel calculation. These recommendations will help you in
optimally taking advantage of this feature.
1. Order the dimensions in the outline:
To optimize parallel calculation performance, order the sparse dimensions in
an outline from smallest to largest, based on the actual size of the dimension.
To verify the actual size of the dimension (see Figure 6-6), you can use
Application Manager or the ESSCMD command GETDBSTATS.

The actual size


value represents
the size of the
dimension.

The members stored


value represents the
size of the dimension.

Figure 6-6 Verifying the database size

Your outline structure and application design determines whether enabling


parallel calculation can improve calculation performance. If your application
does not meet these requirements, you may not get the full benefit of parallel
calculation.
Calculation tasks are usually generated along the last sparse dimension of an
outline.

Chapter 6. Parallel calculation, data load, and export 241


You should order the sparse dimensions in an outline from smallest to largest,
because the calculation tasks are usually generated along the last sparse
dimension of an outline.

Attention: Placing the largest sparse dimension at the end of the outline
for maximum parallel calculation performance may slow retrieval
performance. If you want to prioritize the query performance, you should
place the most queried sparse dimensions before the less queried sparse
dimensions.

We have done a small test, where we ran a parallel calculation in an outline


with the sparse dimensions disordered. See Table 6-4.

Table 6-4 Outline disordered


Dimension order Dimension Type Actual size

1 Dense 129

2 Dense 2

3 Dense 11

4 Sparse 4

5 Dense 4

6 Sparse 6

7 Sparse 7

8 Sparse 8

9 Sparse 8

10 Sparse 3570

11 Sparse 1245

We have executed parallel calculation in the same database, ordering the


sparse dimensions in the outline from smallest to largest. We also ordered
first the dense dimensions and then the sparse dimensions.
Using the ordered outline, we got a 49% improvement. See Table 6-5:

242 DB2 OLAP Server V8.1: Using Advanced Functions


Table 6-5 Outline ordered
Dimension order Dimension Type Actual size

1 Dense 129

2 Dense 2

3 Dense 11

4 Dense 4

5 Sparse 4

6 Sparse 6

7 Sparse 7

8 Sparse 8

9 Sparse 8

10 Sparse 1245

11 Sparse 3570

2. Define the right number of threads (CALCPARALLEL):


It is recommended to set up the number of calculation threads
(CALCPARALLEL) to equal the number of processors available in the
machine, minus one. This extra processor can then be used by either the
operating system or by the DB2 OLAP Server process responsible for writing
out dirty blocks from the cache.

Note: The maximum number of threads that DB2 OLAP Server can use to
calculate in parallel is four. If you specify a number greater than four, DB2
OLAP Server will assume four.

3. Define the right value for CALCTASKDIM:


As explained in 6.1.5, “Identifying concurrent tasks for parallel calculation” on
page 234, sometimes the distribution of data may cause tasks to be empty,
that is, there are no blocks to be calculated in the part of the database
identified by a task, causing uneven load balancing.
Empty tasks in the calculation process are normal, although a high number of
empty tasks can reduce the effectiveness of parallel calculation.
The high empty task situation can be caused by a FIX statement in the sparse
dimension that DB2 OLAP Server is using to identify the concurrent tasks for
parallel calculation.

Chapter 6. Parallel calculation, data load, and export 243


Using the CALCTASKDIM, you can enable DB2 OLAP Server to use
additional sparse dimensions in the identification of tasks for parallel
calculation. In this case, smaller tasks would be created, thus increasing the
opportunities for parallel processing and providing better load balancing.

Note: Unless you are fixing on the last sparse dimension, generating many
empty tasks, there is no benefit from increasing CALCTASKDIMS.

4. Combine different values for CALCPARALLEL and SET CALCPARALLEL:


Do this if your site requires it. You can combine different numbers of threads
during the calculation process if you are using a calculation script (set
CALCPARALLEL). This allows you specify the right number of threads for
each step of a calculation process.
You can also calculate a part of the database using serial calculation and
other parts using parallel calculation.
In Example 6-6, we configured three threads to calculate the “Product”
dimension and two threads to calculate the “Market” dimension.

Example 6-6 Configuring threads


set calcparallel 3;
CALC DIM (Product);
set calcparallel 2;
CALC DIM (Market);

The following hints are applicable for both methods: serial and parallel
calculation. But if you followed the recommendations above and the performance
of the parallel calculation is not improving, consider reviewing the following
additional recommendations:
1. Block size and block density:
The data block is the fundamental data storage structure in DB2 OLAP
Server.
When the database data blocks are much smaller than 8 kilobytes, the index
is usually very large, forcing DB2 OLAP Server to write and retrieve the index
from disk. This slows down the calculation process.
A data block size of 8 kilobytes to 100 kilobytes provides the optimal
performance in most cases, but the optimal block size is model specific. The
best practice is to test and isolate the optimal block sizes for specific
databases.
To change the data block size, you should balance rearranging the dense and
sparse dimension configuration of the database.

244 DB2 OLAP Server V8.1: Using Advanced Functions


For more information about how to verify the data block size or to change it,
see the DB2 OLAP Server Administrator’s Guide, SC18-7001; and the IBM
Redbook, DB2 OLAP Server Theory and Practices, SG24-6138.
2. Tune the DB2 OLAP Server caches:
DB2 OLAP Server uses memory to optimize calculation performance,
especially for large calculations. DB2 OLAP Server uses four memory caches
to coordinate memory usage:
a. Calculator cache
b. Index cache
c. Data cache
d. Data file cache (only used if you configured direct I/O instead buffered I/O)
For information about sizing caches, see DB2 Administration Guide “Sizing
Caches” session.
To help you customize the right values for these caches, you can use the DB2
OLAP Server hit-ratio. See “DB2 OLAP Server hit ratios” on page 264 for
more information about how to monitor DB2 OLAP Server. You can also
consult the DB2 OLAP Server Theory and Practices, SG24-6138 redbook.

3. Direct I/O:
DB2 OLAP Server can work with the buffer cache to store compressed blocks
using buffered I/O or direct I/O. Buffered I/O uses the file system’s buffer
cache and the direct I/O bypasses the file system’s buffer cache using the
RAM memory. The direct I/O is able to perform asynchronous and overlapped
I/Os. See 8.1, “Direct I/O” on page 390 for more information.
Direct I/O can provide a faster response time for the calculation.
When you are using direct I/O, DB2 OLAP Server uses an area in the
memory, called the data file cache parameter, to store the compressed data
(.pag files). Using direct I/O you can customize the optimal cache to be used.

Note: When using direct I/O, you should customize the data file cache
parameter. If this parameter is not configured correctly or if the machine
doesn’t have free RAM memory to allocate the data file cache buffer, causing
paging pages to the disk, direct I/O will not improve performance.

To help you customize the right values for the data file cache parameter, you
can use the DB2 OLAP Server hit-ratio. See “DB2 OLAP Server hit ratios” on
page 264 for more information about how to monitor DB2 OLAP Server.

Chapter 6. Parallel calculation, data load, and export 245


4. Cache memory locking:
Cache memory locking gives the DB2 OLAP Server kernel priority use of
system RAM.
Enabling this feature may improve calculation performance because the
system memory manager does not need to swap and reserve space for the
memory used by DB2 OLAP Server caches.
If you enable this feature, leave at least one-third of the system RAM available
for non-DB2 OLAP Server kernel use.
This option is not selected by default, and it can only be enabled if you are
using Direct I/O instead buffered I/O.
See 8.1.5, “The cache memory locking option” on page 394 for more
information.

6.1.8 Monitoring using the log


To obtain information about the parallel calculation process and to confirm if the
load is executing in parallel instead the serial calculation, you can use the DB2
OLAP Server application log file. The application log file is located as follows:
򐂰 UNIX: /$ARBORPATH/app/<appname>/<dbname>
򐂰 Windows: x:<olap_inst_dir>\<appname>\<dbname>
– <appname> is the application name
– <dbname> is the database name
– <olap_inst_dir> is the directory where the DB2 OLAP SERVER is
installed.
򐂰 If the parallel calculation is enabled, the following message is added in the
application log file:
(1012678) Calculating in parallel with [X] threads
This information message indicates that DB2 OLAP Server is performing the
calculation in parallel using the listed number of threads (X). If the listed
number is different from the value you set using CALCPARALLEL, the
calculator has picked the listed number as the optimal degree of parallelism
for your database, and there is nothing wrong.
򐂰 If the parallel calculation is disabled (DB2 OLAP Server is using serial
calculation), the following messages are generated in the application log file:
(1012677) Calculation in serial
If you requested the calculation to run in parallel mode and you received this
message, check if your application satisfies the requirements to run a parallel
calculation. See 6.1.3, “Requirements” on page 230.

246 DB2 OLAP Server V8.1: Using Advanced Functions


򐂰 The following message informs you of the number of tasks that can be
executed concurrently (the number of tasks that each subtask has). See
6.1.2, “Parallel calculation architecture” on page 225 for more information
about how DB2 OLAP Server determines the number of tasks in a subtask.
In this example, 1215 tasks can be executed concurrently. After these tasks
complete, 25 more can be performed concurrently, and so on.
(1012679) Calculation task schedule [1215,25,4,1]
This message is only generated when executing calculation in parallel mode.
򐂰 The following message shows the number of sparse dimensions included in
the identification of tasks for parallel calculation (CALCTASKDIMS). See
6.1.5, “Identifying concurrent tasks for parallel calculation” on page 234 for
more information.
(1012680) Parallelizing using [X] task dimensions

Note: This message only indicates the number of sparse dimensions that
DB2 OLAP Server analyzed to determine the subtasks (set of independent
tasks) for the parallel calculation. This message doesn’t indicate the
number of threads that DB2 OLAP Server will use to execute the parallel
calculation.

If the value specified in this message (X) is different from the value specified
in the CALCTASKDIM, the message (1012680) is complemented with the
following entry:
Usage of calculator cache caused reduction in task dimensions
򐂰 The following message indicates that DB2 OLAP Server changed the commit
blocks interval. DB2 OLAP Server does this during the parallel calculation to
optimize the performance. In this example, the commit blocks interval was
changed from the default to 5839 blocks.
(1012568) Commit Blocks Interval was adjusted to be [5839] blocks.
򐂰 This message indicates the number of empty tasks that will be executed in
each subtask. In this example, the first subtask has 907 empty task, the
second has 1 and the third and the forth subtasks don’t have empty tasks.
(1012681) Empty tasks [907,1,0,0]
The number of empty tasks affects the gains you can receive from parallel
calculation. The ideal number of empty tasks is 0. See 6.1.5, “Identifying
concurrent tasks for parallel calculation” on page 234 for more information.
򐂰 The following messages indicate that a formula in the outline or in the
calculation script prevented DB2 OLAP Server to execute the calculation in
parallel mode. If you receive one of these messages, DB2 OLAP Server will
calculate in serial mode.

Chapter 6. Parallel calculation, data load, and export 247


(1012570) A circular or recursive dependency along dimension dimensionName
forces calculation to execute in serial mode
In this case, the listed dimension contains a dependency that requires the
calculation be executed in serial mode.
(1012571) Presence of variables or formulas with @XREF function forces
calculation to execute in serial mode
In this case, formulas or calculation scripts that use variables with the
@XREF prevented parallel calculation.
1012569 Formula on member memberName forces calculation to execute in
serial mode.
A formula on the listed member requires that the calculation be performed
in serial mode instead of parallel mode.

6.1.9 Estimating the size of a database calculation


You can use one of the following methods to estimate the size that a database
will have after a calculation process:
򐂰 SET MSG ONLY
The command SET MSG ONLY should be used in a calculation script. If you
don’t want to use a calculation script, use the command EstimateFullDBSize.
This command forces DB2 OLAP Server to execute a simulated calculation. It
performs a calculation operation, but does not derive data values. When using
the SET MSG ONLY, the database is not changed.
During execution of a calculation using the set msg only, DB2 OLAP Server
engine scan potential blocks and flags which blocks will be created under a
real calculation. It will perform a calculation run through the database keeping
track of the calculation process in terms of I/O (block creation and updates).
SET MSG ONLY analyzes the database based on the nature of the data that was
loaded. To be reliable and accurate, you need to load real data across all the
dimensions in the model before use the SET MSG ONLY.
A simulated calculation produces a result to help you deduce the number of
data blocks that the database would have created, approximately, as if you
had actually calculated it. This information is reported in the application log
file (ARBORPATH\app\<appname>).
Example 6-7 shows the output of a calculation process in the log file for
application onlinei. We used the following calculation script:
set msg only;
calc all;

248 DB2 OLAP Server V8.1: Using Advanced Functions


Note: During validation of the script, you may disregard any error message
that indicates DB2 OLAP Server does not recognize the SET MSG ONLY
command.

Example 6-7 Set msg only result


Total Potential blocks: [2.1993e+006] Blocks
Sparse Calculations: [2.1725e+006] Writes and [0.0000e+000] Reads
Dense Calculations: [2.6841e+004] Writes and [0.0000e+000] Reads
Sparse Calculations: [0.0000e+000] Cells
Dense Calculations: [0.0000e+000] Cells

򐂰 ESSCMD calculation estimation utility:


Use the command method to estimate the size that a database will have after
the calculation process through ESSCMD (EstimateFullDBSize command).
This is a new feature of DB2 OLAP Server version 8.1.
It allows loaded data to be tested for calculated size of the database. It quickly
goes through the sparse combinations for total number of blocks that exist.
Use the following steps to estimate the database size using the
EstimateFullDBSize ESSCMD command:
a. Before executing EstimateFullDBSize, you need to load real data across
all the dimensions.
b. Bring up the ESSCMD command line.
c. Enter the login command: login <hostname> <username> <appname>.
d. Enter the select command: select <appname> <dbname>.
e. Enter the Estimatefulldbsize to get an estimate of the number of blocks
in the database: The syntax is:
EstimateFullDBSize n
In this command, n is a number between 1 and 4 denoting the number of
hashing functions to be performed. Use of 4 is suggested (for better
estimation).
Example 6-8 shows the output of the EstimateFullDBSize command:

Example 6-8 EstimateFullDBSize output


Estimated count of blocks after full calculation = 2175080
Time elapsed to calculate this estimation = 40.96 seconds

f. Open the Application Manager, and logon to the server

Chapter 6. Parallel calculation, data load, and export 249


g. From the Application Manager menu, select Application —> Application
Information. In the Application Information dialog, click on the Database
Information button. In the Database Information notebook, select the
Statistics tab and record the Block Size and the Compression Ratio.
h. Use the following formula:
Estimated database size = Estimated Number of Blocks x Block Size x
Compression Ratio
The SET MSG ONLY calculation command and the EstimateFullDBSize
ESSCMD command will enable you to get a very accurate estimation of the
total number of blocks that a particular database will generate in a very short
amount of time.
Table 6-6 shows a comparison between the SET MSG ONLY,
EstimateFullDBSize (n=4), and a real calculation result.

Table 6-6 SET MSG ONLY versus EstimateFullDBSize versus real calculation
SET MSG ONLY EstimateFullDBSize Result after a real
calculation

Total number 2199300 2175080 2199332


of blocks

6.2 Performing parallel load


DB2 OLAP Server version 8.1 has a parallel engine that can also be used during
the load process to exploit a multi-processor hardware.

6.2.1 Understanding the parallel load


When DB2 OLAP server loads a data source, it processes the data in three main
stages:
򐂰 Input stage: In this stage, DB2 OLAP Server reads a portion of the data
source to be loaded in the multidimensional database.
򐂰 Preparation stage: DB2 OLAP Server arranges the data in preparation for
putting it into blocks.
򐂰 Write stage: DB2 OLAP puts the data into blocks in memory and then writes
the blocks to disk, finding the correct block on the disk by using the index,
which is composed of pointers based on sparse intersections.

250 DB2 OLAP Server V8.1: Using Advanced Functions


Input file
flat
file or Relational
database

Input stage
Portion
of data

Preparation Thread1 Thread2


DLTHREADSPREPARE=3
Thread3

stage

organized
data
DLTHREADSWRITE=2

Thread2 Thread1

Write stage data cache


(memory)
blocks
data

Disk

Figure 6-7 Data load process

Chapter 6. Parallel calculation, data load, and export 251


This process is repeated until all data is loaded.

DB2 OLAP Server looks at each stage as a task and uses separate processing
threads, in memory, to perform each task. When a data load stage completes its
work on a portion of data, it can pass the work to the next stage and start work
immediately on another portion of data. Processing threads perform their tasks
simultaneously on different processors.

The DB2 OLAP Server can execute threads in parallel, exploiting CPU
parallelism. But the DB2 OLAP Server load process doesn’t have the ability to
execute I/O parallelism.

The CPU parallelism refers to the process of executing data processing


operations exploiting a multi-processor machine, dividing the process into
threads that can be executed in parallel through multiple processors.

The I/O parallelism refers to the process of writing to, or reading from, two or
more I/O devices simultaneously. In parallel I/O you have multiple inputs in
parallel, asynchronously writing to multiple backup media in parallel. Each I/O
server is assigned the I/O workload for a separate file.

DB2 OLAP Server doesn’t execute I/O parallelism during the data load because
it doesn’t split the input file in more than one file and it doesn’t write the output to
multiple files in parallel. So the only parallelism possible during the load I/O is at
the hardware level.

DB2 OLAP Server can also execute parallel processing in a single processor
machine, taking advantage of processor resources that are left idle during I/O
thread wait time.

In Figure 6-8 the parallel load process is executed using three threads in a single
CPU. The CPU starts to run the first threads, but in a second instant, the threads
need to wait for an I/O on disk. DB2 OLAP Server can take advantage of the
processor that is in idle, and the second thread starts to run while the first thread
is waiting for the I/O.

252 DB2 OLAP Server V8.1: Using Advanced Functions


Instant 1

Thread 2
waiting Thread 1
CPU Executing

Thread 3
waiting
Single CPU
CPU

Instant 2

Thread 2
Executing
Thread 3
waiting Single CPU
CPU Disk
Thread 1
waiting I/O

Figure 6-8 Parallel load process in a single CPU

Note: Although DB2 OLAP Server recognizes opportunities to process data


load on single-processor computers, even more opportunities are available on
multiple-processor computers.

6.2.2 Enabling parallel load


DB2 OLAP Server version 8.1 provides three essbase.cfg configuration settings
that enable you manage parallel data load processing: DLTHREADSPREPARE,
DLTHREADSWRITE and DLSINGLETHREADPERSTAGE.

To enable the parallel load (see Example 6-9), you should set the configuration
setting DLSINGLETHREADPERSTAGE to FALSE (or do not set it, because the default is
FALSE). And you should set the number of threads you want to use for the
prepare stage (DLTHREADSPREPARE) and the number of threads you want to use for
the write stage (DLTHREADSWRITE).

See “6.2.1, “Understanding the parallel load” on page 250” for more information
about the load stages.

Note: These configuration settings can be used only in the server


essbase.cfg. You cannot set them on the essbase.cfg client.

Chapter 6. Parallel calculation, data load, and export 253


Example 6-9 essbase.cfg configuration file
DLSINGLETHREADPERSTAGE FALSE
DLTHREADSPREPARE 4
DLTHREADSWRITE 3

In Example 6-9, the DB2 OLAP Server is running the load process in parallel,
using 4 threads for the prepare stage and 3 threads for the write stage.

Here we discuss these parameters in more detail:


򐂰 DLSINGLETHREADPERSTAGE:
You should use this parameter to specify if you want to run the load process to
occur in a single thread per stage, or if you want to specify the number of the
threads that DB2 OLAP Server will use in the preparation and write stages.
Syntax:
DLSINGLETHREADPERSTAGE [appname [dbname]] TRUE | FALSE
TRUE: This tells DB2 OLAP Server not to use the values in the
DLTHREADSPREPARE and DLTHREADSWRITE configuration settings
when it performs a data load. Consequently, it performs all data load
processes in single-thread stages.
FALSE: This tells DB2 OLAP Server to use the thread values specified in the
configuration settings DLTHREADSPREPARE and DLTHREADSWRITE as
the numbers of threads to use in the preparation and write stages of data load
processing. The default value is FALSE.
You can specify DLSINGLETHREADPERSTAGE for individual databases, all
databases within an application, or for all applications and databases on the
server.
In the Example 6-10, the DB2 OLAP Server is executing the load process in a
single thread per stage, only for the databases that are in application onlinea.
Other applications are using DLSINGLETHREADPERSTAGE FALSE, which is the
default.

Example 6-10 DLSINGLETHREADPERSTAGE: application level


DLSINGLETHREADPERSTAGE onlineia
TRUE

In Example 6-11 the DB2 OLAP Server is executing the load process in a
single thread per stage, only for the database onlineid in application
onlinea. Other databases in application onlinea and other applications are
using DLSINGLETHREADPERSTAGE FALSE.

254 DB2 OLAP Server V8.1: Using Advanced Functions


Example 6-11 DLSINGLETHREADPERSTAGE: database level
DLSINGLETHREADPERSTAGE onlineia onlineid
TRUE

In Example 6-12 the DB2 OLAP Server is executing the load process in a
single thread per stage for all databases in all applications.

Example 6-12 DLSINGLETHREADPERSTAGE: server level


DLSINGLETHREADPERSTAGE TRUE

In Example 6-13 the DB2 OLAP Server is executing the load process in
parallel (if the DLTHREADSPREPARE and DLTHREADSWRITE are greater than 1) for
all databases in all applications. This is the default.

Example 6-13 DLSINGLETHREADPERSTAGE: parallel mode


DLSINGLETHREADPERSTAGE FALSE

򐂰 DLTHREADSPAREPARE:
You should use this parameter to specify how many threads DB2 OLAP
Server may use during the preparation stage of the load process. The
preparation stage organizes the source data in memory for storing the data
into blocks.
Syntax:
DLTHREADSPREPARE [appname [dbname]] n
You can specify DLTHREADSPREPARE for individual databases, all databases
within an application, or for all applications and databases on the server.
In Example 6-14 the DB2 OLAP Server is executing the preparation load
stage in parallel, using 2 threads, only for the databases that are in
application onlinea. Other applications are using DLTHREADSPREPARE1, that is
the default.

Example 6-14 DLTHREADSPREPARE: application level


DLTHREADSPREPARE onlineia 2

In Example 6-15 the DB2 OLAP Server is executing the preparation load
stage in parallel, using 3 threads, only for the database onlineid in
application onlinea. Other databases in application onlinea and other
applications are using DLTHREADSPREPARE 1.

Chapter 6. Parallel calculation, data load, and export 255


Example 6-15 DLTHREADSPREPARE: database level
DLTHREADSPREPARE onlineia onlineid 3

In Example 6-16 the DB2 OLAP Server is executing the preparation load
stage in parallel, using 4 threads, for all databases in all applications.

Example 6-16 DLTHREADSPREPARE: server level


DLTHREADSPREPARE 4

򐂰 DLTHREADSWRITE:
You should use this parameter to specify the number of threads the DB2
OLAP Server may use during the write stage of the load process. The write
stage writes blocks from the memory to the disk.
Syntax:
DLTHREADSWRITE [appname [dbname]] n
You can also specify DLTHREADSWRITE for individual databases, all databases
within an application, or for all applications and databases on the server.
In Example 6-17 the DB2 OLAP Server is executing the write load stage in
parallel, using 4 threads, only for the databases that are in application
onlinea. Other applications are using DLTHREADSWRITE 1, that is the default.

Example 6-17 DLTHREADSWRITE: application level


DLTHREADSWRITE onlineia 4

In Example 6-18 the DB2 OLAP Server is executing the write load stage in
parallel, using 2 threads, only for the database onlineid in application
onlinea. Other databases in application onlinea and other applications are
using DLTHREADSWRITE 1.

Example 6-18 DLTHREADSWRITE: database level


DLTHREADSWRITE onlineia onlineid 2

In Example 6-19 the DB2 OLAP Server is executing the write load stage in
parallel, using 3 threads, for all databases in all applications.

Example 6-19 DLTHREADSWRITE: server level


3)DLTHREADSWRITE 3

256 DB2 OLAP Server V8.1: Using Advanced Functions


6.2.3 Running parallel data load
You can submit a parallel load process using Application Manager, the import
ESSCMD command, Integration Server or using the new features Administration
Services or Enterprise Services:
򐂰 Application manager:
To execute a data load in the Application Manager, perform the following
steps:
a. Connect to DB2 OLAP Server (Server -> Connect).
b. Select the application and database.
c. Go to Database —> Load Data.
d. Select the options you want to use.
e. Click OK.
Figure 6-9 is an example of a Load process. It is executing data load in the
database Basic in application Demo, using a flat file as a source, and it is not
using a rule file.

This process is
executing only
The input data is
data load. It
a flat file.
does not
executing
member load.
Path where
input file is.

This load is not


using rule file.

Figure 6-9 Data load using Application Manager

Chapter 6. Parallel calculation, data load, and export 257


򐂰 ESSCMD:
To call the ESSCMD command interface, on Windows platforms:
a. Go to Start —>Programs —>IBM DB2 OLAP Server 8.1 —> ESSCMD
command interface.
To call the ESSCMD command interface, on UNIX platforms:
a. Login with a DB2 OLAP Server user. This user should have the DB2 OLAP
Server environment variables configured. See DB2 OLAP Server
installation Guide, SC27-1228 for information about how to set up the DB2
OLAP Server environment variables.
b. Execute ESSCMD on the AIX command session.
In ESSCMD command interface, execute the following commands to execute
the data load (see Figure 6-10):
login <hostname> <user> <password>
select <appname> <dbname>
IMPORT
If you don’t specify the complete syntax for the IMPORT command, DB2 OLAP
Server ask which options you want to use.

The value 2 specifies that the input file is located


This is the name of the input file on the server in the database directory
to be loaded in the database. (Ex.: ARBORPATH/app/sample/basic).

The value 1 indicates that The value n specifies that The value y indicates
the input file format is text. no rules file is used to that if some errors occurred
load the data. during the data load, the
process is canceled.
Figure 6-10 Data load using ESSCMD command interface

258 DB2 OLAP Server V8.1: Using Advanced Functions


See the Technical Reference guide for complete syntax of import command.
򐂰 Integration Server:
To execute a data load using the Integration Server, follow these steps:
a. Open your OLAP Metaoutline, to determine the data source name, user
and password to access the data source.
b. Go to Outline —> Data Load.
c. Select the DB2 OLAP Server application, the database, and the options
you want to use. See Figure 6-11.

DB2 OLAP Server The DB2 OLAP Server


application name. hostname you are connected.

DB2 OLAP Using this


Server option you
database can
name. change
the DB2
OLAP
Server
connection.
By default
OIS
updates
all
dimensions
and
members.

Use this option if you don’t want to run a calculation


process (calc script) after the load process.
Figure 6-11 Integration Server data load

d. In the next screen you can schedule your load process. If you don’t want to
schedule it, select the option Now.
e. Click Finish.

򐂰 Administration Services:
You can use Administration Services to load DB2 OLAP Server databases.
Using Administration Services, you can execute a load process in background
and continue using Administration Services for other things. See “Managing
databases” on page 316, list number 5 on page 329.

Chapter 6. Parallel calculation, data load, and export 259


򐂰 Enterprise Services:
When executing the copyCube or synccubereplicas command through
Enterprise Services, DB2 OLAP Server is implicitly executing a data load
process. This process can take advantage of parallelism if you enable the
parallel calculation in the target server where you are copying the cube.
See “Copy DB2 OLAP applications and databases across servers” on
page 161 for more information about these Enterprise Services commands.

6.2.4 Monitoring using the log


To obtain information about the data load process and to confirm if the load is
executing in parallel instead the serial load, you should use the DB2 OLAP
Server application log file. The application log file is located in:
򐂰 UNIX: /$ARBORPATH/app/<appname>/<dbname>
򐂰 Windows: x:<olap_inst_dir>\<appname>\<dbname>
– <appname> is the application name.
– <dbname> is the database name.
– <olap_inst_dir> is the directory where the DB2 OLAP SERVER is
installed.

When you start the load process, the following message is added in the
application log file:
(1013091) Received Command [Import] from user [olapsi]

If you specify that you are doing the load process using a rule file, the following
message is added in the application log file:
(1019025) Reading Rules From Rule Object For Database [testlu]

If the parallel load is enabled, the following message is added in the application
log file:
(1003040) Parallel dataload enabled: [X] block prepare threads, [Z] block write
threads.

This message is generated only when the load process is finished. X is the value
that is specified in the DLTHREADSPREPARE configuration setting parameter.
Z is the value specified in the DLTHREADSWRITE configuration setting parameter.

If the parallel load is disabled, the following messages are generated in the
application log file:
(1013091) Received Command [DataLoad] from user [Administrator]
(1003037) Data Load Updated [X] cells
(1003024) Data Load Elapsed Time : [Z] seconds

260 DB2 OLAP Server V8.1: Using Advanced Functions


X is the number of cells loaded in the database and Z is the elapsed time to run
the data load process.

6.2.5 Parallel load performance: Defining the right parameters


To define the number of threads to be used during the prepare and write stages
and to define the size of data cache, you should monitor the processing of the
data load.

You can use the following schema to monitor the data load process:
1. Start with the default parallel data load processing thread values whereby
DB2 OLAP Server uses a single thread per stage.
2. Perform and time the data load.
3. Monitor the CPU and memory activity during the data load process. See
“Tools to monitor parallel calculation and load” on page 264 for more
information about the major monitoring features provided by operating
systems.
Figure 6-12 contains an example of how to monitor CPU and memory using
the vmstat tool. We can see that the CPU is 66% idle, the machine isn’t
paging, and the wait for I/O is 27%.

Figure 6-12 VMSTAT example

If there is an I/O bottleneck during the load, the use of parallel load won't help
(it causes writing more data from different threads over multiple CPUs).
4. Monitor the data cache activity during the data load process. While executing
a parallel load, each thread specified by the DLTHREADSWRITE setting uses an
area in the data cache equal to the size of an expanded block. Depending on
the size of the block, the number of threads, and how much data cache is
used by other concurrent operations during a data load, it may be possible to
require more data cache than what is available.
The data cache is the memory area that is allocated to hold uncompressed
data blocks. The following formula determines the utilization of data cache
during the parallel load process:
utilization of data cache during the parallel load process = value of
DLTHREADSWRITE * block db size + cache used by other concurrent
applications.

Chapter 6. Parallel calculation, data load, and export 261


To verify the block size of your database, open the Application manager and
go to Database —> Information —> Statistics.
To monitor the data cache activity, you can use the DB2 OLAP Server hit
ratios. See “DB2 OLAP Server hit ratios” on page 264 for more information.
If during the data load you can see that the hit ratio data cache is low, you can
try to increase the data cache value. Before increasing the data cache value,
verify the memory (RAM) available.
5. Alter the essbase.cfg settings to another value (DLTHREADSPREPARE,
DLTHREADSWRITE).
Alter the data cache value if necessary. Remember that each thread specified
by the DLTHREADSWRITE setting uses an area in the data cache equal to
the size of an expanded block.
6. Repeat the last four steps until you find values that provide the best
performance.

As described in “6.2.1, “Understanding the parallel load” on page 250”, the DB2
OLAP Server can execute threads in parallel, exploiting CPU parallelism, but the
DB2 OLAP Server load process doesn’t have the ability to execute I/O
parallelism.

The data load process is a heavily I/O-bound task. The DB2 OLAP Server
parallel load (only CPU parallelism) can increase the load performance, although
the most effective strategy to improve performance on load data process is to
minimize the number of disk I/Os that DB2 OLAP Server must perform while
reading or writing to the database.

The parallel load records are processed in a pipeline, making it possible to


increase the records processed per time period. This is what is referred to as
CPU parallelism.

Because DB2 OLAP Server can increase the records processed per time period,
there is a stress on the I/O subsystem to write more number of blocks in the
same time period, as compared to previous releases. A block write typically
involves only the page file. DB2 OLAP Server does not allow physical partitioning
of the page file, which means all blocks are written to the same file. So the only
parallelism possible during I/O is at the hardware level, currently. This is the
reason we made the last stage of data load that does block writes single
threaded by default. If your disk hardware allows parallelism, then enable multiple
write-back threads.

To minimize the number of disk I/Os, you can use the following techniques:
򐂰 Group sparse member combinations: Organize the source data
corresponding to the physical block organization.

262 DB2 OLAP Server V8.1: Using Advanced Functions


򐂰 Make the data source as small as possible: Group the data into ranges,
thus eliminating redundancy in the data sources.
򐂰 Make the source fields as small as possible: Remove white spaces, using
#MI instead #MISSING.
򐂰 Position data in the same order as the outline: Arrange the source data to
match the order of entries in sparse dimensions.

See IBM DB2 OLAP Server Database Administrator’s Guide, SC18-7001 for
more information about these methods.

You can also use the direct I/O and (or) cache memory locking configurations to
provides a faster response time for the data load.
򐂰 Direct I/O:
When you are using direct I/O, DB2 OLAP Server uses an area in the RAM
memory, the data file cache parameter, to store the compressed data
(.pag files). Using direct I/O you can customize the optimal cache to be used
(data file cache parameter).

Note: Using direct I/O, you should customize the data file cache parameter. If
this parameter is not configured correctly, or if the machine doesn’t have free
RAM memory to allocate the data file cache buffer, causing paging of pages to
the disk, the Direct I/O will not improve performance.

To help in customizing the right values for the data file cache parameter, you
can use the DB2 OLAP Server hit-ratio. See “DB2 OLAP Server hit ratios” on
page 264 for more information about how to monitor DB2 OLAP Server.
򐂰 Data cache locking:
Cache memory locking gives the DB2 OLAP Server kernel priority use of
system memory. Enabling this feature may improve load performance
because the system memory manager does not need to swap and reserve
space for the memory used by DB2 OLAP Server caches. If you enable this
feature, leave at least one-third of the system memory available for non-DB2
OLAP Server kernel use.
The cache memory locking can only be enabled if you are using Direct I/O
instead buffered I/O.
See 8.1.5, “The cache memory locking option” on page 394 for more
information.

Chapter 6. Parallel calculation, data load, and export 263


6.2.6 Tools to monitor parallel calculation and load
The most critical operations in a DB2 OLAP Server environment are the data
load and the calculation.

Previously we showed you how to use the parallel load and calculation and
discussed the benefits of using these new DB2 OLAP Server version 8.1
features. In this section we offer you a brief description of the tools you can use
to monitor the DB2 OLAP Server environment during the parallel data load and
calculation to better optimize your environment.

DB2 OLAP Server hit ratios


The hit ratio data cache represents the percentage of time that a requested piece
of information is already in the cache. A higher hit ratio indicates that the data is
in cache more often. This improves performance because the requested data
does not have to be retrieved from disk for the next process. A hit ratio of 1.0
indicates that every time data is requested, it is found in the cache. This is the
maximum performance possible from a cache setting.

You can monitor the following DB2 OLAP Server caches using these hit ratios:
򐂰 Index cache
򐂰 Data cache
򐂰 Data file cache

You can monitor the data caches using one of the following tools:
򐂰 Application manager:
To use the application manager:
a. Go to Database —> Information —> Run-time.
b. Verify the hit ratio data cache value.
c. Use the Refresh button to update the data.
Figure 6-13 shows an example of monitoring the data cache using the hit ratio
of Application Manager. We can see the number 40 for the hit ratio on the
data cache.

264 DB2 OLAP Server V8.1: Using Advanced Functions


Figure 6-13 Hit ratio information

In this case, 40% of the time that data was requested, it was already in the
cache.
򐂰 Administration Services:
The new Administration Services feature also allows you to monitor the DB2
OLAP Server hit ratios. For more information about how to use this feature,
see “DB2 OLAP Server hit ratios” on page 264.

GETPERFSTATS ESSCMD command


This command returns detailed performance statistics for the thread, database,
and application. This information can help you understand whether the database
is in good running condition or could use modifications to improve performance in
the load and calculation processes.

The statistics appear as tables in the ESSCMD window.

Chapter 6. Parallel calculation, data load, and export 265


Before executing the GETPERFSTATS command, you must enable statistics
gathering using the command RESETPERFSTATS.

This tool gathers a variety of statistics regarding the performance of the system
and the connected applications. The output of GETPERFSTATS can vary
depending on what the system has just done, how long statistics have been
gathered, and the persistence of the gathered statistics.

For a complete description about the getdbstats output, see the online
documentation: DB2 OLAP Server Technical Reference.
򐂰 To use the getdbstats command:
a. Open an ESSCMD command interface.
b. Login in the DB2 OLAP Server: login <hostname> <user> <password>.
c. Select the application: select <appname> <dbname>.
d. Execute: getperfstats.

Operating system monitoring tools


Operating systems provide different tools that can help you monitor the
calculation and data load processes. Here we provide an overview about the
major monitor features and how to interpret them.
򐂰 Task Manager in Windows/NT and Windows/2000:
This tool enables you to view processor and memory usage and process.
Figure 6-14 shows the Task Manager window.
The graphics of CPU Usage can help you determine if the CPU is in idle. The
values of physical memory and kernel memory are in kilobytes.

266 DB2 OLAP Server V8.1: Using Advanced Functions


Figure 6-14 Task Manager

򐂰 Microsoft Management Console (only for Windows 2000):


You can use this tool to verify more information about memory usage during
the data load process.
To monitor Windows 2000 using MMC, follow these steps:
a. Execute Start —> run —> mmc.
b. Go to Console —> add/remove snap-in —> add.
c. Choose the option, System Information.
d. Click Add.
e. Click OK.
Under the System Information tree (see Figure 6-15), you have the System
Summary. In the System Summary, you can find memory information: total
physical memory, available physical memory, total virtual memory, available
virtual memory, and page file space.

Chapter 6. Parallel calculation, data load, and export 267


Use this button to refresh information.

Memory information.

Figure 6-15 MMC

򐂰 In UNIX systems you can use the vmstat tool to monitor CPU and memory
activity during the calculation and data load.
Table 6-7 shows some values monitored by vmstat for AIX and how to
interpret them (please note that a memory page is 4K).

Table 6-7 The vmstat tool


Value What it does

memory - avm Active virtual pages used. The number in the avm field divided by
256 will yield the value in megabytes.

memory - fre Free RAM pages. You can use this information to determine if
there is enough memory to run all the process.

page - pi Pages in per second. You can use this information to determine if
the system is paging or not.

268 DB2 OLAP Server V8.1: Using Advanced Functions


Value What it does

page - po Pages out per second. You can use this information to determine
if the system is paging or not. If the paging numbers are high and
the fre column is close to zero, then you should either reduce the
number of memory-hungry programs or buy more memory. You
can reduce the memory used by applications reducing the size of
DB2 OLAP caches.

cpu - us Percentage of CPU used by user. You can use this information to
determine how the user programs are using the CPU (this include
the DB2 OLAP Server process).

cpu - sy Percentage of CPU used by system. You can use this information
to determine how the operating system is using the CPU.

cpu - id Percentage of CPU idle time. This can yelp you determine if your
CPUs are idle during the OLAP Server load process.

cpu - wa Percentage of disk I/O wait. This information can help in


determining if there is a bottleneck with the I/O during the data
load, in this case the use of parallel load (that causes writing more
data from different threads over multiple CPUs) won't help.

You can also use other tools provided by the operating system or you can use
third-party tools to view and analyze system utilization.

6.3 Performing parallel export


Using DB2 OLAP Server version 8.1, you can improve export performance, by
exporting data in parallel to a specified number of files at the same time.

The DB2 OLAP Server parallel export feature has the ability to execute I/O
parallelism. The I/O parallelism refers to the process of writing to, or reading
from, two or more I/O devices simultaneously. In parallel export you can have
multiple outputs in parallel, asynchronously writing to multiple media in parallel.

The DB2 OLAP Server parallel export feature also has the ability to execute CPU
parallelism, because multiple threads (one for each output file) are used to
execute the process.

Chapter 6. Parallel calculation, data load, and export 269


App: onlinei
Database: onlinei

Export

Output Output Output


file1 file2 file3

Figure 6-16 Parallel export

You can consider exporting data for the following reasons:


򐂰 To transfer data across platforms.
򐂰 To back up only a certain portion of the data; for example, level 0 blocks.
򐂰 To create an exported file in text format, rather than binary format.
򐂰 To reduce fragmentation in a database by exporting data into an ASCII file,
clearing all data from the database, and reloading the ASCII file.

During an export, data integrity is verified because every block is checked to


confirm whether corresponding page and index files match.

Exporting data copies it to an ASCII text file (or files) that you specify, and this
does not compress the data. The export file contains data only. The export output
does not include control, outline, or security information.

To load data into a DB2 OLAP Server from the resulting ASCII files generated by
a parallel export, you should inform all the files generated in the parallel export.

270 DB2 OLAP Server V8.1: Using Advanced Functions


The maximum number of files that DB2 OLAP Server can use to execute the
export in parallel is 8. If a greater value than 8 is specified, DB2 OLAP Server
assumes the value to be 8.

6.3.1 Running parallel export


To execute an export in parallel, you can use the PAREXPORT command
(ESSCMD) or you can use the MaxL export command.

You cannot use the Application Manager to execute export in parallel. Using
Application Manager you can only execute export in serial; the output is only one
file.

Note: Administration Services V6.5 does not have the ability to execute export
in serial or parallel mode.

1. Executing a parallel export using the PAREXPORT command:


PAREXPORT is an ESSCMD command. This is the first option to execute an
export process in parallel.
To define the name of the output files that the DB2 OLAP Server will use
when executing the PAREXPORT command, you should use one of the
following methods:
– Input file method:
Using this method you should create a text input file that with the paths
and names that DB2 OLAP Server will use to create the output files for the
parallel export.
For example, you can have an input file called parainput.txt that contains:
c:\olapexp\outexp1
d:\olapexp\outexp2
e:\olapexp\outexp3
The number of files listed in the input file must match the number of export
threads base input file. Parallel export generates the following error
message if there is a mismatch:
(1005034) Parallel export: Error after reading [x] export filenames from
input [y].
– Base output file name method:
Using this method you should specify a base name that DB2 OLAP Server
will use as suffix to define the output file names for the parallel export
process.

Chapter 6. Parallel calculation, data load, and export 271


For example, if you define OUTEXP as the base output file name and use
two threads in the parexport, DB2 OLAP Server will create the files
outexp1 and outexp2.

Important: Using this method you cannot create output files in different
drivers or paths. You can specify only one path and base name.

Before executing the parexport command, open an ESSCMD command


interface, login to the DB2 OLAP Server, and select the database.
– To login: login <DB2 OLAP Server hostname> <user> <password>
For example: login localhost olapsup ola12p
– To select the database: select <appname> <dbname>
For example: select Sample Basic
The syntax (see Table 6-8) of the parexport command is:
PAREXPORT [-threads n] [-in input_filename] | [output_filename]
amount formatOption

Table 6-8 Parexport syntax


Parameter What it does

-threads n Number of output files used to execute the export process in


parallel. The maximum value is 8. If n is greater than 8, DB2
OLAP Server assumes the value to be 8.

-in input_filename The flag -in specifies that you will use a text input file to
determine the name of the parallel export output files. See
“Input file method:” on page 271.

output_filename If you don’t specify the flag -in, DB2 OLAP Server assumes that
you will specify a base name to be used as the output file name.
See“Base output file name method:” on page 271.

amount Specifies the number representing the data to export:


1 - All data
2 - Only level 0 blocks
3 - Only data from blocks with input data

formatOption Specifies the format of the data:


0 (null) - Non-columnar format. This is the default
1 - Columnar format

272 DB2 OLAP Server V8.1: Using Advanced Functions


Now we provide some practical examples using the parexport command:
– Execute the parexport command with an input file to determine the output
file names:
In this first example, we created a input file in the
c:\exp\input\parainput.txt. The file parainput.txt contains the following
entries:
c:\exp\onlineexp1
d:\exp\onlineexp2
We executed the following parexport command:
parexport -threads 2 -in c:\exp\input\parainput.txt 1 0
The output file onlineexp1 was generated in the path c:\exp and the file
onlineexp2 was generated in the path d:\exp, as determined in the input
file.
– Execute the parexport command with a base name to create the output file
names:
We executed the following parexport command:
parexport -threads 2 c:\exp2\onlinexp 1 0
The files onlinexp1 and onlinexp2 were created in the path c:\exp2.

Important: If you don’t specify the full path for the base name, DB2 OLAP
Server will create the files in the <ARBORPATH\app. For example, executing
the following command “PAREXPORT -threads 2 onlinexp 1 0”, DB2 OLAP
Server will create the files onlinexp1 and onlienexp2 in the
<ARBORPATH\app>.

2. Executing a parallel export using the MaxL export command:


The MaxL export command is another option to execute an export process in
parallel.
The MaxL Shell is located in the <ARBORPATH\bin\essmsh>. In the
Windows platforms you have a shortcut to this shell in the DB2 OLAP Server
folder in the programs. In the MaxL shell you can run MaxL scripts or enter
MaxL statements interactively at the command line. See the IBM DB2 OLAP
Server MaxL User’s Guide for more information about the MaxL shell.
Before executing the MaxL export command, you should login to the DB2
OLAP Server:
login <user> <password> on <hostname>
For example: login olapsup ola12p on localhost

Chapter 6. Parallel calculation, data load, and export 273


The syntax of the MaxL export command is shown in Figure 6-17 and in
Table 6-9.

Figure 6-17 MaxL export syntax

Table 6-9 MaxL export syntax


Parameter What it does

database This is a fixed word.

DBS-NAME Specifies the name of the database. The name should be


<appname.dbname>. Ex: Sample.Basic.

all | level0 | input You should choose one of these options. This determines the
level data that will be exported. The all data is the default. If you
don’t specify all, level0 or input, DB2 OLAP Server will assume
all.

data This is a fixed word.

in columns Specifies the columnar format to export the data. If this flag is
not specified, DB2 OLAP Server will export data in
non-columnar format. Non-columnar format is the default.

to This is a fixed word.

server If you don’t specify this flag, DB2 OLAP Server will assume
server.

data_file This is a fixed word.

FILE_NAME Specifies the output file paths and names. Use comma to
separate the file names.

To export data in parallel, specify a comma-separated list of export files. The


number of files (threads) that DB2 OLAP Server uses depends on the number
of file names you specify in the FILE_NAME parameter.
On an UNIX platform you should use double quotation marks in the
FILE-NAME to allow variable expansion, and single quotation marks are
required because there are special characters in the file name.
For example:
export database onlinei.onlinei data to data_file
“‘$ARBORPATH/app/exp1’”,”’$ARBORPATH/app/exp2’”;

274 DB2 OLAP Server V8.1: Using Advanced Functions


If you are not using variable expansion on UNIX, you don’t need to use
double quotation marks, only the single quotation marks.
For example:
export database onlinei.onlinei data to data_file
‘/olap81/app/exp1’,’/olap81/app/exp1’;
On the Windows platforms, single quotation marks are also required in the file
name. Two backlashes (\\) are required by the MaxL Shell to indicate one
backlashes, because the backlashes has a special meaning to the MaxL
Shell.
For example:
export database onlinei.onlinei data to data_file
‘c:\\exp\\onlineexp1’,’d:\\exp\\onlineexp2’;
3. Using the EXPORTTHREADS essbase.cfg setting:
The unique purpose of the EXPORTTHREADS essbase.cfg setting is to
define the number of files (threads) the PARAEXPORT command (ESSCMD) will
use to export the database in parallel.
If the flag “-threads” is specified in the PARAEXPORT command the value of the
flag will overrides the number of export threads set in the EXPORTTHREADS
setting in the essbase.cfg file.
If EXPORTTHREADS is not specified, and the flag “-threads” is not specified also,
then the default value of 1 is used, that is serial export.
The MaxL export command never uses the number of threads specified in
the EXPORTTHREADS essbase.cfg setting.
Syntax:
EXPORTTHREADS appname dbname n
For example:
EXPORTHTREADS onlinei onlinei 6
This number of files (threads) should be between 1 and 8, inclusive.

6.3.2 Monitoring using the log


Some status messages are generated in the ESSCMD command line or in the
MaxL shell when executing database export process.

These messages status can help you confirm if the export process is executing in
parallel, confirm the number of threads used, monitor the elapsed time, and
determine if the process was executed with success.

Chapter 6. Parallel calculation, data load, and export 275


When the parallel export process starts, the following message status is
generated:
(1005029) Parallel export enabled: Number of export threads [4]

You can use this message to confirm if the number of threads is correct. If it is not
correct you can decide to cancel the export operation and re-execute with the
correct value.

For each thread that finishes the export process, the following message is
generated:
(1005031) Parallel export completed for this export thread. Blocks Exported:
[x]. Elapsed time: [9.99].

When executing the PARAEXPORT ESSCMD command, specifying an input file to


determine the name of the output files, the following messages are generated in
the end of process, indicating that it finished with success:
Parallel Export completed
sts = 0 Export Filenames in [input_file_path_and_name]

When executing the PARAEXPORT ESSCMD command, specifying a base name as


the suffix for the output files, the following messages are generated in the end of
process, indicating that it finished with success:
Parallel Export completed
sts = 0 Export File = output_base_name

When executing the MaxL export command, the following messages are
generated in the end of process, indicating that it finished with success:
OK/INFO - 1013270 - Database export completed ['<appname>'.'<dbname>'].

6.3.3 Parallel export performance


DB2 OLAP Server parallel export is able to execute CPU and I/O parallelism.

To experience good improvements from CPU parallelism, it is recommended that


you do NOT use a number of threads for parallel export greater than the number
of CPUs on the DB2 OLAP Server machine. The number of threads for the
parallel export process should generally be equal to the number of processors on
the machine that you wish to commit for parallel export.

DB2 OLAP Server can also exploit I/O parallelism, splitting the output into
multiple files (up to eight files). However, parallel I/O refers to the process of
writing to two or more I/O devices simultaneously. In order to have a parallel I/O,
you should specify different devices to the output files.

276 DB2 OLAP Server V8.1: Using Advanced Functions


Note: You cannot specify different devices for the export output when using
the PARAEXPORT ESSCMD command with the base name method (use a
base name as the suffix to define the output file for the parexport command).

To specify different devices using the PARAEXPORT command, you should use
the input method (use the input file that has the names of the output files for the
parexport command).

You can also use the MaxL export command to specify different devices to
export your database data.

See 6.3.1, “Running parallel export” on page 271 for more information about the
PARAEXPORT ESSCMD command and MaxL export command.

6.3.4 Exporting files larger than 2 GB


Some file management systems do not support ASCII files larger than 2 GB.
To avoid this problem, if the data for an export thread exceeds 2 GB, the data is
separated into multiple files. Each file is lees than 2GB.

This is a new feature of DB2 OLAP Server version 8.1 and works the same on all
operating system.

When DB2 OLAP Server creates multiple export files, it uses the requested file
name for the main file. An underscore and a sequential cardinal number are
appended to the names of the additional files, starting with _1.

For example, if the requested file name is expall.txt and the exported data would
exceed 6GB, DB2 OLAP Server creates four files, naming them: expall.txt,
expall_1.txt, expall_2.txt, and expall_3.txt.

Chapter 6. Parallel calculation, data load, and export 277


278 DB2 OLAP Server V8.1: Using Advanced Functions
7

Chapter 7. Administration Services


Administration Services is the new cross-platform DB2 OLAP Server
administration tool. It provides:
򐂰 A middle tier server that synchronizes communication between the user and
the OLAP servers.
򐂰 A client graphical console, called the Administration Services Console, that
provides a graphical view of the DB2 OLAP Server environment.

The console is an easy-to-use graphical interface that enables administrators to


manage the DB2 OLAP Server environment. The console provides wizards,
editors, and other graphical tools to help administrators view, manage, and
maintain OLAP Servers and the Administration Services servers in a simple and
intuitive way. The console incorporates much of the functionality of Application
Manager with other administration tools, such as MaxL.

Administration Services works with DB2 OLAP Server Release 8.1 or higher. It
also works with the previous version of DB2 OLAP Server (v7.1 fixpack 8), but
not all the features are available from Administration Services Console. For more
information about which OLAP Server releases support which features, see
Release Compatibility.

© Copyright IBM Corp. 2002. All rights reserved. 279


7.1 Administration Services components
Administration Services works with DB2 OLAP Server servers in a three-tiered
architecture that consists of a client use interface, a middle tier server
component, and a database server, DB2 OLAP Server. The middle tier or server
coordinates interactions and resources between the client interfaces and the
OLAP servers. The three tiers may or may not be on the same machine or
platform.

These are the Administration Services components:


򐂰 Administration Services Console (client tier): A Java-based client console
that provides a graphical representation of the DB2 OLAP Server
environment. The console can be run on any platform supported by DB2
OLAP Server.
򐂰 Administration Services Server or Administration Server (middle tier):
A Java-based server that maintains communication, session, and security
information between the user interface and each connection to OLAP
Servers.
򐂰 DB2 OLAP Server servers (database tier): One or more DB2 OLAP Servers
that store and process multidimensional database information.

Figure 7-1 shows the architecture for Administration Services.

Client Tier Middle Tier Database Tier


Administration Services Administration Services DB2 OLAP Server
Console Server servers

HTTP TCP/IP

Data Store

HTTP
Listener

Figure 7-1 Administration Services architecture

280 DB2 OLAP Server V8.1: Using Advanced Functions


Administration Services lets you perform various actions from the graphical
console, including these:
򐂰 Perform multiple tasks simultaneously
򐂰 Run processes in the background
򐂰 Perform cross-server operations
򐂰 Manage active user sessions and requests
򐂰 Manage security
򐂰 Perform any regular operation, like creating cubes, loading and calculating
them and so on

7.2 New administrative capabilities


There are several new functions in Administration Services comparing it with
DB2 OLAP Server Application Manager. See Table 7-1. This list is not intended
to be exhaustive, but rather, to provide ideas on what the new capabilities are. In
this redbook, we will cover most of them to get you started.

Table 7-1 New functions


Function Description

Administration Services Both the middle tier Administration Server and the Client console are
Managing Administration Services

Console Java products that run on multiple platforms. The console provides an
intuitive interface and advanced tools to help you implement and
manage DB2 OLAP Server.

User single sign-on to the When you log into Administration Services, the Administration Server
OLAP Server enterprise handles your connections to OLAP Servers, applications, and
environment. databases. You do not need to connect to individual DB2 OLAP Server
objects or servers after you initial login to Administration Services.

Migrate DB2 OLAP You can migrate DB2 OLAP users and groups across DB2 OLAP
Managing security

Servers users and groups Servers, independently of an application, to and from any platform
across OLAP Servers. supported by DB2 OLAP Server. You can migrate individual users, or
you can migrate multiple users at one time.

Propagate user You can change a user’s password and then propagate the new
passwords across password to other DB2 OLAP Servers.
servers.

Chapter 7. Administration Services 281


Function Description

View and compare The Administration Services Console presents most OLAP Server
Managing OLAP Servers

information for different information in non-modal windows. This means that you can view
OLAP Server objects at information for multiple objects at the same time. For example, you can
the same time. open properties windows for multiple databases at the same time.

Manage user locks on The Administration Services Console provides a Locks window that
data and manage active enables you to view and manage user locks on data for an entire OLAP
user sessions at server, Server, an application, or a database. A session window enables you
application, and database to manage individual user sessions and requests.
levels

Migrate applications and Use the Migration Wizard to migrate applications and databases
Managing applications

databases across OLAP across OLAP Servers, to and from any platform supported by DB2
Servers. OLAP Server. For example, you can develop and test an application on
a Windows server and then migrate it to a production server running
UNIX.
When you migrate applications and databases, you can specify how
objects and security information are migrated with the application.

Filter, search, and Using Log Analyzer, you can filter, search, and analyze OLAP Server
Managing logs

analyze OLAP Server logs logs and applications logs and even see the log information in graphical
and applications logs. reports.

New MaxL Script Editor to A new MaxL Script Editor is integrated with the Administration Services
Managing scripts

manage and execute Console. From the MaxL Script Editor, you can create, edit, save, and
MaxL scripts and execute MaxL statements and scripts. You can also use the editor to
statements. type and execute MaxL statements.

Background processing to You can execute calculations in the background. You can then perform
execute calculations. other tasks or exit the console while the process continues to run. A
message panel in the console window tells you when the process is
Miscellaneous

completed.

E-mail the contents of the You can send OLAP Server information to other administrators or to
console window, such as Hyperion Technical Support via e-mail. For example, you can send
properties windows and properties information or log information via e-mail.
log windows.

282 DB2 OLAP Server V8.1: Using Advanced Functions


Note: Administration Services V6.5 does not yet support the administration of
other DB2 OLAP Server components, such as Integration Services and
Enterprise Services.

7.3 Administration Services configurations


The Administration Services components can be installed in many different
deployment configurations, depending on the organizational requirements and
infrastructure available. Each of the components can be installed in a variety of
platforms. Here, we present some possible configuration scenarios to help you
understand how Administration Services works:
򐂰 Different machines: This involves having the DB2 OLAP Server,
Administration Services Server (AS Server), and Administration Services
Console on different machines. See the sample scenario in Figure 7-2.

AS Console AS Console
Essbase Essbase

HT
TP P
Windows or Unix TT
H

AS
Server

DB2 OLAP
Client

AIX Server - Sicily W2000 - Cbarar4


DB2 OLAP Server DB2 OLAP Server

AIX Server - Cayman


DB2 OLAP Server

Figure 7-2 Administration Services: enterprise scenario

Chapter 7. Administration Services 283


The Administration Services Server is on one computer that must have at
least Essbase Client v6.51 installed. It is not necessary to install the
Administration Services Server on the same machine as the OLAP server, but
you have to have a runtime client. The Administration Services Server is
communicating with three DB2 OLAP Servers in different platforms. It is in
charge of communicating and synchronizing information between the console
and the OLAP Servers.There are two client machines with Administration
Services Console from where to control and to maintain the three OLAP
Servers.
򐂰 Same machine: This involves having the Administration Services Server and
DB2 OLAP Server on the same machine.
In Figure 7-3, the Administration Services Server is administering three DB2
OLAP Servers. One of these DB2 OLAP Server is on the same machine as
the Administration Services Server. The other DB2 OLAP Servers are on
separate machines. There are two machines with Administration Services
Console accessing this Administration Services Server.

Administraton Services Administraton Services


Console Console

HT Windows 2000/NT or Unix


T P TP
HT
Administration
Services
Server

DB2 OLAP Server +


client components

TC
P PI
PI P
TC

AIX Server - Sicily AIX Server - Cayman


DB2 OLAP Server
DB2 OLAP Server

TCPIP

Figure 7-3 Administration Services: mixed scenario

284 DB2 OLAP Server V8.1: Using Advanced Functions


Note: With the first release of DB2 OLAP Server v8.1 and Administration
Services, the scenario explained before will not be available. You will not be
able to use a local DB2 OLAP Server v8.1 with Administration Services. For
more information see “Prerequisites and supported platforms” on page 360.

򐂰 Stand-alone scenario: This involves having the Administration Services


Server and Administration Services Console on the same machine.
In Figure 7-4, the Administration Services Server, the graphical console, and
the OLAP runtime client are installed in the same machine. The
Administration Services Server is administering three DB2 OLAP Servers in
three different machines.

Administration
Services
Console

HTTP

Administration
Services
Server

AIX Server - Sicily TCPIP


Win 2000 - Cbarar4
D B2 OLA P Server DB2 OLA P Server
D B2 OLAP
Client TCPIP
TCPIP

TCPIP

AIX Server - Cayman


DB2 OLAP Server

Figure 7-4 Administration Services: stand alone scenario

Chapter 7. Administration Services 285


򐂰 Enterprise scenario: This involves having multiple Administration Services
Servers, multiple consoles, and multiple OLAP Servers.

You can also have multiple Administration Services Servers administering


multiple OLAP Server computers if your enterprise environment requires you to
administer these OLAP Server from physically remote points, for example.

Note: Administration Services does not support multiple DB2 OLAP Servers
running on different port numbers. All DB2 OLAP Servers you connect to
through Administration Services must be running on the same port. If you
have changed the default port for an DB2 OLAP Server, you need to change
all DB2 OLAP Server ports to use that port number. For more information, see
7.3, “Administration Services configurations” on page 283.

7.4 Using Administration Services


Administration Services provides all of the administration and maintenance
capabilities that are available through Application Manager through a new
graphical user interface (the Administration Services Console).

In this section, we focus on these topics:


򐂰 Managing security (user, groups, and migration of these from one OLAP
server to another)
򐂰 Managing multiple OLAP Servers, applications, and databases in a single
view, monitoring them, and executing processes in background
򐂰 Managing logs
򐂰 Managing scripts (MaxL, calculation, reports)
򐂰 Other miscellaneous operations

7.4.1 Managing security


Administration Services provides all of the security maintenance capabilities that
are available in Application Manager, including new features to help you
administer your users and groups. The following new security features are
available with Administration Services:
򐂰 Migrating users and groups across servers: To facilitate migrating users
and groups from development to testing to production, you can copy a specific
user (or group) or a set of users and groups from one DB2 OLAP Server to
another, regardless of platform. You can also use this new feature to migrate
your security (users, passwords, groups and privileges) between your cubes
in an Enterprise Services cluster environment.

286 DB2 OLAP Server V8.1: Using Advanced Functions


򐂰 Password propagation: Since the middle tier Administration Services Server
handles password administration, users can change their passwords once
and apply the change to multiple DB2 OLAP Servers.

Managing DB2 OLAP Servers users and groups


Administration Services has the same features as Application Manager to
manage DB2 OLAP Servers users and groups, although Administration Services
presents the easiest way to manage security through its graphical interface.

In the following sections we show you, step-by-step, how to create, delete, and
rename users and groups, how to add users in a group, and how to change user
privileges.
1. Creating users:
To create users in the DB2 OLAP Server using the Administration Services,
Console, follow these steps:
a. From Enterprise View or a custom view, find the DB2 OLAP Server for
which you want to create a user.
b. Expand the Security icon below that server, and then select the Users
icon.
c. Right-click and select the option Create User from the pop-up menu. See
Figure 7-5.

Figure 7-5 Uing Administration Services to create an OLAP Server user

d. In the dialog box, Create User on OLAP Server, enter the username.

Chapter 7. Administration Services 287


e. Select an authentication model (if you want to use the external
authentication, see “Managing external authentication” on page 301).
f. Enter the password. It must be between 6 to 100 characters in length that
are not case-sensitive. To prompt the user to change the password at the
next login attempt, select Prompt user to change password.

Important: Check only the Disable username option if you want to lock the
user out of the system for any reason. Only a Supervisor can re-enable a
username that has been disabled.

g. In the option group, User type, select either User or Supervisor. See the
DB2 OLAP Server Administration Guide, Chapter 15, for more information
about DB2 OLAP Server privileges.
h. Click OK to add the user.

Note: If the user you are creating will need to use Administration Services to
manage DB2 OLAP Server, you must also create that user on the
Administration Services Server. See “Creating users in Administration
Services” on page 372 for information about how to create a user on the
Administration Server.

2. Creating groups
To create a group of users in the DB2 OLAP Server using Administration
Services Console, follow these steps:
a. From Enterprise View or a custom view, find the DB2 OLAP Server for
which you want to create a group.
b. Expand the Security icon below that server, and then select the Groups
icon as shown in Figure 7-6.

288 DB2 OLAP Server V8.1: Using Advanced Functions


Figure 7-6 Using Administration Services to create an OLAP Server group

c. Right-click and select the option Create Group from the pop-up menu.
d. In the dialog box, Create Group on OLAP Server, enter the group name.
e. In the option, Group type, select either User or Supervisor.
f. Click OK to add the group.
3. Deleting/Renaming users and groups
To create or delete users and groups in the DB2 OLAP Server using
Administration Services Console, follow these steps:
a. From Enterprise View or a custom view, find the DB2 OLAP Server for
which you want to delete or rename a user or a group.
b. Expand the Security icon below that server, and expand the Users or
Groups icon.

Chapter 7. Administration Services 289


c. Right-click the user/group which you want to delete or rename, and select
the appropriate option, Delete or Rename, from the pop-up menu as
shown in Figure 7-7.

Renaming the user


user1.
Deleting the
user user1.

Figure 7-7 Using Administration Services to delete and rename users or groups

d. If you are renaming the user name or group name, input the new name.
e. Click OK.

4. Managing the group’s user membership


To add a DB2 OLAP Server user to a group using Administration Services
Console, follow these steps:
a. From Enterprise View or a custom view, expand the Security icon under
the appropriate DB2 OLAP Server
b. Expand the Users icon, and select the user whose group membership you
want to modify.

290 DB2 OLAP Server V8.1: Using Advanced Functions


c. Right-click and select Edit properties from the pop-up menu as shown in
Figure 7-8.

Figure 7-8 Editing group

d. In the User Properties window, select the Groups tab.


e. Select the group in the list box, Not member of groups.
The list box, Member of groups, lists the names of all groups to which the user
currently belongs as shown in Figure 7-9. The list box, Not member of groups,
lists the remaining groups on the OLAP Server to which the user can be
added.

Chapter 7. Administration Services 291


Figure 7-9 Adding a user to a group

f. Click the single-arrow button that points to the Member of groups list box.
g. Click Apply to add the user to the groups listed in the Member of groups
list box.
5. Granting application and databases permissions
The permissions you grant a new user or group apply to the entire OLAP
Server. After creating the user or group, use the following step to grant the
user or group different permissions for specific applications and databases:
a. From Enterprise View or a custom view, expand the Security icon under
the appropriate DB2 OLAP Server.
b. Expand the Users or Groups icon, and select the user or group to whom
you want to grant application/database permissions.
c. Right-click and select Edit properties from the pop-up menu.
d. Select the App/Db Access tab and expand the Applications tree as
shown in Figure 7-10.

292 DB2 OLAP Server V8.1: Using Advanced Functions


Figure 7-10 Granting permissions

Note: The tab App/Db Access is not selectable, since the DB2 OLAP User
that is being used to connect in Administration Services has full access to all
applications and databases.

e. To grant permissions for an application, select a permission from the


drop-down list box next to the appropriate application.
f. To grant specific permissions for each database in an application, select
Access Databases as the application permission, and select a
permission for each database.
g. To assign a filter to a user or group for a database, select Filter below the
appropriate database node and select a filter from the drop-down list.
h. If you selected None as the database permission, the Filter option is not
selectable.
i. If you selected Calculation as the user or group's database permission,
you can specify which calculation scripts the user or group is allowed to
execute.
j. Click Apply to apply the settings to the user’s or group's properties.

Chapter 7. Administration Services 293


Migrating users and groups
You can migrate DB2 OLAP Server users, passwords, and groups across OLAP
Servers, regardless of platform. For example, you can migrate a user from a
Windows development server to a UNIX production server. You can migrate to
any platform supported by DB2 OLAP Server.

This new Administration Services feature can help you to replicate security in
your Enterprise Services cluster environment.

A cluster of DB2 OLAP Server is a set of servers running on different computers


that run copies, or replicas of the same OLAP application. For more information
about Enterprise Services, see 5.3.10, “Synchronizing security across all OLAP
Servers in a cluster” on page 166.

You can use the Administration Services migration feature to migrate users,
passwords, groups, and privileges between multiple servers in the cluster
environment. In an Enterprise Services cluster environment, you should have the
same users, passwords, groups and privileges in the multiple DB2 OLAP Servers
that participate of the cluster.

The Enterprise Services also has features to migrate security (users and
groups), but it doesn’t migrate passwords and privileges.

Note: The IBM Security Migration tool is another alternative to migrate users
and groups from a DB2 OLAP Server to another. You can use the IBM
Security Migration tool to migrate users between machines without needing
DB2 OLAP Server client installed on the machine on which you are running
Security Migration Tool. See 8.2, “Security Migration Tool” on page 396 for
more information.

Using Administration Services, it is possible to migrate individual users or


multiple users at one time.
1. Migrating multiple users or groups at one time:
Here we give you a practical example of how to migrate multiple users at one
time. In this example we are migrating three users (user1, user2, and user3)
from a Windows development DB2 OLAP Server to a UNIX production DB2
OLAP Server.
The three users have the same characteristics and the same privileges:
– User type: user
– Create/delete users and groups: false
– Create/delete applications and databases: false
– Application designer on the application Demo

294 DB2 OLAP Server V8.1: Using Advanced Functions


The Windows DB2 OLAP Server’s hostname is localhost. The AIX DB2 OLAP
Server’s hostname is cayman. The two DB2 OLAP Servers are already
defined in the Enterprise View.
To migrate these users from a DB2 OLAP Server to another, using the
Administration Services Console, perform the following steps:
a. From Enterprise View or a custom view, expand the Security icon under
the source DB2 OLAP Server (the DB2 OLAP Server from which you will
copy the users).
b. Right-click the Users icon and select the option, Migrate Users, from the
pop-up menu.

Figure 7-11 Migrating users

Chapter 7. Administration Services 295


c. In the dialog box, Migrate users to OLAP Server, inform the DB2 OLAP
Server target (the DB2 OLAP Server to which you are migrating the
users).
d. Select the users you want to migrate in the Available window and click the
single arrow.
See Figure 7-12. We informed the OLAP Server cayman, that is the target,
and we selected user1, user2, and user3 to be migrated. Other users will
not be migrated.

Figure 7-12 Migrating users to OLAP Server

e. Click OK to finish.
The users user1, user2 and user3 are automatically migrated from the
localhost (DB2 OLAP Server windows machine) to Cayman (DB2 OLAP
Server AIX machine). All the privileges and characteristics of these users are
also migrated. See Figure 7-13.

296 DB2 OLAP Server V8.1: Using Advanced Functions


Cayman, the
target machine.

Single user,
Create/delete users,
groups, applications
is disabled (as the
localhost user).

User1 migrated.

User1 has
application designer
on application Demo.

Figure 7-13 User migrated

If the user has access on an application or database in the source machine,


but the application or database doesn’t exist in the target database, these
privileges are not migrated.

2. Migrating individual users:


You can also copy individual users and groups using the options, Copy user
and Copy group, in the Administration Services Console (Enterprise View
—> Essbase OLAP Servers —> OLAP Server hostname —> Security —>
Users/Groups —> username/group name —> Copy).
You can use the copy function to copy a specific user from a DB2 OLAP
Server to another.
You can also copy a user to same DB2 OLAP Server, changing the
username. This is useful if you want to create multiple users with the same
characteristics (privileges). You can create a single user, define the
characteristics privileges and copy it changing the username.
The copy function is available in the Application Manager, although using
Application Manager you can only copy users to the same DB2 OLAP Server.

Chapter 7. Administration Services 297


In Figure 7-14 the user, user3, is copied as user4 in the same machine. The
new user4 has the same characteristics as user3.

Source DB2
Source username.
OLAP Server.

Target DB2
OLAP Server. New username.

Figure 7-14 Copy user

3. Migrating users using Migration Wizard:


You can also use the Migration Wizard to migrate users and groups, although
you cannot use the Migration Wizard migrate only users. Using the Migration
Wizard you should migrate applications or databases and you can include the
security.
Using the Migration Wizard you can specify how the security permissions are
migrated with those users and groups. For more information about Migration
Wizard see “Managing databases” on page 316.

Propagating passwords
A new function, implemented by Administration Services, provides the capability
to propagate a user password. It allows you change a user password in multiple
DB2 OLAP Servers at the same time. To use it, you should have the same user
created on the multiple DB2 OLAP Servers on which you want to propagate the
new password.

This function can help you administer multiple DB2 OLAP Servers, for example,
in an Enterprise Services cluster environment.

298 DB2 OLAP Server V8.1: Using Advanced Functions


In an Enterprise Services cluster environment, the same password is necessary
in all DB2 OLAP Servers that participate in the cluster. Using the Propagate
Password feature, you can change the password for a user in all DB2 OLAP
Servers that participate in the Enterprise Services cluster at the same time.

In Figure 7-15 the new password, pass1, is propagated to two DB2 OLAP
Servers (Sicily and Cayman) at the same time. These two DB2 OLAP Servers
are in an Enterprise Services cluster environment.

DB2 OLAP Server - Cayman

Onlinei1
Onlinei
Onlinei
Onlinei
Enterprise
ol a
Services Onlinei2 pu
se Administration
Onlinei r1
OnlineiOnlinei Cluster

pa
ss
Services
Users: =p
a ss
Olapuser1 1
OLAP Sessions

Olapuser2
TCP/IP

DB2 OLAP Server - Siciliy

1
a ss
=p
ss
pa
Onlinei1
1
er

Onlinei Propagate password


us
ap

"pass1" to user
ol

Onlinei Olapuser1
Onlinei
Onlinei2
Onlinei
Users:
Olapuser1
Olapuser2

Figure 7-15 Propagating password in a cluster environment.

򐂰 To change a user's password and propagate the new password to other


OLAP Servers, follow these steps:
a. From Enterprise View or a custom view, expand the Security icon under
one of the DB2 OLAP Server (you can use any of the DB2 OLAP Server
you want to propagate the password).
b. Under the Users icon, right-click the userid for which you want to
propagate the password, and select the Propagate password option from
the pop-up menu. See Figure 7-16.

Chapter 7. Administration Services 299


Figure 7-16 Propagating the password

c. In the dialog box, Propagate password to OLAP Servers, enter and


confirm the user's new password.
d. In the Available list box, select the servers to which you want to propagate
the user's password.
e. Click the single-arrow button pointing toward the Selected list box (see
Figure 7-17).

300 DB2 OLAP Server V8.1: Using Advanced Functions


Figure 7-17 Propagating password dialog box

f. When all servers to which you want to propagate the password are listed
in the Selected list box, click OK.

Managing external authentication


DB2 OLAP Server version 8 provides an option to use external authentication of
DB2 OLAP Server users, instead of using native DB2 OLAP Server
authentication. Now it can authenticate users against global repositories such as
LDAP. DB2 OLAP Server supports LDAP V3-compliant servers, Microsoft Active
Directory Service, and NT authentication as external authentication methods.
You can also develop your own authentication modules and plug them into the
DB2 OLAP Server security infrastructure.

You can select an authentication model when you are creating a user. You can
change the authentication model for an existing user by editing the user's
properties. You can also select an authentication model to use when you copy an
existing user.

Use the following procedure to create DB2 OLAP Server users using external
authentication using Administration Services:
1. Add the AUTHENTICATIONMODULE (see Table 7-2) configuration setting to
the server configuration file essbase.cfg (see Example 7-1). The essbase.cfg
file is stored in the ARBORPATH\bin directory.

Chapter 7. Administration Services 301


Syntax:
AUTHENTICATIONMODULE module_name library_name max_wait_time
default_connection_parameters@hostname:port_number

Table 7-2 AUTHENTICATIONMODULE syntax


Parameter Explanation

module_name The name of the authentication module. For example,


LDAP.

library_name The directory path and name of the DB2 OLAP Server
library that implements the authentication protocol. This
library is located in ARBORPATH\bin. The library name
depends on the operating system where you have installed
DB2 OLAP Server:
WINDOWS: essldap.dll
SOLARIS: libessldap.so
AIX: libessldapS.a
HP: libessldap.sl

max_wait_time You should use the value "x." This value is not used in this
DB2 OLAP Server version. It is reserved for future use.

default_connection_pa This value represent the private data needed to authenticate


rameters the user with the authentication protocol. If you are using
LDAP, you should inform the full DN (Distinguished Name)
created in the LDAP Server. See? about how to configure
LDAP Server. The default_connection_parameters cannot
exceed 256 bytes.

@hostname:portname The host name and port number of the server that the
authentication protocol contacts to authenticate the user.
The default port used by LDAP server is 389.
Note: You must type the character "@" before the host
name, and type the character ":" between host name
and port number.

In Example 7-1 the LDAP protocol is used to authenticate DB2 OLAP users.

Example 7-1 Authentication module essbase.cfg


AUTHENTICATIONMODULE LDAP libessldapS.a x cn=ldapuser,o=ibm@fermium:389

The DB2 OLAP Server is installed in an AIX machine, so we are using the
library file libessldapS.a. The x should be specified in this DB2 OLAP version
(it will be used in future releases). The portion of the DN (Distinguished
Name) used in our LDAP server is: cn=ldapuser,o=ibm. The hostname of the
LDAP server is fermium and the port used by the LDAP server is 389.
The DN should not have any spaces.

302 DB2 OLAP Server V8.1: Using Advanced Functions


2. Restart the DB2 OLAP Service.
3. Create a user using the Administration Services Console (see Figure 7-18):
a. From Enterprise View or a custom view, expand the Security icon below
the appropriate OLAP Server.
b. Select the Users icon, and then right-click and select the Create user
option from the pop-up menu.
c. Inform the new username. This user should be pre-created in the LDAP
server.
d. In the dialog box, Create User on OLAP Server, clear the check box, Use
OLAP authentication (that is enabled by default)
e. Clearing this check box enables the Protocol and Parameters text boxes.
f. In the Protocol text box, enter the protocol LDAP.
g. In the Parameters text box, enter the authentication parameters.

New DB2 OLAP


Server
username.
The LDAP
protocol is
used to external
authentication
process.
ldapuser=ldap
administrator
username.
In this value you
don’t need to
specify the same
username you
are creating.
fermium= ldap
server hostname
389=ldap port.
Figure 7-18 Creating a new user using LDAP external authentication.

h. Click OK.

4. Connect to DB2 OLAP Server using this new user.

Chapter 7. Administration Services 303


7.4.2 Managing DB2 OLAP Servers, applications, and databases
Administration Services simplifies the administration of DB2 OLAP Servers,
applications and databases providing a graphical representation of all DB2 OLAP
Server objects. You can operate servers, applications, databases and other
objects quickly, in a visual and familiar setting.

The following new features are available in Administration Services to help you
manage you DB2 OLAP Servers, applications and databases:
򐂰 Migrating application and databases across servers: To facilitate
application migrations from development to testing or production environment,
you can copy entire applications from one DB2 OLAP Server server to
another, regardless of platform. You can also use this option to copy
applications and databases in your Enterprise Services cluster environment.
򐂰 Run processes in background: Administration Services allows you to
perform multiple tasks simultaneously, and run processes in the background.
You can perform cross-server operations, and manage active user sessions
and requests.
򐂰 View and compare information: You can view and compare information for
different DB2 OLAP Server objects at the same time. For example, you can
open properties windows for multiple databases at the same time.

Managing DB2 OLAP Servers


The Administration Services graphical interface facilitates the administration of
multiple DB2 OLAP Servers.

Using Administration Services, you can see properties of different DB2 OLAP
Servers at the same time. To do the same in Application Manager you need to
open two or more Application Manager sessions.

Use the following procedures to display and change DB2 OLAP Server
properties and to manage users sessions and locks on your different DB2 OLAP
Servers.

304 DB2 OLAP Server V8.1: Using Advanced Functions


1. Viewing and changing DB2 OLAP Server properties:
a. To open the OLAP Server Properties window, go to Enterprise View or a
custom view.
b. Select the OLAP Server.
c. Right-click and select Edit properties from the pop-up menu (see
Figure 7-19).

Figure 7-19 DB2 OLAP Server properties.

In the DB2 OLAP Server Properties” dialog box you can display and change
security properties, display license properties, display statistics properties,
display environment properties, display operational system properties and
display disk properties.
See Table 7-3 for more details about the DB2 OLAP Server properties:

Chapter 7. Administration Services 305


Table 7-3 DB2 OLAP Server properties
Folder Properties Detail

Security Login attempts allowed Number of consecutive, incorrect user name and/or password
before username is entries allowed before the user name is disabled. This number
disabled must be between 0 and 64,000.The default settings are 0,
meaning that the options are turned off.

Number of inactive Specifies the number of days a user account may remain
days before username inactive before the user name is disabled. The default settings
is disabled are 0, meaning that the options are turned off.

Number of days before Number of days a user may retain the current password. After
user must change the allowed number of days, the user is prompted at login to
password change the password. This number must be between 0 and
64,000. The default settings are 0, meaning that the options
are turned off.

Inactive limit (minutes) Specifies the number of minutes of user inactivity permitted
before system automatically disconnects the user. The default
is 60 minutes, the minimum is 5 minutes and there isn’t a limit
for the maximum. The value 0 means that users can stay
inactive connected until the server is shut down.

Check for inactivity Specifies how often DB2 OLAP Server checks for inactivity, in
every (minutes) minutes. The default is 5 minutes, the minimum is 1 minute
and there isn’t a limit for the maximum.

License License information Version: displays the current version of DB2 OLAP Server
running on the machine.
License number: displays the DB2 OLAP Server serial
number.
License expiration: displays the expiration date of the DB2
OLAP Server license. If you are using a try version.
Number of installed ports: displays the total number of ports
installed on the server. DB2 OLAP Server provides one
additional reserve port for Supervisors.
Network Protocol: displays the network protocol installed on
the server machine.

Installed options Lists the features that were put in place when DB2 OLAP
Server was installed.

Essbase system files Lists the DB2 OLAP Server DLL files in server memory, their
locations, and version numbers.

306 DB2 OLAP Server V8.1: Using Advanced Functions


Folder Properties Detail

Statistics Statistics information. Server start time: displays the last the OLAP Server was
started.
Elapsed time: Displays how long, in hours:minutes:seconds,
the OLAP Server has been running since last time it was
started.
Ports in use: displays the number of ports in use on the server
(client connections).
Ports available: displays the number of ports available for use
on the server. If the Ports Available number is -1, the reserve
port for supervisors is already in use.

Environment Essbase environment Displays DB2 OLAP Server environment variables, as defined
variables during installation (for
example, ARBORPATH).

Essbase configuration Lists the parameters defined in the essbase.cfg server


settings (essbase.cfg) configuration file, if you have created it. If you have not
created this file, this list box is blank.

OS Operation System Displays OS version, displays date and time the operating
system was started or rebooted, displays how long the OS
has been running and displays the current time

CPU Displays the number and type of the CPUs on the server
machine.

Memory Displays, in kilobytes, the total physical memory installed on


the server machine, the amount of physical memory used,
and the amount of physical memory available.

Virtual memory Path: displays the swap file paths.


Total: Indicates the total amount of swap space in kilobytes.
Used: Indicates the swap file size in kilobytes. If there is more
than one swap file, used space is the combined sizes of the
swap files.
Free: Indicates the amount of space available, in kilobytes, for
the growth of the swap files.

Disk drivers Disk drivers information Displays the drive name, the label of the volume, the type of
drive (Fixed, Removable, RAM, Remote, or Unknown), the file
system used by the drive (FAT, HPFS, or NTFS), the total
amount of space on the drive in kilobytes, the amount of
space used on the drive in kilobytes, free (available) space on
the drive, in kilobytes.

Chapter 7. Administration Services 307


Using Administration Services, you can open multiple DB2 OLAP Servers
properties and compare the values. In Figure 7-20 we are comparing the
security properties between two servers: Cayman (DB2 OLAP Server on AIX)
and localhost (DB2 OLAP Server that is installed on the same machine as
Administration Services in the Windows environment); see Figure 7-20.

Figure 7-20 Administration Services - comparing DB2 OLAP Server properties

Using Application Manager, you should open one Application Manager session
for each DB2 OLAP Server you want to display or change the properties.
2. Managing sessions:
Using Administration Services, you can log off users sessions.
A session is an instance of a user who is actively logged in to a DB2 OLAP
Server at the system, application, or database level. A session begins when
the user logs in, and ends when the user logs out or is logged out by
someone else. A user can have more than one session open at the same
time.

Note: If you are using the Enterprise Services connection pooling feature, you
can have multiple users connections to DB2 OLAP Server using the same
session. In this case, Administration Services will display a session of the
Enterprise Service user that can represents multiple users connections. See
5.3.3, “Connection pooling” on page 134.

308 DB2 OLAP Server V8.1: Using Advanced Functions


Using Administration Services, the administrator can log off (disconnect
sessions) or kill (close sessions without disconnect) the following:
– A specific user session
– All instances of an specific user in an application
– All instances of an specific user in a database
– All instances of an specific user in a DB2 OLAP Server
– All users in an application
– All users in a database
– All users in the DB2 OLAP Servers
To open the Sessions window, go to Enterprise Viw or a custom view, expand
the OLAP Server, right-click the Sessions icon, and click Edit properties.

Figure 7-21 Managing sessions

In Figure 7-21 we selected the session 1432354805 and these options: Log
off, all instances of user, on selected database. All the connections of the user
selected, in the database selected, will be disconnected.

Chapter 7. Administration Services 309


Figure 7-22 Logging off users — example

In this case all connections for user Administrator on database onlinei are
logged off (sessions 1432354805 and 3789553650).
Figure 7-22 shows the result of the log-off.

310 DB2 OLAP Server V8.1: Using Advanced Functions


Figure 7-23 Logging off users result

3. Managing locks:
Occasionally, you may need to release a user lock. For example, if you
attempt to calculate a database that has active locks on data, the calculation
must wait when it encounters a lock. If you release the lock, the calculation
can continue.
Removing a user's lock disconnects the user from the current session.
To open the dialog box, OLAP Locks, go to Enterprise View or a custom view,
expand the OLAP Server, and double-click the Locks icon.

Figure 7-24 Administration Services managing locks

Chapter 7. Administration Services 311


Using this Administration tool you can display the following lock information:
– User that is locking the database
– The application and the database name that contains the lock
– The number of blocks the user is locking
– The time duration of the lock
You can remove a lock selecting the lock object and clicking the button
Remove Lock.

Managing applications
Using Administration Services you can create applications, start and stop
applications, delete and rename applications and see properties of different
application at the same time.

Here we will introduce you how to use these features:


1. Creating, renaming and deleting applications:
When you create an application, DB2 OLAP Server creates a new application
directory on the destination OLAP Server (ARBORPATH\app\appname),
when you rename an application, it is also renamed and when you delete an
application, the path is deleted.
Figure 7-25 shows how to create, delete and rename an application.

312 DB2 OLAP Server V8.1: Using Advanced Functions


Renaming
application.

Deleting
application.
Creating application.

Figure 7-25 Creating application

2. Starting and stopping applications:


You can start and stop a specific application or start and stop all applications
in a DB2 OLAP Server.

To start or stop all applications in a DB2 OLAP Server:


a. Open the Administration Services Console.
b. From Enterprise View or a custom view, expand the DB2 OLAP Server you
want to work with.
c. Right-click the icon Applications and select Start/Stop all applications
from the pop-up menu.
d. In the confirmation window, click Yes.

Chapter 7. Administration Services 313


To start or stop a specific application:
a. Open the Administration Services Console.
b. From Enterprise View or a custom view, expand DB2 OLAP Server you
want to work with.
c. Expand the icon Applications and right-click the specific application and
select Start/Stop from the pop-up menu.
d. In the confirmation window, click Yes.
You can configure your applications to start automatically when DB2 OLAP
Server service starts. The default is start the applications when a user needs
to retrieve data from a database in the application.
Use the following steps to change the start option of an application:
a. Open the Administration Services Console.
b. From Enterprise View or a custom view, select the application you want to
configure.
c. Right-click and select Edit properties from the pop-up menu.
d. In the Application Properties window, select the General tab.
e. Expand the Startup icon.
f. Select Start application when Essbase starts.
g. Click Apply to apply the setting.
You can have both options selected at the same time: Allow users to start
application and Start application when Essbase starts.
3. Displaying and changing application properties:
To open the Application Properties:
a. Go to Enterprise View or a custom view.
b. Select the specific application.
c. Right-click and select Edit properties from the pop-up menu.
In the dialog box, Application Properties, you can display and change general
properties. You can also display statistics information.
See Table 7-4 for more details about the application properties.

314 DB2 OLAP Server V8.1: Using Advanced Functions


Table 7-4 Application properties
Folder Properties Detail

General Startup You can choose between two options:


Allow users to start application
Start application when Essbase starts.

Minimum The minimum access level for an application. It applies


access level to all databases within the application. Unless you are
sure it really is public the general access has to be set
as none.
You should select one of the following options:
– None
– Read
– Write
– Calculate
– Database Designer

Timeout on The maximum amount of time, in minutes, that a user


data block can hold a lock on data blocks. If you need to release
locks a lock before this period, see Step 3., “Managing
(minutes) locks:” on page 311.

Max Specify a maximum file size for Linked Reporting


attachment Object attachments to prevent users from attaching
file size (KB) very large files. The default size is Unlimited.

Data storage You cannot change this option on DB2 OLAP version
type 8, because it doesn’t support DB2 relational database
storage type anymore.

Statistics Application Displays what time the application was started.


start time

Application Displays how long, in hours:minutes:seconds, the


elapsed time application has been running.

Number of Displays the current number of users connected to the


connections application.

Chapter 7. Administration Services 315


Managing databases
Using Administration Services, you can execute all the Application Manager
functions to manage your databases in an easier graphical interface. Here we will
present you how to use the major Administration Services functions to manage
you DB2 OLAP Server databases:
1. Creating, renaming, and deleting databases:
When you create a new database, DB2 OLAP server creates a new database
directory under application directory (ARBORPATH\app\appname\dbname)
on the destination OLAP Server. When you rename a database, the database
directory and the database outline are renamed. Several other database files
are also renamed (dbname.db, dbname.dbb, dbname.esm, dbname.ind,
dbname.tct). When you delete an database the database directory and all
files stored in that directory are deleted.
Figure 7-26 shows how to create, delete and rename an application.

Renaming a
database.

Deleting a Creating a
database. database.

Figure 7-26 Creating, renaming or deleting a database.

2. Starting and stopping databases:


You can start and stop a specific database or start and stop all databases in
an application.
To start or stop all application in a DB2 OLAP Server:
a. Open the Administration Services Console.
b. From Enterprise View or a custom view, expand the application you want
to work with.

316 DB2 OLAP Server V8.1: Using Advanced Functions


c. Right-click the icon Databases and select Start/Stop all databases from
the pop-up menu.
d. In the confirmation window, click Yes.
To start or stop a specific application:
a. Open the Administration Services Console.
b. From Enterprise View or a custom view, expand the application you want
to work with.
c. Expand the icon Databases and right-click the specific database and
select Start/Stop from the pop-up menu.
d. In the confirmation window click Yes.
You can also configure your databases to start automatically when the
application starts. The default is start the database only when a user attempts
to retrieve data from a database. Use the following steps to change the start
option of a database:
a. Open the Administration Services Console.
b. From Enterprise View or a custom view, select the database you want to
configure.
c. Right-click and select Edit properties from the pop-up menu.
d. In the dialog box, Database Properties, select the General tab.
e. Expand the Startup icon.
f. Select Start application when Essbase starts.
Click Apply to apply the setting.
You can have both options selected at the same time: Allow users to start
database and Start database when application starts.
3. Displaying and changing database properties:
To open the Database Properties:
a. Go to Enterprise View or a custom view.
b. Select the specific database.
c. Right-click and select Edit properties from the pop-up menu.
In the dialog box, Database Properties, you can display and change
properties in the following folders: General, Caches, Trasactions, Storage and
Currency. In the folders Dimensions, Statistics, and Modification, you can only
display information.
See Table 7-5 for more detail about the database properties:

Chapter 7. Administration Services 317


Table 7-5 Database properties
Folder Properties Detail

General Description and The description is optional and it cannot be longer than 79 characters.
database type The database type indicates if it is normal or currency.

Startup You have the following options to configure a database to start


automatically: allow users to start database when trying to access
database and start database when application starts. You can have
both options selected at the same time.

Calculation You can select one or more of the following options:


Aggregate missing values: when this option is select and you load
data directly at the parent level, these parent-levels value will be
replaced by the result of the database consolidation, even if the
results are missing values.
Create blocks on equations: enables DB2 OLAP Server to create a
block when you assign a non-constant value to a member
combination for which a data block does not already exist. It can result
in a very large database.
Two-Pass calculation: recalculates members tagged as Two-pass in
the outline after a default calculation is run.

Minimum Determines the minimum access level for the database. Select one of
access level the following:
None: all users can access the database according to their
permissions.
Read: grant all users to view files, retrieve data vales and run report
scrips.
Write: grant all users to read access and update data values.
Calculate: Grant all users perform calculations.
Db designer: Grants all users all access to the database.

Data retrieval Changing these buffers you can only increase performance in data
buffers retrieval (end users reports as Spreadsheet add-in and report scripts).
It will not increase performance on load and calculation processes.
Buffer size: used to process and optimize retrievals from Spreadsheet
Add-in and report scripts.
Sort buffer size: hold unsorted data to be sorted during retrievals.

Dimensions Dimensions Displays the number and name of dimensions defined in the outline.
information Displays the number of members in each dimension and the number
of members that can store data (shared or label only members cannot
store data). Indicates whether each dimension is sparse or dense.

318 DB2 OLAP Server V8.1: Using Advanced Functions


Folder Properties Detail

Statistics Statistics Displays the time the database was started, how long it has been
running, the number of users connected to it and the data and time at
which DB2 OLAP Server collected the information for the Statistics
tab.

Blocks Displays the following information:


number of existing blocks (that contain data) in the database.
Size in bytes of the blocks
Potential number of blocks that is the number of members of each
sparse dimension multiplied. For example if you have 3 sparse
dimensions. The dimension A has 3 members, the dimension B has
2 members and the dimension C has 5 members, the potential
number of blocks will be 3 X 2 X 5 = 30.
Existing level 0: total number of sparse dimension members that have
no children and contain data.
Existing upper-level blocks: Total number of non level 0 blocks that
contain data.
Block density (%): average percentage that data exist on each data
blocks.
Percentage of maximum blocks existing: percentage of blocks that
exist compared to the total potential number of blocks (use this to
measure the sparsity of the database).
Compression ratio: indicates the compression efficiency of blocks
stored on disk.
Average clustering ratio: indicates the fragmentation level of data.
The maximum value 1 indicates no fragmentation.

Run-time Displays run-time statistics for each cache hit ratios and read/write
operations.

Caches Cache memory Select this check box to lock the memory used by the index cache,
locking data file cache and data cache into physical memory. It will gives the
DB2 OLAP Server kernel priority use of system RAM. It can only be
used if direct I/O is enabled.

Cache size Determines how much memory DB2 OLAP Server allocates for index
cache, data file cache and data cache.

Index page Specify the size of the index page. In some DB2 OLAP Server
settings versions you cannot change this value. This setting does not apply
when using direct I/O (that will use a fixed value of 8KB). A change on
this value only take effect if the database is empty.

Chapter 7. Administration Services 319


Folder Properties Detail

Transactions Committed Select this option to allow transactions to hold read/write locks on all
access data blocks involved with a transaction until the transaction completes
and commits. You can determine how many seconds a transaction
waits for access to locked data blocs (Wait) and you can enable or not
users read-only access to data blocks that are locked for the duration
of another concurrent transaction (pre-image access).

Uncommitted Select this option to allow transactions to hold read/write locks on a


access block-by-block basis. This is the default setting.
You should specify the number of data blocks updated before DB2
OLAP Server performs a commit (Commit blocks) and the number of
rows of a data file processed during data load before DB2 OLAP
Server performs a data commit (commit rows).

Storage Current I/O Displays the current (active) I/O access mode for the database.
access mode

Pending I/O Select the I/O mode that DB2 OLAP Server will uses to access the
access mode database:
Buffered I/O: uses the file system’s buffer cache.
Direct I/O: Bypasses the file system’s buffer cache and is able to
perform asynchronous, overlapped I/Os, providing faster response
time.

Data Use one of the following:


compression Bitmap compression: Uses bitmap to represent data cells. Stores only
non-missing values and does not compress repetitive values or zeros.
In most cases conserves disk space more efficiently. This is de
default setting.
RLE: Compress consecutive, repetitive value, including zero, keeping
track of each repeating value and number f times it is repeated
consecutively.
No compression: Does not compress data blocks when they are
written to disk.

Disk volumes Options for allocating storage on disk volumes.


for index and
data a data file

320 DB2 OLAP Server V8.1: Using Advanced Functions


Folder Properties Detail

Currency Currency You can select a currency database to link to for currency conversion
information calculations. If no currency database is linked to the current database,
the currency database is [None].
You can use multiple (multiple local data values in the database by
exchange rates) or divide conversion methods (divides de data
values in the database by exchange rates).
You can specify the name of the member of the currency type
dimension that to be used as the default in currency conversions
(default currency type member).
The country dimension node displays the name of the country
dimension as defined in the outline in the country dimension node.
The time dimension node displays the name of the time dimension as
defined in the outline.
The category dimension node displays the name of the accounts
dimension tagged as Cur Category in the outline.
The currency partition node displays the name of the dimension
tagged as Currency partition in the outline.

Modification Modifications The operation column indicates the type of operation performed, the
information user column displays the name of the user who performed the
operation. You can also see the start and end time for the operations.
If appropriate DB2 OLAP Server displays a note about the operation.

4. Using the Administration Services Outline Editor:


Administration Services has a new a graphical environment for defining and
maintaining multidimensional database outlines. In this section we will provide
an overview, showing how to use the new Administration Services Outline
Editor.
All DB2 OLAP Server development begins with creating a database outline. A
database outline defines the relationships between members in a DB2 OLAP
Server database, organizes all the data in the database and defines the
consolidations and mathematical relationships between items.
We are assuming that you are already familiar with the outline concepts. If
you need more information, refer to the DB2 OLAP Server Administration
Guide, Chapter 2, “Multidimensional Concepts”.
To open the outline editor (see Figure 7-27) in the Administration Services
Console, go to Enterprise View or a custom view, expand the database on
which you want to work, right-click the Outline icon, and click Edit.

Chapter 7. Administration Services 321


Figure 7-27 Opening the Outline Editor

Administration Services uses the representation of dimension in trees, as the


Application Manager. See Figure 7-28, the branches immediately below the
database name are the dimensions.

Figure 7-28 The outline structure

322 DB2 OLAP Server V8.1: Using Advanced Functions


When you are editing the outline at the first time, it is empty. To start defining
the dimensions and members, right-click Outline: new (Active Alias Table:
Default), select the option, Add child, fill the dimension name, and press
Enter. Or you can also use the button, Add a child to the selected member,
in the toolbar. See Figure 7-29.

Figure 7-29 Defining dimensions and members

To edit the dimension or member property in the Administration Services


Console, right-click the member name, and select the option Edit member
property, or use the buttons in the toolbar.

The properties of dimensions and members define the rules of the dimensions
and members in the design of the multidimensional structure.

In Figure 7-30, we changed the consolidation property on a member called


“transactions”, without using the toolbar.

Chapter 7. Administration Services 323


Figure 7-30 Changing a member properties

You can edit the following dimension or member properties in the member
properties information folder:
򐂰 Member Information:
– Name: Member name
– Comment: Comment box
– Consolidation: The method used to consolidate members (addition,
subtraction, multiplication, division, percent or ignore)
– Two-Pass calculation: To specify that members must be calculated in two
passes. This option is not valid for attribute dimensions and members.
– Data storage: To specify the option used to store data in this member
(store data, dynamic calc and store, dynamic calc, never share, label only
and shared member).

324 DB2 OLAP Server V8.1: Using Advanced Functions


򐂰 Account Information:
– Time balance: To specify how to calculate the data in a dimension tagged
as account. To use these tags, you must have a dimension tagged as
accounts and a dimension tagged as time. Choose one of the options:
none, average, first and last. The default is none, to not use time balance.
• Skip option: Choose one of the options: missing, zeros, both or none.
– Variance reporting expense: Define how DB2 OLAP Server calculates the
difference between actual and budget data in members with the @VAR or
@VARPER function in their member formulas. There are two variance
reporting properties: expense and non-expense. The default is
non-expense.
– Currency conversion: Select None (Use ancestor) to specify that a
member has no relation to currency conversion, select Yes Conversion to
specify that a member requires a conversion or select Category to
indicate that a member requires currency conversion to a specific category
type.
• Category: This option is only enabled when you select currency
conversion category. In the Category text box, enter the type of
conversion necessary for the member.
򐂰 Aliases
– Default: Displays the current alias name for the member.
There are also some properties that apply to the entire outline. To edit the outline
properties in the Administration Services Console, go to Enterprise View or a
custom view , expand the database in which you want to work, right-click the
Outline icon, and click Edit, folder Properties.

Figure 7-31 displays the outline properties for the database e-BankDB on the
DB2 OLAP Server installed on the cayman machine (hostname).

Chapter 7. Administration Services 325


Figure 7-31 Outline properties

You can edit the following outline properties in the outline editor properties folder:
򐂰 Case-sensitive members: Selects whether members whose names differ
only by case are treated as separate members in all member comparison and
search operations. You should set true or false. The True option indicates that
the members are treated as case-sensitive. The default is false.
򐂰 Alias table: Right-click this option and you can create an alias table in the
active outline, clear all tables in the active outline or delete all tables in the
active outline. Right-click the table name and you can set the table as active,
create another table, rename, copy, clear and delete the specific table. You
can also export and import an alias table, using the an ALT file type.
򐂰 Attribute settings: For the Prefix/Suffix format, define a prefix or suffix to
attach a value in the member name; for example, Population_50000.
򐂰 Calculation dimension names: Change this values only if you want a
different name for the Attribute Calculations dimension or for the names of
any of its members (sum, count, minimum, maximum and average). The
names specified on these boxes are the names used on reports and
spreadsheets.
򐂰 Boolean, date, and numeric attribute settings: Use boolean options to
modify member names for Boolean and date attribute dimensions. You can
specify a value for true and for false. For example, you can specify “Yes” for
true and “No” for false.

326 DB2 OLAP Server V8.1: Using Advanced Functions


Use the data format options to choose the format data: mm-dd-yyy or
dd-mm-yyy. Use the numeric ranges options to create members whose
names represent a range of numeric values: the tops of ranges specify that
DB2 OLAP Server considers a particular set of numeric attribute member
value as the highest value in the numeric range, the bottoms of ranges
specifies that DB2 OLAP Server considers a particular set of numeric
attribute member value as the lowest value in the numeric range.
򐂰 Dimension storage types: Here you have an entry for each dimension you
have defined in your outline. Use this option to define if the dimension is
sparse or dense.

You can also edit the outline properties using the outline toolbar. Figure 7-32
explains the main buttons in the outline editor toolbar. The buttons can be
alternated according to the object which is selected in the outline.

Sort the
members
Add a
child
Delete the
member Add a Edit formula
sibling

Dimension Store options Time


Types balance
Two-pass
calculation Expense
Reporting

Figure 7-32 Outline editor toolbar

The Administration Services outline editor has a new graphical interface to help
you define the calculation formula for your outline (formula editor). To access the
formula editor, on the outline editor, right-click the member name and select the
option edit, select the folder Formula. Figure 7-33 shows the Formula editor
components.

Chapter 7. Administration Services 327


Use this
box to
edit your
Click formula.
two
times
on the
member
name
to paste
it in the
formula
box.

Use this box to past commands, functions


and operators into your formulas.

Figure 7-33 Member formula

In the new Formula editor you can select the member name into the editing panel
without typing them. It also has a function template where you can choose the
formulas to be pasted in the editing pane. With the member selection and the
function templates, you can build a quick and easy prototype of your formula
using only the mouse. You can then customize the formula in a text editor.

For more information about developing formulas, see the DB2 OLAP Server
Administrator's Guide.

Use the Verify button to check if your formula syntax is correct. If DB2 OLAP
Server find some error, it will generate a message in the Administration Services
Console message panel. See Example 7-2.

Example 7-2 Error on verifying formula


[cayman:e-bank:e-BankDB]OutlineEditVerifyFormulaThu May 30 14:35:49 PDT 2002
ERROR:1200334: Error parsing formula for [] (line 1): wrong number of arguments
in function [@RANK]

328 DB2 OLAP Server V8.1: Using Advanced Functions


Administration Services provides an easy way to see the modifications done in
the outline. It is very useful to track the changes done in the outline. To see the
modifications dialog box, go to Enterprise View or a custom view, expand the
database in which you want to work, right-click the Outline icon, and click Edit,
folder Modifications.

Example 7-3 shows some messages that can be generated in the Administration
Services Modifications folder.

Example 7-3 Modifications folder


3:38:04 PM: Renamed Member ‘20001’ to ‘200001b’
3:39:06 PM: Renamed Member ‘200001b’ to ‘20001’

You can use the Administration Server to enable or disable Hybrid Analysis in
your outline and you can also visualize the Hybrid Analysis members in the
Administration Services outline editor. For more information, see 3.5.5, “Hybrid
Analysis and Administration Services” on page 57.

5. Loading data:

You can use Administration Services to load data and to build dimension in your
DB2 OLAP Server database.

A data load loads data values from a data source into a DB2 OLAP Server
database.

A dimension build loads dimensions and members from a data source into a DB2
OLAP Server outline.

You must have write permissions for the database into which you are loading the
data or members.
1. To load data or to build dimension in the database using Administration
Services Console, follow these steps:
a. From Enterprise View or a custom view, select the database in which you
want to work.
b. Right-click and select Load data from the pop-up menu.
c. In the dialog box, Data Load, select one or more data sources.
d. If you are performing a data load, select Load data.
e. If you are performing a dimension build, select Modify outline.
2. You can execute data load and dimension build at the same time.
a. If you are using a rules file, select Use rules and select the rules file.

Chapter 7. Administration Services 329


b. Click OK.
In Figure 7-34 we are executing a data load and a dimension build at the
same time in the database E-BankDb in the machine Cayman.

This option
enables data
load.
This option
enables
the build
dimensions. This option
is only
This option enabled
is used to when using
execute the rule file.
load in
background In the
interactive
mode the
.
errors are
displayed
and DB2
continues
the process.

Figure 7-34 Data load and dimension build

3. Calculating data:

You can use Administration Services to calculate your cubes. Administration


Services enables the execution of calculation process in background. You can
start an calculation in background and continue to use Administration Services
for other purposes. When you run a calculation in the background, you can exit
the console but you cannot shut down the Administration Server until the
calculation has completed.

You can track the calculation process that is executing in background through
the dialog box, Background process status. For more information, see “Executing
processes in background” on page 342.

330 DB2 OLAP Server V8.1: Using Advanced Functions


DB2 OLAP Server offers two ways that you can calculate a database:
򐂰 Outline calculation: This is the simplest method of calculation. DB2 OLAP
Server bases the calculation of the database on the relationships between
members in the database outline and on any formulas that have been
associated with members in the outline.
򐂰 Calculation script: Using a calculation script, you can choose exactly how to
calculate a database. For example, you can calculate only a part of a
database or copy data values between members. A calculator script contains
a series of calculation commands, equations, and formulas.
To calculate databases using Administration Services Console, follow these
steps:
a. From Enterprise View or a custom view, select the database in which you
want to work.
b. Right-click and select Execute calculation from the pop-up menu to
display the dialog box, Execute Database Calculation.
c. In the calculation scripts list, select the calculation script that you want to
run against the database. Select (Default) to run the default calculation
against the database (outline calculation).
d. If you want to run the calculation in the background so that you can
continue working in the console as the calculation processes, select
Execute in the background (see Figure 7-35).

Figure 7-35 Execute a calculation in the background

e. Click OK to start the calculation.

Chapter 7. Administration Services 331


See “Calculation scripts” on page 353 for information about how to create
calculation scrips using Administration Services.
4. Clearing data:
You can clear all data values from a database or you can clear only calculated
data blocks or upper-level data blocks. When you clear data, the cleared data
values are set to #MISSING.
To clear all data from a database:
a. From Enterprise View or a custom view, select the database.
– Right-click and select:
i. Clear data > All data from the pop-up menu: if you want to clear all data
from the database.
ii. Clear data > Non-input blocks from the pop-up menu: If you want to
clear only calculated (on-input) blocks from a database.
iii. Clear data > Upper-level blocks from the pop-up menu: If you want to
clear only the upper-level blocks from a database.
b. At the confirmation prompt, click Yes.
You can also clear data automatically as part of a data load.
To clear data values before performing a data load:
a. Create or open a rules file (go to Enterprise View or a custom view,
expand the database in which you want to work, right-click the Rules files
icon, then select Create rules file).
b. When you have a rules file opened, the Options menu is enabled. In the
Options menu, select the option Data load settings.
c. In the dialog box, Data Load Settings, select the Clear Data
Combinations tab.

332 DB2 OLAP Server V8.1: Using Advanced Functions


Figure 7-36 Clearing data before a data load

d. In the text box, Clear combinations, type the member combinations to


clear (enclosing each name in quotation marks; for example, “New York”),
or double-click the members in the Dimension node (you can only see the
dimension and member names after you associate the rules file with an
outline).
e. Click OK.

Migrating applications and databases


Using Administration Services, you can migrate DB2 OLAP Server applications
and databases, regardless of the platform, from one server to another. For
example, you can migrate a database from a Windows development server to a
UNIX production server. You can migrate to any platform supported by DB2
OLAP Server.

To migrate applications and databases across DB2 OLAP Servers in the


Administration Services Console, you should use the Migration Wizard that steps
you through all the process of migrating. The Migration Wizard is the only tool

Chapter 7. Administration Services 333


provided to migrate applications and databases in Administration Services
Console.

You can use this feature to migrate applications and databases in your
Enterprise Services cluster environment, for example when you are configuring
the cluster environment for the Enterprise Services (you should create multiple
copies of an application on different machines, or on the same machine).

Note: Using the Migration Wizard you cannot migrate applications or


databases to the same machine. Using the Migration Wizard you should
migrate applications or databases from a DB2 OLAP Server to another. To
create multiples copies of the same application or database on the same DB2
OLAP Server machine, use the Copy option (you should change the
application or database name).

The following information is copied with the application during migration using
Wizard Migration:
򐂰 Any databases and objects you select in the Migration Wizard.
򐂰 Application and database properties, such as cache settings, with the
exception of disk volumes.
򐂰 Users and groups, according to the options you select in the Migration
Wizard. Passwords are migrated. After migration, you can edit user and group
properties on the target server without affecting user/group permissions on
the source server.
򐂰 Filters and their associations. You do not need to re-assign filters to
users/groups after migration.
򐂰 Linked reporting objects (not available in Alpha release).
򐂰 Partitions.

The following information is not copied during migration using Wizard Migration:
򐂰 Data (.pag and .ind files).
򐂰 Non DB2 OLAP Server files, such as spreadsheet files, text files, MaxL script
files, ESSCMD scripts.
򐂰 The Essbase configuration file (essbase.cfg).
򐂰 Disk volumes.

Note: As an alternative to migrate the data (.pag and .ind files) you can use
the IBM Security Migration tool. See 8.2, “Security Migration Tool” on
page 396. for more information.

334 DB2 OLAP Server V8.1: Using Advanced Functions


Before migrating databases, execute the following procedure:
1. Run the VALIDATE command (ESSCMD) against any databases to be
migrated.
a. Open the ESSCMD (Command interface) and execute:
b. Login <DB2 OLAP Server hostname> <DB2 OLAP Server User>
<password>
For example: login localhost olapcay olappwd
c. Select <appname> <dbname>
For example: select Sample Basic
d. Validate
You will be prompted to inform a file name that DB2 OLAP Server will
use to log errors if some inconsistency in the database is find.
Example 7-4 shows the return status of a database that is consistent.
No errors were found in this database.

Example 7-4 Validation status


Validate: no errors found during validation
Validate completed
sts = 0

The error file is only generated if DB2 OLAP Server VALIDATE command find
some problem in the database.
If the VALIDATE returns errors, revert to a backup that is free of errors.
2. If the database that you are migrating already exists in the target machine
(you are only updating it), back up the databases on the target machine
before migrating. For more information about how to backup a DB2 OLAP
Server database, see the IBM DB2 OLAP Server Administrator’s guide,
chapter 44, Backing up and restoring data.

To open the Migration Wizard on the Administration Services Console, go to the


menu, Wizard —> Migration Wizard.

In the first Migration Wizard window you should select if you want to perform a
novice or advanced migration.

Using the novice option, the DB2 OLAP Server users and groups are not
migrated. To migrate users and groups, select Advanced. During a novice
migration, you can select which types of objects to migrate, but you cannot select
individual objects. For example, you can choose to migrate all report scripts
associated with an application, but you cannot select individual report scripts.

Chapter 7. Administration Services 335


Using the advanced option, the DB2 OLAP Server users and groups that have
access to the application, or to databases in the application, are migrated, and
you can specify how security permissions are migrated with those users and
groups. You can also select individual users and groups to migrate. During an
advanced migration, you can select individual objects to migrate, such as a
particular report script.

We will give you an overview of each panel in the Migration Wizard and how to
use them:
1. In the first Wizard Migration panel you should inform the user level (novice or
advanced), the source DB2 OLAP Server and the target DB2 OLAP Server.
Figure 7-37 shows the first Wizard Migration panel. In this case we are
selecting to migrate applications and databases from the DB2 OLAP Server in
the sicily machine (AIX) to Cayman (also AIX) environment. We are using the
advanced option.

Figure 7-37 Migration Wizard: dialog box 1

336 DB2 OLAP Server V8.1: Using Advanced Functions


2. In the second Wizard Migration dialog box, you should select the source
application (the name of the application you want to migrate) and you should
select the target application. The target application can be a new application
on the target OLAP Server, or it can be an existing application.
You cannot migrate more than one application at the same time.
3. In the third Wizard Migration dialog box, you can filter the objects you want to
migrate. In Figure 7-38 we are selecting only the database onlinei.
The databases that are not checked will not be migrated. You can only select
individual objects, as report and calculation scripts, when you are using the
migration advanced option.

Figure 7-38 Migrating Wizard: dialog box 3

4. If you are executing an advanced migration you will receive more three dialog
boxes where you can:
– Specify how security permissions for users and groups are migrated. The
permissions on the source server are unaffected. The options for
migrating permissions are:

Chapter 7. Administration Services 337


• Do not change permissions of user/group: If the users/groups being
migrated already exist on the target OLAP Server, their permissions on
that server are not changed in any way.
• Reduce permissions of user/group: If the users/groups being migrated
already exist on the target OLAP Server, and if their permissions for the
application being migrated on the target server are higher than on the
source server, their permissions on the target server are reduced to the
same level as the source server after migration.
• Grant extra permissions to user/group: If the users/groups being
migrated already exist on the target OLAP Server, and if their
permissions for the application being migrated on the target server are
lower than on the source server, additional permissions are granted on
the target server after migration.
– Select the Copy supervisors check box to migrate supervisors. You cannot
select this option unless you are also a supervisor.
– Select individual users in the panel, Individual Users to Migrate.
– Select individual groups in the panel, Individual Groups to Migrate.

Monitoring performance
Administration Services provides tools to help you monitor and adjust the DB2
OLAP Servers caches.

Administration Services provides also information about the operating system


and disk drivers usage, to monitor the Operating system during execution of DB2
OLAP Server processes. These tools are very helpful if you don’t know the
operational system commands to monitor memory and disk usage or if you want
to monitor the operating system remotely.

Administration Services can display monitor information for multiple servers at


the same time. For example, you can monitor the cache usage or the operational
system memory usage in your multiple OLAP Servers in an Enterprise Services
cluster environment at the same time.

Some of the Administration Services Console tools that you can use to monitor
DB2 OLAP Server performance are:
1. Runtime hit ratios:
You can use the hit ratio values to monitor the usage of DB2 OLAP Server
cache. The hit ratio data of a cache represents the percentage of time that a
requested piece of information that is already in the cache.

338 DB2 OLAP Server V8.1: Using Advanced Functions


A higher hit ratio indicates that the data is in cache more often. This improves
performance because the requested data does not have to be retrieved from
disk for the next process. A hit ratio of 1.0 indicates that every time data is
requested, it is found in the cache. This is maximum performance possible
from a cache setting.
To see the runtime hit ratio values in using the Administration Services
Console go to Enterprise View or a custom view, expand the database in
which you want to work, right-click the Edit properties icon, then Folder
Statistics —> Option Run-Time.
In Figure 7-39, you can see that the “hit ratio on index data cache” displays
the value 1.00. This is the best value and indicates that every time DB2 OLAP
Server requested a read in a index it was already in the cache.

Figure 7-39 Hit ratio on Administration Services

You can monitor the following hit ratios:


– Hit ratio on index cache: Indicates the success rate of the DB2 OLAP
Server kernel in locating index information in the index cache without
having to retrieve another index page from disk.
– Hit ratio on data file cache: Indicates the success rate of the DB2 OLAP
Server kernel in locating compressed data files in the data file cache
without having to retrieve them from disk.

Chapter 7. Administration Services 339


– Hit ratio on data cache: Indicates the success rate of the DB2 OLAP
Server kernel in locating data blocks in the data cache without having to
retrieve them from disk.
2. Operating System Monitor:
Administration Services has a window to view dynamic information about the
operating system on the DB2 OLAP Server machine and the resource usage.
This tool is very useful to monitor the operating system remotely.
Administration Services enables you monitor more than one server at the
same time. You can compare resource usage of multiple DB2 OLAP Server.
For example in an Enterprise Services cluster environment you can verify the
resource usage of your different servers and redistribute the workload if
necessary. See 5.3.4, “Workload balancing” on page 138 for more information
about workload balancing on an Enterprise Services cluster environment.
To see the operating system information using the Administration Services
Console go to Enterprise View or a custom view, right-click the DB2 OLAP
Server you want to monitor, and select Edit properties —> folder OS.
In Figure 7-40 we compare information on two different DB2 OLAP Servers,
localhost that is a Windows machine and Cayman that is a AIX machine.

Note: Depending of the machine configuration or operating system, the


Administration Services Console cannot capture all information. In Figure 7-40
the memory information of the Cayman machine (AIX 4.3.3) could not be
displayed.

340 DB2 OLAP Server V8.1: Using Advanced Functions


Figure 7-40 Operating System monitor

3. Disk drivers usage:


Administration Services has a window to view dynamic information about the
disk usage on the DB2 OLAP Server machine.
This tool is very useful to monitor the disk usage during a load process and
during a calculation process or to evaluate the driver to a new database.
To see the disk drivers information using the Administration Services Console
go to Enterprise View or a custom view, right-click the DB2 OLAP Server you
want to monitor, and select Edit properties —> folder Disk drivers.
Figure 7-41 displays information on two different DB2 OLAP Servers. In the
localhost machine (Windows), the Administration Services Console cannot
display information about drivers E and H because they are not local drivers,
they are mapped drivers. In the Cayman machine (AIX) you can see
information from all file systems mounted.

Chapter 7. Administration Services 341


Figure 7-41 Disk drivers monitor

Executing processes in background


Using Administration Services you can execute processes as calculations and
loads in the background. You can then perform other tasks or exit the console
while the process continues to run. Using Application Manager you cannot
perform other tasks or exit the Application Manager window while a process is
running.

A message panel (see Figure 7-42) in the Administration Services Console


window tells when the process is completed.

Figure 7-42 Background execution status

342 DB2 OLAP Server V8.1: Using Advanced Functions


You can also use the window, View background processes, to check the status of
background processes. This window displays the status of background
processes initiated by you or by other administrators. To check the status of
processes running in the background:
– Open the Administration Services Console.
– Select Tools —> View background processes.

The Background Process Status window (see Figure 7-43) lists all processes
that are currently running in the background or that have completed. All
background processes are displayed in this list until you manually delete them.

To delete a row from the list, select the row and click Delete.

Figure 7-43 Viewing background processes status

When you start a process in background, an ID for that process is displayed in


the message panel (Figure 7-44).You can use the object ID to track the status of
the background process.

Figure 7-44 Process ID

7.4.3 Managing logs


Using Log Analyzer, you can filter, search, and analyze OLAP Server logs and
application logs.

Administration Services Console message panel


The Administration Services Console messages panel is displayed along the
bottom of the console window.

Chapter 7. Administration Services 343


The Messages panel displays DB2 OLAP Server error messages and
Administration Services error messages.

The DB2 OLAP Server error messages returned are identified by an error
message number. Figure 7-5 shows an OLAP Server message error example.
Notice that a DB2 OLAP Server error number was generated. You can use the
DB2 OLAP Server Error messages manual to get more information about the
error message.

Example 7-5 DB2 OLAP Server error


localhost:Demo:BasicDbGetPropertiesSat Jun 01 02:46:25 BST 2002
ERROR:1053001: Cannot open object file: C:\IBM\db2olap\\app\Demo\Basic\file.lst

Example 7-6 is an Administration Services error message. It indicates that


Administration Services Console connection with the Administration Server
exported because of inactivity. You should login again.

Example 7-6 Administration Services error


Session FailureSessionFri May 31 14:33:25 PDT 2002
ERROR:-1: Please relogin

You can execute the following actions with the messages displayed in the
Administration Services Console message panel:
򐂰 Clear
򐂰 Select (to copy and paste)
򐂰 Save (in a text file format)
򐂰 Print
򐂰 Send an e-mail with the messages (See “E-mail” on page 357).

To execute these actions, right-click the menu panel. See Figure 7-45.

Figure 7-45 The message panel

If you want to close the Administration Services panel, right-click the Messages
button and select the option Hide. See Figure 7-46.

344 DB2 OLAP Server V8.1: Using Advanced Functions


Figure 7-46 Closing the message panel

To see the Administration Services message panel again, select the menu View
and select the Messages check box.

DB2 OLAP Server and Application message logs


Using Administration Services you can display the DB2 OLAP Server messages
log (Essbase.log) and the application messages log (<appname>.log).

Administration Services provides a easy way to analyze the DB2 OLAP Server
logs and application logs. Using the Administration Services log analyzer you
can filter messages by date, by message type and by message content.

To see a DB2 OLAP Server messages log, go to Enterprise View or a custom


view, right-click the DB2 OLAP Server you want to work, and select the option
View log....

To see an application messages log, go to Enterprise View or a custom view,


expand the DB2 OLAP Server, expand the applications icon, right-click on the
application on which you want to work, and select the option View log....

In Figure 7-47, we are filtering the messages for contents where the username
that received the message is olapcay.

Chapter 7. Administration Services 345


Figure 7-47 Filtering messages

In the drop-down list, Show messages, you can choose one of the following
options:
򐂰 That contains
򐂰 That does not contain
򐂰 For user
򐂰 For application
򐂰 For database

Figure 7-49 shows the log analyzer message folder. The message folder has a
intuitive graphical interface that helps you easily find and understand the DB2
OLAP Server messages and the application messages.

346 DB2 OLAP Server V8.1: Using Advanced Functions


Legend:
Error message

Information message

Warning message

Figure 7-48 Log analyzer message folder.

The Administration Services Console also provides different types of charts to


analyze the messages activity in your DB2 OLAP Server or application.

To open the DB2 OLAP Server log chart viewer, go to Enterprise View or a
custom view, right-click the DB2 OLAP Server on which you want to work, and
select the option View log charts.

To open the application log chart viewer, go to Enterprise View or a custom view,
expand the DB2 OLAP Server, expand the applications icon, right-click on the
application on which you want to work, and select the option View log charts.

Chapter 7. Administration Services 347


The Administration Services Console provides the following type of charts:
– Log activity (Bar): Displays the number of error, warning, and information
messages that the log contains. Available for both application and server
logs. This chart is available as a bar chart or a pie chart.
– Log activity (Pie): same as above, using the chart pie format.
– Spreadsheet query times: Displays elapsed spreadsheet query times as
recorded in the log. Available only for application logs.
– Calculation times: Displays elapsed calculation times as recorded in the
log. Available only for application logs.
– Errors per day: Displays the number of error messages per day as
recorded in the log, for the last 14 days (including the current day) only.
Available for both application and server logs.
– Login per user: Displays the number of login per user as recorded in the
log. Available only for server logs.
Figure 7-49 shows a chart that contains the log activity in a pie format.

Figure 7-49 Log analyzer chart folder

DB2 OLAP Server version 8.1 provides new messages in the DB2 OLAP Server
messages file (ABORPATH/Essbase.cfg) that provide more control about
security. The new server log messages include:

348 DB2 OLAP Server V8.1: Using Advanced Functions


򐂰 The user name of anyone entering and incorrect password or changing a
password
򐂰 The IP address of the computer on which a user logs in
򐂰 The user name and groups name when the user or group is deleted

You can use Administration Services and Log Analyzer to display these
messages as shown on Figure 7-50.

The user “user2” was removed The user db2admin entered an


from the DB2 OLAP Server. incorrect password. This is
This is displayed as an displayed as an error message.
information message.

The ip number (127.0.0.1) of the


computer on which a user logged in
DB2 OLAP Server. This is displayed
as an information message.

Figure 7-50 OLAP Server log enhancements.

7.4.4 Managing scripts


In Administration Services, all script editors (Calculation Script Editor, MaxL
Script Editor and Report Script Editor) have a common look and feel. These
editors share common new features, such as color-coded syntax highlighting and
point-and-click member selection.

Chapter 7. Administration Services 349


MaxL
A new MaxL Script Editor is integrated with the Administration Services Console.
From the MaxL Script Editor, you can create, edit, save, and execute MaxL
statements and scripts. You can also use the editor to type and execute MaxL
statements interactively, to perform one DB2 OLAP Server operation at a time.
Results from MaxL statements are displayed within the editor.

The MaxL Script Editor in Administration Services provides new features that
helps you build MaxL statements interactively in a very easy graphical interface.

To access the MaxL Script Editor in Administration Services, go to Edit —> New
—> folder Scripts —> MaxL Script —> OK.

The tools provided by the MaxL Script Editor in Administration Services are:
򐂰 Auto-completion feature: when you start typing text in the editor, a list of
possible keywords/values is displayed. After you select the appropriate
keyword/value and press the spacebar to continue, successive drop-down
lists are displayed.
For example, in Figure 7-51 we typed d in the editor, and we were prompted
to select from a list of possible MaxL keywords: display and drop.
If you select display and press the spacebar, you are prompted to select from
a list of additional keywords for display — for example, application.
If you select application and press the spacebar, you are prompted to select
from a list of possible values for display application matching the
applications on the OLAP Server.

Figure 7-51 MaxL auto completion

򐂰 Syntax color coding: The MaxL Script Editor color-codes different


components of MaxL scripts to a better visualization and comprehension of
the syntax (see Figure 7-52).

350 DB2 OLAP Server V8.1: Using Advanced Functions


Black: Literal values for Light blue: Path and file
MaxL keyworkds. references and dimension/
member names that
Red: Parameters requires quotations marks.
for MaxL keywords.

Blue: MaxL Keywords. Green: Comments.

Figure 7-52 MaxL color coding

򐂰 Toolbar:
When you open the MaxL Script Editor, a special toolbar is displayed.
Figure 7-53 shows the functions available in this toolbar.

Set properties Define or update


Define the for the MaxL variables.
DB2 OLAP Script Editor.
Server.

Expand Run the MaxL


Include references variables and
to another MaxL file. script.
file references
in the script.

Figure 7-53 MaxL Script editor toolbar.

Chapter 7. Administration Services 351


򐂰 Properties of the MaxL Script Editor:
You can customize the editor to suit your preferences, you can change the
editor and result set properties and you can choose how the MaxL Script
Editor will proceed in a error or undefined variable situation. The following are
the properties you can change:
– Editor
• Enable auto-completion: When auto-completion is enabled, the MaxL
Script Editor prompts you with lists of relevant keywords/values as you
type.
• Enable GUI help with auto-completion: for example, if you are typing
the create filter statement, the MaxL Script Editor launches the
Filter Editor to help you complete the filter definition through the GUI,
and then completes the MaxL statement for you.
• Font size
• Font name
– Result set
• Echo statements: Clear this check box if you do not want to see MaxL
statements in the Results panel.
• Keep results in one tab: Select this check box to display the results for
each MaxL statement in one tab in the Results panel.
• Font size
• Font name
– Errors during execution
• Stop execution: stops script execution completely when an error
occurs.
• Prompt to continue: prompts you to continue or stop execution when an
error occurs.
• Ignore and continue: ignores errors and completes the execution.
– Undefined variables
• Stop execution: stops script execution completely when an undefined
variable is encountered.
• Prompt to continue: prompts you to define any undefined variables that
are encountered.
• Ignore and continue: ignores undefined variables and completes the
execution.

352 DB2 OLAP Server V8.1: Using Advanced Functions


After the execution of a MaxL script in the MaxL Script Editor, the results panel
(see Figure 7-54) is displayed.

Figure 7-54 MaxL Script Editor result panel

For more information about MaxL language see DB2 OLAP Server MaxL User’s
Guide and for the complete MaxL syntax reference see the DB2 OLAP Server
Technical Reference.

Calculation scripts
Using the Calculation Script Editor provided by Administration Services you can
edit your calculation scripts using a customized right-click menu or using a
toolbar. You can check the syntax, search for members or commands and
point-and-click for member selection. The Administration Services Console
Calculation Script Editor has also a color-coding of calculation script syntax,
improving readability.

Calculation scripts specify exactly how you want to calculate a database. For
example, you can calculate only some dimensions of a database or use special
formulas. Calculation scripts can override the database consolidation as defined
in the database outline.

You can associate a calculation script with a specific database or with all
databases in an application. In Enterprise View, a container node for calculation
scripts appears under each application and database.

To open the calculation script editor,go to Enterprise View or a custom view,


expand the DB2 OLAP Server, expand the Applications icon, expand the
Databases icon, expand the database on which you want to create the
calculation script, right-click the Calculation Scripts icon, and select the option
Create calculation script (see Figure 7-55).

Chapter 7. Administration Services 353


Figure 7-55 Creating a calculation script

Using the Calculation Script Editor (see Figure 7-56), you can search for
members or commands and point-and-click for member selection. You can also
type the contents of a calculation script directly into the text area of the
Calculation Script Editor.

354 DB2 OLAP Server V8.1: Using Advanced Functions


Figure 7-56 Calculation script editor.

There is a toolbar in the menu, to work with calculation script editor. See
Figure 7-57.

Use this button to


Use this button to execute the
verify the syntax calculation.
of your script.
Use this button to
associate the
script with an outline.

Figure 7-57 Calculation scripts buttons.

Report scripts
The Report Script Editor in the Administration Services Console, provides
features to help you to build report scripts quickly. The syntax is color-coded to
improve readability, and members and report commands are displayed in tree
views within the editor to help you insert them into your scripts easily.

Chapter 7. Administration Services 355


Using the Report Script Editor you can write scripts to generate reports that can
exceed the capabilities of even the most robust spreadsheet. In the Report Script
Editor, you use report commands to define formatted reports, export data
subsets from a database, and produce free-form reports. You can then execute
the script to generate a report

To access the Report Script Editor in Administration Services, go to Edit” —>


New —> folder Scripts —> Report Script —> OK.

Using the Report Script Editor (see Figure 7-58), you can search for members or
commands and point-and-click for member selection. You can also type the
contents of a report script into the text area of the Report Script Editor.

Figure 7-58 Report Script editor

When you open the Report Script Editor, a toolbar is displayed. This toolbar is
the same that is displayed for the Calculation Script Editor. See Figure 7-57 for
more information about the toolbar.

After the execution of a report script in the Report Script Editor, the Report
Viewer is displayed with the results as shown in Figure 7-59.

356 DB2 OLAP Server V8.1: Using Advanced Functions


Figure 7-59 Report Viewer

For more information about the report commands to build a script, see DB2
OLAP Server Technical Reference.

7.4.5 Miscellaneous
Additional miscellaneous are provided in Administration Services.

E-mail
You can send DB2 OLAP Server information to other administrators via e-mail.
For example, you can send properties information or the content of
Administration Services logs via e-mail to another Administration Services
administration adding some comment. To enable this functionality, an outgoing
mail (SMTP) server must be specified on the Administration Server computer.

The SMTP (Simple Mail Transfer Protocol) is a protocol for sending e-mail
messages between servers.

To specify an outgoing mail server, start the Administration Server and in the
Essbase Administration Server window, select the menu View and the option
Configuration. In the E-mail server area, enter the name of the SMTP server.

Chapter 7. Administration Services 357


Then you should select the menu Action and the option Update. If is necessary,
restart the EAS Server for the setting to take effect.

Access to manuals
From the Administration Services Console Help menu you can easily access the
DB2 OLAP Server manuals:
򐂰 Calculation functions: DB2 OLAP Server Technical Reference, Essbase
Functions session
򐂰 Calculation commands: DB2 OLAP Server Technical Reference, Calculation
Commands session
򐂰 Report commands: DB2 OLAP Server Technical Reference, Report Writer
Commands session
򐂰 MaxL statements: DB2 OLAP Server Technical Reference, MaxL Statements
session
򐂰 Configuration settings (essbase.cfg): DB2 OLAP Server Technical Reference,
Essbase Configuration File Settings (essbase.cfg) session
򐂰 Essbase error messages: DB2 OLAP Server messages help
򐂰 Database Administrator’s Guide: DB2 OLAP Server Administrator’s Guide

Print properties
In the Administration Services Console you can print contents of MaxL scripts,
Reports, Scripts, Message panel and other windows. To print these contents,
click the object you want to print and Select File —> Print.

7.5 Implementing Administration Services


In this section, we present a step-by-step implementation of Administration
Services and a checklist of the required actions to be performed. You will also
find guidelines to install the different Administration Services components and
how to manage users.

Table 7-6 contains a checklist you can use to make sure every required step is
being performed.

358 DB2 OLAP Server V8.1: Using Advanced Functions


Table 7-6 Administration Services step by step implementation
Phase Step Section

Preparing for installation Check the prerequisites 7.5.1, “Preparing for


installation” on page 360
– For DB2 OLAP Server
– For Administration
Services
Decide scenario 7.3, “Administration Services
configurations” on page 283

Installing DB2 OLAP Server Installing DB2 OLAP Server: 7.5.2, “Installing DB2 OLAP
v8.1 Server components” on
– Full OLAP Intallation
page 360
– OLAP Runtime Client
Checking the ARBORPATH , “Verifying the ARBORPATH
variable” on page 361

Installing Administration 7.5.3, “Installing


Services Administration Services” on
page 362

Starting Administration Starting the Administration Services , “Starting and stopping


Services Server Administration Server” on
page 364

Starting the Administration Services , “Starting and stopping


Console Administration Services
Console” on page 368

Setting Users - Defining Users 7.5.5, “Setting up users” on


- Associating OLAP Server to users page 371
- Modifying users properties
(optional)

Performing Backup Backing up users information 7.5.6, “Backing up


Administration Services users
information” on page 384

Creating views Creating custom views 7.5.7, “Creating views” on


page 385

Chapter 7. Administration Services 359


7.5.1 Preparing for installation
Before installing Administration Services, it is necessary to check which are the
prerequisites for it and which are the supported platforms, for the graphical
Console and for the server itself. Then you must decide which deployment
scenario is the most convenient for your environment. To see some sample
scenarios that can help you define with is the best for your environment, see
Administration Services configurations.

Prerequisites and supported platforms


The computer hosting the Administration Server requires at least, a runtime
client in order to connect to and communicate with DB2 OLAP Server servers.
This runtime client must be Essbase Runtime Client Release 6.5.1 or its equal
IBM DB2 OLAP Server.

If you already have a previous version of an OLAP Server running in the machine
where you are about to install Administration Services, you must migrate it to the
6.5.1 version.

If you attempt to install the Administration Server on a computer that does not
have, at a minimum, Essbase Runtime Client Release 6.5.1 installed, the
Administration Services installation program reminds you to do so before
proceeding with installation.

Administration Services can work in a variety of platforms. For a complete detail


of the supported platforms and system requirements for the Administration
Server and Console, refer to the Administration Services Installation Guide.

7.5.2 Installing DB2 OLAP Server components


Administration Services needs, at a minimum, a runtime client version 6.5.1 of
OLAP Server. In the same machine as AS, you can have only the runtime client
or a full DB2 OLAP Server installation. Administration Server uses the runtime
client to communicate with local or remote DB2 OLAP Servers.

Full installation
If you want to install the full code of DB2 OLAP Server, follow the installation
procedure described in DB2 OLAP Server Installation Guide.

Runtime client
To install only the runtime client, follow the steps explained in the DB2 OLAP
Server Installation Guide.

360 DB2 OLAP Server V8.1: Using Advanced Functions


Remember that Administration Services required Essbase 6.5.1 version to work
and to communicate with the OLAP Servers.

Attention: If you have an installation of a previous version of DB2 OLAP


Server in the machine, the installation process of Essbase Runtime client
v6.5.1 will modify the ARBORPATH variable, and you will not be able to use
your previous installation, until you change the variable back again. Be careful
when modifying this variable because it has to be well set up for
Administration Services to work.

The required version of Essbase Runtime Client is packed with Administration


Services and DB2 OLAP Server v8.1.

Since Administration Services requires a version of Essbase that is not


compatible with DB2 OLAP Server v8.1, you cannot use both installations at the
same time. Both update the same ARBORPATH variable that Administration
Services uses to work. Because of this reason, you cannot use DB2 OLAP
Server installed on the same machine of Administration Services.

Verifying the ARBORPATH variable


Make sure the ARBORPATH environment variable is set. ARBORPATH specifies
the root installation directory for the OLAP Server or the runtime client. Because
the computer hosting Administration Services requires, at a minimum, the 6.5.1
release files in order to work properly, an OLAP Server installation directory must
already exist on that computer before installing Administration Server.

If the ARBORPATH environment variable is not set, the installation program uses
a default location for installation that you can modify.

To modify the ARBORPATH in Windows platforms (see Figure 7-60):


1. Go to: Start —>Settings —>Control Panel —>System —>Advanced
—>Environment Variables
2. Double-click the row with the ARBORPATH variable.
3. Change the path to the correct installation.
4. Click OK

Chapter 7. Administration Services 361


Figure 7-60 Setting the ARBORPATH variable

For more information about how to set the ARBORPATH variable, refer to the
DB2 OLAP Server Installation Guide.

7.5.3 Installing Administration Services


To install Administration Services follow the instructions in the Administration
Services Installation Guide.

During the installation, you will be asked to choose which components to install.
The options are:
򐂰 Perform a complete installation, which installs the server and the graphical
console in the same machine.
򐂰 Install only the server component.
򐂰 Install only the Graphical console.

362 DB2 OLAP Server V8.1: Using Advanced Functions


Figure 7-61 shows the prompt screen, Choose Product Features, during
installation. In the right part of the screen you can choose the components to
install and in the left side of the screen there is an information panel, to see which
steps are you performing in Administration Services installation procedure.

Figure 7-61 Choose Product Features Prompt Screen

Remember that you can install Administration Services in a variety of scenarios.


To see some sample scenarios, refer to “Administration Services configurations”
on page 283.

After this step, you must provide a path for the directory where to install the
product, for example C:\IBM\db2olap\eas. At the end, you need to choose if you
want to create a shortcut for Administration Services.

Documentation files are installed to the Administration Server so that other


console users can access documentation from the Administration Services
Console without needing to install it locally.

7.5.4 Starting Administration Services


After installing Administration Services, and starting the necessary DB2 OLAP
Servers, you are ready to start the Administration Services (AS) Server or
Administration Server and the graphical Console.

Chapter 7. Administration Services 363


Starting and stopping Administration Server
򐂰 To start the Administration Server:
a. Execute the adminsvr file from the directory to which you installed the
Administration Server (.exe on Windows platforms, .sh on UNIX
platforms). The location of the adminsvr file can be different in each
installation. The default installation is
ARBORPATH\eas\server\bin\adminsvr.exe
b. If you chose to add shortcuts to the Start menu during installation, you can
also start the Administration Server by selecting Start —> Programs —>
Administration Services —> Administration Server, or the shortcut you
chose during the installation process.
When the Administration Server starts properly, you see the following
message in the server window:
Starting service Tomcat-Apache
Apache Tomcat/4.0.2
If you do not see this message, the Administration Server has not started
properly.

Figure 7-62 shows the Administration Server window. You will receive a message
like the one shown in the figure. Leave the window open.

In the Administration Server window, you have several controls. Look at


Figure 7-62. There are the start/stop controls, which lets you start and stop the
server in an easy way.

364 DB2 OLAP Server V8.1: Using Advanced Functions


Start/Stop
Controls
Save to Log

Clear log

Change View
Tabs

Figure 7-62 Administration Server window

Now look at the Change View tabs in the bottom part of the screen. These tabs
enable you to see different kind of information:
򐂰 Log tab: All the messages from the server can be seen from this screen.
򐂰 Configuration tab: These are the Administration Services default
configuration parameters like the port in which Administration Services listen,
the memory usage parameter and the e-mail server, to send notification
e-mails.
򐂰 Environment tab: This is the JAVA environment information. The classes and
their values.

You can change the view by just clicking in any of the tabs.

Chapter 7. Administration Services 365


Every action performed through Administration Services leaves a message in
this screen. When needed you can save this messages to a log file for further
analysis. You can choose where that log file will reside. If you want to save the
messages, click the button or go to Actions —> Save logs to file.... See
Figure 7-63.

Figure 7-63 Saving logs to a file

Then choose a directory where to store the log file, for example,
C:\IBM\db2olap\eas\logadmserver. See Figure 7-64.

366 DB2 OLAP Server V8.1: Using Advanced Functions


Figure 7-64 Saving logs to a log file

You also have the possibility of clear all the messages from the screen using the
Clear Log button.
򐂰 To stop the Administration Server:
a. From the Essbase Administration Server window, and select Server —>
Stop Administration Server (See Figure 7-65) or click the stop server
button. You will receive a message like the following in the server screen:
Stopping Hyperion Essbase Administration Server...
Current time stamp: Mon Jun 03 11:10:35 PDT 2002
Stopping service Tomcat-Standalone

Chapter 7. Administration Services 367


Figure 7-65 Stopping Administration Server

b. Now you can close the window.

Starting and stopping Administration Services Console


The Administration Services Console is a graphical user interface to administer
DB2 OLAP Server servers. To start the console you need to have Administration
Server running.
򐂰 To start the Administration Services Console, you can perform one of the
following options:
a. Launch the admincon file (.exe on Windows platforms, .sh on UNIX
platforms) from the directory to which you installed the Administration
Services Console, which is ARBORPATH\eas\console\bin\admincon for
the default installation
b. Go to Start —> Programs —> Administration Services —>
Administration Console (This is only available if you chose to create
shortcuts during the installation process).
In order to logon to Administration Services you should have an
Administration Services user id. If you are the administrator connecting for
the first time after installation, use the default user id and password.

368 DB2 OLAP Server V8.1: Using Advanced Functions


When the Administration Services Login dialog box is displayed (see
Figure 7-66), connect to Administration Services.
i. In the Administration Services dialog box, enter the Administration
Server name (hostname or IP number). If the Administration Server is
installed on the same machine as the Administration Services Console,
you can use “localhost”. For example, Fermium.
ii. Use the default user id: admin.
iii. Use the default password: password

You should inform the hostname or the ip number


of the machine that has the Administration Server
installed.

The default
user name The default
is “admin”. password is
“password”.

Figure 7-66 Administration Services Console login

If you connected using the default administrator information, change the


password for the administrator account immediately. See Setting users

The graphical console looks like Figure 7-67. You can edit the console in many
ways. You can change the console look and feel, and adapt it to your
preferences, and you can create your own enterprise views, to arrange the
objects you want to administer, as you prefer. For more information about
changing the console, see 7.5.7, “Creating views” on page 385.

Chapter 7. Administration Services 369


Console Toolbar Menu Bar

Navigation Panel Workspace Area Messages Panel

Figure 7-67 Administration Services Console

The graphical console has many panels. Here we provide a brief description of
each one:
򐂰 Menu Bar : Menus and menu items change dynamically depending on your
current focus. Click each one of the options takes you to the required action.
Most of the menu bar options are also available in right-click “context” menus.
򐂰 Console Toolbar: The main toolbar in the console provides quick access to
commonly used commands. The toolbar changes dynamically, depending on
what you have open in the console.

370 DB2 OLAP Server V8.1: Using Advanced Functions


򐂰 Navigation Panel: By default, the navigation panel displays the Enterprise
View tab, which is a graphical view of the OLAP Server environment. In this
panel, you can view and manage objects in Enterprise View, and you can
copy a subset of the Enterprise View tree to a separate tab in the navigation
panel. The navigation panel can have the Enterprise View tabs and MyView
tabs, which are custom views of the OLAP Environment.
򐂰 Workspace Panel: The workspace panel contains one or more windows
and/or dialog boxes. The workspace panel contains the following
components:
– Script editors, where calculation scripts, report scripts, and MaxL scripts
are managed.
– Windows that enable you to view and manage logs, view and edit
properties, check application/database status, monitor user sessions and
locks, view outlines, and so on.
– Dialog boxes.
Multiple windows can be open at one time.
򐂰 Messages Panel: The Messages Panel is displayed along the bottom of the
console window. When a message is returned from the OLAP Server or from
the Administration Server, it is displayed in this area.
The Messages panel displays error messages and status information. Use
the right-click menu in this panel to clear messages or copy messages to
another program.
If you want to close any of the panels, select the View menu and clear the
panel check box you want to close.
To shut down the console: Select File —> Exit.

7.5.5 Setting up users


After login into the Administration Server you must create users on the
Administration Server and associate them to the DB2 OLAP Server they will
administrate.

You may have two kinds of users in Administration Services:


򐂰 Administrator users: These users are intend to perform the most important
actions like defining security, create other users, add or remove DB2 OLAP
Servers from ordinary users properties panel, etc.

Chapter 7. Administration Services 371


򐂰 Ordinary users: These users will mostly change their own properties, like
their password, and they can add a new DB2 OLAP Server for their own
access. They cannot add OLAP Servers to be used by another user. Ordinary
users can create new custom views and change the look and feel of the
console.

Administration Services users are not the same as the DB2 OLAP Server users.
You only need to create users on the Administration Server if they will be using
the Administration Services Console to manage DB2 OLAP Server. The existing
DB2 OLAP Servers users cannot use Administration Services until they
have been created as users on the Administration Server.

Creating users in Administration Services


To create users, you have two options:
򐂰 Use the User Setup Wizard
򐂰 Create them manually.

Creating users using the User Setup Wizard


1. In the first connect, after the Administration Services installation, the User
Setup Wizard is displayed. This wizard can help you through the process of
performing the two main steps:
1. Create the Administration Services user.
2. Associate the user with DB2 OLAP Server.

To create the user:


1. Verify that the Administration Server is started, otherwise start it.
2. Start the Administration Services Console.
3. If the Wizard is not open, launch it by going to Wizards —>User Setup
Wizard. See Figure 7-68.

372 DB2 OLAP Server V8.1: Using Advanced Functions


Figure 7-68 Launching the User Setup Wizard

4. When prompted, complete the required information:


a. Username: This is the username for the Administration Server user. It is
not necessary that this user matches the DB2 OLAP Server username.
For example, ibmuser.
b. E-mail Address: This address is used when sending DB2 OLAP Server
information via e-mail, like failure messages. For example,
ibmuser@us.ibm.com
c. E-mail Full Name: Enter the user’s full name. For example, IBM
Administrator.
d. Password: the user’s password. The password does not have to match the
user’s DB2 OLAP Server password. For example, password.
e. Confirm password: re-enter the password.

Chapter 7. Administration Services 373


f. Administrator privileges: You can choose if the user will have administrator
privileges (true) or not (false). For example, true. Figure 7-69 shows the
User info panel.

Figure 7-69 User Information Panel

g. Click Next. If you want to associate the user with the OLAP Servers he will
access, complete the information required. To complete this step refer to ,
“Associating users with OLAP Servers” on page 378.
h. If you do not want to associate an OLAP Server, click Next again to
confirm the creation of the user.
i. In the next screen you have the option to create another user by checking
the box, Create another user.
j. Press Finish.

You must see the user created in the Navigation Panel. See Figure 7-70.

374 DB2 OLAP Server V8.1: Using Advanced Functions


Every time you perform actions in Administration Services Console you have log
messages in this screen. Check the bottom part of the screen.

Figure 7-70 User ibmuser created

Creating users manually


If you do not want to use the wizard, you can add users in the Navigation Panel
by doing the following:
1. Click Users in the Navigation Panel.
2. Right-click it and select Create user...See Figure 7-71.

Chapter 7. Administration Services 375


Figure 7-71 Creating users in the navigation panel

1. When prompted the Create user on Administration Services window (see


Figure 7-72), complete the information required as you did in the wizards:
a. Username, for example, asuser
b. E-mail full name, for example Administration Services User
c. E-mail address, for example asuser@us.ibm.com
d. Password, for example password
e. Confirm password
f. Administrator privileges, for example, TRUE.

376 DB2 OLAP Server V8.1: Using Advanced Functions


Figure 7-72 Create user window

2. Click OK. You will receive a message like this one:


The user listed below has been added.
asuser
3. Click OK again.

Now the user has been added in the Navigation Panel (Figure 7-73).

Chapter 7. Administration Services 377


Figure 7-73 New user in the navigational panel

Associating users with OLAP Servers


After creating the Administration Services users you should associate those
users with the specific DB2 OLAP Servers you want to administer.

When you log into Administration Services, the Administration Server handles
your connections to DB2 OLAP Servers, applications, and databases. You do not
need to connect to individual DB2 OLAP Servers after your initial login to
Administration Services.

When defining which DB2 OLAP Server to associate with, you must inform the
name of the server and the user you want to use to connect to OLAP server. this
capability enables Administration Services users to connect to various DB2
OLAP Servers using a single sign-on.

Figure 7-74 shows an example of single sign on. The OLAP Administrator person
has two DB2 OLAP Servers to manage (A and B) with different users (olapcay,
olapsi). This administrator can create a unique user in Administration Services
(user=ibmuser) and he can specify that the user “ibmuser” will have access to
DB2 OLAP Server A (as the user olapcay) and DB2 OLAP Server B (as the
user olapsi).

378 DB2 OLAP Server V8.1: Using Advanced Functions


Administration Services

user=ibuser - AS Administrator

DB2 OLAP Server A DB2 OLAP Server B

Application Application
Onlinei ebank
Database Database
Onlinei ebank

user=olapcay user=olapsi
OLAP Supervisor OLAP Supervisor

Figure 7-74 Administration Services single sign-on

򐂰 To associate the user with OLAP Servers, follow these steps:


a. If you have the Wizard open, go to the OLAP Server Connections Screen.
b. If you do not have the Wizard open, right-click the name of the user you
want to edit, and click Edit properties. See Figure 7-75.

Chapter 7. Administration Services 379


Figure 7-75 Associating OLAP servers to users

c. Go to the OLAP Servers window.


d. Click the first row where it says Click here to add in grey.
e. Complete the information required:
• OLAP Server: The host name or the TCP/OP address of the DB2
OLAP Server you want to access. If the DB2 OLAP Server is on the
same machine as the Administration Server, you can use “localhost”.
For example, Cayman.
• Username: Enter the DB2 OLAP Server username, this user will be
used to connect to the OLAP Server. For example, olapcay.
• Password: Enter the password for the OLAP Server user, for example,
olapcay1.
• Confirm Password: re-enter the OLAP Server user’s password
• Set button: Click this button to apply your settings.
• Delete button: Select a row and click this button to delete the OLAP
Server.

380 DB2 OLAP Server V8.1: Using Advanced Functions


Figure 7-76 shows the OLAP Server added.

Figure 7-76 OLAP Servers window

In Figure 7-77 the Administration Services user, “ibmuser” is accessing three


DB2 OLAP Servers: Localhost, Sicily and Cayman. The Localhost indicates that
Administration Services and the DB2 OLAP Server are installed on the same
machine.

To access the DB2 OLAP Server on localhost, Administration Services uses the
username “db2admin”. To access the DB2 OLAP Server on Sicily machine,
Administration Services uses the username “olapsi”. To access the DB2 OLAP
Server on the cayman machine, Administration Services uses the username
“olapcay”.

Chapter 7. Administration Services 381


“ibmuser” is the
Administration
This is the user id you want to use to connect Services userid
that is being
to the OLAP Server. In thisexample we are using configured.
an OLAP Server supervisor user.

Three different
DB2 OLAP Servers

Hostname of the
Administration Server.

Figure 7-77 Adding a OLAP Server to a user

The above is an example of a single signon. The user ibmuser, connects only
once to Administration Services Console, using his username and password,
and the Administration Server connects him to all the OLAP Servers he is
associated with.

Based on the rights that the ibmuser has on DB2 OLAP Server, is the access to
the applications they have in Administration Services. For example, in
Figure 7-77, if the DB2 OLAP Server userid “olapcay” is a supervisor on DB2
OLAP Server, the user “ibmuser” (Administration Services user) can execute all
operations and commands on the OLAP Server Cayman. But if the userid
“olapcay” is an ordinary user it can only execute operations and commands
allowed by its privileges.

If you want to add more OLAP Server servers to the user ibmuser, follow the
steps explained above.

382 DB2 OLAP Server V8.1: Using Advanced Functions


If you need more information about users and security, refer to DB2 OLAP Server
Administrator’s Guide, SC18-7001 on managing security for users and
applications).

After defining the DB2 OLAP Servers, the Enterprise view in the Navigation
Panel is updated with the DB2 OLAP Servers. Figure 7-78 shows the OLAP
Server for the user ibmuser.

Figure 7-78 Enterprise View for user ibmuser

Modifying users properties


To modify the properties of an existent user, like their password:
1. Go to the name of the user and right-click it.
2. Select Edit Properties...
3. In the window prompted in the workspace area, press Edit user.
4. Change the password for the administration user or any other property you
want to change (see Figure 7-79).

Chapter 7. Administration Services 383


Figure 7-79 Editing user properties

5. Then press Apply to apply the changes or Revert, to undo the changes.
6. Click Close.

Remember that is convenient to change the password of the administrator user


immediately after starting the graphical console for the first time.

7.5.6 Backing up Administration Services users information


After you created the Administration Services users, it is recommended to make
a backup copy of the database used to store Administration Services users
information. To back up this database:
1. Go to the directory where Administration Services is installed, for example
\as\server
2. Make a back up of the dbms directory

It is recommended to do this after creating the users, but before starting to work
with Administration Services. Then, you can revert to the backup directory if you
have problems.

384 DB2 OLAP Server V8.1: Using Advanced Functions


7.5.7 Creating views
When starting the Administration Services Console, the Enterprise View tab is
displayed by default in the navigation panel. The Enterprise View is a graphical
tree view of the objects managed trough Administration Services. Figure 7-80
shows the Administration Servers and DB2 OLAP Servers selected.

Figure 7-80 Administration Services Enterprise View

The view of the OLAP environment may look differently from one administrator to
another one. Administrators can customize the way to see the objects they are
administrating by creating their own custom views.

A custom view is a subset of an Enterprise View. You create a custom view to


make your own representation of the OLAP Environment. The only way to
configure Enterprise View is to create a custom view. You cannot change the
order of objects in Enterprise View and you cannot remove objects from
Enterprise View without actually deleting them from the OLAP Server.

Attention: You cannot delete objects from the Enterprise View without
deleting them from the DB2 OLAP Servers they belong to. You can remove an
entire OLAP Server from the Enterprise View.

Chapter 7. Administration Services 385


When creating custom views, you add the objects you want to focus on, in
separate tabs in the navigation panel. Any custom view created is simply pointing
out to the same objects in the Enterprise View. Operations performed on objects
in the Enterprise View are reflected in custom views, and inversely.

To create a custom view, choose the object to include in the custom view:
1. Right-click and select Add to —>New custom view from the pop-up menu.
2. Drag the object to the empty space next to Enterprise View tab at the bottom
of the Navigation Panel.

The console creates a new tab called by default MyView1. This new tab contains
the object you selected, and everything under that object (see Figure 7-81).

Figure 7-81 New custom view

In the new custom view, you can see the object you selected and all the objects
under it, like the applications, databases, function, etc.

386 DB2 OLAP Server V8.1: Using Advanced Functions


After creating the view you can add new objects to this view. To add new objects,
select the object you want to include in the custom view and perform one of the
following actions:
1. Right-click, select Add to —>select the appropriate custom view, for
example MyView1.
2. Drag the object to the appropriate tab at the bottom of the navigation panel,
and drop it on the tab.

The console adds the object to the view as the last item in the tree.

You can also modify the look-and-feel of the console. Go to Tools —>Console
options and change the settings you want, like the font or the look-and-feel of
the windows.

Chapter 7. Administration Services 387


388 DB2 OLAP Server V8.1: Using Advanced Functions
8

Chapter 8. Additional enhancements


In this chapter we discuss various other enhancements, such as these:
򐂰 Direct I/O
򐂰 Security Migration Tool
򐂰 Multiple OLAP Agents on the same machine
򐂰 Custom Defined Functions

© Copyright IBM Corp. 2002. All rights reserved. 389


8.1 Direct I/O
In this section we first discuss the DB2 OLAP Server caches and their functions.
This should help you understand the main differences between buffered I/O and
direct I/O, and what is new in DB2 OLAP Server V8.1.

8.1.1 Understanding the DB2 OLAP Server caches


DB2 OLAP Server stores data in the disks in compressed blocks format. When
DB2 OLAP Server needs to access these blocks from disk to perform operations
(load, calculation and retrieval), it needs an area in buffer to store these
compressed blocks and another area in memory to store these blocks in
uncompressed format. See Figure 8-1.

Data Cache Buffer Cache Disk


RAM Buffered I/O=Operating system cache
Direct I/O= RAM (Data file cache)

Compressed
blocks

Uncompressed Compressed
blocks blocks

Figure 8-1 DB2 OLAP Server caches

Buffered I/O and direct I/O are the two options you have to configure how DB2
OLAP Server will allocate the buffer cache to store the compressed blocks.

8.1.2 The difference between buffered I/O and direct I/O


DB2 OLAP Server can work with the buffer cache to store compressed blocks in
two different ways: buffered I/O or direct I/O.

390 DB2 OLAP Server V8.1: Using Advanced Functions


Buffered I/O uses the file system’s buffer cache and the direct I/O bypasses the
file system’s buffer cache using the RAM memory. The direct I/O is able to
perform asynchronous and overlapped I/Os.

When you are using direct I/O, DB2 OLAP Server uses an area in the RAM
memory, the data file cache parameter, to store the compressed data (.pag files).
When you are using the buffered I/O, DB2 OLAP Server doesn’t use the data file
cache area in RAM, it uses the file system buffer cache (operating system). If you
are not using direct I/O, the data file cache is not used.

Direct I/O Buffered I/O


Operating System Operating System

Disk
Disk

File system Cache = compressed data


Data File Cache = compressed data

Data Cache = uncompressed data Data Cache = uncompressed data

index index

DB2 OLAP Server DB2 OLAP Server

Figure 8-2 Direct I/O versus buffered I/O

In the buffered I/O access mode, the operating system is responsible for the DB2
OLAP Server data blocks compressed, in the direct I/O access mode, the DB2
OLAP Server is responsible for the data blocks compressed (data file cache).

Chapter 8. Additional enhancements 391


The following benefits are provided by direct I/O:
򐂰 Faster response time: A user waits less time for DB2 OLAP Server to return
data.
򐂰 Scalability and predictability: You can customize the optimal cache to be
used (data file cache parameter).

8.1.3 New features in DB2 OLAP Server version 8.1


In previous releases of DB2 OLAP Server this configuration (buffered I/O or
direct I/O) is a server-wide, and affects all databases. With DB2 OLAP Server
version 8.1, the I/O access mode is a database setting stored in the security file,
rather than a server-wide essbase.cfg. The DB2 OLAP Server version 8.1 allows
a different configuration (buffered I/O or direct I/O) for each database.

Table 8-1 shows the platforms on which DB2 OLAP Server version 8.1 supports
direct I/O.

Table 8-1 Direct I/O supported platforms


Platform Direct I/O

Windows 98 Not supported

Windows NT, 2000, XP Supported

AIX Supported

Solaris Operating Environment Supported

HP-UX Supported (but it is not supported if you


are using HFS on HP-UX)

The default buffer cache configuration option (buffered I/O or direct I/O) and the
way to configure it, vary according with DB2 OLAP Server version. See Table 8-2
for more information:

Table 8-2 Default buffer cache configuration and how to set it


DB2 OLAP Server Default How to set up
version / releases

1 or 1.0.1 or 1.1 Buffered I/O Direct I/O is not available for these releases.

7.1 up to fixpack 7 Direct I/O Buffered I/O is not available for this release.

7.1 fixpack 8 and Buffered I/O You can change the DB2 OLAP Server to use
later direct I/O using the DIRECTIO TRUE setting in
the essbase.cfg. This change affects all
databases in this DB2 OLAP Server installation.

392 DB2 OLAP Server V8.1: Using Advanced Functions


DB2 OLAP Server Default How to set up
version / releases

8.1 Buffered I/O You can change to use direct I/O for specific
databases. You can also change the
essbase.cfg (DIRECTIO TRUE) for all DB2
OLAP Server if you want.

When migrating from previous versions of DB2 OLAP Server to DB2 OLAP
Server version 8.1, the databases will use buffered I/O configuration, that is the
default for this new version (if you didn’t define the DIRECTIO TRUE setting in
the essbase.cfg). If you can use direct I/O for database migrated from previous
versions, you should change the database properties for the database.

8.1.4 Changing the I/O access mode (buffered I/O or direct I/O)
With DB2 OLAP Server version 8.1, the I/O access mode is a database setting.
To change the I/O access mode you can change the propriety for a specific
database:
򐂰 Changing the I/O access mode using the Application Manager:
a. Connect to the DB2 OLAP Server.
b. Select the database you want to change the I/O access mode.
c. Go to Database —> Settings —> Storage tab.
d. Change the access mode to buffered I/O or direct I/O.
򐂰 Changing the I/O access mode using MaxL:
a. login <username> <password> on <db2olap server hostname>;
b. alter database <appname.dbname> set io_access_mode <direct or
buffered>;
Example:
login olapsup olapsup1 on localhost;
alter database Onlinei.onlinei set io_access_mode direct;
򐂰 Changing the I/O access mode using ESSCMD:
a. setdbstateitem 28 n (1=buffered, 2=direct)
b. login <username> <password> on <db2olap server hosname>;
Example:
setdbstateitem 28 2

After changing the I/O access mode option, it will only take effect the next time
the database is stopped and started.

Chapter 8. Additional enhancements 393


To check the I/O access mode you are using, you can execute the ESSCMD
command getdbstate.

Example 8-1 shows the output of the getdbstate command after changing the
I/O access mode from buffered I/O to direct I/O without stopping and starting the
database.

Example 8-1 Changing I/O access mode without restarting the database
Application name >onlinei
Database name >onlinei

---------Database State---------
I/O Access Mode (pending) : Direct
I/O Access Mode (in use) : Buffered
Direct I/O Type (in use) : N/A

Example 8-2 shows the output of the getdbstate after changing the I/O access
mode from buffered I/O to direct I/O and after stopping and starting the database.

Example 8-2 Changing the I/O access mode and restarting the database
Application name >onlinei
Database name >onlinei

---------Database State---------
I/O Access Mode (pending) : Direct
I/O Access Mode (in use) : Direct
Direct I/O Type (in use) : No Wait

You can also change the I/O access mode for all DB2 OLAP Server, using the
DIRECTIO TRUE setting in the essbase.cfg file in the server. After changing this
setting you should restart the DB2 OLAP Server service in order to take effect
this change.

8.1.5 The cache memory locking option


There is a database property, “cache memory locking”, that enables DB2 OLAP
Server to lock the memory used by the index cache, data file cache, and data
cache into physical memory. The will give the DB2 OLAP Server kernel usage of
system memory.

Enabling this feature may improve performance because the system memory
manager does not need to swap and reserve space for the memory used by DB2
OLAP Server caches. Cache memory locking gives the DB2 OLAP Server kernel

394 DB2 OLAP Server V8.1: Using Advanced Functions


priority use of system memory. If you enable this feature, leave at least one-third
of the system memory available for non-DB2 OLAP Server kernel use.

This option is not selected by default.

Important: Cache memory locking can be used only if direct I/O is used as
the input/output setting for database.

򐂰 Changing the cache memory locking option using the Application Manager:
a. Connect to the DB2 OLAP Server.
b. Select the database you want to change the I/O access mode.
c. Go to Database —> Settings —> Storage tab.
d. Check the “cache memory locking” check-box.

8.1.6 Defining the DB2 OLAP Server caches when using direct I/O
The size of the index cache and the data file cache (when direct I/O is used) are
the most critical DB2 OLAP Server cache settings. In general, the larger these
caches, the less swapping activity occurs; however, it does not always help
performance to set cache sizes larger and larger. You should monitor you system
activity and make sure that the machine is not paging.

When direct I/O is used, DB2 OLAP Server allocates memory to the data file
cache during data load, calculation, and retrieval operations, as needed. The
data file cache is not used with buffered I/O. How much of the data within data
files can fit into memory at one time depends on the amount of memory you
allocate to the data file cache.

In general, if you are using direct I/O:


򐂰 Make the index cache as large as system resources allow. If you are using
buffered I/O, make them as small as possible.
򐂰 Make the data file cache as large as system resources allow. If you are using
buffered I/O, the data file cache is not used.
򐂰 If you have to choose between allocating memory to the data file cache or
allocating it to the data cache, choose the data file cache.

To a fine tune of the DB2 OLAP Server caches, use the DB2 OLAP Server
hit-ratios (see “DB2 OLAP Server hit ratios” on page 264 for more information)
and refer to the IBM DB2 OLAP Server 8.1 Database Administrator’s Guide,
SC18-7001.

Chapter 8. Additional enhancements 395


8.2 Security Migration Tool
Security Migration Tool allows administrators to migrate OLAP security data from
one OLAP Server to another OLAP Server.

They can migrate the following:


򐂰 Users, groups, applications, databases and filters. The security data is stored
in the ESSBASE.SEC file in the $ARBORPATH\bin directory. You cannot always
just copy the essbase.sec file from one server to another, which is why you
should use the Security Migration Tool.

Note: When migrating, if specific security data already exists on the


destination server, the Security Migration Tool will not update it on the
destination server and will retain the existing data.

򐂰 Database files (as reports, outlines, rule files and data files) that are located
on the database directory (ARBORPATH\app\<appname>\<dbname>)

You can migrate from an OLAP Server (IBM DB2 OLAP Server or Hyperion
Essbase Server) version to another. Table 8-3 shows the versions of DB2 OLAP
Server supported.

Table 8-3 IBM DB2 OLAP Server and Hyperion Essbase correspondences
DB2 OLAP Server version Correspondent with

DB2 OLAP Server 7.1 Hyperion Essbase 6.x

DB2 OLAP Server 8.1 Hyperion Essbase 6.5

The platforms supported by Security Migration Tool are the platforms supported
by DB2 OLAP Server, on both UNIX and Windows environments.

The Security Migration Tool is available on the following IBM site:


http://www.ibm.com/software/data/db2/db2olap

396 DB2 OLAP Server V8.1: Using Advanced Functions


8.2.1 Before running the Security Migration Tool
The Security Migration Tool requires the following to run correctly:
򐂰 The TCP/IP address and server name of the other server(s) you are
accessing must be in the hosts file (On Windows NT/2000, in
WINNT/system32/drivers/etc/hosts and on UNIX in /etc/host) or the
other server(s) you are accessing must be accessible on the network of the
computer you are running the Security Migration Tool from. You can test this
by using the Application Manager on the current computer, if it is available, or
by running an application, such as FTP, to test the connection to the server(s)
you will be accessing during migration.
򐂰 Check that the DB2 OLAP Server(s) that you will be accessing are started.
򐂰 If you planned to migrate the files in the source server’s application directory,
check for one of the following:
– The machine that you are running the Security Migration Tool from can
access the server(s) you are using that are located on other machines
through FTP.
– The machine that you are running the Security Migration Tool from is
mapped (network map drive) to the server(s) you are accessing that are
located on other machines.
򐂰 Make sure that you know the supervisor userid on both source and
destination servers.

8.2.2 Running the Security Migration Tool


This section describes three step-by-step implementation scenarios:
򐂰 Migrating security data from a Windows OLAP Server directly onto an AIX
OLAP Server.
򐂰 Creating a data file for future migration.
򐂰 Migrating data using a data file.

The Security Migration Tool specific directory contains the following files for
Windows:
– EssbaseXX.mdb
– MigReadme.html
– secmainXX.dll
– secmgr.exe

Chapter 8. Additional enhancements 397


Note: The XX in the foregoing file names indicates the minimum OLAP
Release that the specific library can access. The first release will include
“71,” which includes all of OLAP 7.1 and OLAP 8.1 will follow. When
additional releases become available for migration, they will be added.

Migrating data from a Windows server to an AIX server


These are the steps you must follow to migrate data from a Windows server to an
AIX server:
1. Launch Security Migration tool executable: secmgr.exe.
2. Choose the first option to copy security data from a source server and migrate
to a destination server as shown in Figure 8-3.

Figure 8-3 Migrating data: first option

3. Enter the server login information for each of the servers and select the
security options to migrate.
If you are migrating the associated data directories, and migrating to or from a
UNIX server where the OLAP directory is not available on the filesystem,
enter the OLAP path in the UNIX format (as shown in Figure 8-4). If a server
is not available on the filesystem, the Security Migration Tool will use FTP to
copy supporting data files.

398 DB2 OLAP Server V8.1: Using Advanced Functions


Figure 8-4 Enter servers information

4. By choosing Yes as shown in Figure 8-5, you can also specify specific
applications to migrate.

Figure 8-5 Select specific application to migrate

5. If you chose to select applications to migrate, the Security Migration Tool will
list the applications available for migration as shown in Figure 8-6.

Chapter 8. Additional enhancements 399


Figure 8-6 List of available applications

6. Click the Run the Migration button shown in Figure 8-7 to start the migration.

Figure 8-7 Run the migration

400 DB2 OLAP Server V8.1: Using Advanced Functions


7. When the migration ends, the results are displayed as shown in Figure 8-8.

Figure 8-8 Migration results display

8. The following log files are created by this migration option and are stored in
the current Security Migration Tool directory:
– The connect.log shows the connection information for the servers
accessed (see the example in Figure 8-9).

Figure 8-9 Connect.log example

Chapter 8. Additional enhancements 401


– The essbase.log file contains messages received from DB2 OLAP Server.
– The results.log shows the results (see the example in Figure 8-10).

Figure 8-10 Results.log example

402 DB2 OLAP Server V8.1: Using Advanced Functions


– The data.txt contains the security data migrated.
An example of the data.txt user section is shown in Figure 8-11.

Figure 8-11 Data.txt example: user section

Chapter 8. Additional enhancements 403


An example of the data.txt application section is shown in Figure 8-12.

Figure 8-12 Data.txt example: application section

404 DB2 OLAP Server V8.1: Using Advanced Functions


– The secmgr.log contains an overview of the migration, noting the
successful options migrated and any errors, if they occurred (see an
example in Figure 8-13).

Figure 8-13 Secmgr.log example

Creating a data file to use for future migration


These are the steps to follow to create a data file data.txt to use for future
migration:
1. Launch Security Migration tool executable: secmgr.exe.
2. Select the second option to copy security data from a source server only and
create a data file (data.txt) for future migration use as shown in Figure 8-14.

Chapter 8. Additional enhancements 405


Figure 8-14 Migrating data: second option

3. Enter the information for the server to retrieve OLAP security data from as
shown in Figure 8-15.

Figure 8-15 Enter server information

406 DB2 OLAP Server V8.1: Using Advanced Functions


4. By choosing Yes as shown in Figure 8-16, you will be provided with a list of
applications to choose for migration.

Figure 8-16 Select specific application to migrate

5. If you chose to select applications to migrate, the Security Migration Tool will
list the applications available for migration as shown in Figure 8-17.

Figure 8-17 List of available applications

Chapter 8. Additional enhancements 407


6. Click the Run the migration button shown in Figure 8-18 to start the
migration.

Figure 8-18 Run the migration

7. When the migration ends, Figure 8-19 displays its results.

Figure 8-19 Migration results display

408 DB2 OLAP Server V8.1: Using Advanced Functions


8. The following log files are created by this migration option and are stored in
the current Security Migration Tool directory (see examples in step 8 on
page 401):
– The connect.log shows the connection information for the server
accessed.
– The essbase.log file contains messages received from DB2 OLAP Server.
– The data.txt contains the security data migrated.
– The secmgr.log contains an overview of the migration, noting the
successful options migrated and any errors, if they occurred.

Migrating data onto a server using a data.txt file


These are the steps you must follow to migrate data onto a server using a
data.txt file.
1. Launch Security Migration tool executable: secmgr.exe.
2. Choose the third option to migrate security data from a previously created
data file to a destination server as shown in Figure 8-20.

Figure 8-20 Migrating data: third option

Chapter 8. Additional enhancements 409


3. Enter the destination server information as shown in Figure 8-21 and, if
migrating supporting data files, the OLAP path of the destination server and
the directory where the source server application files exist (the directory that
contains the files to migrate).

Note: The directory that contains the source server data files to migrate
must be on the filesystem. If the source server directory is not available on
the filesystem, then copy the entire /app directory of the source server onto
the filesystem. In this example, the /app directory was copied into
e:\temp\db2olap.

Figure 8-21 Enter destination server information

4. By choosing Yes as shown in Figure 8-22, then the applications that were
copied into the data file will be available for selection.

Figure 8-22 Select specific application to migrate

410 DB2 OLAP Server V8.1: Using Advanced Functions


5. On Figure 8-22, we selected No in order to migrate all data in the data.txt file.
Select Run the Migration button shown on Figure 8-23 to start the migration.

Figure 8-23 Run the migration

6. When the migration ends, the results are displayed as shown in Figure 8-24.

Figure 8-24 Migration results display

7. The following log files are created by this migration option and are stored in
the current Security Migration Tool directory (see examples in 8 on page 401):

Chapter 8. Additional enhancements 411


– The connect.log shows the connection information for the server
accessed.
– The essbase.log file contains messages received from DB2 OLAP Server.
– The results.log.
– The data.txt contains the security data migrated.
– The secmgr.log contains an overview of the migration, noting the
successful options migrated and any errors, if they occurred

Verify the migration


After migrating security data to another server, you can verify if the migration was
succesful using the following methods:
򐂰 You can verify the migration using the Application Manager to connect to the
destination server in order to verify the migrated data.
򐂰 You can issue the dump command from the OLAP Server and examine the
dump file to verify that all data migrated successfully.

8.3 Multiple OLAP agents on the same machine


DB2 OLAP Server version 8.1 enables a single computer to run multiple DB2
OLAP Server services (ESSBASE) at the same time. We will use the word agent
to specify each DB2 OLAP Server service running on the same machine.

This new feature is useful to research new systems without the need to use a
different server computer. For example you can have two DB2 OLAP Server on
the same machine with different fixpack level, for test purposes.

Important: It is not recommended to use more than one agent per computer
in production environments. This feature should be used in development and
test environments.

If DB2 OLAP Server installer supports multiple agents on a single UNIX


machine, it will also support it in Windows platforms only if the two agents are
from different versions. The installation will prevent from installing the same
version twice. On the other hand on Windows environment, if you have version 7
installed and want to install version 8, then you can install version 8 into a
separate directory.

For each DB2 OLAP Server agent you want to run on the same machine, it’s
necessary an installation of the DB2 OLAP Server in a specific path (one DB2

412 DB2 OLAP Server V8.1: Using Advanced Functions


OLAP Server installation for each agent). Each DB2 OLAP Server service
running (ESSBASE) should point to a different ARBORPATH (installation path).

To configure a second DB2 OLAP Server agent on a UNIX machine that already
has DB2 OLAP Server installed, follow these steps:
1. Create a new user id to run the new DB2 OLAP Server agent installation
2. Stop the ESSBASE service (the previous DB2 OLAP Server installation)
3. Execute the DB2 installation process in a different path. See DB2 OLAP
Server installation guide, SC27-1228 on installing on AIX, Solaris and HP-UX
operating environment for the procedure to install DB2 OLAP Server.
4. Create the necessary DB2 OLAP environment variables in the profile for the
new userid. To facilitate the process you may want to copy the profile from the
old DB2 OLAP Server installation user and change the paths for the new
installation. Don’t forget to change the ARBORPATH environment variable (in
the profile of the user created in the first step) pointing to the new installation
path.
5. Assign the correct privileges in the installation path to the new user id created
in the first step. The new user id should be the owner of the new installation
directory, subdirectories and files. If you used this userid in the installation
process it is already the owner of the installation directory, subdirectories and
files.
For example, in a AIX operating system you can execute the following
command to change the owner of the installation directory:
– chown <new olap user id> <new olap installation path>
And you can use the following commands in the AIX to change the
subdirectories and files owner on the installation path:
– cd <new olap installation path>
– chown -R <new olap userid> *
6. In the $ARBORPATH/bin directory of the new installation, create or modify the
server configuration file essbase.cfg. It should contain these settings:
– AGENTPORT: The port that this DB2 OLAP Server installation (agent) will use
to connect. The default is 1423.
– SERVERPORTBEGIN: The first port that the first process will try to use to
connect (connections to the DB2 OLAP Server). The default is 32768.
– SERVERPORTEND: The highest value for a port number that a process can
use to connect. The default is 33768.
– PORTINC: The increment between ports. For example, if PORTINC is
assigned a value of 5, DB2 OLAP Server will look for ports 32700, 32705,
and so on up to the value of SERVERPORTEND. The default is 1.

Chapter 8. Additional enhancements 413


If you don’t define these parameters, the default is used. You cannot have
two agents with the same values for these parameters. For example, to
configure two agents on the same machine, you should change these
parameters to a value different of the default at least for one of the agents
at the installation.
7. Repeat previous step in all the DB2 OLAP clients machine in the configuration
file essbase.cfg.
8. On the UNIX DB2 OLAP Server machine, login with the previous DB2 OLAP
Server user id, running its profile. For example, in AIX run: su - <username>.
9. Start the ESSBASE service. This will start the previous DB2 OLAP Server
agent.
10.Login with the new userid created in the first step, running its profile.
11.Make sure the ARBORPATH environment variable is pointing to the new
installation path. To verify the value in the ARBORPATH environment variable,
execute: echo $ARBORPATH.
12.Start the ESSBASE Service. At the first time, you should start the ESSBASE
service in foreground because it will ask for the company name, the DB2
OLAP Server supervisor userid and its password.

8.3.1 Hints and tips


The following hints and tips apply only to DB2 OLAP Servers on UNIX platforms.
򐂰 To start the DB2 OLAP Server service (ESSBASE) in the foreground:
– Logon on the UNIX operating system with the user id that has the profile
configured to set the DB2 OLAP Server environment variables.
– From the UNIX command prompt, type: $ARBORPATH/bin/ESSBASE.
– Or if your path includes $ARBORPATH/bin, type: ESSBASE.
– If you encounter any errors during startup, check your path and
environment settings.
– In a first-time installation, DB2 OLAP Server prompts you for the following
items: company name, your name (this will be the OLAP user supervisor)
and the password for this user.
򐂰 To start the DB2 OLAP Server service (ESSBASE) in background:
– Logon in the UNIX operating system with the user id that has the profile
configured to set the DB2 OLAP Server environment variables.
– From the UNIX command prompt, enter the following command: nohup
$ARBORPATH/bin/ESSBASE <password> -b &

414 DB2 OLAP Server V8.1: Using Advanced Functions


– If your path already includes $ARBORPATH/bin, type this instead: nohup
ESSBASE <password> -b &
򐂰 To stop the DB2 OLAP Server service (ESSBASE) that is running in
foreground:
– Execute exit in the window session that is running the DB2 OLAP Server
service.
򐂰 To stop the DB2 OLAP Server service that is running in background:
– Logon in the UNIXUNIX operating system with the user id that has the
profile configured to set the DB2 OLAP Server environment variables.
– From the UNIX command prompt, enter the following command:
$ARBORPATH/bin/ESSCMD
– If your path already includes $ARBORPATH/bin, type this instead: ESSCMD
– In the DB2 OLAP Server command interface, execute: shutdownserver
localhost <userid> <password>
– This procedure will shutdown a DB2 OLAP Server on the localhost
machine. It will shutdown only the DB2 OLAP Server agent (installation)
that the user you are logged in is configured to work with as set in the
ARBORPATH.

8.3.2 A sample configuration scenario


We configured the Cayman machine (see 2.2.3, “Our test environment setup” on
page 36) to work with two concurrent DB2 OLAP Server agents (ESSBASE
services).

The Cayman is a UNIX operating system, AIX 4.3.3. The old DB2 OLAP Server
has the following characteristics:
– DB2 OLAP Server version: 8.1
– Installation path: /olap81
– AIX userid that has the DB2 OLAP Server environment variables
configured in the profile (.profile): olapcay.
– Profile of olapcay user (/home/olapcay/.profile) as shown in Example 8-3.

Example 8-3 The olapcay user .profile


ask () {
_pr="$1"
_def="$2"
prompt="${_pr}"
shift
if [ $# -gt 0 ]; then prompt="$prompt"' ['"${_def}"']' ; shift ; fi

Chapter 8. Additional enhancements 415


if [ $# -gt 0 ]; then prompt="$prompt"' {'"${_def} ""$@"'}' ; fi
echo 1>&2 "$prompt ?"
while read input ; do
if [ -z "$input" ]; then input="${_def}" ; break ; fi
if [ $# -eq 0 ]; then break ; fi
# @@@@ extend to limit to choices given
break;
done
}

if [ -f /olap81/essbaseenv.sh ]; then
. /olap81/essbaseenv.sh
fi

if [ -f /olap81/essjava.sh ]; then
ask 'Which userprofile will you use, DB2 OLAP Server or DB2 OLAP Integration
Server?' ess is
case "$input" in
ess*|ESS*|e*|E*) c=/olap81/essjava.sh ;;
*) c=/olap81/is/hisjava.sh ;;
esac
. $c
fi

# The following three lines have been added by UDB DB2.


if [ -f /home/db2inst1/sqllib/db2profile ]; then
. /home/db2inst1/sqllib/db2profile
fi
export ODBCINI=/olap81/bin/.odbc.ini
export PATH=$PATH:$ISHOME/odbclib

This profile has if commands to ask if you would like to start the DB2 OLAP
Server environment variables or the Integration Server environment variables. To
start the ESSBASE environment variables type ESS (this should be used to start
the ESSBASE service). To start the Integration Server environment variables
type IS (this should be used to start the Integration Server service olapisvr).

This is required because you should not set the Integration Server environment
variables (to work with JAVA), and the DB2 OLAP Server environment variables
at the same time. If you do this, you can receive errors (DB2 OLAP Server
exceptions), when trying to select a database in DB2 OLAP Server. Another
alternative is create two different users: one configured with the DB2 OLAP
Server environment variables and another configured with the Integration Server
environment variables.

This DB2 OLAP Server installation has 2 applications and databases:


򐂰 Onlinei -> onlinei

416 DB2 OLAP Server V8.1: Using Advanced Functions


򐂰 E-bank -> ebank

Installation Procedure: We executed the following procedure to install and


configure the second DB2 OLAP Server agent:
1. We created a new AIX userid called olapcayb.
2. We created another file system to contain the new DB2 OLAP Server
installation: /olap81b.
3. The user olapcayb was used to start the DB2 OLAP Server installation
process (./setup.sh). We used the path /olap81b for this new DB2 OLAP
Server installation.
4. We confirmed that the olapcayb user id is the owner of the /olap81b directory,
subdirectories and files with the command: ls -la.
5. We copied the .profile from the user olapcay to the user olapcayb:
6. cp /home/olapcay/.profile /home/olapcayb/.profile
7. We changed the olapcayb profile (see Example 8-4) pointing to the new
installation path.

Example 8-4 Olapcayb user .profile


ask () {
_pr="$1"
_def="$2"
prompt="${_pr}"
shift
if [ $# -gt 0 ]; then prompt="$prompt"' ['"${_def}"']' ; shift ; fi
if [ $# -gt 0 ]; then prompt="$prompt"' {'"${_def} ""$@"'}' ; fi
echo 1>&2 "$prompt ?"
while read input ; do
if [ -z "$input" ]; then input="${_def}" ; break ; fi
if [ $# -eq 0 ]; then break ; fi
# @@@@ extend to limit to choices given
break;
done
}

if [ -f /olap81b/essbaseenv.sh ]; then
. /olap81b/essbaseenv.sh
fi

if [ -f /olap81b/essjava.sh ]; then
ask 'Which userprofile will you use, DB2 OLAP Server or DB2 OLAP Integration
Server?' ess is
case "$input" in
ess*|ESS*|e*|E*) c=/olap81b/essjava.sh ;;
*) c=/olap81b/is/hisjava.sh ;;

Chapter 8. Additional enhancements 417


esac
. $c
fi

# The following three lines have been added by UDB DB2.


if [ -f /home/db2inst1/sqllib/db2profile ]; then
. /home/db2inst1/sqllib/db2profile
fi
export ODBCINI=/olap81b/bin/.odbc.ini
export PATH=$PATH:$ISHOME/odbclib

8. We changed the essbase.cfg of the new DB2 OLAP Server installation


(/olap81b/bin/essbase.cfg) to contain the following settings:
AGENTPORT 1479
SERVERPORTBEGIN 32470
SERVERPORTEND 32600
PORTINC 5
We didn’t change the essbase.cfg of the old DB2 OLAP Server installation.
The old DB2 OLAP Server installation is using the default port values.
9. We logged with the old DB2 OLAP Server user, executing the profile: su -
olapcay and we started the ESSBASE service.
10.We logged with the new DB2 OLAP Server user, executing the profile: su -
olapcayb and we started the ESSBASE services.
11.Both servers were started with success. The following is the result of the
command ps -ef | grep ESS:
olapcayb 21556 27004 0 11:15:06 pts/3 0:00 ESSBASE xxxxxx -b
olapcay 28046 20472 0 11:14:16 pts/3 0:00 ESSBASE xxxxxx -b
12.On a DB2 OLAP Server windows client machine we created the essbase.cfg
file, under the directory %ARBORPATH%/bin (example:
c:\ibm\db2olap\bin\essbase.cfg), with the same entries that we defined in new
DB2 OLAP Server installation:
AGENTPORT 1479
SERVERPORTBEGIN 32470
SERVERPORTEND 32600
PORTINC 5

Using the Application manager in this DB2 OLAP windows client, we could
connect to the new DB2 OLAP Server installation:
򐂰 server —> cayman
򐂰 username—> olapcayb

418 DB2 OLAP Server V8.1: Using Advanced Functions


We could only see the applications and databases for this new installation. We
could not access the applications in the old DB2 OLAP Server installation (onlinei
and e-bank).

We removed the entries in the essbase.cfg (agentport, serverportbegin,


serverportend and portinc) in this DB2 OLAP client, and we connected to the old
DB2 OLAP Server installation:
򐂰 server —> cayman
򐂰 username —> olapcay

We could visualize only the applications for the old DB2 OLAP Server
installation, including the applications onlinei and e-bank.

8.4 Custom Defined Functions


The Custom Defined Function (CDF) feature gives you the capability to create
complex calculation functions not otherwise supported by the DB2 OLAP Server
calculation scripting language. CDF requires additional development in Java. The
purpose of CDF is to use these functions:
򐂰 If you need pre- or post-database calculation functions
򐂰 If you need to do check on data or check after calculation
򐂰 If you want to extract data from DB2 OLAP Server in other formats than
supported
򐂰 To do special summary calculations
򐂰 If you want to send external messaging (for example, an E-mail with
information about the calculation; perhaps that it has finished with success)
򐂰 If you cannot use an existing calculation function within DB2 OLAP Server
򐂰 If you need to get a required calculation data into DB2 OLAP Server

You have to develop these functions separately in the Java programming


language. After compilation and archiving the functions in Java, you register the
CDF in DB2 OLAP Server. You can either associate the CDF with an OLAP
Server or application. You can then use CDF in formulas and calculation scripts
just as you use native DB2 OLAP Server calculation functions.

8.4.1 Software requirements


You can use a Java Development Kit (JDK) of your choice to create your own
CDF. A JDK is not supplied with DB2 OLAP Server or Integration Server. If you
have installed EES there is a Java compiler stored in the directory

Chapter 8. Additional enhancements 419


arborpath\ees\jre\bin. Otherwise you can download a free compiler from Sun
homepage on Internet (http://www.sun.com).

The Java Runtime Environment (JRE) is required by DB2 OLAP Server to enable
Java-based features, such as CDF. The JRE must be installed on the computer
running the DB2 OLAP Server component.

The DB2 OLAP Server installation program copies the files to your workstation.
To complete the installation of Java, you need to update your PATH statement:

On Windows 2000 and Windows XP, add this variable to your PATH statement:
%JREHOME%\bin

On Windows NT, add this variable to your PATH statement:


C:\ibm\db2olap\java\jre\bin

8.4.2 Performance considerations in the Windows environment


Both CPU and memory have to be taken in consideration for performance
optimization.

CPU considerations
CDF can significantly slow down calculations. The functions are loaded when an
DB2 OLAP Server application is started and will be processed by the JAVA
Virtual Machine (JVM). Since there is a hand over between DB2 OLAP Server
and JVM, it slows down the calculation execution. The CDF are typically 1.5 to 2
times slower than native DB2 OLAP Server Calculator functions even when the
CDF is developed properly.

A main recommendation would be to limit the use of CDF to functions that you
cannot perform with the invoked calculator, particularly if the calculation speed of
the applications is a critical consideration.

Memory considerations
It has initial effect to the memory required to run DB2 OLAP Server using the
Java Virtual Machine (JVM) and the Java API for XML Parsing, which is a part of
the general installation of DB2 OLAP server has to be checked. The memory
requirements for these additional components are approximately 10MB per
application.

Beyond these start-up memory requirements, the Java programs you develop for
CDF sometimes require additional memory. When started, the JVM for Win32
operating systems immediately allocates 2 MB of memory for programs. This
allocation is increased according to the requirements of the programs that are
then run by the JVM. The default upper limit of memory allocation for the JVM on

420 DB2 OLAP Server V8.1: Using Advanced Functions


Win32 operating systems is 64 MB. If the execution of a Java program exceeds
the default upper limit of memory allocation for the JVM, the JVM generates an
error. For more information about JVM memory management and memory
allocation details for other operating systems, see the Java Development Kit
documentation.

Considering the default memory requirements of the JVM and the limitations of
the hardware on which you run servers, carefully monitor your use of memory. In
particular, developers of CDF should be careful not to exceed memory limits of
the JVM when creating large objects within CDF.

If you install Java but are not using CDF or custom defined macros, you can
reduce your startup memory requirement by disabling Java. To disable Java,
remove all parameters from the JVMMODULELOCATION setting in the
essbase.cfg file or make the statement to a comment by setting a ; (semicolon) in
front of the statement as shown in Example 8-5.

The essbase.cfg file is stored in the arborpath\bin directory and is a JVM file type
(see Example 8-5).

Example 8-5 Essbase.cfg file


; The following entry specifies the full path to JVM.DLL.
; JvmModuleLocation C:\Hyperion\Essbase\java\jre13\bin\hotspot\jvm.dll

8.4.3 Creating a CDF


To create a CDF, there are several steps required:
1. Comply with the Java and methods requirements.
2. Develop and compile a public Java class that contains at least one public,
static method to be used as a CDF.
3. Install the Java class on DB2 OLAP Server.
4. Register the CDF.

Java and methods requirements


The basis of a CDF is a Java class and method to perform a particular type of
calculation created by somebody with Java programming skills. It could be
yourself, a database administrator or Java programmer. Creating and testing
these Java classes and methods is the first step toward creating a CDF.

You can create more than one method in a class for use as a CDF. In general, it is
recommended that you create all the methods you want to use as CDF in a
single class. However, if you want to add new CDF that are not going to be used

Chapter 8. Additional enhancements 421


across all applications on DB2 OLAP Server create them in a new class and add
them to DB2 OLAP Server in a separate .jar file. The .jar file contains both the
class and the method, .jar files and their use is described later on.

When creating multiple Java classes that contain methods for use as CDF, verify
that each class name is unique. Duplicate class names will cause methods in the
duplicate class not to be recognized, and you will be unable to register those
methods as CDF.

After creating the Java classes and methods for CDF, test them using test
programs in Java. When you are satisfied with the output of the methods, install
them on DB2 OLAP Server and register them in a single test application - see
“Registering a CDF Using MaxL” on page 426 or “Using Application Manager” on
page 429. We recommend that you do not register functions globally for testing.
Instead start registers the CDF in a single test application. Afterwards you can
register the functions globally if necessary.

A class method may be registered with the DB2 OLAP Server calculator
framework under many different names, whereas function names in the
framework must be unique within a particular application. Locally defined
functions within an application may have the same names as global (system
scope) functions. In this case, the local function overrides the global functions.

If the specified Java class contains more than one method with the same name,
you must specify the signature for this method (if the signature is not specified,
JVM uses the first method with this name). The signature is a specification of
types of input parameters to a method, as well as of the returned type. If only one
method exists with the specified name in the specified class, the calculator
framework automatically determines the signature of the method using Java
Reflection API. Otherwise, it automatically determines the return type, but needs
specification of the input types.

The signatures of the Java functions used as CDF must use only the following
types:

These are the primitive Java types:


򐂰 Byte
򐂰 Boolean
򐂰 Char
򐂰 Short
򐂰 Int
򐂰 Long
򐂰 Float
򐂰 Double
򐂰 Class java.lang.String

422 DB2 OLAP Server V8.1: Using Advanced Functions


򐂰 Class com..Essbase.calculator.CalcBoolean
򐂰 Arrays of any of the above

In addition to the specified types, the return type may also be of type void. All of
the primitive Java types are mapped to the NUMBER type in DB2 OLAP Server
calculator framework. Strings are mapped to STRING type. CalcBoolean is
mapped to BOOLEAN type.

Note: Notice the difference between Boolean and CalcBoolean types.


Boolean is a usual type with two values: TRUE and FALSE. Since DB2 OLAP
Server calculator framework has to deal with missing values, the CalcBoolean
is a three-valued type: TRUE, FALSE, and MISSING. The class has methods
for the Boolean operators AND, OR, and NOT, and other useful methods. This
class is already installed with DB2 OLAP Server.

To provide you with all the necessary means to perform arithmetic operations as
add, subtract, divide, multiply and compare double precision values you have the
com.Essbase.calculator. class. This class has rules to deal with missing values
and are using the same logic as the calculator framework.

As the conversion between the NUMBER type and the primitive Java types (other
than double) assumes loss of precision, you should be cautious about choosing
the functions' input parameters types. Using double as the analog of NUMBER
type is highly recommended, especially since calls from the calculator
framework-to-functions, that take only double parameters, are highly optimized.

The Java code developer must be sure that the double values that are returned
to the DB2 OLAP Server calculator framework from the JVM are finite (or
#MISSING). Some tools might not correctly display values that are either infinite
or NaN (not a number). The programmer is responsible for ensuring that this rule
is observed. The Calculator class may be helpful in treating various functions and
operators according to DB2 OLAP Server calculator rules (no calculations in DB2
OLAP Server ever produce infinite values or NaNs. The result, in cases like
division by zero or square root of a negative number, is always #MISSING).

In the case when the input NUMBER is #MISSING, a special MISSING value for
the Java primitive type is generated (this value is specific to each type) with the
exception of Boolean, in which case #MISSING is mapped to FALSE. This is why
it is recommended to use CalcBoolean for passing Boolean values to the JVM.

Developing and compiling a Java class


This is the procedure to create a Java class:
1. Open a text editor and create a Java class or use your Java Developer Kit
(JDK) to create it. Example 8-6 shows an example of a Java program.

Chapter 8. Additional enhancements 423


Example 8-6 Example of Java program
public class CalcFunc {
public static double sum (double[] data) {
int i, n = data.length;
double sum = 0.0d;
for (i=0; i<n; i++) {
double d = data [i];
sum = sum + d;
}
return sum;
}
}

2. Save the Java class as a .java file. In this example we save it as


CalcFunc.java.
3. Compile the Java class file. At the command prompt of the operating system
move to the directory, where your .java file was saved and use the Java
compiler (javac).Example 8-7 shows how to compile the java program.

Example 8-7 Compiling the Java program


javac CalcFunc.java

Note: Be sure that the path to the compiler (javac.exe) is defined properly.

4. Resolve any compiling errors and recompile if necessary. When the


compilation ends successful the compiler has created a new .class file.
Referring to the example we now have a file called CalcFunc.class.

Installing Java Classes on DB2 OLAP Server


Before you register a Java class on DB2 OLAP server you have to compile the
class file into a Java Archive file (.jar) and then copy the .jar file to the computer
running DB2 OLAP Server.
1. The .jar file is created based on the class file. At the command prompt in the
directory where your class file has been saved you type the command to add
your class file to a java archive file. The command to compile the
CalcFunc.class to a .jar file is described in the example below.

Example 8-8 Archiving Java program using jar


jar cf CalcFunc.jar CalcFunc.class

As with the compiler, the path to the jar.exe has to be defined properly.

424 DB2 OLAP Server V8.1: Using Advanced Functions


2. Copy the .jar file to the computer running DB2 OLAP Server. The .jar file has
to be stored in one of the following locations:
– If it is a global function, which means it is a function available in all
applications on the server store .jar file into the ARBORPATH\java\udf\
directory. If the directory does not exist, then create it.
– If it is a local function, which only has to be available in one single
application, store the .jar file into ARBORPATH\app\AppName\udf\
directory. Where AppName refer to the name of the application. If the
directory does not exist you have to create it. If the .jar file is placed in
another location, the CLASSPATH variable must be modified so it includes
the full path and filename for the .jar file.

Registering a CDF
Before you are able to use a CDF within DB2 OLAP Server, it has to be
registered.

There are two ways to register the CDF:


1. Using MaxL scripting language
2. Using the Application Manager

Registering requirements
Registering requires to have taken in consideration both security and to have
correctly named the CDF.

Security permissions

To register a CDF on DB2 OLAP Server requires that you have one of these
security permissions:
򐂰 Application designer or higher to create, delete and manage CDF on an
application level (local).
򐂰 Supervisor to create, delete and manage CDF on server level (global).

Correctly naming a CDF

When you register a CDF in DB2 OLAP Server, you give the function a name.
This name is used in calculation scripts and formulas and is distinct from the
Java class and method name used by the function.

Remember these requirements when you create function names:


򐂰 CDF names must start with an @ symbol; for example, @MYFUNCTION. The
rest of a function name can contain letters, numbers, and the following
symbols: @, #, $, and _. Function names cannot contain spaces.

Chapter 8. Additional enhancements 425


򐂰 The names of CDF, which are called only by custom-defined macros, should
start with "@_" to distinguish them from general use functions and macros.
򐂰 CDF must have unique names. Function names must be different from each
other, from the names of custom-defined macros, and from the names of
existing calculation functions.

If a DB2 OLAP Server application contains a local function that has the same
name as a global function, the local function is used for calculation.

Registering a CDF Using MaxL


To register a CDF using MaxL, use this procedure:
1. Ensure that DB2 OLAP Server is started.
2. Start MaxL Shell either from the operating system command prompt by typing
the command essmsh or from start ->programs->DB2 Olap Server->MaxL
shell and logon on to the DB2 OLAP server.
Example 8-9 shows how to log in to DB2 OLAP Server, where admin is the
user, mypassword is the password of the user and localhost is the DB2 OLAP
Server.

Example 8-9 Using MaxL to log in to DB2 OLAP Server


MaxL>login admin mypassword on localhost;

The command above establishes a connection to the DB2 OLAP Server


called localhost for user admin identified by mypassword. For more
information about MaxL see the MaxL users guide
3. To register the CDF, you use the statement create function. The syntax
varies a bit if it is a global or a local function. If it is a function with a local
scope, the create function statement includes the application name as a
prefix. If it is a global function you simply do not prefix the function with the
application name. Example 8-10 shows how to register the earlier created
CalcFunc into DB2 OLAP Server.

Example 8-10 Register the CDF using MaxL


MAXL> create function Sample.'@JSUM'
2> as 'CalcFunc.sum'
3> spec '@JSUM(memberRange)'
4> comment 'adds list of input members';

The prefix Sample. before the name of the function assigns the CDF only to
the application Sample, so the function will be available only within that
application.

426 DB2 OLAP Server V8.1: Using Advanced Functions


Note: Specifying input parameters for the Java method is optional. If you
do not specify input parameters, DB2 OLAP Server reads them from the
method definition in the Java code. However, if you are registering two or
more CDF with the same method name but with different parameter sets,
you must register each version of the function separately, specifying the
parameters for each version of the function.

Refreshing the CDF catalog


Before the CDF is available in calculations or out-lines, the custom-defined
catalog has to be refreshed, if it is already loaded. Example 8-11 shows the
MaxL statement to do the refresh on application Sample.

Example 8-11 Refresh MaxL statement


MAXL>refresh custom definitions on application Sample;

If the application is not loaded, the CDF will become available by the next load.

The statement re-reads the CDF on the Agent, and associates newly created
functions with the specified application (since the last refresh, or since the last
time the application was restarted). Invalidly defined functions are not loaded to
the application.

To refresh global definitions, issue the statement separately for each application
on the DB2 OLAP Server or stop and restart the DB2 OLAP server.

Validation occurs at the application level only, during the refresh and not during
creation. There is no validation on the system level.

You could combine the login, the create function statement and the refresh
statement in one single MaxL script. Keep in mind to end each statement with a
semicolon. Example 8-12 shows how registering the CalcFunc can be done with
a MaxL script.

Example 8-12 Combining MaxL commands in a script


login admin mypassword on localhost;
create function Sample.'@JSUM'
as 'CalcFunc.sum'
spec '@JSUM(memberRange)'
comment 'adds list of input members';
refresh custom definitions on application Sample;
logout;

Chapter 8. Additional enhancements 427


First we do a login to the server, then a register of the CDF followed by a refresh
and finishing logging out the DB2 OLAP Server.

If the file in the example is stored as regcalcfunc.txt, you can execute it from the
operating systems command prompt by typing:
essmsh regcalcfunc.txt

To manage your CDF you have several MaxL statements available. We will briefly
describe these statements and give examples of their use.

Renaming or copying a CDF


There is no renaming statement for CDF in the MaxL language. Instead you have
to register the function based on the Java Archive file (.jar) with the new name. If
the CDF with the old name is of no use anymore, you can delete it with MaxL
statement drop function, se below.

Deleting a CDF
To delete a CDF, you can use the MaxL statement:
drop function function name;

If you want to delete the function @JSUM in the application Sample, the
statement looks like Example 8-13.

Example 8-13 MaxL drop function statement


Maxl>drop function Sample.'@JSUM';

If it is a global CDF you do not prefix the function with the application name.

As with registering a CDF the drop function statement needs a refresh of the
application or a stop and restart to take effect, see the part about register CDF
for further details.

Displaying a CDF
You can display CDF or macros in four different ways, depending on which syntax
you use in the display statement.

The main statement is:


display function all/on system/on application application name/function
name;

The all keyword used in the display statement displays all custom definitions,
including those registered on the application level (local) and on the system level
(global).

428 DB2 OLAP Server V8.1: Using Advanced Functions


The on system keywords used in the display statement (see Example 8-14)
displays all custom-definitions registered on the system (global), not including
locally defined custom definitions.

Example 8-14 MaxL display statement


Maxl>display function on system;

The on application application name keywords used in the display statement,


displays all CDF in the typed application.

Specifying the function or macro name in the display function or display macro
statement displays only the named custom definition.

If you want to see all functions registered to the application Sample, the
command looks like Example 8-15.

Example 8-15 MaxL display atatement on the application


MAXL> display function on application sample;

Example 8-16 shows the output from the command above.

Example 8-16 MaxL display statement output


application function class method
spec comment runtime state

+-------------------+-------------------+-------------------+------------------
+-------------------+-------------------+-------------------+------------------

Sample @JSUM CalcFunc sum


@JSUM(memberRange) adds list of input FALSE 2

OK/INFO - 1241044 - Records returned: [1].

Using Application Manager


Use this procedure to register a CDF using Application Manager:
1. Ensure that DB2 OLAP Server is started.
2. Start the Application Manager and connect to the server.
3. Click Server -> Custom-Defined Functions. DB2 OLAP server displays the
Custom Defined Function Manager:

Chapter 8. Additional enhancements 429


Figure 8-25 Custom Defined Function Manager main screen.

4. Select a server to which you are connected, where the CDF will be used. If it
is a global CDF you are about to register, select the value <global> in the
application selection box or keep it as it is, since you can change that in the
next window.
If the CDF is not global, use the Application selection box to change to the
application where the CDF will be used. You are not able to change to any
other application further on in the process.
– Click New to register a new CDF, and DB2 OLAP Server displays the
Custom Defined Functions Editor, as shown in Figure 8-26.

430 DB2 OLAP Server V8.1: Using Advanced Functions


Figure 8-26 Custom Defined Function Editor

– In the selection box scope, select the appropriate scope for the CDF:
<Global> if the CDF will be available for all applications on the server, or
select the application name you choose in the custom-define functions
manager, if the CDF will be available for only one that application.
– If the CDF has to be available for more than one application, you have to
register the function into all the applications one by one, where it is
needed. In this example we register the CDF into the application Sample.

Note: Functions you registered to a specific application are only available


for use in calculation scripts or formulas within the application in which they
were registered. If you registered the CDF globally, then the functions are
available to all calculation scripts and formulas in all applications on the
DB2 OLAP Server where the functions are registered.

Chapter 8. Additional enhancements 431


– In the Name text box, leave the "@" symbol as the first character of the
CDF name, and then add the rest of the name, for example JSUM. The @
tells DB2 OLAP Server that this is a CDF. For more details about naming
conventions of CDF, see “Correctly naming a CDF” on page 425.
– In the bottom of the Custom Defined Function Editor you can read the
corresponding MaxL statements, which Application manager uses to
register the CDF.
– Add the correct information to the fields in the Custom Defined Function
Editor as shown in Figure 8-27.

Figure 8-27 Filling in the Custom Defined Function Editor

432 DB2 OLAP Server V8.1: Using Advanced Functions


In Figure 8-27 we use information about the sample class created in the
part “Registering a CDF Using MaxL” on page 426. If you need help filling
in the values, review that section.
When the information is correct, click OK to register the function. DB2
OLAP Server displays the function in the Custom Defined Function
Manager (see Figure 8-28).

Figure 8-28 Displaying the CDF

Note: There is no control if the Java Class or Method exists. The way to
see if a function is valid and available for use in calculations or formulas
is described in “Verifying a CDF” on page 433.

Verifying a CDF
After registering a CDF, you can determine whether a function has been
registered successfully and whether it is registered locally or globally. Until you
do a refresh or stop and restart the application the state of the function remain
unknown. If it is global function the server has to be stopped and restarted.

Chapter 8. Additional enhancements 433


If, after a refresh or a stop and restart of the application, the function is still
unknown or unloaded, you have to do the following checks and corrections to get
it available for loading:
򐂰 Check if the function is validly defined in Java.
򐂰 The application is not started. This is only if the CDF is global, otherwise you
have to start the application to see the list of CDFs.
򐂰 Check if the Java Runtime Environment (JRE) is installed. If not, the function
is not loaded into the application process. If the JRE is installed, check if the
correct path is added to PATH. For more details, see “Java and methods
requirements” on page 421.

Note: Remember to do a refresh after you have done the changes.

Tip: DB2 OLAP Server cannot determine whether the function defined in
JAVA is active. You may need to refresh the CDF catalog, or shutdown and
restart the application or applications, to tell if the function is loaded and
active.

8.4.4 Using a CDF in the outline


After registering a CDF, you can use them like native DB2 OLAP Server
calculation commands. Functions you registered to a specific application are only
available for use in calculation scripts or formulas within the application in which
they were registered. If you registered the CDF globally, then the functions are
available to all calculation scripts and formulas in all applications on the DB2
OLAP Server where the functions are registered.

If you want to add a CDF as a formula in an outline:


1. Open the outline editor for the database where you want to add a formula with
the CDF.
2. Choose the member where you want the formula added.
3. In the Application Manager screen choose Edit ->Formula = and the Formula
editor opens as shown in Figure 8-29.

434 DB2 OLAP Server V8.1: Using Advanced Functions


Figure 8-29 Formula editor

In the lower left corner of the Outline editor you can choose which member
the formula has to be calculated on. In the figure above we have chosen to let
the formula calculate on Market/East/New York.
4. Choose the function Formula->Paste functions and you get a list of function
templates as shown in Figure 8-30.

Chapter 8. Additional enhancements 435


Figure 8-30 Function templates

The function template screen is split into two parts, the categories selection
window and the template selection window. The template selection window
shows the available functions in the category you choose.
CDF is the last entry in the categories.
5. Choose the CDF to use, for example, @JSUM in Figure 8-31.

436 DB2 OLAP Server V8.1: Using Advanced Functions


Figure 8-31 Formula created formula in the outline

You can either type in the functions or use the buttons in the top of the screen.

6. Before you save and close the formula editor, use the specific button to verify
your formula:

7. Resolve any errors, save the formula, and close the Formula editor. The
formula has now been attached to the member “New York” as shown in
Figure 8-32.

Chapter 8. Additional enhancements 437


Figure 8-32 Outline with formula

8.4.5 Using a CDF in calculations


To use a registered CDF in a calculation script:
1. Create a new calculation script or open an existing calculation script
– If the CDF was registered locally-within a specific application-then you
must use a calculation script or formula within that application.
– If the CDF was registered globally, then you can use any calculation script
or formula on DB2 OLAP Server.
2. Add the CDF to a new or existing calculation script or formula. To use the
CDF shown earlier in this chapter, use this calculation script:
"New York" = @JSUM(@LIST(2.3, 4.5, 6.6, 1000.34));
Use this calculation script with the Sample Basic sample database, or replace
"New York" with the name of a member in a test database.
3. Save the calculation script or formula, and then run it as usual.

438 DB2 OLAP Server V8.1: Using Advanced Functions


Part 5

Part 5 Appendixes
In this part of the book, we supply several appendixes containing the following
supplementary material:
򐂰 Appendix A, “DB2 OLAP Integration Server” on page 441
򐂰 Appendix B, “Setting up DB2 OLAP Analyzer Analysis Server V8.1” on
page 463
򐂰 Appendix C, “Enterprise Services sample programs” on page 489
򐂰 Appendix D, “Data modeling basics” on page 495

© Copyright IBM Corp. 2002. All rights reserved. 439


440 DB2 OLAP Server V8.1: Using Advanced Functions
A

Appendix A. DB2 OLAP Integration


Server
In this appendix we provide an overview over the latest enhancements and
functionalities in DB2 OLAP Integration Server (Integration Server through the
book).

The functionality covers new features available from DB2 OLAP Server version
7.1 fixable 7 and DB2 OLAP Server version 8.1.

We describe the following new features and enhancements for Integration


Server:
򐂰 New Integration Server configuration file
򐂰 Multiple data sources for one model
򐂰 New drill-through functionality and options
򐂰 XML export and import of models and meta outlines
򐂰 Intelligent help and increased usability

© Copyright IBM Corp. 2002. All rights reserved. 441


A.1 Integration Server enhancements
With the new version 8.1 of OLAP Server, the functionality formerly known as
Integration Server has changed the name slightly to Integration Services. Along
with the name and version change, a whole new range of enhancements and
features are now available.

One of the primary enhancements are the improved performance and flexibility.
For Integration server, this means that you get:
򐂰 Performance:
– A better SQL engine:
• Options for customizing the SQL that Integration Server generates
– A better “group by” statement
– Removal of joins:
• No more redundant joins
• Intelligent removal of joins
– Parallel data load:
• Fetch data
• Transform data
• Send data to DB2 OLAP Server
• All in parallel
򐂰 Flexibility:
– The SQL Override function lets you override the SQL generated by
Integration Server with your own SQL, including ODBC SQL, native SQL,
and stored procedures.
– You can write and use single or multiple data load SQL.
– You can now use drill-through SQL or template SQL to override the
automatically generated SQL associated with drill-through reports.

The new Hybrid Analysis functionality which enables the OLAP application to
have part of the data loaded or calculated in the multidimensional part and other
data residing in a relational database. This gives some clear advantages, for
example:
򐂰 Increased scalability
򐂰 Complement to Integration Server Drill-Through Reports

442 DB2 OLAP Server V8.1: Using Advanced Functions


Increased usability and flexibility in the way you use Integration Server, with the
help functions, are now available during the building of your applications:
򐂰 Intelligent Help
򐂰 Intelligent console
򐂰 Update Drill-through Reports without doing a member load
򐂰 Formula validation
򐂰 New data source display and organization
򐂰 Resizable windows

A whole new organization of data source and multiple data sources now gives a
better overview of databases, view and users:
򐂰 Formula validation

Integration Server new configuration file — eis.cfg — now enables you to apply
settings to the Integration Server. This is covered in A.2.1, “New configuration file
for Integration Server” on page 444.

Merant 4.0 drivers are now shipped with Integration Server to enable better
access to different things by ODBC sources.

In the following sections we explore some of these new enhancements and


features. Hybrid analysis functionality is not covered in this appendix, since it is
covered in 3.1, “Hybrid Analysis overview” on page 42.

With this new version of DB2 OLAP Server, it is now more than simply a cube
builder and is assuming more function with each release. With the version 8.1 of
DB2 OLAP Server you can build applications split between multidimensional and
relational storage, source data from multiple relational databases and customize
your Business Intelligence environment so it fits the business users needs.

A.2 Migration of earlier OLAP metadata catalogs


In order to accommodate the new function in V8, the metadata catalog has been
changed. When you either create or update an OLAP metadata catalog for the
first time, a set of scripts are run, enabling you to migrate automatically to
Integration Services 8.1. This feature assists you in migrating from the earlier
releases V2, V6.1, and V6.2 of Integration Server. Refer to Figure A-1.

Appendix A. DB2 OLAP Integration Server 443


Figure A-1 OLAP Metadata Catalog setup or migration dialog box

All you need to do is simply:


1. Select the OLAP Server name where your OLAP Catalog is located.
2. Select the ODBC DSN.
3. Enter userid and password.

Now the migration or creation of the OLAP Metadata Catalogs runs.

A.2.1 New configuration file for Integration Server


In Integration Services Release 8.1, you can store server configuration file
settings for command line parameters in a single file called eis.cfg (see
Example A-1). This is where ODBC and JDBC mappings are located for the
different RDBMS.

Integration Services runs this file, eis.cfg, which in turn automatically sets the
configurations for you. This process eliminates the need for manually entering
configurations each time you perform a member or data load.

444 DB2 OLAP Server V8.1: Using Advanced Functions


Example: A-1 Server configuration settings
[JDBC DSN]#COMMENT: The ODBC-JDBC mapping should be in the following format.
#<ODBC DSN>:<Gateway Host>:<Port# on Gateway>?<DB2 server host>

[B]=100
[C]=10000
[E]=C:\IBM\db2olap\logdir\

In Example A-1 the following is set.


򐂰 [B], which gives the fetchsize
򐂰 [C], which gives the commit size
򐂰 [E], which gives the location of the logfile

A.2.2 Multiple data sources in Integration Server


Now, instead of one single database providing everything for Integration Server,
you can have different data sources, and separate databases, for example, if you
need to build your Model on the basis of several relational sources. An important
notice is that Hybrid Analysis does not currently support multiple relational data
sources, as shown in Figure A-2.

Appendix A. DB2 OLAP Integration Server 445


The Connections Dialog menu has been extended to show an additional item
called Add Data Sources, as shown in Figure A-2. The data sources are shown
in the left panel of the Model screen and are grouped by schema/owner.

Figure A-2 Connecting to a second data source in Integration Server

446 DB2 OLAP Server V8.1: Using Advanced Functions


The Model Properties dialog box has a check box which you can check to
remember secondary data source passwords, as shown in Figure A-3.

Figure A-3 Check to remember secondary data source password.

To use the new data source, simply drag and drop tables from the source in the
same way as you do for the original data source.

Important: You can not join tables from different sources to anything other
than the fact table.

Appendix A. DB2 OLAP Integration Server 447


Some information is provided in the Data Source properties dialog shown in
Figure A-4. There is no menu action for this so the box is of pure informational
value. You must click with the second mouse button on the appropriate data
source in the left hand pane and choose Properties.

Figure A-4 Primary data source properties

In the Data Source Properties window you get information about what data
source you are accessing (Name), User Name, Data Source Type, whether you
are connected or not (Connection Status), Whether the data source is in use or
not (In Use Status), and the dimensions in use from the specific data source.

448 DB2 OLAP Server V8.1: Using Advanced Functions


In Figure A-5 we look at the dimension properties. You retrieve these by right
clicking on a dimension in the right panel of the Model window and choosing
Properties.

Figure A-5 Dimension properties showing selection of data source

In the dimension properties you see all available data sources in the drop down
Data Source listing. Be aware that choosing another data source may change
the ability to access data, if the table in the new data source does not exist
equivalent to the one in the data source prior to the switch.

Appendix A. DB2 OLAP Integration Server 449


For the secondary data source properties, refer to Figure A-6.

Figure A-6 Secondary data source properties

The Dimension properties dialog has been extended to let you see, and select
where applicable, the data source available:
򐂰 Data Sources are listed in the left portion of the Model tool, as shown in
Figure A-7.
򐂰 Within a data source, relational objects are categorized and grouped by
schema/owner
– Tables
– Views
– Synonyms

It was always hard to remember where the views are or how you displayed them.
Now the data source listing at the left side has been reorganized and shows
tables, views and synonyms, for all data sources.

450 DB2 OLAP Server V8.1: Using Advanced Functions


Figure A-7 Multiple data sources connected in left frame

Navigation has improved significantly and you have now easier access to browse
the different data sources. The options to show tables, views and synonyms
have been removed from the View menu.

Appendix A. DB2 OLAP Integration Server 451


A.2.3 Drill through
The new version of DB2 OLAP Server v. 8.1 has some great enhancements
when it come to drill-through functionality. When you are defining drill-through
reports, with the metaoutline tool, you choose the metaoutline and click the Edit
--> Drill-Through Reports...menu selection. This now displays the Drill
Through Reports dialog box (as shown in Figure A-8) which has the Add option
and additional functionality.

Figure A-8 How to add a new drill through report

452 DB2 OLAP Server V8.1: Using Advanced Functions


In the dialog box you have the option to name your report. For this example, we
call it “Drill through to beer”. Secondly, you choose whether or not you will allow
spreadsheet users to customize this report. Alternatively, the two new functions
Use Template SQL and None can be selected. Use Template SQL overrides the
SQL that normally will be generated for the drill through reports, and replacing
these with template based SQL, that you can edit yourself (as shown in
Figure A-9).

Figure A-9 New drill through functionality

The option None simply means that no changes can be made.

Appendix A. DB2 OLAP Integration Server 453


Figure A-10 shows a sample of SQL generated by a drill-through report and
changes made to it.

Figure A-10 SQL generated by a drill-through report and changes made to it

Update Drill-through Data is a new function, which is found in the Outline menu.
There is no need to do a member or data load. The dialog is similar to that for
member and data load.

454 DB2 OLAP Server V8.1: Using Advanced Functions


Using this functionality you can now build a DB2 OLAP Server cube using any
method, such as Application Manager and then use Integration Server to do the
drill-through.

For the SQL Override function, refer to Figure A-12.

Figure A-11 SQL Override

Appendix A. DB2 OLAP Integration Server 455


Formula verification (in Figure A-12) takes place using the Formula tab of the
Member Properties Dialog Box in the metaoutline tool. By clicking the verify
button, Integration Server will check for errors. During verification, the cursor
stops at the location of each error. After correcting the error, you can either start
the verification process at the beginning of the formula or choose to find the next
error in the formula.

By creating a “dummy” OLAP cube, the verification function tests the formula
against the cube for any possible syntax or structural irregularities.

Figure A-12 Formula validation for member

456 DB2 OLAP Server V8.1: Using Advanced Functions


Figure A-13 shows a sample of a formula with an error and the result of validating
the formula. Although this is a very simple formula, there could be many
commands like IF and FIX in it, making it quite long and complex (8000
characters are allowed).

Figure A-13 Error reporting on Formulas in Member Properties

You can now use the power of drill-through reporting without having first created
your cube using Integration Services.This means that existing cubes, such as
those created by Application Manager, can be extended to allow greater data
reach, including detail data, non-numeric name lists, and so on.

Appendix A. DB2 OLAP Integration Server 457


1. You start from an existing OLAP database, and use the Application Manager
generated outline (see Figure A-14).

Figure A-14 Start with the Application Manager outline for drill through reports

2. Then you create the model using Integration Server. Using Integration Server
creates a simplified Integration Server model. The model only needs to
contain the fact table and dimensions that will be used in the drill-through
reports OLAP intersection level. In Figure A-14, we see just a few tables used.
3. Then you use Integration Server Metaoutline to create a metaoutline. The
metaoutline only needs to contain dimensions that will be used in the
drill-through reports OLAP intersection level. Hierarchies need only contain
lowest level at which OLAP intersection level starts. Make sure all
transformations are built into the hierarchies.
4. Finally, you create drill-through reports in the normal way, as shown in
Figure A-15.

458 DB2 OLAP Server V8.1: Using Advanced Functions


Figure A-15 Update drill through data for the added drill through functionality

In addition to the existing Open Database Connectivity (ODBC) drivers already


supported, Integration Services Release 8.1 supports Oracle native drivers.

This support eliminates the need for database client software and thus
significantly facilitates the installation of Integration Services on the UNIX
operating system. Support of Oracle native drivers also enhances performance
on UNIX platforms.

A.2.4 XML export/import of models and metaoutlines


Import and export of the model and metaoutline is now integrated in Integration
Server. This is especially helpful when it comes to moving models and
metaoutlines between servers, and thereby share the models and metaoutlines
for the applications.

Using the File menu, you can choose to Export an existing model or metaoutline
as an XML file (see Figure A-16), or import a model/metaoutline from an existing
XML file. This could be a backup version of an existing object, or one created on
another system and sent to you.

XML is human readable and editable with any text editor, or specialized XML
editor.

Appendix A. DB2 OLAP Integration Server 459


Figure A-16 Saving a Model as an XML file

A.2.5 Intelligent help and increased usability


Intelligent Help (see Figure A-17) is similar to the Wizards in Integration Server,
such as was delivered with OLAP Starter Kit. There is one for model and one for
metaoutline. The original Wizards are no longer available.

Clicking the icons of the major steps displays text in the area below. The left pane
has a list of actions, and clicking one of these displays details in the right pane.

Sometimes an action can be launched from the right panel, for example, to
auto-detect a fact table from the current data source.

460 DB2 OLAP Server V8.1: Using Advanced Functions


Figure A-17 Intelligent help in Integration Server

Appendix A. DB2 OLAP Integration Server 461


462 DB2 OLAP Server V8.1: Using Advanced Functions
B

Appendix B. Setting up DB2 OLAP


Analyzer Analysis Server
V8.1
In this appendix we provide guidelines to set up and configure DB2 OLAP
Analyzer Analysis Server (Analyzer throughout this book).

This appendix covers the following topics:


򐂰 The Analyzer V8.1 enhancements
򐂰 How to set up WebSphere Application Server as an application server as
required for Analyzer V8.1
򐂰 How to configure and set up Analyzer V8.1 on WebSphere Application Server
with the repository in DB2 UDB
򐂰 How to start using Analyzer

© Copyright IBM Corp. 2002. All rights reserved. 463


B.1 Analyzer V8.1 overview
With this new release of Analyzer, major changes and enhancements apply:
򐂰 User interface reworked, with new options such as:
– Seamless access to Hybrid Analysis applications.
– Access to relational databases. Before this release, Analyzer could only
access the multidimensional cubes created by Application Manager or
Integration Server.
򐂰 Rearchitected to leverage the power and performance of open systems
platforms including Windows NT/2000/XP, AIX and Sun Solaris.
򐂰 Hyperion Analyzer Java-based Web Client (100% Java) has been enhanced
to contain major features from the Hyperion Analyzer 5.0.2 Windows client
and Design Tools. These major features include the ability to define
calculations, show/hide member filters based on name, values or traffic
lighting colors, retrieve top/bottom, restrict data, subsets, date/time series,
substitution variables, form designer, pin designer and pinboard designer.
򐂰 Hyperion Administrator (100% Java) is now a Java applet allowing users,
user groups, and database connections to be managed from anywhere within
the enterprise. Also, the user types 'system manager' and 'user' have been
replaced with security roles. Users are assigned roles to allow full access,
manage users and user groups, manage database connections, create
custom reports, create basic reports, or allow read only.
򐂰 Relational integration that provides an improved user interface for defining
direct access to relational databases, in addition to OLAP Servers. Users are
able to access data regardless of where it is located, and merge relational
and multidimensional data together on a single report.
򐂰 Personalization that allows users to easily customize their user preferences
choosing from options that:
– Modify the user interface's look-and-feel
– Create personal database connections
– Set a perspective (point of view) on a database connection that remains
persistent throughout a user's session
– Enable a list (personal variable) of members to be reused as a member
selection
򐂰 High-end scalability and the ability to run now right inside leading
J2EE-compliant application servers, such as IBM WebSphere. This benefits
users by providing the highest level of scalability and performance available
in the industry, plus it enables them to leverage existing investments in
enterprise application server technology.

464 DB2 OLAP Server V8.1: Using Advanced Functions


The following other enhancements should be mentioned:
򐂰 Traffic lighting can now be used across Pivot
򐂰 Symbols can be used with userids
򐂰 Allows change of passwords and global password expiration
򐂰 Database formatting can be applied to any dimension, not just measures
򐂰 The Save / Save As interface has been improved
򐂰 The cube navigator now indicates attribute dimensions
򐂰 The dimension browser has been revised so it now handles long member
names
򐂰 LROs support file attachments
򐂰 Send to Excel and print to PDF are possible
򐂰 Add rest of calculation types (except percentage of member)

Important: Analyzer V8.1 can not use the previous version repository.

B.1.1 Supported platforms


Table B-1 shows which components and platforms are supported by Analyzer
V8.1.

Table B-1 Supported components and platforms

Component Details

Windows client Supported Operating Systems:


򐂰 Windows NT 4.0 service pack 6
򐂰 Windows 2000 service pack 2
򐂰 Windows XP
Java Web client Sun Java Plug-in supported:
򐂰 Version 1.3.0.02 (API Toolkit - modal dialogs do
not freeze with this plug-in)
򐂰 Version 1.3.0.02 or higher (Java Client)

Web Browsers supported:


򐂰 Microsoft Internet Explorer 4.0, 5.0 or 6.0
򐂰 Netscape 4.7, 6.1 or 6.2

Operating Systems supported:


򐂰 Windows 98 Service Release 2
򐂰 Windows NT 4.0 service pack 6
򐂰 Windows 2000 service pack 2
򐂰 Windows XP

Appendix B. Setting up DB2 OLAP Analyzer Analysis Server V8.1 465


Component Details

HTML Web client Web Browsers supported:


򐂰 Microsoft Internet Explorer 4.0, 5.0 or 6.0
򐂰 Netscape 6.1 or 6.2

Operating Systems supported:


򐂰 Windows 98 Service Release 2
򐂰 Windows NT 4.0 service pack 6
򐂰 Windows 2000 service pack 2
򐂰 Windows XP
Application servers 򐂰 Windows NT 4.0 service pack 6
򐂰 Windows 2000 service pack 2
򐂰 AIX 4.3.3
򐂰 Solaris 8

Table B-2 shows the different compatibilities and dependencies required to run
Analyzer V8.1.

Table B-2 Compatibilities and dependencies

Component Details

OLAP Server 򐂰 DB2 OLAP Server V7.1 Fixpack 7 (Essbase


6.1.4)
򐂰 DB2 OLAP Server V7.1 Fixpack 9 (Essbase
6.2.1)
򐂰 DB2 OLAP Server V8.1 (Essbase 6.5)
Repository 򐂰 IBM DB2 7.2 UDB Personal Edition on Windows
NT 4.0 sp6, Windows 2000 sp2
򐂰 IBM DB2 7.2 UDB Workgroup Edition and
Enterprise Edition on all supported operating
systems
򐂰 Oracle 8.1.7
򐂰 Microsoft SQL Server 2000 on Windows NT 4.0
sp6, Windows 2000 sp2
WebSphere Application Web Server support for:
Server V3.5.5 and V4.0.3 򐂰 Microsoft IIS 5.0 and 6.0
򐂰 Netscape 3.6 and 4.0
򐂰 IBM HTTP Server 1.3.12 for WebSphere 3.5.5 /
IBM HTTP Server 1.3.19 for WebSphere 4.0.3

466 DB2 OLAP Server V8.1: Using Advanced Functions


For the hardware configuration:
򐂰 The server should run at least on a 450 mhz CPU or higher, and 256 MB
RAM is an absolute minimum (recommended is 512 MB)
򐂰 The clients should run at least on a 233 mhz CPU or higher, and with 128 MB
RAM free as a minimum

B.1.2 Architectural overview


With Analyzer V8.1 new architecture, the traditional Windows clients have moved
into Java based clients as shown in Figure B-1. The Windows clients will still be
available. The functionality available in the Java clients are now identical to the
Windows client. For example, the administration includes user definitions and
security.

Figure B-1 Architecture for Java based clients

An HTML based client is also available which is pure HTML. This results in a
much better and faster performance as compared to the Java clients. The HTML
client supports forms and allows users to work interactively with data.

Appendix B. Setting up DB2 OLAP Analyzer Analysis Server V8.1 467


The Java based Web client has the following new abilities:
򐂰 An analysis tool (that is also a right-click menu):
– Show/Hide only
– Calculations
– Restrict data
– Retrieve Top/Bottom
򐂰 Advanced selections capabilites within cube navigator, dimension browser,
right-click menu as:
– Also select previous
– Substitution variables
– Date time series
– Subsets

The Administration tool is covered in Section B.4.2, “Analyzer Administration


Tool” on page 486.

B.2 WebSphere Application Server setup


Analyzer V8.1 requires an application server, such as WebSphere Application
Server, to be set up first.

The installation of WebSphere Application Server V3.5 Standard Edition and


Fixpack 5 for Windows is quite simple.

On the Analyzer v8.1 Refresh Server Windows CD-ROM, under the folder called
websphere35\Nt, double-click on setup.exe to start the installation of WebSphere
Application Server 3.5 base code.

468 DB2 OLAP Server V8.1: Using Advanced Functions


1. Choose Custom Installation, as shown in Figure B-2.

Figure B-2 Selecting custom installation

Appendix B. Setting up DB2 OLAP Analyzer Analysis Server V8.1 469


2. Take the defaults for the Application Server components and click Next
(see Figure B-3).

Figure B-3 Selecting WebSphere Application Server components

470 DB2 OLAP Server V8.1: Using Advanced Functions


3. Take the default (IBM HTTP Server V1.3.12) for the Web Server Plug-in
component and click Next (see Figure B-4).

Figure B-4 Choosing the Web Server Plugins

Appendix B. Setting up DB2 OLAP Analyzer Analysis Server V8.1 471


4. Type a user name and password (user name must have administrator rights)
and click Next (Figure B-5).

Figure B-5 Specifying security options

472 DB2 OLAP Server V8.1: Using Advanced Functions


5. Take the defaults for Product Directory and click Next (see Figure B-6).

Figure B-6 Specifying products directories

6. For Database options, choose DB2 for Database Type, then fill in the
pertinent information for DB2 and click Next (see Figure B-7)

Figure B-7 Specifying database options

Appendix B. Setting up DB2 OLAP Analyzer Analysis Server V8.1 473


7. Keep clicking Next to get the Installation started.
8. Once this is done, reboot.
9. When the machine comes up again, MS-DOS window will open to start the
creation of the database called "was" in DB2.
10.Once this is completed, stop WebSphere and Web Servers services. Then
install Fixpak 5 for WebSphere Application Server, which will be done via
MS-DOS.
Fixpak 5 for WebSphere Application Server is located on the root of the
CD-ROM. It is a zip file called was35_std_ptf_5.zip.

Note: If this zip file is not present, please go to the following URL to
download the zip file. The zip file is dated Oct 31, 2001 with a file size of
57371 KB:
ftp://ftp.software.ibm.com/software/websphere/appserv/support/fixpacks/
was35/fixpack5/WIN/

To install the fixpak:


򐂰 Stop the following processes prior to installation:
– IBM HTTP Server
– WebSphere Application Server
– HTTPDL.exe and IMNSVDEM.exe processes under task manager (which
is the HTML Search Engine for DB2 UDB)
򐂰 Open a DOS command window and type the CD command (change
directory) to change it to where the extracted fixpak is located.
򐂰 Type install (to start the installation of the fixpak).
򐂰 Insert the appropriate information as to where WebSphere, HTTP Server, and
the Samples are located.
򐂰 Answer Yes to all questions.

To start up WebSphere, go to Start -> Program -> IBM WebSphere ->


Application Server v3.5 -> Start Admin Server.

To start up the IBM HTTP Server, go to Start -> Program -> IBM HTTP Server
-> Start HTTP Server.

Refer to the readme file for more information.

474 DB2 OLAP Server V8.1: Using Advanced Functions


B.3 Setting up and configuring Analyzer Server V8.1
Analyzer V8.1 is significantly different from the earlier version 5.x. The repository
is now only relational based, and this requires some additional setup steps,
which we cover in the following step-by-step guide.

The following list provides an overview of the components needed for running the
installation procedure:
򐂰 Setup_win32.exe: setup the executable
򐂰 Setup_win32_debug.cmd: launches setup log console.
򐂰 Setup.jar: installation code
򐂰 Jniutil.dll: specific to Windows
򐂰 hyperion\analyzer directory: Hyperion Analyzer ADM driver files
򐂰 \jdk1.3_win32: Java Runtime Environment for the Installation
򐂰 \was35_std_ptf_5.zip: Fixpack 5 for WebSphere 3.5
򐂰 \websphere35 : WebSphere 3.5 installation
򐂰 \db2: DB2 UDB Personal Edition V7.2
򐂰 \xml_config: XML files to deploy Hyperion Analyzer into WebSphere
򐂰 \documentation
򐂰 \java_plug-in_1_3_0_02: java plug-in 1.3.0.02 installation
򐂰 \repository: JDBC and SQL scripts

The different components are in the following locations:


򐂰 DB2 UDB: \hyperion\sqllib (If DB2 UDB Personal Edition is installed)
򐂰 WebSphere:\WebSphere\AppServer
򐂰 Analyzer:
\WebSphere\AppServer\hosts\default_host\<<servlet_engine_name>>
򐂰 Web directory: HTML pages, Samples, HTMLClient
򐂰 Classes directory: Bin, Lib, Classes.XML
򐂰 Logs:\WebSphere\AppServer\logs
– <<Servlet_Engine_Name>>stdout.log
– <<Servlet_Engine_Name>>stderr.log
򐂰 IBM HTTP Server: \IBM HTTP Server

B.3.1 Configuring Analyzer


On the server where you will have Analyzer Server running, we are assuming
you have DB2 Enterprise Edition installed and WebSphere Application Server
3.5 with Fixpak 5. These will serve as the relational repository and Application
Server. If WebSphere Application Server 4.0 is used, Fixpak 3 for WebSphere
will need to be installed.

Appendix B. Setting up DB2 OLAP Analyzer Analysis Server V8.1 475


If DB2 UDB is not going to be used as the repository for the Analyzer Server, the
other options available for an RDBMS are Oracle and MS SQL Server.

These are the different steps:


1. Ensure that DB2 UDB, WebSphere Application Server, and IBM HTTP Server
are running.
2. Start the installation of Analyzer by inserting the Analyzer CD into the
CD-ROM (or you can also double-click on setup_win32.exe to start the
install).
3. After the welcome screen and release notes, insert the number of users in the
usage mode panel and move on to the next panel, which is the License
agreement.
4. After agreeing to the the License terms, by default, the Application Server
option (IBM WebSphere 3.5) is chosen (see Figure B-8).

Figure B-8 Selecting the Application Server

476 DB2 OLAP Server V8.1: Using Advanced Functions


5. Next, we need to configure WebSphere Application Server. By default, the
path where WebSphere is installed is filled in. However, if the information is
not correct, change it to point to the correct path where WebSphere is
installed. The node name by default will be filled in. If the name is correct,
leave it as is (see Figure B-9).

Figure B-9 Configuring the Application Server

6. Next, we specify which relational database we will use for Analyzer's


repository. Here, assuming that DB2 UDB Enterprise Edition is on the same
machine where Analyzer will be installed, we will pick the DB2 UDB V7.2
(Local) option as well as choosing both options (as shown on Figure B-10):
– Create database (creates ANALYZ60)
– Create repository (tables and default data for Analyzer within database
ANALYZ60 )

Appendix B. Setting up DB2 OLAP Analyzer Analysis Server V8.1 477


Figure B-10 Using a local RDBMS

If DB2 UDB Enterprise Edition is on a remote machine (see Figure B-11), you
need to create the database ANALYZ60 first and authorize the user Analyzer
to this database.

Note: The user Analyzer with password "password" needs to be created


on the operating system with Administrator rights.

Then pick the DB2 UDB V7.2 (Remote Workgroup Edition, Enterprise Edition,
Extended_Enterprise Edition) option as well as the option:
– Create repository.

478 DB2 OLAP Server V8.1: Using Advanced Functions


Figure B-11 Using a remote RDBMS

7. The next step is to configure the DB2 connection information. The following
information is needed for a local connection (see Figure B-12) though most of
the information is filled in by default.
– DB2 Server: hostname of machine: This is automatically filled in and
cannot be changed.
– DB2 Database Name: Name of the database for Analyzer which is
ANALYZ60. This is automatically filled in and cannot be changed.
– DB2 Administrator Name: Username with authority to connect to DB2.
– DB2 Administrator Password: Password used in conjunction with the
username (DB2 Administrator Name).

Appendix B. Setting up DB2 OLAP Analyzer Analysis Server V8.1 479


Figure B-12 Configuring the local DB2 connection

480 DB2 OLAP Server V8.1: Using Advanced Functions


If the remote DB2 option was chosen in step 6 above, the following
information is needed, although most of it is filled in by default (see
Figure B-13).
– DB2 Server: Hostname of the remote machine where DB2 is installed.
– DB2 Database Name: Name of the database for Analyzer which is
ANALYZ60. If database for Analyzer is different, please change this field to
the appropriate database name.
– DB2 Administrator Name: Username with authority to connect to DB2.
– DB2 Administrator Password: Password used in conjunction with the
username (DB2 Administrator Name).

Figure B-13 Configuring the remote DB2 connection

Appendix B. Setting up DB2 OLAP Analyzer Analysis Server V8.1 481


8. The next step is to configure Analyzer, as shown in Figure B-14.

Figure B-14 Configuring Analyzer

9. Now you will see the summary panel, which shows what is about to be
installed. click Next to actually start the installation.
When the installation is completed, there is an option to display the log file
and also, the login system user information is given along with the URL to
launch Analyzer. The URL is as follows:
http://hostname/Analyzer6_Server/webapp/Analyzer6/index.html
In addition to the information stated under the heading "After Installation
Checklist" on pg.19 of the Analyzer Installation Guide, please note the
following. These steps are to be completed once Analyzer has been installed:

Prior to launching Analyzer, there are a couple more things that need to be done
if the edition of DB2 UDB v7.2 is not Personal Edition.
1. Once the Analyzer install is done, go back to the CD-ROM and open the
folder called Java_Plugin_1_3_0_02.

482 DB2 OLAP Server V8.1: Using Advanced Functions


2. Click on the self-executable named j2re-1_3_0_02-win-i.exe, which will go
through the install wizard for java runtime environment. Take all defaults.
3. Ensure that all services for DB2 OLAP Server, DB2 UDB, IBM HTTP Server,
and WebSphere Application Server are stopped.
4. In DOS, change directory to …sqllib\java12 and run the batch file in DOS
called usejdbc2.bat (see Figure B-15) so that the correct JDBC driver level is
running (once this is done, there should be a file called inuse in the same
directory area).

Figure B-15 Running usejdbc2.bat

5. Go to the directory where WebSphere has been installed:


…WebSphere\AppServer\hosts\default_host\Analyzer6_Server\Analyzer6\
classes\lib\jdbc\db2
Rename the db2java.zip (or it may be called db2java.jar) file to for example,
db2java.zip.orig (or db2java.jar.orig).
6. Go to the directory…sqllib\java and copy the file called db2java.zip and paste
it into the WebSphere directory as stated in the step above this one. If
necessary, please do a rename on the copied file to rename it exactly how the
original file was (either db2java.zip or db2java.jar as in step above this one).
7. Reboot the machine and then once the machine comes back on, click on
Start, Program, IBM WebSphere, Application Server v3.5 and click on Start
Admin Server. To start this automatically, go to Services and change IBM WS
AdminServer to Automatic instead of the default, which is manual.
8. Once everything is started (that means WebSphere Application Server, HTTP
Server, OLAP Server and DB2 UDB), launch a Web browser like Netscape 6
or Internet Explorer 4 and above. Type the following in the URL:
http://hostname/Analyzer6_Server/webapp/Analyzer6/index.html
(where hostname is the name of your machine and Analyzer6_Server is the
Servlet Engine Name)

Appendix B. Setting up DB2 OLAP Analyzer Analysis Server V8.1 483


B.3.2 Uninstalling Analyzer V8.1
If you need to remove the installation, the following components need to be
uninstalled:
򐂰 Uninstall WebSphere
򐂰 Uninstall IBM HTTP Server
򐂰 Uninstall DB2 Personal Edition

Delete the following directories:


򐂰 [root_drive]\Hyperion\Appserver\hosts\default_hosts\Analyzer6_Server\Analyze
r6
򐂰 [root_drive]\DB2
򐂰 [root_drive]\DB2Log
򐂰 [root_drive]\Hyperion\appserver
򐂰 [root_drive]\Hyperion\sqllib
򐂰 [root_drive]\Hyperion\analyzer
򐂰 [root_drive]\WebSphere\AppServer
򐂰 [root_drive]\IBM HTTP Server

B.4 Using Analyzer V8.1


You can still use the Windows clients but for this appendix we have chosen to use
the Java client to show the new functionalities of Analyzer.

The Analyzer Launch page found on the URL


http://ServerHostName/Analyzer6_Server/webapp/Analyzer6/index.html on the
server where you installed Analyzer, is shown in Figure B-16. Here you can
choose to launch the following tools:
򐂰 Analyzer Information Map: Provides centralized access to the entire
Analyzer documentation set, this launch page, and several related Web sites.
Administrators can also customize the Information Map to provide users with
additional links and information.
򐂰 Analyzer Java Web Client: Using Java technology, the Analyzer Java Web
Client offers Web-based functionality at its best. This client enables users to
create and save sophisticated analytical reports using a single interface. The
Java Web Client is ideal for advanced business analysis users and report
designers.
򐂰 Analyzer HTML Web Client: A zero-footprint Hyperion Analyzer client based
on standard HTML technology. Because of its streamlined, intuitive
user-interface, this Web client is ideal for users focused on using rather than
creating business analyses.

484 DB2 OLAP Server V8.1: Using Advanced Functions


򐂰 Analyzer Administration Tools: A graphical user-interface for managing
users, user groups, database connections, and security roles.
򐂰 Analyzer Analysis Server: Enables administrators to remotely monitor and
control Hyperion Analyzer Analysis Servers.

Figure B-16 Analyzer Launch Page

Analyzer API Toolkit Jump Start enables developers to extend the out-of-the-box
Java Web Client or to build their own custom Web applications leveraging the
flexibility, ease-of-use and analytic power of Hyperion Analyzer. This Jump Start
Guide introduces concepts necessary to begin using the API Toolkit, as it
provides live sample applications.

B.4.1 Analyzer Server console


Using the Analyzer Server console (see Figure B-17) enables the administrator
to monitor the connected users accessing the Analyzer Server. You have the
possibility to apply different settings for monitoring:
򐂰 Idletime for connected users
򐂰 Statistical refresh interval
򐂰 Connected users

Appendix B. Setting up DB2 OLAP Analyzer Analysis Server V8.1 485


򐂰 Trace toggle on/off for users
򐂰 Killed users and reason message

Figure B-17 Analyzer Server console for user monitoring

Furthermore, the traces toggled on are shown in the lower part of the
Administration Console window.

B.4.2 Analyzer Administration Tool


The Java based Administration tool lets the administrator do management tasks
from anywhere. The user interface allows you to:
򐂰 Manage userids and passwords
򐂰 Assign users to user groups
򐂰 Assign personalization and user settings
򐂰 Manage global database connections
򐂰 Assign and manage users to have roles

486 DB2 OLAP Server V8.1: Using Advanced Functions


The Administration Tool is also where you select the data source accessed by
the users. Connecting to a new OLAP application is a three-step job. (This is a
global setting where all users will be able to see the connection to the OLAP
application.) This is shown in Figure B-18.

Figure B-18 Connecting to DB2 OLAP application

Appendix B. Setting up DB2 OLAP Analyzer Analysis Server V8.1 487


488 DB2 OLAP Server V8.1: Using Advanced Functions
C

Appendix C. Enterprise Services sample


programs
In this appendix we provide the code of one of the sample programs packaged
with Enterprise Services and used in this book to copy an application or
database: CopyOlapAppAndCube sample program.

We also provide the script to run the sample programs: runsamples.cmd script.

© Copyright IBM Corp. 2002. All rights reserved. 489


C.1 Copy application/database using CopyOLAP
Example 8-17 provides the script to copy an application or database:
CopyOlapAppAndCube.

Example 8-17 CopyOlapAppAndCube sample script


/*
File: CopyOlapAppAndCube.java 1.0, 04/04/2001
Copyright (c) 2002 Hyperion Solutions Corporation. All Rights Reserved.
*/
package com.essbase.samples;

import com.essbase.api.base.*;
import com.essbase.api.session.*;
import com.essbase.api.datasource.*;
import com.essbase.api.dataquery.*;
import com.essbase.api.domain.*;

/**
CopyOlapAppAndCube copies olap application/cube from one server to another.

In order for this sample to work in your environment, make sure to


change the s_userName, s_password, s_domainName, s_prefEesSvrName to suit
your environment.

@author Srini Ranga


@version 1.0, 04/04/2001
*/
public class CopyOlapAppAndCube {

// NOTE: Change the following variables to suit your setup.

private static String s_userName = "system";


private static String s_password = "password";
private static String s_domainName = "essbase";
private static String s_prefEesSvrName = "localhost";
private static IEssbase.EEssOrbPluginType s_orbType =
IEssbase.EEssOrbPluginType.TCPIP;
private static int s_port = 5001;

public static void main(String[] args) {


IEssbase ess = null;
try {
acceptArgs(args);

// Create JAPI instance.


ess = IEssbase.Home.create(IEssbase.JAPI_VERSION);

490 DB2 OLAP Server V8.1: Using Advanced Functions


// Sign on to the domain.
IEssDomain dom = ess.signOn(s_userName, s_password, s_domainName,
s_prefEesSvrName, s_orbType, s_port);

// Copy olap application across servers.

dom.copyOlapApplication("sicily", "Demo", "cayman", "Demo1");

// Copy cube across servers.

dom.copyCube("sicily", "Demo", "Basic", "cayman", "Demo2",


"Basic");

} catch (EssException x) {
System.out.println("Error: " + x.getMessage());
} finally {
// Sign off from the domain.
try {
if (ess != null && ess.isSignedOn() == true)
ess.signOff();
} catch (EssException x) {
System.out.println("Error: " + x.getMessage());
}
}
}

static void acceptArgs(String[] args) throws EssException {


if (args.length >= 6) {
s_userName = args[0];
s_password = args[1];
s_domainName = args[2];
s_prefEesSvrName = args[3];
s_orbType = IEssbase.EEssOrbPluginType.sm_fromString(args[4]);
s_port = Integer.parseInt(args[5]);
} else if (args.length != 0) {
System.err.println(
"Usage: java com.essbase.samples.CopyOlapAppCube " +
"<user> <password> <domain> <prefEesSvr> <orbType> <port>\n"+
" java com.essbase.samples.CopyOlapAppCube");
System.exit(1);
}
}
}

Appendix C. Enterprise Services sample programs 491


C.2 Sample runsamples.cmd script
Example 8-18 provides the script to run the sample programs.

Example 8-18 Sample runsamples.cmd script


@echo on

REM This command file is used to run Essbase JAPI examples.


REM You can change the following varibles to suit your setup.

set ESS_ES_HOME=c:\itso\essbase\ees
set JAVA_HOME=%ESS_ES_HOME%\jre
set THIRDPARTY=%ESS_ES_HOME%\external
set CLASSPATH=%ESS_ES_HOME%\lib\ess_japi.jar;
set WEBLOGIC_HOME=C:\program_files\weblogic
set USER=system
set PASSWORD=password
set DOMAIN=essbase
set EES_SERVER=localhost
set OLAP_SERVER=cayman

if "%1"=="" goto tcpip


if "%1" == "tcpip" goto tcpip
if "%1" == "http" goto http
if "%1" == "corba" goto corba
if "%1" == "ejb" goto ejb
goto usage

:tcpip
set ORB=tcpip
set PORT=5001
goto run

:http
set ORB=http
set PORT=7001
goto run

:corba
set ORB=corba
set PORT=0
set
CLASSPATH=%CLASSPATH%;%ESS_ES_HOME%\lib\ess_es_server.jar;%THIRDPARTY%\visibrok
er\vbjorb.jar;
goto run

:ejb
set ORB=ejb

492 DB2 OLAP Server V8.1: Using Advanced Functions


set PORT=7001
set
CLASSPATH=%CLASSPATH%;%ESS_ES_HOME%\lib\ess_es_server.jar;%WEBLOGIC_HOME%\class
es;%WEBLOGIC_HOME%\lib\weblogicaux.jar;
goto run

:run
echo Step-1: Ready to compile all the examples ...
pause
%JAVA_HOME%\bin\javac *.java -d .

echo Step-2: Ready to run Data Query example ...


pause
%JAVA_HOME%\bin\java com.essbase.samples.CopyOlapAppAndCube
%USER% %PASSWORD% %DOMAIN% %EES_SERVER% %ORB%
%PORT% %OLAP_SERVER%

echo Step-3: You can include to run the rest of the examples in similary way.
goto end

:usage
echo Usage: runsamples [tcpip or corba or http or ejb]
echo where
echo tcpip - use tcpip to run the samples.
echo corba - use corba to run the samples. You need to download
your own copy of Visibroker.
echo http - use http to run the samples. You need to have run
EES in a web container before.
echo ejb - use ejb to run the samples. You need to have run EES
in a EJB container before.
goto end

:end
pause

Appendix C. Enterprise Services sample programs 493


494 DB2 OLAP Server V8.1: Using Advanced Functions
D

Appendix D. Data modeling basics


In this appendix we describe the basic differences between the two major data
modeling techniques used in Business Intelligence solutions.

The two data modeling techniques that are relevant in a data warehousing
environment are ER (Entity Relationship) modeling and dimensional modeling.

ER modeling produces a data model of the specific area of interest, using two
basic concepts: entities and the relationships between those entities. Detailed
ER models also contain attributes, which can be properties of either the entities
or the relationships. The ER model is an abstraction tool because it can be used
to understand and simplify the ambiguous data relationships in the business
world and complex systems environments.

Dimensional modeling uses three basic concepts: measures, facts, and


dimensions. Dimensional modeling is powerful in representing the requirements
of the business user in the context of database tables.

D.1 ER data models


An ER model as in Figure D-1 is represented by an ER diagram, which uses
three basic graphic symbols to conceptualize the data: entity, relationship, and
attribute.

© Copyright IBM Corp. 2002. All rights reserved. 495


An entity is defined to be a person, place, thing, or event of interest to the
business or the organization. An entity represents a class of objects, which are
things in the real world that can be observed and classified by their properties
and characteristics.Example of entity are Product, Customer

A relationship is represented with lines drawn between entities. The relationship


between two entities can be defined in terms of the cardinality. This is the
maximum number of instances of one entity that are related to a single instance
in another table and vice versa. The possible cardinalities are: one-to-one (1:1),
one-to-many (1:M), and many-to-many (M:M). For example, the relationship
between Product and Customer can be one-to-Many (1 single customer can buy
many different products).

For ER model, with man-to-many (M:M) relationship is required a associative


entity.

Attributes describe the characteristics of properties of the entities, example,


Product ID, Description, and Picture are attributes of the PRODUCT entity. An
attribute name should be unique in an entity and should be self-explanatory.

Entity

Product Product Model

Product_id Product_id
Prod_Description
Picture
x Model_id
Retail_Price

Attribute Relationship
x

Component Product Compoment

Comp_id Product_id
Comp_description
Cost x Model_id
Comp_id
Number_components

Figure D-1 ER data model

496 DB2 OLAP Server V8.1: Using Advanced Functions


D.2 Multidimensional data models: star and snowflake
There are two basic models that can be used in dimensional modeling:
򐂰 Star model
򐂰 Snowflake model

Star and snowflake models correspond to a given set of end-user requirements,


basically expressed as queries and hypothesis for which the data warehouse
should provide an answer.

Star schema
This has become a common term used to connote a dimensional model.
Database designers have used the term star schema to describe dimensional
models because the resulting structure looks like a star and the logical diagram
looks like the physical schema. The star model, as shown in Figure D-2, is the
basic structure for a dimensional model. It typically has one large central table
(called the fact table) and a set of smaller tables (called the dimension tables)
arranged in a radial pattern around the fact table.

Product Customer

Product_id Customer_id
Prod_Description Customer_Name
Product_Family Customer_Segment

Fact

Product_id
Time_id
Customer_id
Branch_id
Quantity
Organization Time
Sales_Total
Area Time_id
Region Year
Branch_id Quarter
Branch_Name Month

Figure D-2 Star schema data model

Appendix D. Data modeling basics 497


Snowflake model
Dimensional modeling typically begins by identifying facts and dimensions, after
the business requirements have been gathered. The initial dimensional model is
usually starlike in appearance, with one fact table in the center and one level of
several dimensions around it.

The snowflake model, as shown in Figure D-3, is the result of decomposing one
or more of the dimensions, which sometimes have hierarchies themselves. We
can define the many-to-one relationships among members within a dimension
table as keys that reference the dimensions.

Product Family Customer Segment

Family_id Segment_id
Family_Name Segment_Name

Fact

Product_id
Product Time_id Customer
Customer_id
Product_id Branch_id Customert_id
Prod_Description Quantity Customer_Name
Family_id Sales_Total Segment_id

Time

Time_id
Banking Location Banking Year
Quarter
Location_id Branch_id Month
Location_Name Branch_Name
Location_id

Figure D-3 Snowflake data model

498 DB2 OLAP Server V8.1: Using Advanced Functions


Related publications

The publications listed in this section are considered particularly suitable for a
more detailed discussion of the topics covered in this redbook.

IBM Redbooks
For information on ordering these publications, see “How to get IBM Redbooks”
on page 500.
򐂰 DB2 OLAP Server: Theory and practices, SG24-6138-00
򐂰 LDAP Implementation Cookbook, SG24-5110

Other resources
These publications are also relevant as further information sources:
򐂰 IBM DB2 OLAP Server 8.1 Quick Path, SC18-7000
򐂰 IBM DB2 OLAP Server 8.1 Database Administrator’s Guide, SC18-7001
򐂰 IBM DB2 OLAP Server 8.1 Integration Server Data Preparation Guide,
SC18-7006
򐂰 IBM DB2 OLAP Server 8.1 Integration Server Administration Guide,
SC27-1227
򐂰 IBM DB2 OLAP Server 8.1 Spreadsheet Add-in User’s Guide for 1-2-3,
SC27-1231
򐂰 IBM DB2 OLAP Server 8.1 Spreadsheet Add-in User’s Guide for Excel,
SC27-1232
򐂰 IBM DB2 OLAP Server 8.1 Installation Guide, SC27-1228
򐂰 IBM DB2 OLAP Server 8.1 MaxL User’s Guide, SC27-XXXX
򐂰 IBM DB2 OLAP Server 8.1 SQL Interface Guide, SC18-7004
򐂰 Hyperion Analyzer Release 6 .1 Product Overview
򐂰 Hyperion Analyzer Release 6.1 Administrator’s Guide
򐂰 Hyperion Analyzer Release 6.1 Getting started
򐂰 Hyperion Analyzer Release 6.1 Installation Guide

© Copyright IBM Corp. 2002. All rights reserved. 499


Referenced Web sites
These Web sites are also relevant as further information sources:
򐂰 IBM DB2 OLAP Server site
http://www-3.ibm.com/software/data/db2/db2olap/
򐂰 IBM Data Management Home Page
http://www-4.ibm.com/software/data/
򐂰 Hyperion Essbase Server site
http://www.essbase.com/
򐂰 Hyperion Home Page
http://www.hyperion.com/
򐂰 Distribution of freeware Essbase information, applications and code
http://www.olapunderground.com/
򐂰 Scapa technologies and its stress testing tool
http://www.scapatech.com

How to get IBM Redbooks


You can order hardcopy Redbooks, as well as view, download, or search for
Redbooks at the following Web site:
ibm.com/redbooks

You can also download additional materials (code samples or diskette/CD-ROM


images) from that site.

IBM Redbooks collections


Redbooks are also available on CD-ROMs. Click the CD-ROMs button on the
Redbooks Web site for information about all the CD-ROMs offered, as well as
updates and formats.

500 DB2 OLAP Server V8.1: Using Advanced Functions


Index
thick client 26
Symbols using Analyzer 484
@ALIAS 19
WebSphere Application Server 468
@NAME 19
ancestors 53
@NEXTS 19
API enhancements 7, 16
@PRIORS 19
applet 125
application
A
addolapserver 194 data storage type 315
adduser 187 create 312
administration 279, 304 delete 312
Administration Server 280 elapsed time 315
Administration Services 25, 230, 240, 259, 265, max attachment file size 315
279 minimum access level 315
architecture 280 number of connections 315
client tier 280 rename 312
components 280, 283 start 313
configuration 283 start time 315
Console 284 startup 315
console 36, 279–281 statistics 315
database tier 280 stop 313
Hybrid Analysis 57 timeout on data block locks 315
middle tier 280 application fault tolerance 152
Outline Editor 321 Application Manager 13, 25, 231, 237
outline editor 58 SQL strings 18
server 280, 283 asynchronous processing 25
users atypical values 90
backup 384 authentication 288, 301
administrators 279, 396 AUTHENTICATIONMODULE 301
AGENTLOGMESSAGELEVEL ERROR 215 automatic summary tables 60
AGENTPORT 17 automatically 296
agents availability 132, 137
multiple OLAP agents 17, 389, 412
aggregation 4, 97
aliases 325
B
background 12, 25, 240, 281–282, 304, 342
Analyzer 22, 26, 463
backward compatibility support 17
Administration tool 486
balanced workload 146
components 475
batch window 3, 8, 223
configuring 475
block density 244
hardware platforms 26
block size 244
HTML based client 26
Brio Enterprise 22
Java-based Web Client 26, 464
buffered I/O 17, 245, 390–391
platforms 464–465
business issue 32
relational integration 464

© Copyright IBM Corp. 2002. All rights reserved. 501


Business Objects 22 synchronizing data 165
business requirements 120 clustering 3, 7, 25, 121, 128, 131, 137, 166, 184
commit threshold 230
concurrent users 76, 78
C configuration 21
cache size 62
configuration settings 17, 307
caches 245, 338, 390
Connect.java 214
cache memory locking 246
connection pool 135–137, 140, 160, 166
data file 245, 395
connection pooling 3, 7, 25, 121, 134, 166, 184,
index 395
308
memory locking 319, 394
connections 120, 134, 310
size 319
additional 145
CALC 239
capacity increment 150
CALCDEFAULT 239
maximum number 136, 145
CALCLINE 239
minimum capacity 150
CALCPARALLEL 10, 229, 232
minimum number 150
CALCTASKDIMS 10, 228, 234
control
calculation 240, 281
OLAP Servers 284
functions 19
copies 130, 216–217
outline 331
identical 159
parallel 3, 224
copy
script 331
users 297
scripts 18
copyCube 195, 260
serial 8, 224
copyOlapApp 194
set the number of threads 230
CopyOlapAppAndCube 162, 214, 489–490
Calculation Script Editor 25, 353
CORBA 122, 124, 129
case sensitivity 19
CPU 307
CDF 15, 419
CPU parallelism 252, 269, 276
copying 428
creating cubes 281
creating 421
cross-platform 279
deleting 428
cross-server operations 12, 281, 304
displaying 428
CTrace 86–87
registering 425
cube
Application Manager 429
explosion 79
MaxL 426
cube storage 4
renaming 428
cube view 218
using
creation 218
calculations 438
currency conversion 325
outline 434
Custom Defined Functions 7, 15, 389, 419
CDM 15
Custom Defined Macros 7, 15
checklist 358
custom view 288–290, 292, 295, 299, 309, 314,
clearing data 332
317, 332, 385
CLEARLOGFILE TRUE 215
create 386
client use interface 280
clients requests
distribution 138 D
cluster 120, 130, 136, 140, 159, 166, 294, 299 data
create 159 cache 261
definitions 146, 149 consistency 48

502 DB2 OLAP Server V8.1: Using Advanced Functions


detailed level 4 wizard 100
distribution 91 deviations 5, 90, 104
integrity 270 dimension building 18
mass data scalability 4 dimensional tables 60
migration 26 direct I/O 17, 245, 263, 389–391, 393
mining 23 platforms 392
algorithm 5 disable
volume 4, 130 username 288
data blocks 315 discovering anomalies 6
database fault tolerance 152 disk drivers 307
databases usage 338
allocating storage 320 distribution
blocks 319 requests 138
caches 319 DLSINGLETHREADPERSTAGE 253–254
calculation 318 DLTHREADSPREPARE 253, 255, 262
committed access 320 DLTHREADSWRITE 253, 256, 262
create 316 dom.copyCube 162
currency 321 dom.copyOlapApplication 162
current I/O access mode 320 domain 173, 178
data compression 320 creating 182
data retrieval buffers 318 domain storage 123, 171, 173, 178
delete 316 drill down
dimensions 318 into relational data 79
modifications 321 drill-through 42, 441, 452
pending I/O access mode 320 Drill-Through Reports 4, 42, 80, 82, 442, 452
properties 317
rename 316
start 316
E
e-bank
startup 318
application 29, 95
statistics 319
editors 279
stop 316
EJB 122, 124–125, 128
storage 320
elapsed time 307
transactions 320
e-mail 282, 357
uncommitted access 320
empty outline support 18
DataQuery 214
enterprise administration 25
sample program 211
Enterprise Services 6, 25, 119, 260, 283
DB2 OLAP
administrators 184
multiple data sources 441
benefits 131
DB2 OLAP Analyzer Analysis Server 463
command shell 163
DB2 OLAP Integration Server 441
components 122
DB2 OLAP Server
define Enterprise Services servers 189
components 21
define OLAP servers 191
servers 280
environment support 7
DB2 OLAP Server installation 22
graphical console 161
DB2 OLAP Server JAPI 124
group 178
definitions 43
guidelines 159
development 294, 304
managing groups 188
deviation detection 3
regular users 184
definition 6, 98

Index 503
remote activation 216 getdbstats 241, 266
sample programs 125 GETPERFSTATS 266
settings 215 grant permissions 292–293
start 176 grid 79
stop 176 group
synchronization 217 delete 289
users creation 184 rename 290
Enterprise Services Command Shell 124, 179 group’s user membership 290
Enterprise Services Console 124, 177, 183 groups 294
Enterprise Services Server 124 create 288
Enterprise View 288–290, 292, 299, 309, 314, 317, guidelines 41, 358
332, 385
Essbase Client v6.51 284
Essbase Java API 25
H
HAENABLE 61, 69
Essbase Spreadsheet Services 122, 127
HAMAXNUMCONNECTION 47, 61, 64
Essbase system files 306
HAMAXNUMSQLQUERY 65
essbase.cfg 59, 61, 68, 233, 275, 307
HAMAXQUERYROWS 62, 65
essbase.properties file 152–154, 173
HAMAXQUERYTIME 62, 66
essbase.sec 26
HAMAXSQLQUERY 62
ESSCMD 231, 237–238, 241, 258
HAMEMORYCACHESIZE 61–62
EssCreateFilter 17
HARETRIEVENUMROW 62, 67
EssListCalc 16
hash tables 232
EssListLogins() 17
high availability 3, 7
EssSetFilterRow 17
high concurrency 3, 120
EstimateFullDBSize 248–249
High Concurrency Option 7
exception processing 74
hit ratio 245, 265, 319, 338, 395
execute processes 342
data cache 264
export
HTML 467
parallel 3, 271
HTTP 122, 124, 126
serial 271
Hybrid Analysis 3–4, 24, 41, 43, 83, 445, 464
external authentication 18, 288, 301
architecture 45
backup 47
F build an hybrid cube 49
fact table 60 calculation 54
failover 3, 25, 120, 137, 151 time 48
failure 7 configuration settings 68
conditions 153–154 connections 47
fault tolerance 152 cube 4
custom actions 153 data storage 54
filters 293, 334 debugging 87
firewalls 124 deploying 45
FIX command 235 disable 56–57
Formula editor 328 enable 56–57, 61
formulas 231 filters 48
framework 3 formulas 57
guidelines 45
levels 71
G limitations 48
getdbstate 394

504 DB2 OLAP Server V8.1: Using Advanced Functions


load 54 J
maximum connections 61 J2EE 27, 120, 464
maximum query time 62 JAPI 162
member name duplicates 53 JAPI fault tolerance 152
memory for member caching 61 Java 13, 280–281
metadata 45 JAVA API 120–121, 125, 162
metaoutline transformations 52 client programs 122
multidimensional part 44, 48, 51 Java Database Connectivity 123, 171
multidimensional storage 44 Java Virtual Machine 15, 170
number of rows 62 JDBC 123, 171, 444
operations 47 join 447
outline 4 JRE 170, 434
performance trace 86 JVM 420
queries 48, 60, 68
performance 68
relational data 62 L
LDAP 18, 301–302
relational part 44, 51
libessldapS.a 302
relational tuning 60
license 306
retrieval times 54
Linked Report Objects 90
security 85
listolapservers 194
several cubes 44
listusers 187
storage 48
load 259, 281
trace 86
parallel 3
Hybrid Analysis cube 43
locate function 178
Hybrid Analysis levels 43
location service 174
Hybrid Cube 43
lock 282, 288, 304, 311, 315
Hyperion Administrator 464
log 26, 87, 114, 174, 215, 246, 260, 275, 282, 343
message 345
I server 18
I/O access mode 17, 393 Log Analyzer 343, 349
I/O parallelism 11, 252, 276 log off
I/O settings 17 users sessions 308
IIOP 129 login sessions 134
import 257 LOGMESSAGELEVEL ERROR 215
inactive limit 306 LRO 90, 107, 465
inactivity 306
incremental restructuring 232
Index page settings 319 M
magnitude 5, 95, 101–102
initial capacity 140
maintain
Integration Server 4, 23, 42, 46, 48–49, 83, 165,
OLAP Servers 284
237, 239, 259, 441
manage
configuration file 441
applications 312
GUI interface 24
databases 316
Intelligent Help 460
OLAP Servers 12
metaoutline 4
users sessions 304, 308
Integration Services 283
manuals 358
interruption 7, 152
master cube 217
isolation level 230
materialized query tables 60

Index 505
maximum capacity 145 new users request 145
MaxL 13, 16, 230, 279
export 12, 271, 273
Script Editor 25, 282, 350
O
objects manipulation 13
scripts 282
ODBC 24, 83
member caching 59, 73
OLAP cube 43
member combinations 76
OLAP Metadata Catalog 24
member information 324
OLAP Miner 5, 22, 90
membership 290
architecture 108
memory 307
configuration 113
Merant 4.0 drivers 443
magnitude 94
metadata 24, 46, 443
monitoring 110
metaoutline 24, 46, 59, 452
performance 95
middle tier 13, 279–280
platforms 110
migrate 396
requirements 98
across OLAP servers 294
running 110
application and databases 304
scenario 99
applications and databases 282, 333
stopping 111
users
synchronization 112
individual 297
wizard 108
multiple 294
OLAP Miner Client 90, 109, 113
users and groups 281
OLAP models 24
migration 7
OLAP outlines 24
automatically 14
OLAP security data 14
Migration Wizard 298, 333
OLAP Server services interruption 152
mining 103
OLAP Servers
model 24, 46, 59, 445
add 7
modeling
clustering 6
dimensional 495, 497
connection pooling 6
ER 495
failover 6
snowflake 498
groups 6, 173
monitor 13, 265, 338
high availability 6
disk usage 338, 341
high concurrency 6
memory 338
workload balancing 6
remotely 340
OMRunDef 113
monitoring tools
OMServer.cfg 96, 111
operating systems 266
Online Investment application 31, 49, 55, 95
multi threaded 8, 223–224
operating system 307, 338, 340
multidimensional database 4
Oracle 83, 123
multiple DB2 OLAP Servers 304
outline
multiple machines 6
add a child 323
multiple relational data sources 445
properties 326
multiple threads 11, 269
output splitting 11
multiple users connections 308
multiprocessor 8, 10, 224
P
PARAEXPORT 273, 277
N parallel 3
network protocol 306
parallel calculation 8

506 DB2 OLAP Server V8.1: Using Advanced Functions


administrate 9 duration 18
commands 9 performance 59–60, 73
database size 248 response time 120, 137
enable 232 consistent 7
ESSCMD calculation estimation utility 249 time 4
monitoring 246
parameters 9
performance 240
R
real-time information 130
running 237
reconnectRetryOnNextSvcComponErrorCodes
subtasks 247
153
parallel capabilities 7
reconnectRetryOnSameSvcComponErrorCodes
parallel export 11, 269
152
back up 270
Redbooks Web site 500
files larger than 2 GB 277
Contact us xxvii
monitoring 275
relational child 56
performance 276
relational database 4, 42, 123
reduce fragmentation 270
relational partition 57
transfer data 270
RelChild Present 56
parallel load 10, 442
reliability 120
cache memory locking 263
removeolapserver 194
input stage 250
removeuser 187
monitoring 260
replicas 130, 159, 216
preparation 10
replicate
preparation stage 250
security 294
write stage 10, 250
replicated partitions 217
PAREXPORT 12, 271
Report Script Editor 25, 355
partitioning 165, 217
report scripts 18
partitions
repository 24
transparent 232
requests
password 288, 294
distribution 120, 130
propagation 25
RESETPERFSTATS 266
performance 8, 71, 73, 83, 120, 338, 395, 420, 442
resource utilization 120
permission 293
response time 7, 130, 392
permissions 292, 329
response times 79
port 302, 307
restoring sessions 152
PORTINC 17
retries 153
predictability 392
root domain 178, 183, 189
prefix
Run Sample Query Program 151
transformation rules 54
RunReport 214
print properties 358
runsamples.cmd 163, 489, 492
privileges 294
runtest 151
production 294, 304
propagate
password 298 S
propagate user passwords 281 sample JAVA programs 162, 166
samples program 489
scalability 3, 120, 130, 392, 442, 464
Q Scapa 75
query
StressTest 75

Index 507
Test Bench component 76 stress 78
script subdomain 182
editors 349 substitution variable 18
scripts subtasks 224
editors 25 suffix
Security 306 transformation rules 54
security 18, 120, 160, 281, 290, 294, 301 sync olap 112
data 396 SyncCubeReplicas 214
file 18 synccubereplicas 194, 260
synchronizing 166 synchronization 160, 230, 279, 284
Security Migration Tool 7, 14, 26, 389, 396 syncsectoees 194
hardware platforms 14
implementation 397
installation program 15
T
TCP/IP 36, 122, 124–125, 166
options 15
terminology 43
platforms 396
test environment 36
Security Migration tool 294, 334
testing 304
server start time 307
threads 10
SERVERPORTBEGIN 17
three-tier 280
SERVERPORTEND 17
throughput 8
service component names 138, 147, 151
time balance 325
servlet 125
toolbar 323
SET CALCPARALLEL 233
transfer data across platforms 11
SET CALCTASKDIMS 234
transformations 54
SET MSG ONLY 248
transparency access 135
Simple Mail Transfer Protocol 357
transparent server 120
simulating
multiple users 75
simultaneous connections 136 U
simultaneously 281 unbalanced workload 147
single logical unit 130 unexpected values 3
single point of administration 12 UNIX 294
single point of control 3 Unix 294
single sign-on 25, 120, 281 user
single-threaded 8 create 301
SMTP 357 user interactions 75
snowflake 83, 498 user interface 13
sparse dimension 44, 228, 234, 241–242, 247 user sessions 12, 281–282
sparse member 262 users 294
spreadsheet add-in 22, 90, 121 create 287
spreadsheets 99, 108 delete 289
SQL Interface 18 rename 289
SQL Override 442 users requests 134
SQL queries 4
SQL Server 123
V
ssbase.properties file 153 values
stand alone 285 deviant 5
star schema 23, 60, 83, 497 variables 307
statistics 307

508 DB2 OLAP Server V8.1: Using Advanced Functions


variance 325
view 385
virtual memory 307
virtual users 75
VMSTAT 268

W
WebSphere Application Server 468
Windows 294
wizard 12, 279, 298
mining definition wizard 108
workload
balanced 146
distribution 147
unbalanced 147
workload balancing 3, 25, 120, 131, 137–139, 166
workload distribution 140

X
XML 24, 115, 441, 459
import/export metaoutlines 459
import/export models 459

Index 509
510 DB2 OLAP Server V8.1: Using Advanced Functions
DB2 OLAP Server V8.1:
Using Advanced Functions
(1.0” spine)
0.875”<->1.498”
460 <-> 788 pages
Back cover ®

DB2 OLAP Server V8.1


Using Advanced Functions

Enhancing OLAP This IBM Redbook explores DB2 OLAP Server V8.1
cube scalability and enhancements and strengths in the areas of scalability,
INTERNATIONAL
discovering deviant performance, high concurrency, high availability, and TECHNICAL
values administration, and explains how to deploy them in a whole SUPPORT
enterprise environment. ORGANIZATION
Implementing high We provide administrators and implementers with practical
concurrency and guidelines based on a case study on the new advanced
high availability functions in DB2 OLAP Server V8.1. We discuss Hybrid BUILDING TECHNICAL
scenarios Analysis and its ability to conciliate and integrate data from INFORMATION BASED ON
OLAP cubes and data warehouses, as well as the ability of PRACTICAL EXPERIENCE
OLAP Miner to detect deviations and discover anomalies and
Managing multiple
special segments from the wealth of data already analyzed
OLAP servers IBM Redbooks are developed by
within OLAP cubes.
the IBM International Technical
We also consider the capabilities of DB2 OLAP Server Support Organization. Experts
Enterprise Services or the High Concurrency Option to provide from IBM, Customers and
availability and reliability, including cube clustering, failing Partners from around the world
create timely technical
over and connection pooling. Performance enhancements information based on realistic
and the ability to run operations in a multithreaded mode as scenarios. Specific
parallel load, calculation and export, are covered, as well as recommendations are provided
DB2 OLAP Server Administration Services and the ability to to help you implement IT
manage multiple OLAP Servers from a single point of control. solutions more effectively in
your environment.
If you are an administrator or OLAP designer concerned with
DB2 OLAP Server, this book will help you to evaluate the
applicability of its new functions and show you how to start
implementing them. For more information:
ibm.com/redbooks

SG24-6599-00 ISBN 0738427098

You might also like