7

Click here to load reader

WebSphere Portal Family Wiki _ Database Configuration for WebSphere Portal _ Steps to Configure WebSphere Portal 6.1

Embed Size (px)

Citation preview

Page 1: WebSphere Portal Family Wiki _ Database Configuration for WebSphere Portal _ Steps to Configure WebSphere Portal 6.1

3/12/13 WebSphere Portal Family wiki : Database Configuration for WebSphere Portal : Steps to Configure WebSphere Portal 6.1.x with DB2 for Windows/UNIX usin…

www-10.lotus.com/ldd/portalwiki.nsf/dx/Test 1/7

Steps to Configure WebSphere Portal 6.1.x with DB2 for Windows/UNIX using Type 4 drivers

Added by Hunter T Tweed | Edited by Hunter T Tweed on October 28, 2010 | Version 18

Abstract

No abstract provided.

Tags: 6.1, 6.1.0, 6.1.0.1, 6.1.5, basic configuration, best, best practice, best practices, configuration, Config, data source, database, datastore, DB2, install, installation, Install

Portal, Installing Portal, Portal, Portal 6.1, release database

This guide will detail how to configure WebSphere Portal v6.1.x with DB2 for Wndows/UNIX using Type 4 drivers. These steps apply to all DB2 versions for Windows/UNIX

supported by WebSphere Portal. If you are unsure whether or not your DB2 version is supported, please review the detailed system requirements for WebSphere Portal:

WebSphere Portal Detailed System Requirements

Before You Begin

1. Ensure that the database software is installed and upgraded to the supported version.

2. Copy the database driver jar files from the DB2 server to the WebSphere Portal server in some directory. The jar files you will need are:

db2jcc.jar

db2jcc_cu_license.jar

In this guide, we will be using DB2 v9.1.0.5 with Type 4 drivers, so we will copy the db2jcc.jar and the db2jcc_cu_license.jar files to the WebSphere Portal server.

Creating the Databases

In this section, you will create the databases in the DB2 environment to be used by WebSphere Portal. In Portal v6.1.x, there are six Portal database domains (where "domain"

refers to a logical grouping of data):

Release

Community

Customization

JCR

Likeminds

Feedback

You can organize this data in however many databases you would like. The recommendation is to use six separate databases. If this is not possible though and you need to

combine these domains into single databases, ensure that you use unique values for the domain.DbSchema values in wkplc_comp.properties (this will be covered in the

Modifying the ConfigEngine properties section).

In this guide, six databases will be created:

RELDB

COMDB

CUSDB

JCRDB

FDBKDB

LMDB

1. The following SQL commands were used to create six databases. If you are only going to use one database, then just create one database.

CREATE DB reldb using codeset UTF-8 territory us PAGESIZE 8192;

UPDATE DB CFG FOR reldb USING applheapsz 4096;

UPDATE DB CFG FOR reldb USING app_ctl_heap_sz 1024;

UPDATE DB CFG FOR reldb USING stmtheap 32768;

UPDATE DB CFG FOR reldb USING dbheap 2400;

UPDATE DB CFG FOR reldb USING locklist 1000;

UPDATE DB CFG FOR reldb USING logfilsiz 4000;

Community Articles > Database Configuration for WebSphere Portal > Steps to Configure WebSphere Portal 6.1.x with DB2 for Windows/UNIX using Type 4 drivers

Page 2: WebSphere Portal Family Wiki _ Database Configuration for WebSphere Portal _ Steps to Configure WebSphere Portal 6.1

3/12/13 WebSphere Portal Family wiki : Database Configuration for WebSphere Portal : Steps to Configure WebSphere Portal 6.1.x with DB2 for Windows/UNIX usin…

www-10.lotus.com/ldd/portalwiki.nsf/dx/Test 2/7

UPDATE DB CFG FOR reldb USING logfilsiz 4000;

UPDATE DB CFG FOR reldb USING logprimary 12;

UPDATE DB CFG FOR reldb USING logsecond 20;

UPDATE DB CFG FOR reldb USING logbufsz 32;

UPDATE DB CFG FOR reldb USING avg_appls 5;

UPDATE DB CFG FOR reldb USING locktimeout 30;

UPDATE DB CFG FOR reldb using AUTO_MAINT off;

CREATE DB comdb using codeset UTF-8 territory us PAGESIZE 8192;

UPDATE DB CFG FOR comdb USING applheapsz 4096;

UPDATE DB CFG FOR comdb USING app_ctl_heap_sz 1024;

UPDATE DB CFG FOR comdb USING stmtheap 32768;

UPDATE DB CFG FOR comdb USING dbheap 2400;

UPDATE DB CFG FOR comdb USING locklist 1000;

UPDATE DB CFG FOR comdb USING logfilsiz 4000;

UPDATE DB CFG FOR comdb USING logprimary 12;

UPDATE DB CFG FOR comdb USING logsecond 20;

UPDATE DB CFG FOR comdb USING logbufsz 32;

UPDATE DB CFG FOR comdb USING avg_appls 5;

UPDATE DB CFG FOR comdb USING locktimeout 30;

UPDATE DB CFG FOR comdb using AUTO_MAINT off;

CREATE DB cusdb using codeset UTF-8 territory us PAGESIZE 8192;

UPDATE DB CFG FOR cusdb USING applheapsz 4096;

UPDATE DB CFG FOR cusdb USING app_ctl_heap_sz 1024;

UPDATE DB CFG FOR cusdb USING stmtheap 32768;

UPDATE DB CFG FOR cusdb USING dbheap 2400;

UPDATE DB CFG FOR cusdb USING locklist 1000;

UPDATE DB CFG FOR cusdb USING logfilsiz 4000;

UPDATE DB CFG FOR cusdb USING logprimary 12;

UPDATE DB CFG FOR cusdb USING logsecond 20;

UPDATE DB CFG FOR cusdb USING logbufsz 32;

UPDATE DB CFG FOR cusdb USING avg_appls 5;

UPDATE DB CFG FOR cusdb USING locktimeout 30;

UPDATE DB CFG FOR cusdb using AUTO_MAINT off;

CREATE DB jcrdb using codeset UTF-8 territory us PAGESIZE 8192;

UPDATE DB CFG FOR jcrdb USING applheapsz 4096;

UPDATE DB CFG FOR jcrdb USING app_ctl_heap_sz 1024;

UPDATE DB CFG FOR jcrdb USING stmtheap 32768;

UPDATE DB CFG FOR jcrdb USING dbheap 2400;

UPDATE DB CFG FOR jcrdb USING locklist 1000;

UPDATE DB CFG FOR jcrdb USING logfilsiz 4000;

UPDATE DB CFG FOR jcrdb USING logprimary 12;

UPDATE DB CFG FOR jcrdb USING logsecond 20;

UPDATE DB CFG FOR jcrdb USING logbufsz 32;

UPDATE DB CFG FOR jcrdb USING avg_appls 5;

UPDATE DB CFG FOR jcrdb USING locktimeout 30;

UPDATE DB CFG FOR jcrdb using AUTO_MAINT off;

CREATE DB lmdb using codeset UTF-8 territory us PAGESIZE 8192;

UPDATE DB CFG FOR lmdb USING applheapsz 4096;

UPDATE DB CFG FOR lmdb USING app_ctl_heap_sz 1024;

UPDATE DB CFG FOR lmdb USING stmtheap 32768;

UPDATE DB CFG FOR lmdb USING dbheap 2400;

UPDATE DB CFG FOR lmdb USING locklist 1000;

UPDATE DB CFG FOR lmdb USING logfilsiz 4000;

UPDATE DB CFG FOR lmdb USING logprimary 12;

UPDATE DB CFG FOR lmdb USING logsecond 20;

UPDATE DB CFG FOR lmdb USING logbufsz 32;

UPDATE DB CFG FOR lmdb USING avg_appls 5;

UPDATE DB CFG FOR lmdb USING locktimeout 30;

UPDATE DB CFG FOR lmdb using AUTO_MAINT off;

CREATE DB fdbkdb using codeset UTF-8 territory us PAGESIZE 8192;

UPDATE DB CFG FOR fdbkdb USING applheapsz 4096;

UPDATE DB CFG FOR fdbkdb USING app_ctl_heap_sz 1024;

UPDATE DB CFG FOR fdbkdb USING stmtheap 32768;

UPDATE DB CFG FOR fdbkdb USING dbheap 2400;

UPDATE DB CFG FOR fdbkdb USING locklist 1000;

UPDATE DB CFG FOR fdbkdb USING logfilsiz 4000;

UPDATE DB CFG FOR fdbkdb USING logprimary 12;

UPDATE DB CFG FOR fdbkdb USING logsecond 20;

Page 3: WebSphere Portal Family Wiki _ Database Configuration for WebSphere Portal _ Steps to Configure WebSphere Portal 6.1

3/12/13 WebSphere Portal Family wiki : Database Configuration for WebSphere Portal : Steps to Configure WebSphere Portal 6.1.x with DB2 for Windows/UNIX usin…

www-10.lotus.com/ldd/portalwiki.nsf/dx/Test 3/7

UPDATE DB CFG FOR fdbkdb USING logsecond 20;

UPDATE DB CFG FOR fdbkdb USING logbufsz 32;

UPDATE DB CFG FOR fdbkdb USING avg_appls 5;

UPDATE DB CFG FOR fdbkdb USING locktimeout 30;

UPDATE DB CFG FOR fdbkdb using AUTO_MAINT off;

3. Create the following tablespaces in your JCR database. If you are using one database for all domains, then create these tablespaces in that database:

IMPORTANT: Failure to create these tablespaces will cause the database-transfer to fail

IMPORTANT: These tablespace names cannot be altered. You must use the names listed below.

CONNECT TO jcrdb USER db2inst1 USING password;

CREATE BUFFERPOOL ICMLSFREQBP4 SIZE 1000 PAGESIZE 4 K;

CREATE BUFFERPOOL ICMLSVOLATILEBP4 SIZE 8000 PAGESIZE 4 K;

CREATE BUFFERPOOL ICMLSMAINBP32 SIZE 8000 PAGESIZE 32 K;

CREATE BUFFERPOOL CMBMAIN4 SIZE 1000 PAGESIZE 4 K;

CREATE REGULAR TABLESPACE ICMLFQ32 PAGESIZE 32 K MANAGED BY SYSTEM USING ('ICMLFQ32') BUFFERPOOL ICMLSMAINBP32;

CREATE REGULAR TABLESPACE ICMLNF32 PAGESIZE 32 K MANAGED BY SYSTEM USING ('ICMLNF32') BUFFERPOOL ICMLSMAINBP32;

CREATE REGULAR TABLESPACE ICMVFQ04 PAGESIZE 4 K MANAGED BY SYSTEM USING ('ICMVFQ04') BUFFERPOOL ICMLSVOLATILEBP4;

CREATE REGULAR TABLESPACE ICMSFQ04 PAGESIZE 4 K MANAGED BY SYSTEM USING ('ICMSFQ04') BUFFERPOOL ICMLSFREQBP4;

CREATE REGULAR TABLESPACE CMBINV04 PAGESIZE 4 K MANAGED BY SYSTEM USING ('CMBINV04') BUFFERPOOL CMBMAIN4;

CREATE SYSTEM TEMPORARY TABLESPACE ICMLSSYSTSPACE32 PAGESIZE 32 K MANAGED BY SYSTEM USING ('icmlssystspace32') BUFFERPOOL ICMLSMAINBP32;

CREATE SYSTEM TEMPORARY TABLESPACE ICMLSSYSTSPACE4 PAGESIZE 4 K MANAGED BY SYSTEM USING ('icmlssystspace4') BUFFERPOOL ICMLSVOLATILEBP4;

DISCONNECT jcrdb;

TERMINATE;

Modify the ConfigEngine Properties

In this section, you will prepare the wkplc_comp.properties and wkplc_dbtype.properties files with the DB2 information. Complete the following steps:

1. From the wp_profile/ConfigEngine/properties directory, make a backup of the following files:

wkplc.properties

wkplc_dbtype.properties

wkplc_comp.properties

2. Edit the wkplc_dbtype.properties file and make the following changes:

db2.DbDriver=com.ibm.db2.jcc.DB2Driver

db2.DbLibrary=/opt/ibm/db2/V9.1/java/db2jcc.jar:/opt/ibm/db2/V9.1/java/db2jcc_license_cu.jar

db2.JdbcProviderName=wpdbJDBC_db2

NOTE: The entry for db2.DbLibrary is an example only for a UNIX environment. Please ensure this is a valid path on your system.

NOTE: If using Windows, use a semi-colon to separate the jar file paths in DbLibrary. If using UNIX, use a colon .

NOTE: Use forward slash (/) instead of backslash (\).

3. Edit the wkplc_comp.properties file and make the following changes:

domain.DbType - The type of database you are configuring. This value should be 'db2'.

domain.DbName - The name of the database for this domain.

NOTE: This value should be present in the DbUrl.

domain.DbSchema - The schema identifier for objects within the database for this domain.

NOTE: If you are using a single database or have combined domains into a single database, this value MUST be unique for each domain.

domain.DataSourceName - The name of the datasource that will be created in the WebSphere Application Server configuration.

NOTE: Do NOT use any of these values: releaseDS, communityDS, customizationDS, jcrDS, likemindsDS, feedbackDS

domain.DbUrl - The url used to access your database.

NOTE: The URL must use this exact syntax for DB2 with Type 4 drivers: jdbc:db2://<YourDatabaseServer>:<port>/<DbName>:returnAlias=0;. Any other syntax will cause

the database transfer to fail.

NOTE: The value you set for DbName must be used in this url.

Page 4: WebSphere Portal Family Wiki _ Database Configuration for WebSphere Portal _ Steps to Configure WebSphere Portal 6.1

3/12/13 WebSphere Portal Family wiki : Database Configuration for WebSphere Portal : Steps to Configure WebSphere Portal 6.1.x with DB2 for Windows/UNIX usin…

www-10.lotus.com/ldd/portalwiki.nsf/dx/Test 4/7

domain.DbUser - The name of the user that will access this database. This user does not exist yet and will be created in the Setting Up Databases section.

domain.DbPassword - The password of the DbUser.

For this guide, the following values were used:

feedback.DbType=db2

feedback.DbName=fdbkdb

feedback.DbSchema=FEEDBACK

feedback.DataSourceName=wpdbDS_fdbk

feedback.DbUrl=jdbc:db2://mydbserver.ibm.com:50000/fdbkdb:returnAlias=0;

feedback.DbUser=db2inst1

feedback.DbPassword=password

likeminds.DbType=db2

likeminds.DbName=lmdb

likeminds.DbSchema=likeminds

likeminds.DataSourceName=wpdbDS_lmdb

likeminds.DbUrl=jdbc:db2://mydbserver.ibm.com:50000/lmdb:returnAlias=0;

likeminds.DbUser=db2inst1

likeminds.DbPassword=password

release.DbType=db2

release.DbName=reldb

release.DbSchema=release

release.DataSourceName=wpdbDS_reldb

release.DbUrl=jdbc:db2://mydbserver.ibm.com:50000/reldb:returnAlias=0;

release.DbUser=db2inst1

release.DbPassword=password

community.DbType=db2

community.DbName=comdb

community.DbSchema=community

community.DataSourceName=wpdbDS_comdb

community.DbUrl=jdbc:db2://mydbserver.ibm.com:50000/comdb:returnAlias=0;

community.DbUser=db2inst1

community.DbPassword=password

customization.DbType=db2

customization.DbName=cusdb

customization.DbSchema=customization

customization.DataSourceName=wpdbDS_cusdb

customization.DbUrl=jdbc:db2://mydbserver.ibm.com:50000/cusdb:returnAlias=0;

customization.DbUser=db2inst1

customization.DbPassword=password

jcr.DbType=db2

jcr.DbName=jcrdb

jcr.DbSchema=jcr

jcr.DataSourceName=wpdbDS_jcrdb

jcr.DbUrl=jdbc:db2://mydbserver.ibm.com:50000/jcrdb:returnAlias=0;

jcr.DbUser=db2inst1

jcr.DbPassword=password

4. (Optional) Edit the following properties in /ConfigEngine/properties/wkplc_comp.properties if you intend to transfer the Portal databases from any database other than Derby.

NOTE: These values by default are set for the out-of-the-box derby configuration. If you are configuring Portal for an external database for the first time, you should NOT modify

these properties. However if you have already configured Portal for another database, such as Oracle, and you want to transfer to DB2, then update the source properties to

reflect your current database settings.

source.domain.DbType - The type of database you are currently configured to. This is 'derby' by default.

source.domain.DbName - The name of the database this domain is currently using.

source.domain.DbSchema - The current schema identifier for objects within the database for this domain.

source.domain.DataSourceName - The name of the datasource that is currently in use in the WebSphere Application Server configuration.

source.domain.DbUrl - The url currently used to access your database.

source.domain.DbUser - The name of the user that currently accesses this database.

source.domain.DbPassword - The password of the source DbUser.

In this guide, we will not be editing these properties.

Page 5: WebSphere Portal Family Wiki _ Database Configuration for WebSphere Portal _ Steps to Configure WebSphere Portal 6.1

3/12/13 WebSphere Portal Family wiki : Database Configuration for WebSphere Portal : Steps to Configure WebSphere Portal 6.1.x with DB2 for Windows/UNIX usin…

www-10.lotus.com/ldd/portalwiki.nsf/dx/Test 5/7

5. Save the files.

Configure JCR Collation

This section is optional.

This section is only needed if you are using Web Content Management (WCM). These steps enable JCR Collation support, designed to help improve performance with WCM. If

you are not using WCM, it will not hurt to complete these steps, but again, it is not required.

1. Copy the following files from the WebSphere Portal server to a temporary directory on the DB2 server:

<PortalServer>/jcr/prereq.jcr/config/collation.jar

<PortalServer>/jcr/prereq.jcr/config/registerCollationUDFTemplate.sql

2. From the DB2 server, open a terminal window and change directories to:

<db2_instance_home>/sqllib/function

3. From the DB2 server, Execute the following command:

jar -xvf <temporary location>/collation.jar

NOTE: In order for the above command to work, you must have java installed on the DB2 server and the JAVA_HOME environment variable set to the java root directory.

4. From the DB2 server, edit the <temporary location>/registerCollationUDFTemplate.sql file in a text editor.

5. Change all SCHEMA references in this file to the value you set for jcr.DbSchema in wkplc_dbdomain.properties. In this case, the schema value is 'jcr'.

6. Change the following line:

"VALUE VARCHAR(32672),"

to

"VALUE VARCHAR(100),"

7. Change the following line:

"RETURNS VARCHAR(32672) FOR BIT DATA"

to

"RETURNS VARCHAR(100) FOR BIT DATA"

8. Save the registerCollationUDFTemplate.sql file

9. From the DB2 server, connect to the JCR database by executing the following command in a terminal window:

db2 connect to jcrdb user db2inst1 using password

10. From the same terminal window, execute the SQL script by running the following command:

db2 -tvf <temporary location>/registerCollationUDFTemplate.sql

11.. Disconnect from the JCRDB and restart the DB2 instance.

Configure WebSphere Portal with DB2

In this section, you will transfer the WebSphere Portal server data that exists in the current database (Derby by default) to the DB2 server. This is accomplished by a ConfigEngine

Page 6: WebSphere Portal Family Wiki _ Database Configuration for WebSphere Portal _ Steps to Configure WebSphere Portal 6.1

3/12/13 WebSphere Portal Family wiki : Database Configuration for WebSphere Portal : Steps to Configure WebSphere Portal 6.1.x with DB2 for Windows/UNIX usin…

www-10.lotus.com/ldd/portalwiki.nsf/dx/Test 6/7

In this section, you will transfer the WebSphere Portal server data that exists in the current database (Derby by default) to the DB2 server. This is accomplished by a ConfigEngine

script called 'database-transfer'. This script does all of the following:

Connects to the target database (DB2 in this case) and drops all objects within them to ensure we have a clean database to transfer to.

Creates the necessary tables, indexes, etc in the target databases for each domain.

Transfers the data from the source database (Derby by default) to the target database (DB2) for each domain.

Creates a JDBC Provider and datasources in the WebSphere Application Server configuration

Maps the datasources to the appropriate applications. For example the release, customization, community and jcr datasources are mapped to wps.ear.

1. Stop the WebSphere_Portal server by running the following command from the wp_profile/bin directory:

Windows: stopServer.bat WebSphere_Portal -user wasadmin -password password

UNIX: ./stopServer.sh WebSphere_Portal -user wasadmin -password password

2. From the Portal server, and from a terminal window, change directories to wp_profile/ConfigEngine

3. Execute the following ConfigEngine scripts to validate the database properties:

Windows: ConfigEngine.bat validate-database-driver -DWasPassword=password

ConfigEngine.bat validate-database-connection -DWasPassword=password

UNIX: ./ConfigEngine.sh validate-database-driver -DWasPassword=password

./ConfigEngine.sh validate-database-connection -DWasPassword=password

4. Execute the following ConfigEngine script to transfer the database from Derby to DB2:

IMPORTANT: Do not run this script as a background process. The script may hang during the 'action-validate-database' sub-task if executed as a background process.

Windows: ConfigEngine.bat database-transfer -DPortalAdminPwd=password -DWasPassword=password

UNIX: ./ConfigEngine.sh database-transfer -DPortalAdminPwd=password -DWasPassword=password

5. After the database-transfer completes, change directories to wp_profile/bin and execute the following command to start the Portal server:

Windows: startServer.bat WebSphere_Portal

UNIX: ./startServer.sh WebSphere_Portal

6. Clustered environments only. If you have performed these steps in a clustered environment, you must also complete the following steps:

Copy the wp_profile_root/PortalServer/jcr/lib/com/ibm/icm/icm.properties file from the primary node and replace the icm.properties file on each secondary node with the new file

from the primary node.

Restart the secondary cluster members.

Attachments (0)

Versions (18)

Comments (4)

ganesh navlaspur commented on Mar 14, 2012

Re: Steps to Configure WebSphere Portal 6.1.x with DB2 for Windows/UNIX using Type 4 drivers

Thank you Hunter,

for the reply. and for reference to forum.

I had some more question, which i have posted in the forum.

https://www.ibm.com/developerworks/forums/thread.jspa?threadID=421219

Hunter T Tweed commented on Mar 5, 2012

Re: Steps to Configure WebSphere Portal 6.1.x with DB2 for Windows/UNIX using Type 4 drivers

Hi Ganesh,

Technically the answer is 'yes', you should upgrade DB2 to FP9 before applying the fixpack. I could not tell you what impact it might have otherwise....WebSphere Portal v6106was not tested on DB2 v9.1-FP7 so the issues could range anywhere from no issues at all to being unable to read data in the database. Since you'd just be going from FP7 to

FP9, I would suspect that you're likely not going to see any issues at all.

However, because DB2 9.1 fp7 was not tested for v6106, it is not going to be supported (regardless of whether or not you actually have issues) so the safest thing to do is go to

FP9 before the upgrade.

For future reference, comments like this might be more appropriate in the WebSphere Portal forum here:

http://www.ibm.com/developerworks/forums/forum.jspa?forumID=168

Page 7: WebSphere Portal Family Wiki _ Database Configuration for WebSphere Portal _ Steps to Configure WebSphere Portal 6.1

3/12/13 WebSphere Portal Family wiki : Database Configuration for WebSphere Portal : Steps to Configure WebSphere Portal 6.1.x with DB2 for Windows/UNIX usin…

www-10.lotus.com/ldd/portalwiki.nsf/dx/Test 7/7

ganesh navlaspur commented on Mar 2, 2012

Re: Steps to Configure WebSphere Portal 6.1.x with DB2 for Windows/UNIX using Type 4 drivers

A question related to DB2 and not specifically about this article.

We are planning to upgrade from

WPS 6.1.0.1 (which has DB2 at v9.1-FP7)

to

WPS 6.1.0.6 (required DB2 = v9.1-FP9)

Is it required to update the DB2 from FP7 to FP9, "before" upgrading the WPS from 6.1.0.1 to 6.1.0.6 ?

What are the effects if we upgrade WPS first and then DB2?

Thank you.

Rob Fichtel commented on Mar 19, 2010

Steps to Configure WebSphere Portal 6.1.x with DB2 for Windows/UNIX using Type 4 drivers

JCR Collation configuration on a Windows Server 2003 platform:

CD C:\IBM\SQLLIB\FUNCTION

C:\IBM\SQLLIB\java\jdk\bin\jar -xvf C:\IBM\WebSphere\PortalServer\jcr\prereq.jcr\config\collation.jar icm\CollationUDF.class