Before we can install the Connections applications we must create the databases they will use. The database server can be DB2, SQL or Oracle but the licensing for DB2 is part of your Connections licensing whereas SQL and Oracle would need to be separately licensed. I tend to use whatever server the customer feels most comfortable supporting, if they are a big SQL or Oracle house I’ll use that. For our purposes, and if the customer has no preference I like to use DB2. One note about high availability, the license for DB2 includes the rights to use active/passive HADR for DB2 which means creating two servers which sync with each other but with only one active at a time. To make the active server passive and make the passive server active requires a manual switchover and will entail some amount of downtime. For additional license cost DB2 offer a full HADR active/active solution but I won’t be discussing that on this blog.
We already installed DB2 so now we just need to run the DBWizard to create the databases. It’s important to use the db2inst1 account we created during install as “owner” of the DB2 instance (on Windows it’s probably called db2admin) to create the databases. This ensures that the db2inst1 has the right security access to the databases and that later, when the Connections applications attempt to write to the databases, everything works.
Now I can login as db2inst1. Don’t use “su” as that can throw errors, always login to the server as the db2inst1 (or in Windows db2admin) account.
Setting The Environment
The first thing we should do is make sure the instance of DB2 can run all the Connections databases. Run the command
db2 update dbm cfg using numdb 20 to allow up to 20 databases to run in this single instance. That’s a high number but in a reasonably small environment (less than 1000 concurrent users say) it’s fine.
We also need to set the DB2 instance to use unicode before Connections installs, we can do that whilst we’re here by typing
Then stop and start DB2 to make both the above changes take effect
Creating The Databases
IBM released Day 1 fixes for the DBWizards and you need to find and use these not the ones that shipped with 5.5. They are on fixcentral and their filenames are
Using my root account I extract the tar file to a directory like this
tar -xvf /opt/Software/22.214.171.124-IC-D1-DBWizard-LO87408_lin_aix.tar chown -R db2inst1 * (this recursively makes the file owner of all files in that directory db2inst1)
Launch the ./dbWizard.sh from the terminal session. This has a graphical interface so if you don’t have one configured you will need to create a response file and run ./db2Wizard -silent -nameofresponsefile insteaad
The same dbWizard is used to create, update and delete databases, it can also just generate the SQL commands to enable you to manually do these activities yourself. Depending on the complexity of the enviornment and / or if the Wizard starts throwing errors, I often take the SQL commands and manually run them myself so I can monitor and adjust them if necessary.
The second screen asks for (and defaults to) the location of my DB2 install as well as the account that owns that DB instance. I am running the Wizard using that account to ensure there are no security issues with permissions on the newly created databases.
I have chosen not to create either the Cognos or the Connections Content Manager databases at this time beacuse I will not yet be installing those features. When I come to install them later I will re-run this Wizard (or the latest version of this Wizard) and create them then.
The final screen shows all the commands that the Wizard is about to run to create each of the databases. These commands point to .sql files that were extracted into the DBWizard directory and hold instructions on how to build each database for each application. I can save those commands to a file and keep them for reference or use them manually later.
If you want to look at what they are doing, the sql files and routines are under the connections.sql directory in the extracted Wizard location.
The wizard will now run through creating every database and logging the activity to the /home/db2inst1/lcwizard/log/dbWizard directory with one log file for each sql routine. I like to review the log file activity as it progresses in case there are any issues – the entire process can take anywhere from 30 minutues to 2hrs depending on the speed of your disk.
Once the Wizard has finished, try to connect to one of the newly created databases from a terminal window to confirm the database is there and db2inst1 has the right access to it.
For example to connect to the Activities database I use
db2 connect to opnact
Next step: configuring LDAP and populating the profiles database