BOBI 4.0 Installation with separate DB2 Database & Customize database requirement
First of all, “Happy New Year” to all of you.
During my recent experience, I came across a scenario where client requirement was to install SAP BOBI 4.0 SP4 without using integrated DB2 9.7 installation and we need to install separate DB2 9.7 database with some additional requirements. I did not come across any document which gives exact steps to be followed in such a scenario. So, I thought of writing a blog to help colleagues who has similar requirement.
Here is the detailed scenario for SAP BOBI 4.0 SP4 installation:
- Install SAP BOBI 4.0 SP4 on UNIX platform.
- Don’t use integrated DB2 database that’s come bundled with SAP BOBI 4.0 SP4. Because SAP BOBI installer does not give you the option to specify in which file system you want to install database or how you want to design architecture of your database file system. SAP BOBI installer installs the database in the same file system where you install BOBI.
- Database Version: DB2 9.7
- Use separate tablespaces for CMS and Audit database.
- Use separate schemas for CMS and Audit database for additional security.
- Database will be owned by db2<sid> user and SAP BOBI will be owned by <sid>adm user.
- Download Media for SAP BOBI 4.0 SP4.
- Download DVD for DB2 9.7 as per flavor of UNIX.
- Download latest SWPM in order to create db2<sid> and <sid>adm user. Note: We can also create these users manually using operating system commands but we need to set all environment variables manually. However, SWPM will automatically set all environment variables while creating the users.
- Decide <SID> to be used for database and BOBI system.
- You can create same file system for BOBI as a standard Netweaver system except few changes.
- Create /usr/sap/<SID> file system. This file system will be used as installation directory for BOBI.
- Database File system:
- /db2/db2<sid> (DB2 Software)
- /db2/<SID> (DB2 Client)
- /db2/<SID>/sapdata* (Data File system)
- /db2/<SID>/log_dir (Online Logs)
- /db2/<SID>/log_archive (Offline Archive Logs)
- Please make sure that ulimit should be set as unlimited before starting the installation.
- Please make sure that below environment variable should be set before installation.
- LANG – en_US.UTF-8
- LV_ALL – en_US.UTF-8
- These environment variables can also be set in file .sapenv_<hostname>.sh & .sapenv_<hostname>.csh under user <sid>adm home directory. Note: Please make sure that operating system should support UTF-8 character sets.
- Please follow installation guide for more prerequisites.
- Create db2<sid> and <sid>adm user using latest SWPM. (Choose following option in SWPM screen: Generic Installation Options – IBM DB2 for Linux, UNIX and Windows- Preparations- Operating System Users and Groups) Note: While creating users and groups, you can also specify User ID’s & Group ID’s if you have specific numbers allocated for UID’s & GID’s.
- By default, home directory of <sid>adm user will be created under /home which will use root file system. This has a limitation, because BOBI installer creates LCM repository under home directory of user from which installation will be started. In this case, it is <sid>adm user. So, please make sure that you use different home directory so that it should not use root file system. E.g: If you are installing BOBI under /usr/sap/<SID> then you can specify home directory of <sid>adm user as /usr/sap/<SID>/<sid>adm while you are creating user.
- Database Software installation: Create db2_software directory under /db2/db2<SID> directory.
- Start DB2 installation with root user. Go to DB2 9.7 RDBMS DVD (E.g. Path for DB2 installation on AIX- <file system path to DVD>/DB2_LUW_9.7_FP8_RDBMS_AIX__HP__SOL_/AIX_64/ESE/disk1)
- Run script db2setup. Choose: Install Now under DB2 Enterprise Server Edition Version 9.7 Fix Pack8
- When asked to enter installation directory, please enter /db2/db2<sid>/db2_software, similar to standard installation of db2 by sapinst. Note: I have mentioned only the important steps in db2 installation screens and other steps are simple and does not require much planning.
- You should choose option create db2 instance when asked about set up a DB2 instance.
- Choose partitioning options for DB2 instance. Generally, if database resides on one machine then we should choose Single Partition instance.
- When asked about DB2 instance owner then enter existing user as db2<sid>.
- When asked about prepare DB2 tools catalog then Choose option Prepare the DB2 tools catalog.
- Follow the installation screens to complete the installation of database software.
- Once the installation is complete, logon to db2 database with db2<sid> user. Run command db2 connect to <SID>. It will show you the version of db2 software.
- Install DB2 license as per SAP note 816773.
Post Database Installation
- Create database with db2<sid> user using command: db2 CREATE DATABASE <SID> AUTOMATIC STORAGE YES ON ‘/db2/<SID>/sapdata1′,’/db2/<SID>/sapdata2′,’/db2/<SID>/sapdata3′,’/db2/<SID>/sapdata4’ USING CODESET UTF-8 TERRITORY US COLLATE USING IDENTITY Note: You can create database on different file system layout i.e. on different sapdata’s as per the requirement. Please make sure that while creating the database you are not connected to database.
- Set parameter SPM_NAME to null otherwise you will face error during BOBI installation. Command- db2 update dbm cfg using SPM_NAME NULL
- As per the requirement, we want to create separate schema for CMS and Audit.
Prerequisite of Schema:
- In DB2, schemas are database users. So, in order to have separate schema for CMS and Audit, we need to create OS users.
- Create home directory for CMS and Audit users. In our case, CMS user is sapcms and Audit user is sapads. You can create directory /db2/sapcms and /db2/sapads
- Create users at operating system using operating system utility and assign groups similar to db2<sid> user. Make sure that while creating users, you specify home directory as we created in previous step.
- Once users are created, please login with users as it will ask you to change passwords.
- In order to have same environment variable for sapcms and sapads user as db2<sid> user, copy .sapenv, .sapsrc, .dbenv, .dbsrc & profile file from home directory of db2<sid> user to home directory of sapcms and sapads user.
- Change permission of /db2/sapcms & /db2/sapads directory and their contents to sapcms:db2<sid>adm & sapads:db2<sid>adm respectively.
- Compare environment variable of user sapcms & sapads to that of user db2<sid> and it should be same.
- Create schema in db2 with command: db2 create schema SAPCMS authorization & db2 create schema SAPADS authorization Note: Schema name should be same as the name of users created on operating system.
- You can verify schemas in the database with command: db2 select schemaname from syscat.schemata
As per the requirement, we want to create separate Tablespaces for CMS and ADS.
- Let us consider that we want to create CMS tablespace with name PSAPCMS
- Login with user sapcms and create tablespace with command: db2 “create tablespace PSAPCMS managed by database using (FILE ‘/db2/<SID>/sapdata1/db2<sid>/NODE0000/<SID>/PSAPCMS.container000’ 1024M, FILE ‘/db2/<SID>/sapdata2/db2<sid>/NODE0000/<SID>/PSAPCMS.container000’ 1024M, FILE ‘/db2/<SID>/sapdata3/db2<sid>/NODE0000/<SID>/PSAPCMS.container000’ 1024M, FILE ‘/db2/<SID>/sapdata4/db2<sid>/NODE0000/<SID>/PSAPCMS.container000’ 1024M) extentsize 2 prefetchsize automatic dropped table recovery off autoresize yes maxsize none”
CMS Temporary User Tablespace
During BO installation, it will ask for temporary CMS user tablespace. You can create this tablespace with any name and in this case, we are creating this tablespace with name TEMPCMS. Create temporary user tablespace with command: db2 “create user temporary tablespace TEMPCMS managed by database using (FILE ‘/db2/<SID>/sapdata1/db2<sid>/NODE0000/<SID>/temp_cms’ 1024M)” Note: You can add as many containers as you want with different size & location of container files as well. Also, this tablespace will be created with default page size of 4K.
Please note that Audit tablespace needs page size of 8K for BOBI installation. By default, page size of default buffer pool will be 4K. So, we need to create new buffer pool with page size of 8K.
- Login with user sapads on database.
- Create buffer pool with command: db2 “create bufferpool <name of buffer pool> immediate PAGESIZE 8K”
Create Audit Tablespace
Let us consider that we want to create Audit tablespace with name PSAPADS.
Login with user sapads and use below command to create tablespace
db2 “create tablespace PSAPADS PAGESIZE 8K managed by database using (FILE ‘/db2/<SID>/sapdata1/db2<sid>/NODE0000/<SID>/PSAPADS.container000’ 1024M, FILE ‘/db2/<SID>/sapdata2/db2<sid>/NODE0000/<SID>/PSAPADS.container000’ 1024M, FILE ‘/db2/<SID>/sapdata3/db2<sid>/NODE0000/<SID>/PSAPADS.container000’ 1024M, FILE ‘/db2/<SID>/sapdata4/db2<sid>/NODE0000/<SID>/PSAPADS.container000’ 1024M) extentsize 2 prefetchsize automatic dropped table recovery off autoresize yes maxsize none BUFFERPOOL <name of buffer pool>”
Note: Please make sure that while creating audit tablespace, you need to give name of buffer pool created above.
You can verify tablespaces and their owners with command: db2 select owner, tbspace from syscat.tablespaces
In order to check properties of new tablespaces, please use command db2 list tablespaces show detail
Enable archiving for db2 database with command: db2 update db cfg for <SID> using LOGARCHMETH1 DISK:/db2/<SID>/log_archive
Note: You need to take offline database backup after activating logging.
By this, configuration of database is complete and we can start installation process of BOBI.
- Login with <sid>adm user
- Set environment variable LANG & LV_ALL to en_US.UTF-8
- Set ulimit to unlimited.
- Set environment variable LIBPATH= /db2/db2<sid>/sqllib/lib64 in .sapenv_<hostname>.sh & .sapenv_<hostname>.csh in home directory of <sid>adm user
- Start the installation from BOBI DVD with command: ./setup.sh InstallDir=/usr/sap/<SID> Note: Installation software will create sap_bobj directory under /usr/sap/<SID>. Please make sure that you should not create separate file system as /usr/sap/<SID>/sap_bobj for installation, as installation program will not be successful and it will not copy some library files due to some limitations at perl script level.
- Once installation is started, on next screen, you can select setup language. By default, it will be English.
- Enter Destination Folder, by default it will take path of InstallDir that we have given while starting installer.
- After this, installer will perform prerequisite checks. If all checks are successful then it will allow proceeding to next step.
- Accept copyright warning and licensing agreement.
- Enter product key code that you got while you bought the license of BOBI.
- Select all languages that you want to install for BOBI. By default, it will be English.
- Select “User Install”. You can refer to installation guide for difference between User Install and System Install.
- Select Install type as “full”.
- When installer asks about database option. Then choose “Use an existing database”.
- Select CMS database type as “IBM DB2”.
- Select Audit Database type as “IBM DB2”.
- When installer asks about Java web application server, you can choose option according to your requirements whether to install Tomcat application server or manually deploying files to As Java system. In this case, we used Tomcat application server which installer installs.
- Choose Install and use subversion.
- Enter SIA name and port number. By default port number will be 6410.
- Enter CMS port. By default port number will be 6400.
- Enter Administrator account password and cluster key.
- Enter CMS repository database information. You need to enter database alias name (SID of the database that was installed previously), username will be sapcms and password of the user.
- Enter Audit database information. You need to enter database alias name (SID of the database that was installed previously), username will be sapads and password of the user.
- Enter connection port, shutdown port and redirect port. By default, it will be 8080, 8005 & 8443 respectively.
- Enter HTTP listening port. By default, it will be 6405.
- Enter repository port and user password. By default, repository port will be 3690.
- On next screens, if you want to connect BOBI to SMD agent and wily introscope then you can choose these options and it will take you to next screens if you want to configure them. You can also choose option “don’t configure” if you want to skip this.
- Now, you can start the installation process. This process will take some time. Once installation will complete successfully, you can login to CMS with url http://<hostname>:8080/BOE/CMC. Use administrator user and password to login.
- If you want to check the version of BOBI, then go to <installation directory>/InstallData and open file inventory.txt. It will give you the version of BOBI system installed.
- You can run diagnostic check to verify the installation. Login to CMC, Go to monitoring and then Probes. And run all diagnostic checks. Initially, some checks related to Crystal Reports Service might fail.
- You can also check whether all services are running fine or not. Go to Server nodes and select Servers list. If all services are in green then system is working fine.
- Install License key.
By this way, installation of BOBI 4.0 where database is separately installed with customized requirements is complete.
Please note that you should follow BOBI installation and administrator guide also for the installation. This blog alone will not serve the purpose.
Disclaimer: This Blog is the personal Blog and only contains my personal views, thoughts and opinions. It is not endorsed by my employer nor does it constitute any official communication of my employer.