![]()
Portal Express, Version 6.0
Operating systems: i5/OS, Linux, Windows
Transferring DB2 manually
This section provides information on how to manually transfer data to the DB2 database you have installed and set up.
Before you begin
Before configuring databases, ensure that the following prerequisites are met:
- Supported database software is installed.
- Databases and users are correctly setup for use by IBM® WebSphere® Portal Express.
- If you are using one of the following fix packs complete the steps below prior to database transfer. Failure to follow these steps will cause the database transfer to hang at the task action-process-constraints.
- DB2 8.1 Fix Pack 10
- DB2 8.1 Fix Pack 11
- DB2 8.1 Fix Pack 12
- DB2 8.1 Fix Pack 13
DB2 8.1 Fix Pack 14
DB2 9.1 Fix Pack 1
- Locate the following file:
- Linux:
/home/db2inst1/sqllib/cfg/db2cli.ini
- Windows:
db2home/sqllib/db2cli.ini
- Edit the file by adding the following to the end of the file:
- For Fix Pack 10 or Fix Pack 11:
[COMMON] DYNAMIC=1An empty line is required after the dynamic=1 at the end of the file.
For all other Fix Packs listed above:
[COMMON] DYNAMIC=1 ReturnAliases=0An empty line is required after the ReturnAliases=0 at the end of the file.
Notes:
- This fix should be applied to both the client side and server side of the DB2 installation.
If you are using DB2 type 4 JDBC driver at the client side, the fix should be applied to the server side only.
- If you are transferring from Oracle, the open_cursors setting should be set to 1500 by default. If you are using DB2 Content Manager Runtime Edition, this value may need to be increased based on the table count in the DB2 Content Manager Runtime Edition schema.
Password Considerations
For security reasons, you should not store passwords in the wpconfig.properties, wpconfig_dbdomain.properties, and wpconfig_dbtype.properties files. IBM recommends that you edit each of the properties files prior to running a configuration task, inserting the passwords needed for that task. After the task has run, you should delete all passwords from each file. For more information, see Deleting passwords from configuration scripts.
Alternatively, you can specify the password on the command line using the following syntax:
- Linux:
./WPSconfig.sh task_name -Dpassword_property_key=password_value
- Windows:
WPSconfig.bat task_name -Dpassword_property_key=password_value
As with other properties, each password property must have the -D prefix and be set equal to (=) a value. If you have multiple properties in a single command, use a space character between each -Dproperty=value setting. Tips:
- The steps for transferring data to another supported database section provides instructions for manually transferring data. Instead of performing the following steps, you can use the configuration wizard, a graphical user interface, to transfer data to another supported database. For more information, refer to Configuring WebSphere Portal Express with the configuration wizard.
- A configuration template might exist to support these instructions. Refer to the portal_server_root/config/helpers directory for available configuration templates. Use the configuration template to update the wpconfig.properties, wpconfig_dbdomain.properties, and wpconfig_dbtype.properties files, as described in Configuration program, according to the property descriptions and recommended values provided here. If you do not want to use a configuration template, follow theses instructions as written.
Steps for transferring data to another supported database
Follow these steps to transfer WebSphere Portal Express, Member Manager, and DB2 Content Manager databases to DB2.
For Windows, be sure that DB2 is started by checking the 'service'. If attempts to re-start DB2 result in a 'logon failure' message, then go to the DB2 properties and reenter the password.
- Locate the following files and create a backup copy of each before changing any values:
- portal_server_root/config/wpconfig.properties
- portal_server_root/config/wpconfig_dbdomain.properties
- portal_server_root/config/wpconfig_dbtype.properties
- Use a text editor to open the properties files and enter the values that are appropriate for your environment. Tip:
- IBM recommends to print out the properties tables in this step for reference while modifying the properties files.
- Make sure to enter the appropriate values for each instance of each property. In wpconfig_dbdomain.properties, most properties are repeated for each domain.
Notes:
- The WebSphere Portal Express database can be used to hold information for applications such as Document Manager, Personalization, Feedback and LikeMinds. In this case, the user should use similar naming conventions for property values such as release.DbName, jcr.DbName, feedback.DbName, and likeminds.DbName. For example:
- releaseDbName=wpsdb
- jcr.DbName=jcrdb
- feedback.DbName=fdbkdb
- likeminds.DbName=lkmddb
- Do not change any settings other than those that are specified in these steps. For instructions on working with these files, see Configuration properties reference for a complete properties reference, including default values.
- If you are using a remote database, be sure to enter the values for the remote server.
- Use / instead of \ for all platforms.
- Some values, shown here in italics, might need to be modified to your specific environment.
- There might be additional database properties other than those listed here. Only change the properties within this table; skip all other properties.
- The value listed for each property in the following tables represents the specific information that is required to configure WebSphere Portal Express to your target database.
- Depending on which database domain has to be configured, dbdomain may need to be replaced by:
- release
- customization
- community
- jcr
- feedback
- likeminds
- wmm
- The values for at least one of the following properties must be unique for the release, customization, community, and jcr domains:
If you use the same values for all four properties across the release, customization, community, and JCR domains, the database-transfer task will fail. If DbUser, DbUrl, and DbPassword are not the same across domains, the value for DataSourceName must differ from the DataSourceName of the other domains. In other words, this value must be unique for the database domain.
- Do not modify the values for the sync and designer database domains. These domains are not used by WebSphere Portal Express and the values should remain pointing to the default database.
Update the following properties in the file wpconfig_dbdomain.properties.
Database domain properties Property Value dbdomain.DbType The type of database used to store information for WebSphere Portal Express.
Type: Alphanumeric text string
Recommended:
- DB2: db2
dbdomain.DbName The name of the WebSphere Portal Express domain database and schema.
Notes:
- This value is also the database element in the dbdomain.DbUrl property.
- For non-Windows platforms when using DB2, this value is the TCPIP Alias for the database.
Type: Alphanumeric text string
Notes:
- For DB2 this value cannot exceed 8 characters and can only contain letters and numbers. Refer to your database documentation for more information.
- For DB2, this value must be different from the value of dbdomain.XDbName.
- If you change the name of the WebSphere Portal Express data source due to a database migration, manually update this property in the portal_server_root/config/wpconfig_dbdomain.properties file to maintain the proper resource reference mapping.
Recommended value for all domains:
- Release: release
- Community: comm
- Customization: cust
- JCR: jcrdb
- WMM: wmmdb
- Feedback: fdbkdb
- LikeMinds: lmdb
dbdomain.DbSchema The schema name of the database domain.
Notes:
- For i5/OS: dbdomain.DbSchema must match the postfix of dbdomain.DbName after /. For example, if release.DbName=*LOCAL/REL60, then release.DbSchema=REL60.
- Follow the documentation of the target database management system in order to define a valid schema name as restrictions apply for some database management systems, for example on i5/OS.
Notes:
- This property is not used on Member Manager, which only uses the dbdomain.DbUser name as the schema.
- Follow the documentation of the target database management system in order to define a valid schema name as restrictions apply for some database management systems.
- For SQL Server and non-wmm databases only, unless you are the system administrator, the values for dbdomain.DbUser and dbdomain.DbSchema must be the same.
- For Oracle only: For non-feedback domains, DbSchema and DbUser MUST be the same. For Feeback domains, the default schema name is FEEDBACK. If the value is set to something besides FEEDBACK, you also have to set the schemaName property in <wps_home>/shared/app/config/services/FeedbackService.properties to the new schema.
Type: Alphanumeric text string
Default value: dbdomain
dbdomain.DbUrl The database URL used to access the WebSphere Portal Express database with JDBC. The value must conform to standard JDBC URL syntax.
The database element of this value should match the value of dbdomain.DbName.
Type: Alphanumeric text string, conforming to standard JDBC URL syntax
Recommended:
- DB2:
- jdbc:db2:wpsdb
jdbc:db2://db2server.mycompany.com:50000/wpsdb:returnAlias=0;
Please refer to the DB2 documentation for the correct syntax of the JDBC URL.
- JDBC type 2 connection:
- http://publib.boulder.ibm.com/infocenter/db2luw/v9/topic/com.ibm.db2.udb.apdv.java.doc/doc/cjvjt2cn.htm
- Example: jdbc:db2:wpsdb
- JDBC type 4 connection:
- http://publib.boulder.ibm.com/infocenter/db2luw/v9/topic/com.ibm.db2.udb.apdv.java.doc/doc/cjvclrrt.htm
- Example: jdbc:db2://db2server.mycompany.com:50000/wpsdb:returnAlias=0;
The name of the database must be used in the URL; for example, wpsdb. The alias of the database should not be used in the URL.
dbdomain.DbUser The user ID for the database administrator.
Notes:
- For SQL Server and non-wmm databases only, unless you are the system administrator, the values for dbdomain.DbUser and dbdomain.DbSchema must be the same.
- For Oracle and SQL Server, if the user you are using is an administrative user that has authority over the FEEDBACK schema, the administrative user should be entered for the dbdomain.DbUser property.
- For Oracle only: For non-feedback domains, DbSchema and DbUser MUST be the same. For Feeback domains, the default schema name is FEEDBACK. If the value is set to something besides FEEDBACK, you also have to set the schemaName property in <wps_home>/shared/app/config/services/FeedbackService.properties to the new schema.
Type: Alphanumeric text string
Default for all domains: wpdb2ins ReplacewithyourDBAdminUser
- Release: releaseusr
- Community: communityusr
- Customization: customizationusr
- JCR: icmadmin
- WMM: wmmdbusr
- Feedback: feedback
- LikeMinds: lmdbusr
dbdomain.DbPassword The password for the database administrator.
A value must be set for this property; it cannot be empty.
Type: Alphanumeric text string
Default for all domains: ReplaceWithYourDbAdminPwd
dbdomain.XDbName The database loop back alias that needs to be set if you plan to use the create-local-database-db2 task.
Notes:
- For DB2, this value must be different from the value of dbdomain.DbName.
Type: Alphanumeric text string
- Release: wps6TCP
- Community: wps6TCP
- Customization: wps6TCP
- WMM: wps6TCP
- JCR: wps6TCP
- Feedback: fdbk6TCP
- LikeMinds: lmdb6TCP
dbdomain.DbNode The value for the node database.
Required for non-Windows platforms when using DB2 only.
Type: Alphanumeric text string
- Release: wpsNode
- Community: wpsNode
- Customization: wpsNode
- JCR: wpsNode
- WMM: wpsNode
- Feedback value: pznNode
- LikeMinds value: pznNode
dbdomain.DataSourceName The name of the data store that WebSphere Portal Express uses to communicate with its databases.
Notes:
- If the DbUser, DbUrl, and DbPassword are not the same across domains, this value must differ from the DataSourceName of the other domains. In other words, this value must be unique for the database domain.
- The value for dbdomain.DataSourceName should not be set to the same value as dbdomain.DbName.
- i5/OS: The value for dbdomain.DataSourceName must match the postfix of dbdomain.DbSchema name. For example, if release.DbSchema=REL60, then release.DataSourcename=REL60. This name must be unique for each database schema.
- Follow the documentation of the target database management system in order to define a valid schema name, as restrictions apply for some database management systems.
Type: Alphanumeric text string
- Release: wpsdbDS
- Community: wpsdbDS
- Customization: wpsdbDS
- JCR: JCRDS
- WMM: wpsdbDS
- Feedback: feedback5
- LikeMinds: lmdbDS
Update the following properties in the file wpconfig_dbtype.properties.
Database type properties Property Value DbSafeMode This only applies to database-specific tasks. If this property is set to true, database-specific tasks, such as create/modify/drop database, will not be performed. The property should be used if a pre-configured database (from a previous installation) already exists. If the property is set to false, the database will be updated and the pre-existing database configuration will be overwritten.
Recommended: false
Default: false
db2.DbDriver The name of the class that SqlProcessor will use to import SQL files.
The JDBC driver class name depends on the JDBC connection type that will be used.
Recommended:
- For JDBC type 2 connections: COM.ibm.db2.jdbc.app.DB2Driver
For JDBC type 4 connections: com.ibm.db2.jcc.DB2Driver
db2.DbLibrary The directory and name of the .zip or .jar file that contains the JDBC driver class.
The value depends on the JDBC connection type that will be used. For JDBC type 2 connections the JDBC driver archive is named db2java.zip, but for JDBC type 4 connections the archive is split into two files: db2jcc.jar, which contains the JDBC driver, and db2jcc_license_*.jar, which contains the corresponding license. The name of the license archive depends on the actual license. For licensed connections to DB2 on Windows, Linux and Linux the file may be named db2jcc_license_cu.jar. The JDBC driver archives can be found in the DB2 installation directory in the "sqllib/java" subdirectory.
Recommended:
- JDBC Type 2 connection: db2_install/java/db2java.zip
JDBC Type 4 connection: db2_install/java/db2jcc.jar:db2_install/java/db2jcc_license_cu.jar
In Linux environments, use a colon (:) instead of a semi-colon (;) to separate multiple paths.
db2.JdbcProviderName The name of the JDBC provider that WebSphere Portal Express uses to communicate with its databases. Type: Alphanumeric text string
Update the following properties in the file wpconfig.properties.
WebSphere Application Server properties Property Description WasPassword The password for WebSphere Application Server security authentication.
If a value is specified for WasPassword, a value must also be specified for WasUserid. If WasPassword is left blank, WasUserid must also be left blank.
Type: Alphanumeric text string
Recommended: Set this value according to a environment.
Default: ReplaceWithYourWASUserPwd
Update the following properties in the file wpconfig_sourceDb.properties
Property Description source.dbdomain.DbPassword The password for the source database.
Type: Alphanumeric text string
Recommended: Set this value according to a environment.
This value is the same as the administrator password if the default user was used during install.
- Save the file.
- Open a command prompt, and change to the directory portal_server_root/config.
- If WebSphere Portal Express is on Linux and you are using a Type 2 driver, export the DB2 user profile that you created when installing DB2 onto the administrative user using the following command. This gives that administrative user rights over DB2.
. /home/db2inst1/sqllib/db2profilewhere db2inst1 represents your database instanceYou must complete this step before running database tasks and before enabling security in order to create a suitable JDBC driver.
- Enter the following commands to validate configuration properties.
- Linux:
- ./WPSconfig.sh validate-database-connection-wps -Drelease.DbPassword=password -Dcustomization.DbPassword=password -Dcommunity.DbPassword=password -Djcr.DbPassword=password
- ./WPSconfig.sh validate-database-connection-jcr -Djcr.DbPassword=password
- ./WPSconfig.sh validate-database-connection-feedback -Dfeedback.DbPassword=password
- ./WPSconfig.sh validate-database-connection-likeminds -Dlikeminds.DbPassword=password
- ./WPSconfig.sh validate-database-connection-wmm -Dwmm.DbPassword=password
- ./WPSconfig.sh validate-database-driver
- Windows:
- WPSconfig.bat validate-database-connection-wps -Drelease.DbPassword=password -Dcustomization.DbPassword=password -Dcommunity.DbPassword=password -Djcr.DbPassword=password
- WPSconfig.bat validate-database-connection-jcr -Djcr.DbPassword=password
- WPSconfig.bat validate-database-connection-feedback -Dfeedback.DbPassword=password
- WPSconfig.bat validate-database-connection-likeminds -Dlikeminds.DbPassword=password
- WPSconfig.bat validate-database-connection-wmm -Dwmm.DbPassword=password
- WPSconfig.bat validate-database-driver
- From the same command prompt as the previous steps, change to the directory was_profile_root/bin.
- Stop both server1 and the WebSphere Portal Express server.
- Enter the following command:
- Linux:
./stopServer.sh server1 -user admin_userid -password admin_password
- Windows:
stopServer.bat server1 -user admin_userid -password admin_password
- i5/OS:
stopServer.sh server1 -profileName profile_root -user admin_userid -password admin_password
where profile_root is the name of the WebSphere Application Server profile where WebSphere Portal Express is installed; for example, wp_profile.
server1 is the name of your WebSphere Application Server administrative server.
- Enter the following command:
- Linux:
./stopServer.sh WebSphere_Portal -user admin_userid -password admin_password
- Windows:
stopServer.bat WebSphere_Portal -user admin_userid -password admin_password
- i5/OS:
stopServer.sh WebSphere_Portal -profileName profile_root -user admin_userid -password admin_password
where profile_root is the name of the WebSphere Application Server profile where WebSphere Portal Express is installed; for example, wp_profile.
- To transfer the database, perform this step:
- Change to the directory portal_server_root /config.
- Enter the following commands to run the configuration task.
- Linux:
./WPSconfig.sh database-transfer -Drelease.DbPassword=password-Dcustomization.DbPassword=password -Dcommunity.DbPassword=password -Djcr.DbPassword=password -Dwmm.DbPassword=password -Dfeedback.DbPassword=password -Dlikeminds.DbPassword=password
- Windows:
WPSconfig.bat database-transfer -Drelease.DbPassword=password -Dcustomization.DbPassword=password-Dcommunity.DbPassword=password -Djcr.DbPassword=password -Dwmm.DbPassword=password -Dfeedback.DbPassword=password -Dlikeminds.DbPassword=password
- After running this task, a message indicating success should result. Check the log files to verify that this task was successful. If the configuration fails, verify the values in the wpconfig.properties, wpconfig_dbdomain.properties, wpconfig_sourceDb.properties, and wpconfig_dbtype.properties files, and then repeat this step.
- After transferring the database tables, perform a reorg check to improve performance.
- Connect to a database with the following command:
db2 connect to database_alias user db2admin_userid using passwordAdditional options may be required if additional security has been installed. Refer to DB2 Universal Database commands by example for links to a downloadable command reference.
- Once connected, run the following commands from the DB2 prompt: Windows:
db2 reorgchk update statistics on table all > xyz.outLook in the reorg column for entries marked with a * (star or asterisk) in the file xyz.out. For each line with a *, note the tablename and run the following command for each tablename:db2 reorg table tablename db2 terminate c:\> db2rbind database_name -l db2rbind.out -u db2_admin -p passwordFor some tables, running reorg on the table might result in the table still being flagged with a * (star or asterisk). This can be ignored.Linux:
db2 reorgchk update statistics on table all > xyz.outLook in the reorg column for entries marked with a * (star or asterisk) in the file xyz.out. For each line with a *, note the tablename and run the following command for each tablename:db2 reorg table tablename db2 terminate db2rbind database_name -l db2rbind.out -u db2_admin -p passwordFor some tables, running reorg on the table might result in the table still being flagged with a * (star or asterisk). This can be ignored.- The output file db2rbind.out will only be created if there is an error for the above db2rbind command.
- Change to the directory was_profile_root/bin.
- Restart the WebSphere Portal Express server:
- Enter the following command:
- Linux:
./startServer.sh WebSphere_Portal
- Windows:
startServer.bat WebSphere_Portal
- i5/OS:
startServer.sh WebSphere_Portal -profileName profile_root
where profile_root is the name of the WebSphere Application Server profile where WebSphere Portal Express is installed; for example, wp_profile.
Next steps
You have completed this step. Continue to the next step.
Parent topic:
Transferring all domains