WebSphere brand IBM WebSphere Presence Server, Version 7.0

Removing the Oracle database tables

The following topics describe how to clean and remove Oracle database tables when uninstalling IBM® WebSphere® Presence Server Component.

About this task
As part of the installation of the Presence Server product, you created some or all of the following databases:
  • The Presence Server application database: PSDB
  • The Presence Server content indirection database: PSCIDB
  • The Presence Server usage record database: PSURDB
  • The Presence Server data store database: PSSIBUS
Follow these steps to clean and remove the database tables:
  1. Log in to the Oracle server as a database administrator.
  2. Create a directory that has write and execute permission, for example DB_dir.
  3. Copy the installation .tar file, IBMPresenceServerDbPackage_7.0.tar, from the installation medium to the new directory.
  4. Switch to the new directory.
  5. Unpack the installation .tar file using the following command:
    tar -xvf IBMPresenceServerDbPackage_7.0.tar
  6. Switch to the following directory: was_root/installableApps/presence/scripts/dbScripts/presence.
  7. Verify that the following files exist in /presence:
    • ConfigOracle.sh
    • RunConfigOracle.sh
    • RunConfigContentIndirectionOracle.sh
    • DropOracleTables.ddl
    • DropContentIndirectionOracleTables.ddl
  8. Run the following commands to ensure that the uninstall scripts will run properly:
    • chmod 755 ConfigOracle.sh
    • chmod 755 RunConfigOracle.sh
    • chmod 755 RunConfigContentIndirectionOracle.sh
  9. Edit the Presence Server database preparation script, RunConfigOracle.sh, for your environment:
    1. Open RunConfigOracle.sh using a text editor.
    2. Locate the line that begins with the following text:
      • #Update command line parameters here.
    3. Update values for each parameter listed:
      Parameter Description Default value
      DBNAME Name of the database PSDB
      DBUSER User ID for the authorized user (the ID with which you are logged in) <user name>
      DBUSERPW Password for the authorized user <pw>
      For example:
      DBNAME=PSDB
      DBUSER=user_ID
      DBUSERPW=user_pw
    4. Locate the section of the script titled Create Presence Server tables, at the end of the script, and replace the name of the ddl file with DropOracleTables.ddl.
    5. Save your changes.
    6. Run the RunConfigOracle.sh script.
  10. Edit the content indirection database preparation script, RunConfigContentIndirectionOracle.sh, for your environment:
    1. Open RunConfigContentIndirectionOracle.sh using a text editor.
    2. Locate the line that begins with the following text:
      • #Update command line parameters here.
    3. Update values as you did in step 9.
    4. Locate the section of the script titled Create Presence Server tables, at the end of the script, and replace the name of the ddl file with DropContentIndirectionOracleTables.ddl.
    5. Save your changes.
    6. Run the RunConfigContentIndirectionOracle.sh script.
  11. Remove the usage records database tables:
    1. Connect to the usage records database by running the following command:
      sqlplus $dbuser/$dbuserPW@$dbname
      where:
      • dbsser is the user ID for the authorized user.
      • dbuserPW is the password for the authorized user.
      • dbname is the name of the usage records database, for example PSURDB.
    2. Remove the database tables by running the following command:
      DROP TABLE USAGERECORDS;
  12. Optional: Remove the SIBus database tables:
    1. Connect to the SIBus database by running the following command:
      sqlplus $dbuser/$dbuserPW@$dbname
      where:
      • dbsser is the user ID for the authorized user.
      • dbuserPW is the password for the authorized user.
      • dbname is the name of the SIBus database, for example PSSIBUS.
    2. Remove the database tables by running the following command for each table:
      DROP TABLE table_name;
  13. If you did not delete the SIBus database in step 12, delete the database schemas on the deployment manager.
    Note: Failure to delete the SIBus schemas could result in the SIBus not starting properly after an upgrade or a reinstallation.
    1. Stop the cluster.
    2. Log in to the deployment manager.
    3. Change (cd) to the following directory: was_root/installableApps/presence/scripts/dbScripts/SIBus.
    4. Verify that the file dropOracleSIBusSchemas.sh exists in the /SIBus directory.
    5. Run the following command to ensure that the script will run properly:
      • chmod 755 dropOracleSIBusSchemas.sh
    6. Run the script to delete the SIBus schemas:
      ./dropOracleSIBusSchemas.sh java_home jar_name jdbc_jars_dir
             db_user db_password db_server db_name db_port db_schema_file
      where:
      • java_home is the Java home directory, for example was_root/java/bin.
      • jar_name is the full path to the database JAR file, for example /tmp/DataBase/UpdateConfiguration.jar. (The JAR file is located inside the Presence Server installation .tar file, IBMPresenceServerDbPackage_7.0.tar.)
      • jdbc_jars_dir is the directory that contains JDBC driver JAR files for the database client, for example /opt/oracle_jars
      • db_user is the database user, for example root.
      • db_password is the password for the database user.
      • db_server is the fully qualified name of the database server host, for example dbserver.example.com.
      • db_name is the database name, for example PSSIBUS.
      • db_port is the database port, for example 1521.
      • db_schema_file is the full path to the file that contains the SIBus schemas list. By default this file is was_root/logs/presenceServerInstall.log.bus_schemas.



Terms of use
(C) Copyright IBM Corporation 2009. All Rights Reserved.