Tag Archives: cnx

Customizing Connections 4 Wikis Default (Welcome) Page

The Default Page of Wikis shows some content for our users to offer them better work experience, but in some companies it would be good to change this text or use only one language. Content of this welcome page is set in the default language of the user who creates the wiki.

I found the properties File for this text area in {WAS_Root}/profiles/AppSrv01/installedApps/{cellname}/Wikis.ear When you unzip the file share.services.jar, you get the path com/ibm/lconn/share/services/handlers/wiki/nls/ and there the properties-files for wikis (WikiWelcomePageMessages.properties).

To change the values for english, you create a file named com.ibm.lconn.share.services.handlers.wiki.nls.WikiWelcomePageMessages.properties in {Connections Shared Directory}/customization/strings/

Here you define:

WELCOME_MESSAGE_HTML=Your Default Wiki Welcome Text
WELCOME_MESSAGE_COMMUNITY_HTML=Your Default Community Wiki Welcome Text

The string can contain html markup.

If you want to change this in additional languages, you have to prepare files with following name: com.ibm.lconn.share.services.handlers.wiki.nls.WikiWelcomePageMessages_{LanguageCode}.properties

Skripting DB2 Automatic Maintenance

After skripting jdbc and j2ee on WebSphere i was interested to fasten the DB2 configuration after a Connections installation.

There are two ways to get valid source xml-Files for automatic maintenance in DB2. I use automatic maintenance, because i can set a maximum backup time and how many dumps of one database should be stored. DB2 deletes old backups (which i have in a filebackup each night) automatically.

You can’t script this settings directly, IBM provides two system calls for this: sysproc.automaint_set_policyfile and sysproc.automaint_set_policy.

I use the file variant here, because i think it easier to handle files than blob content.

Sample Files

In /opt/ibm/db2/v9.7/samples/automaintcfg you can find example files for all settings within automatic maintenance.

You can edit them and then put them to INSTANCE_ROOT/sqllib/tmp (on Linux|AIX /home/db2inst1/sqllib/tmp).

The xml-Files must have read/write rights for db2fenc1 user or db2iadm group!

Export settings from db2

You can setup one of the connections databases for automatic maintenance (timeperiods, backup path, and so on). These settings can be done through db2cc or DB2 Data Studio. After providing all needed parameters you can export these settings through db2 commandline interface.

 connect to homepage
 call sysproc.automaint_get_policyfile('AUTO_BACKUP','DB2AutoBackupPolicy.xml')
 call sysproc.automaint_get_policyfile('AUTO_RUNSTATS','DB2AutoRunStatsPolicy.xml')
 call sysproc.automaint_get_policyfile('AUTO_REORG','DB2AutoReorgPolicy.xml')
 call sysproc.automaint_get_policyfile('MAINTENANCE_WINDOW','DB2AutoMaintenancePolicy.xml')

The files get automatically stored to INSTANCE_ROOT/sqllib/tmp.

Set automatic maintenance through script

I created a script with following code (e.g. setbackup.sql):

 connect to peopledb;
 update db cfg using AUTO_MAINT ON;
 update db cfg using AUTO_DB_BACKUP ON;
 update db cfg using AUTO_TBL_MAINT ON;
 update db cfg using AUTO_RUNSTATS ON;
 update db cfg using AUTO_STATS_PROF ON;
 update db cfg using AUTO_PROF_UPD ON;
 update db cfg using AUTO_REORG ON;
 call sysproc.automaint_set_policyfile('AUTO_BACKUP','DB2AutoBackupPolicy.xml');
 call sysproc.automaint_set_policyfile('AUTO_RUNSTATS','DB2AutoRunStatsPolicy.xml');
 call sysproc.automaint_set_policyfile('AUTO_REORG','DB2AutoReorgPolicy.xml');
 call sysproc.automaint_set_policyfile('MAINTENANCE_WINDOW','DB2AutoMaintenancePolicy.xml');
 commit;

You have to copy this for all databases where you want to configure automatic maintenance!

After a full IBM Connections installation this are: blogs, cognos, dogear, files, forum, homepage, metrics, mobile, opnact, peopledb, sncomm, wikis.

So you have to copy the text block 10 times and change the “connect to” line.

Now you can apply the settings with db2 -tvf setbackup.sql and you’re done. Restart db2admin or the database server after these settings.

Prerequists

Automatic maintenance needs a TOOLSDB! Without it the configured tasks will not start. When you forgot to enable TOOLSDB on the DB2 setup, you can create one with:

 db2 create tools catalog cc create new database toolsdb

You can check if a TOOLSDB is present and configured with: db2 get admin configuration

Last lines should be:

 [...]
 Tools Catalog Database              (TOOLSCAT_DB) = TOOLSDB
 Tools Catalog Database Instance     (TOOLSCAT_INST) = db2inst1
 Tools Catalog Database Schema       (TOOLSCAT_SCHEMA) = CC
 [...]

Example SQL File (for all Connections Databases)

setbackup.sql

Setting dataSource/JDBC parameters with wsadmin

Setting the performance tuning parameters for all datasources in WebSphere Application Server (for IBM Connections 4) is a really annoying job with lots of mouse clicks.

I searched a way to make these through wsadmin with a jython script and after some testing i wrote one, which set all parameters for the Connections DataSources as described in IBM Connections 4 Performance Tuning Guide.

I set StatementCacheSize, minConnections and maxConnections with this script.

Download:

changeDataSourceParameters

Using this script

Copy this script to your server and copy & paste it to a wsadmin-Session, or start wsadmin with wsadmin.(sh|bat) -lang jython -username youruser -password password -f path/changeDataSourceParameter.py

I didn’t include error handling. When a DataSource is not configured, then the script will terminate!

Disclaimer

I use this script in several installations without problem, but i’m not responsible, when you break your systems or loose data!

If you find errors, you can comment or send me a mail, but i will not provide support for this script.