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
- 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.
- Create the directory to copy CNNCTNS_DOCS_2.0.0_WINLNX_ML.zip to:
- /opt/install/ (Linux™)
- C:\install\ (Windows™)
- Copy CNNCTNS_DOCS_2.0.0_WINLNX_ML.zip into
the newly created directory.
- Open a terminal window for Linux, or double-click the
file for Windows.
- 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)
- Grant db user the access to the folder /opt/install.
- 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:
- Log in to the database server using the database administrator
account and open a terminal window.
- 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.
- Navigate to the db2 directory: cd /opt/install/ConnectionsDocs_2.0.0/SetupDB/db2.
- 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
- Oracle
- su – oracle
- sqlplus / as sysdba
- Set the ORACLE_SID to the Oracle database
name that you created with DBCA:
- Windows™: Set ORACLE_SID=idocs
- Linux™: Export ORACLE_SID=idocs
- Create the databases by running the following commands:
- Ensure that the shell scripts can be run by setting the proper
authorities:
- Run
./createDb.sh
- Run
./updateDBSchema.sh
- Create the databases on Windows™.
If your database server is on Windows™,
complete the following steps:
- Log in to the Windows™ server
with the DB2®, Oracle, or SQL
Server Administrator account.
- For DB2®, open
a
db2cmd
command prompt with administrative rights.
- 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).
- 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
- 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
- Set the ORACLE_SID to the Oracle database name that you created
with DBCA:
- Windows™: set ORACLE_SID=idocs
- Create the databases by running the following commands:
createDb.bat
updateDBSchema.bat
- 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.