Getting started with DB2 Express-C for Lotus Foundations

A fast and scalable database for Lotus Foundations

IBM® introduces DB2® Express-C for Lotus® Foundations, which adds a fast and scalable database product to the Lotus Foundations family. This article provides an overview of the Lotus Foundations architecture and describes how the DB2 Add-on fits into this architecture. You'll also learn how to install and configure the Add-on.

Share:

Sean Esson (sesson@ca.ibm.com), Software Developer - Lotus Foundations, IBM

Sean Esson photoSean Esson is a software engineer for the IBM Lotus Foundations team. He graduated with a degree in computer engineering from the University of Toronto and joined the IBM Toronto Lab in 2008. He currently works on the team responsible for developing the underlying operating system of the IBM Lotus Foundations server. He also works with open source software and IBM technologies such as DB2 and Lotus Domino with the goal of integrating them into the Lotus Foundations server environment.



Maksym Petrenko (maksymp@ca.ibm.com), Software Specialist, IBM

Maksym Petrenko 的照片Maksym Petrenko joined IBM Toronto Lab in 2001 and has worked exclusively with DB2 software since then. As part of his career he was developer, technical support analyst, lab services consultant and beta enabler. His experience includes supporting clients with installation, configuration, application development, and performance issues related to DB2 Databases on Windows, Linux, and UNIX platforms. Maksym is a certified DB2 Advanced Database Administrator and DB2 Application Developer.



01 April 2010

Also available in Russian Vietnamese Portuguese Spanish

Introduction

Lotus Foundations is a family of software appliances that provide the essential software that businesses need to focus on running the business, not managing computer systems.

IBM Lotus Foundations Start is an on-premises small business appliance and a complete solution for businesses with 5-500 employees that have limited or no in-house technical resources. It can be deployed within 30 minutes, and its self-managing, self-healing capabilities minimize the need for human intervention. It enables customers to do email, create and share documents, use business applications, centrally manage files, store and secure business data, control access to information, connect offices and employees, and protect their network and systems from unwanted disruptions and intrusions.

DB2 Express-C is a no-charge community edition of the DB2 data server. It is ideal for small businesses and multi-branch companies, as well as developers and business partners who serve these clients. DB2 Express-C can be set up quickly, is easy to use, and includes self-managing capabilities. It also embodies all of the core features of the more scalable DB2 editions, including the revolutionary pureXML® technology for powering a new breed of Web 2.0 and SOA based solutions.

The combination of these two products helps to provide a strong, feature-rich platform for developing reliable and cost effective applications for small to medium-sized businesses.

Overview of Lotus Foundations Start

Lotus Foundations Start consists of the core platform and Add-ons that extend its functionality. The core operating system (OS) is responsible for handling most of the system functions such as firewall, networking, VPN, file sharing, administration, and backup. Add-ons contain applications such as Domino, which provides the rich collaboration features in Start, and VMware Server 2.0, which allows any application to be hosted on the Lotus Foundations server. The following diagram gives a high-level overview of the internals of Lotus Foundations.

Figure 1. Lotus Foundations infrastructure
Diagram shows Lotus foundations core to the left, connected via UniConf Connectivity to Linux applications, Domino, and VMware Server.

DB2 Express-C for Lotus Foundations overview

The DB2 Express-C for Lotus Foundations provides easy one-click installation. When installed, all users are synchronized between the core operating system and the Add-on, which allows for centralized user management. If advanced configuration of DB2 is necessary, then the Add-on can be remotely accessed via either secure shell (SSH) or telnet.

DB2 Express-C for Lotus Foundations installation

To install the DB2 Express-C for Lotus Foundations you will need to download the installation file from the Resources section of this article. Once the download has completed and you have uncompressed the installation file, follow the steps below.

  1. Connect to the autoinstall file share on the Lotus Foundations server. To do this, from a workstation, click Start -> Run and then enter '\\' followed by the server's IP address, followed by \autoinstall. For example,
    \\192.168.0.1\autoinstall

    Note: This does not work if Windows File Sharing is disabled. If you are using Windows Vista, you must enter the information in the text bar in the Start menu.
  2. If prompted for user credentials, enter an administrative account and password.
  3. Locate the folder where you uncompressed the DB2 Express-C for Lotus Foundations package.
  4. Copy the .pkg folder into the autoinstall folder. Wait for the files to be copied to the server's autoinstall folder before you proceed.
  5. From a Web browser, connect to the server's WebConfig (http://internal_server_ip_address:8042).
  6. At the login page enter the user credentials for an administrator account.
  7. Select Software Update from the menu on the left. In the "Add-on packages available for install" section, a list of installable packages is displayed. If there is no list of available packages, wait several seconds and refresh the screen again. The DB2 Express-C for Lotus Foundations package should be listed and displayed as: "DB2 Express-C for Lotus Foundations (Team autoinstall/ibm-db2-9.7-nnnn.pkg)".
  8. Click the Install link next to the DB2 Express-C for Lotus Foundations. Read and accept the license agreements. The installation will begin and you will be redirected back to the System Status page.
    Figure 2. Software update page showing DB2 Add-on
    Lotus Foundations software update page showing DB2 Express-C add-on available for install, and foundation versions already installed
  9. You can monitor the installation progress in either the Software Update or Add-ons sections of the System Status page. Installation is considered complete when the Add-ons section of the System Status page contains "DB2".
    Figure 3. System Status page shows that DB2 Express-C is running
    Add-ons field of screen shows DB2 Express-C is running

Pre-configured features of DB2 Express-C for Lotus Foundations

For DB2 Express C for Lotus Foundations, the following configuration is set at install time:

  • A new Lotus Foundations team is created, "db2inst1". The home directory for this team contains the DB2 binaries.
  • In DB2, an administrator account is created named "db2inst1."
  • A DB2 PHP driver is installed and configured.
  • A default database is created with the following connection information:
    • Database name: LOTUS_DB
    • Database port number: 50000
    • Database hostname: Set to the same hostname as for the Lotus Foundations server
  • The default database is configured with the following features:
    • Self-tuning memory management that can take up to 500MB of memory
    • Automatic storage management
    • Automatic statistics collection
    • Online backups and point-in-time restores
  • An intelligent disk backup (idb) job named "DB2 Backup" is created for DB2 and configured to run daily at 1:00 A.M.

Password setup for DB2 administrator

The db2inst1 team created in Lotus Foundations during installation is also the default administrator for the DB2 database. By default this user is created without a password. You can assign a password to this team, however this will require using a Lotus Foundation user CAL (client access license). If you decide not to assign a password to this team, you can still access DB2 using the user db2inst1 and the same password as the root user.

To add a password to the db2inst1 team, follow these steps:

  1. From a Web browser, log into WebConfig (http://internal_server_ip_address:8042) as an administrative user.
  2. Select Users from the menu on the left. The Users page is displayed.
  3. Click the Teams tab, and then click the db2inst1 edit pencil-shaped icon icon. The Modify Team page is displayed as shown below:
    Figure 4. Modify team page
    Screen shot shows fields for Team ID, full namd, Password, Re-enter password
  4. In the Password and Re-enter Password fields, enter a password.
  5. Click the Save Changes buttons. You are redirected back to the User Setup page.

This password can now be used for accessing DB2 and DB2 NVS via SSH.

Application enablement on DB2 Express-C for Lotus Foundations

The target application platforms for DB2 Express-C for Lotus Foundations are PHP and Java. Below you will find instructions on configuring connections for each.

PHP

DB2 PHP drivers are installed and configured as part of the DB2 Express for Lotus Foundations installation. If you want to establish connections to a DB2 database from a PHP application, a line like the one below needs to be included in your PHP source code.

$connection = db2_connect("DRIVER={IBM DB2 ODBC 
DRIVER};DATABASE=lotus_db;HOSTNAME=localhost;PORT=50000;PROTOCOL=TCPIP;
UID=db2inst1;PASSWORD=<passwd>;", "", "");

The example shown above is for PHP applications running on the Lotus Foundations server. By default the db2inst1 team is not configured with a password. Before you can connect to the database, you will either need to give a user access or add a password to the db2inst1 team.

If the application is running on a different server, then DB2 PHP drivers must be installed on that server and the hostname field must be changed to the hostname of the Lotus Foundations server. You can download PHP drivers as part of IBM Data Server Driver package. A link to download the Data Server Driver is located in the Resources section of this article.

Java

Java applications can connect to the Lotus Foundations hosted DB2 using JDBC. To install and configure you must have the following configuration on the Java application server:

  • A Java Runtime Environment (JRE) or Java Development Kit (JDK) version 1.4 or later.
  • The DB2 JCC library from the DB2 client package ( see Resources ) must be installed.
  • Your CLASSPATH must contain the path to the db2jcc.jar and db2jcc_license_cu.jar files.

To establish the JDBC connection to the LOTUS_DB database, add the following code segment to your Java source code:

Class.forName("com.ibm.db2.jcc.DB2Driver");
java.sql.Connection conn = DriverManager.getConnection( "jdbc:db2://<LF 
hostname>:50000/lotus_db", "db2inst1", "<password>" );

Please note that you can connect and have full access to the tables in the DB2 database as any of the system users from within your application.

How to backup and restore the default database

The intelligent disk backup (idb) feature of Lotus Foundations provides a robust backup solution for your DB2 databases. During the DB2 Express-C for Lotus Foundations installation, an idb backup job named "DB2 Backup" is created. By default the backup is scheduled to run daily at 1:00 AM. You can modify the settings for this job, run unscheduled backups, or restore data from within WebConfig's Backup page. For more information on these operations, please refer to the backup and restore chapter of the Lotus Foundations Start Administration Guide.

To restore database data from a previous backup, follow these steps:

  1. From a web browser log into WebConfig (http://internal_server_ip_address:8042) as an administrative user.
  2. Select Backup from the menu on the left. The Backup page is displayed.
  3. Click the Restore from job icon for the DB2 Backup job. The Restore Files page is displayed with a list of available backups.
    Figure 5. Modify team page
    Screen shot shows fields for Team ID, full name, Password, Re-enter password
  4. From the list of available backups, click the Open Backuppencil-shaped icon icon for the desired backup period. The contents of the backup is displayed.
    Figure 6. Restore Files page with backup contents
    Screen shot shows directories that can be restored
  5. Click the Yes radio button beside the Team db2backup entry, and then click the Start Restore button. The restore process will begin.

Once the restore process has completed, the DB2 database can be accessed as usual.

Accessing DB2 for advanced configuration and management through SSH

There are times that you may need to perform advanced configuration and management of DB2 Express-C databases. For this purpose secure shell (SSH) is enabled on the server and can be accessed from any machine on the local network. If using Windows you will need to download and install PuTTY. Other operating systems usually have SSH support built in. You can either use username db2inst1or root and the user's corresponding password for connecting. Once you are logged in, you can see the current status of DB2 and its databases:

Figure 7. SSH connection to DB2 Add-on
Shows login, command db2 list db directory, and resulting database entry

Note: If you connect using the root user credentials, you will need to change users to db2inst1 by running the su command.

Support for DB2 Express-C for Lotus Foundations

DB2 Express-C is a free product, and thus does not have official IBM support. However, there are many forums and user groups that can help to resolve any DB2-related issues. For the list of DB2 Express-C forums and groups please refer to the Resource section of this article.


Conclusion

DB2 Express-C for Lotus Foundations extends Lotus Foundation capabilities as a platform for developing reliable and cost-effective solutions for small to medium sized businesses. Now ISVs and business partners can take advantage of this enterprise-class database to deliver more value to the growing base of Lotus Foundation customers.

Resources

Learn

Get products and technologies

Discuss

Comments

developerWorks: Sign in

Required fields are indicated with an asterisk (*).


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Information in your profile (your name, country/region, and company name) is displayed to the public and will accompany any content you post, unless you opt to hide your company name. You may update your IBM account at any time.

All information submitted is secure.

Choose your display name



The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

Required fields are indicated with an asterisk (*).

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


All information submitted is secure.

Dig deeper into Information management on developerWorks


static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Information Management, Lotus
ArticleID=479473
ArticleTitle=Getting started with DB2 Express-C for Lotus Foundations
publish-date=04012010