4 Using Oracle Database with Instant Messaging Server

This chapter describes how to install and configure Oracle Database to store multiuser chat history for Oracle Communications Instant Messaging Server. Currently, you can store only multiuser chat history and no other data in Oracle Database.

Overview of Using Oracle Database for Storing Messages

By default Instant Messaging Server uses Directory Server to store user properties and data, which includes multiuser chat history. Instead of using Directory Server, you can use Oracle Database to store multiuser chat history.

Installing and Creating an Oracle Database Instance for Instant Messaging Server

Installing and creating an Oracle Database instance for Instant Messaging Server involves the following high-level steps:

  1. Downloading and installing Oracle Database

  2. Creating the database instance

  3. Creating the database user

  4. Creating the Instant Messaging Server tables

  5. Downloading and installing Oracle JDBC drivers

  6. Configuring Instant Messaging Server properties

You install and create the Oracle Database instance by using the Oracle Universal Installer.

To install and create an Oracle Database instance for Instant Messaging Server:

  1. Download Oracle Database from the Oracle Technology Network website at:

    http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html

  2. To install and create a new Oracle Database instance, follow the instructions in the installation guide for Oracle Database for your operating system, at:

  3. Create the Instant Messaging Server database user.

    In the following example, the database user is imuser. You use this user, and its associated password, when you set the iim_server.jdbc.connection.username and iim_server.jdbc.connection.password properties later in this procedure.

    $ sqlplus SYSTEM as sysdba
    
    alter session set "_ORACLE_SCRIPT"=true;
    create user demo identified by "imuser";
    GRANT RESOURCE, CONNECT TO imdatabase;
    GRANT UNLIMITED TABLESPACE TO imdatabase;
    
  4. Run the following command to create the Instant Messaging Server tables:

    sqlplus uid/passwd < InstantMessaging_home/lib/ocim_oracle.sql
    
  5. Download and install Oracle JDBC drivers from the Oracle Database Drivers Download web site at:

    http://www.oracle.com/technetwork/database/features/jdbc/jdbc-drivers-12c-download-1958347.html

  6. Use the imconfutil command to set the following Instant Messaging Server configuration properties.

    iim_server.classpath=/opt/instantclient_12_1/ojdbc7.jar
    iim_server.jdbc.connection.url=jdbc:oracle:thin:@host_name:1521:orcl
    iim_server.jdbc.connection.username=user
    iim_server.jdbc.connection.password='password'
    iim_server.jdbc.connection.initialCapacity=10
    iim_server.jdbc.connection.maxCapacity=100
    iim_server.storage.providers="oracle.communications.ucs.ocim.provider.db.DBConferenceHistoryStore"
    iim_server.conference.history.persist=true
    

    where:

    • host_name is the database host

    • user is the database user for Instant Messaging Server that you previously created

    • password is the password for the database user