Creating the HCL Docs databases

HCL Connections Docs currently supports IBM® DB2®, Oracle, and SQL Server for the databases used by the HCL Docs server. You must create the databases before you install HCL Docs.

About this task

To create the databases, you can run the SQL scripts that are provided with HCL Docs or manually run the commands provided in the scripts. You can also share the same database installation that IBM® Connections is using, or create a dedicated database instance for HCL Docs.

Note: The default database name for HCL Docs is CONCORD. If you want to use another name for the HCL Docs database, refer to the readMe.txt file in $SRC/deployment/setupdb/db2.

For more information about databases, see the DB2 for Linux UNIX and Windows welcome page in IBM Knowledge Center.

Procedure

  1. Extract the database files. Copy and extract the DOCS_INSTALLPKG_FILENAME .zip file, for example, CNNCTNS_DOCS_2.0.0_WINLNX_ML.zip, which contains all HCL Docs components. Ensure that the database user has the permission to access the extracted files.
    1. Create the directory to copy CNNCTNS_DOCS_2.0.0_WINLNX_ML.zip to:
      • /opt/install/ (Linux)
      • C:\install\ (Windows)
    2. Copy CNNCTNS_DOCS_2.0.0_WINLNX_ML.zip into the newly created directory.
    3. Open a terminal window for Linux, or double-click the file for Windows.
    4. Extract the contents of CNNCTNS_DOCS_2.0.0_WINLNX_ML.zip into the directory:
      • Run unzip CNNCTNS_DOCS_2.0.0_WINLNX_ML.zip -d /opt/install/IBMConnectionsDocs_2.0.0 (Linux)
      • Extract the files to C:\install\ConnectionsDocs_2.0.0 (Windows)
    5. Grant db user the access to the folder /opt/install.
  2. Create the databases on Linux. Make sure that the dos2unix utility is installed on the system. It is needed to run updateDBSchema.sh. Complete the following steps if the new DB2®, Oracle or SQLServer database will be hosted on a Linux server:
    1. Log in to the database server using the database administrator account and open a terminal window.
    2. In the /opt/install/ConnectionsDocs_2.0.0 directory, there is a SetupDB directory. The database creation scripts for DB2, Oracle, or SQL Server are located in the SetupDB directory in the db2, oracle, or sqlserver subdirectory.
      Note: Ensure that the user who is doing the database setup has write privileges for this directory. This user must also have privileges to create a database, a table space, tables, and indexes.
    3. Navigate to the db2 directory: cd /opt/install/ConnectionsDocs_2.0.0/SetupDB/db2.
    4. Before running the create and update scripts, ensure that the environment is configured correctly for the database that you are using. For DB2®, you must ensure that the database is started. For Oracle, you must ensure that the database is started, and set some environment variables.
      • DB2
        • su db2admin
        • db2start
      • Oracle
        • su – oracle
        • sqlplus / as sysdba
          • SQL> startup
        • Set the ORACLE_SID to the Oracle database name that you created with DBCA:
          • Windows: Set ORACLE_SID=idocs
          • Linux: Export ORACLE_SID=idocs
    5. Create the databases by running the following commands:
      • Ensure that the shell scripts can be run by setting the proper authorities:
        • chmod 775 *.sh
      • Run ./createDb.sh
      • Run ./updateDBSchema.sh
  3. Create the databases on Windows. If your database server is on Windows, complete the following steps:
    1. Log in to the Windows server with the DB2®, Oracle, or SQL Server Administrator account.
    2. For DB2®, open a db2cmd command prompt with administrative rights.
    3. For SQL Server, create a login from Microsoft SQL Server Security Management for HCL Docs (It is best to create a login by SQL Server Authentication).
    4. Change the directory to db2:
      • DB2®: cd C:\install\ConnectionsDocs_2.0.0\SetupDB\db2
      • Oracle: cd C:\install\ConnectionsDocs_2.0.0\SetupDB\oracle
      • SQL Server: cd C:\install\ConnectionsDocs_2.0.0\SetupDB\sqlserver
    5. Before running the create and update scripts, ensure that the environment is configured correctly for the database that you are using. For DB2®, you must ensure that the database is started. For Oracle, you must ensure that the database is running, and set some environment variables. For SQL Server, you must ensure that the database is started.
      • DB2®: db2start
      • SQL Server: Enter the well created login for "Login Name:" when running createDb.bat
      • Oracle:
        • sqlplus / as sysdba
          • SQL> startup
        • Set the ORACLE_SID to the Oracle database name that you created with DBCA:
          • Windows: set ORACLE_SID=idocs
    6. Create the databases by running the following commands:
      • createDb.bat
      • updateDBSchema.bat
  4. Once the databases have been created and updated, grant INSERT, UPDATE, DELETE permission to the database user. Finally, if you are using a different user then the default "DOCSUSER" for the database user account, you must modify the appGrants.sql file with the updated database user and run the following command. This will grant the appropriate access to the updated user account.
    • DB2®: Run db2 -td@ -vf appGrants.sql
    • Oracle: You do not need to run a command because the equivalent GRANT statements are completed when the updateDBSchema scripts are run.
    • SQL Server: Log in to Microsoft SQL Server Management studio to check whether it grants the privileges.
    Note:

    HCL Docs can be deployed using Oracle, or DB2, or SQL as the database server. However, HCL Docs does not provide tooling with the product to migrate from one database server type to another. If you want to move from one database server type to another, consult with the database vendor for services and tooling for migration.

    Things to consider:
    • Database schema: Refer to the sql scripts we have and consult target database vendors.
    • Data: You must export the data from the source database in a format that is supported by the target database.