Sun Java System Portal Server 7.1 Update 1 Community Guide

Chapter 2 Configuring the Database

This chapter contains the following:

Introduction to Java DB

By default, the Sun Java System Portal Server software uses the JavaTM DB to store configuration and membership for the collaboration feature. The Portal Server software installs and configures the database.


Tip –

For information on switching to enterprise-scale databases, see this article.


The Portal Server software does not manage the Java DB process; it must be manually started and stopped using the Java DB NetworkServerControl class (see Starting, Stopping, and Disabling the Java DB in Sun Java System Portal Server 7.1 Configuration Guide for more information). The default database user name is portal and the password is a random string generated during installation. On a production system, change the credentials to secure the system. See Security for Community Membership and Configuration Database for more information on changing the password for the database after installation.

Database Configuration

The Portal Server software components use Java DB through Java EE JDBC resources. When a new portal instance is created, the Portal Server software creates one JDBC resource for each component that accesses the database. In other words, there is one resource per component, per Portal Server instance.

The resource configuration can be modified using the web container console or command line interface. The database URL for the Java DB community database is of the form jdbc:derby://host[:port]/component_portal-ID. When connecting to Java DB using third-party tools, use the driver org.apache.derby.jdbc.ClientDriver. This driver is in the JAR file /opt/SUNWjavadb/lib/derbyclient.jar.

On a production system, change the credentials to secure the system. Please see the following section to find out how to change the credentials for the database.

Security for Community Membership and Configuration Database

The default database user name is portal and the password is a random string generated during installation. After the installation, change the password and the access permissions of the properties files containing them. Repeat the instructions to change the password for the database for each portal in your environment. Replace portal-ID with the actual portal ID (like portal1, portal2) when changing the password.

ProcedureTo Change the Password for the Database

  1. Restart Java DB.

    See Starting, Stopping, and Disabling the Java DB in Sun Java System Portal Server 7.1 Configuration Guide for more information.

  2. Change the password for the default user, portal, by connecting to the communitymc_portal-ID database.

    For example, if you are using a GUI like SQuirrel-j, use the SQL editor to execute the following command after connecting to the database.


    CALL SYSCS_UTIL.SYSCS_SET_DATABASE_PROPERTY('derby.user.portal', 'your-new-password');
  3. Restart Java DB.

    See Starting, Stopping, and Disabling the Java DB in Sun Java System Portal Server 7.1 Configuration Guide for more information.

  4. Verify that the password was set correctly by connecting to the communitymc_portal-ID database with the new password.

  5. For each portal instance:

    1. Refer to the web container's documentation and change the password for the jdbc/communitymc datasource to the new password that was set in step 2.

    2. Open the PortalServer-DataDir/portals/portal-ID/config/portal.dbadmin file and change the password value for the property community.db.password to the new password that you set in step 2.

    3. Change the permission for the PortalServer-DataDir/portals/portal-ID/config/portal.dbadmin file so that it is readable and writable only by the owner.

      For example, type chmod 600 portal.dbadmin.

    4. Restart the web container.