You may need to update the connection information some time after you configure WebSphere Portal to use an external database (such as DB2, Oracle or SQLServer) This document describes the procedure to take to update the database configuration information and includes the following topics:
'connect-database' configuration script
Changing the hostname of the database
Updating database User IDs and/or passwords
Configuring Portal to use a backup database
Limitations of 'connect-database' script
Connect-database configuration script
WebSphere Portal provides a WPSconfig/ConfigEngine script to automatically make these changes for you. This script is the 'connect-database' task.
connect-database
This script does all of the following:
Drop the existing datasources and JDBC provider in the WAS configuration
Creates a new JDBC provider and datasources in the WAS configuration using your updated information
Creates new environment variables if needed for database drivers
Updates several portal applications (such as wps.ear, wcm.ear and icmjcr.ear) to use the new datasources
Steps to update Portal with the new hostname or port of the databases
Portal v6.0.x
1. In the PortalServer/config directory, edit the wpconfig_dbdomain.properties file
2. Change the following values as needed to reflect the new hostname and/or port for the database server:
release.DbUrl
community.DbUrl
customization.DbUrl
jcr.DbUrl
wmm.DbUrl
likeminds.DbUrl
3. Save the file
4. Cluster only. Ensure the DMGR is started.
5. From the PortalServer/config directory, execute the following WPSconfig scripts to validate the properties:
Windows: WPSconfig.bat validate-database-connection-wps
WPSconfig.bat validate-database-connection-jcr
WPSconfig.bat validate-database-connection-likeminds
WPSconfig.bat validate-database-connection-wmm
Unix: ./WPSconfig.sh validate-database-connection-wps
./WPSconfig.sh validate-database-connection-jcr
./WPSconfig.sh validate-database-connection-likeminds
./WPSconfig.sh validate-database-connection-wmm
6. Execute the following WPSconfig script to update the Portal datasources:
Windows: WPSconfig.bat connect-database -DWasPassword=password
Unix: ./WPSconfig.sh connect-database -DWasPassword=password
7. Restart the WebSphere_Portal server.
Portal v6.1.x
1. In the wp_profile/ConfigEngine/properties directory, edit the wkplc_comp.properties file
2. Change the following values as needed to reflect the new hostname and/or port for the database server:
release.DbUrl
community.DbUrl
customization.DbUrl
jcr.DbUrl
feedback.DbUrl
likeminds.DbUrl
3. Save the file
4. Cluster only. Ensure the DMGR is started.
5. From the wp_profile/ConfigEngine directory, execute the following ConfigEngine scripts to validate the properties:
Windows: ConfigEngine.bat validate-database-connection
Unix: ./ConfigEngine.sh validate-database-connection
6. Execute the following ConfigEngine script to update the Portal datasources:
Windows: ConfigEngine.bat connect-database -DWasPassword=password
Unix: ./ConfigEngine.sh connect-database -DWasPassword=password
7. Restart the WebSphere_Portal server.
Steps to update database user Ids and/or passwords in the Portal/WAS configuration
Portal v6.0.x
1. In the PortalServer/config directory, edit the wpconfig_dbdomain.properties file
2. Change the following values as needed to reflect the new user ID and/or password for the database server:
release.DbUser
release.DbPassword
community.DbUser
community.DbPassword
customization.DbUser
customization.DbPassword
jcr.DbUser
jcr.DbPassword
wmm.DbUser
wmm.DbPassword
likeminds.DbUser
likeminds.DbPassword
3. Save the file
4. Cluster only. Ensure the DMGR is started.
5. From the PortalServer/config directory, execute the following WPSconfig scripts to validate the properties:
Windows: WPSconfig.bat validate-database-connection-wps
WPSconfig.bat validate-database-connection-jcr
WPSconfig.bat validate-database-connection-likeminds
WPSconfig.bat validate-database-connection-wmm
Unix: ./WPSconfig.sh validate-database-connection-wps
./WPSconfig.sh validate-database-connection-jcr
./WPSconfig.sh validate-database-connection-likeminds
./WPSconfig.sh validate-database-connection-wmm
6. Execute the following WPSconfig script to update the Portal datasources:
Windows: WPSconfig.bat connect-database -DWasPassword=password
Unix: ./WPSconfig.sh connect-database -DWasPassword=password
7. Restart the WebSphere_Portal server.
Portal v6.1.x
1. In the wp_profile/ConfigEngine/properties directory, edit the wkplc_comp.properties file
2. Change the following values as needed to reflect the new user ID and/or password for the database server:
release.DbUser
release.DbPassword
community.DbUser
community.DbPassword
customization.DbUser
customization.DbPassword
jcr.DbUser
jcr.DbPassword
wmm.DbUser
wmm.DbPassword
likeminds.DbUser
likeminds.DbPassword
3. Save the file
4. Cluster only. Ensure the DMGR is started.
5. From the wp_profile/ConfigEngine directory, execute the following ConfigEngine scripts to validate the properties:
Windows: ConfigEngine.bat validate-database-connection
Unix: ./ConfigEngine.sh validate-database-connection
6. Execute the following ConfigEngine script to update the datasources:
Windows: ConfigEngine.bat connect-database -DWasPassword=password
Unix: ./ConfigEngine.sh connect-database -DWasPassword=password
7. Restart the WebSphere_Portal server.
Steps to point Portal to a backup database:
Portal v6.0.x
1. In the PortalServer/config directory, edit the wpconfig_dbdomain.properties file
2. Change the following values as needed to reflect the values for the backup database server:
NOTE: domain in this case refers to release, community, customization, jcr, likeminds, and wmm. Update all domain properties that apply to your situation.
domain.DbType
domain.DbName
domain.DbUrl
domain.DbUser
domain.DbPassword
domain.DbSchema
3. Save the file
4. Cluster only. Ensure the DMGR is started.
5. From the PortalServer/config directory, execute the following WPSconfig scripts to validate the properties:
Windows: WPSconfig.bat validate-database-connection-wps
WPSconfig.bat validate-database-connection-jcr
WPSconfig.bat validate-database-connection-likeminds
WPSconfig.bat validate-database-connection-wmm
Unix: ./WPSconfig.sh validate-database-connection-wps
./WPSconfig.sh validate-database-connection-jcr
./WPSconfig.sh validate-database-connection-likeminds
./WPSconfig.sh validate-database-connection-wmm
6. Execute the following WPSconfig script to update the Portal datasources:
Windows: WPSconfig.bat connect-database -DWasPassword=password
Unix: ./WPSconfig.sh connect-database -DWasPassword=password
7. Restart the WebSphere_Portal server.
Portal v6.1.x
1. In the wp_profile/ConfigEngine/properties directory, edit the wkplc_comp.properties file
2. Change the following values as needed to reflect the values for the backup database server:
NOTE: domain in this case refers to release, community, customization, jcr, likeminds, and wmm. Update the following properties for all domains that apply to your situation.
domain.DbType
domain.DbName
domain.DbUrl
domain.DbUser
domain.DbPassword
domain.DbSchema
3. Save the file
4. Cluster only. Ensure the DMGR is started.
5. From the wp_profile/ConfigEngine directory, execute the following ConfigEngine scripts to validate the properties:
Windows: ConfigEngine.bat validate-database-connection
Unix: ./ConfigEngine.sh validate-database-connection
6. Execute the following ConfigEngine script to update the datasources:
Windows: ConfigEngine.bat connect-database -DWasPassword=password
Unix: ./ConfigEngine.sh connect-database -DWasPassword=password
7. Restart the WebSphere_Portal server.
Limitations:
To only update the datasource information for specific domains, you can add the following flags to the 'connect-database' script:
Portal v6.0: -DActDbDomainList=domain1,domain2
Portal v6.1: -DTransferDomainList=domain1,domain2
'connect-database' does not validate any of the properties you have entered into wpconfig_dbdomain.properties or wkplc_comp.properties. It is very important that you run the validation scripts prior to running connect-database.
'connect-database' drops the Portal JDBC provider. If you have created any custom datasources in this JDBC provider, they will be lost. It is recommended that you create custom datasources in their own JDBC provider.
If you customized any of the Portal datasources, these changes will be lost. You will need to redo any customizations you may have made to the Portal datasources.
Thanks,
Hunter T. Tweed
WebSphere Portal Level 2 Support
Portal Install and Configuration - Team Lead
Bldg 500 4205 S. Miami Boulevard, Durham , NC 27703
Internet: httweed@us.ibm.com
Phone: (919) 543-9173 (T/L 441-9173)
Working Hours: 12 pm EST - 8 pm EST