Configuring DB2® databases for HCL SafeLinx with DDL
This task describes how to use DDL scripts to create the HCL SafeLinx session and accounting databases on DB2. Complete this task only if you do not want to use the Database configuration wizard
Before you begin
About this task
This task assumes that you are using a remote database server and a separate SafeLinx server. DDL scripts are run on the remote server (Steps 3 - 7). Subsequent steps are run on the Connection Manager server.
Separate instructions are listed for DB2, MySQL, and SQL server. DDL scripts for other database types are not provided.
The following procedure describes how to run the DDL script for creating a SafeLinx session database. By modifying the instructions slightly, you can use the same instructions to update an existing session database that was created by a DDL script. To run the update script, complete the procedure as shown, but in Step 3, substitute the name of the update script, wgdata-update.sql, in place of the creation script, wgdata-create.sql.
For information on how to run the DDL scripts with SQL Server databases, see Configuring SQL Server databases for HCL SafeLinx with DDL.
Procedure
- Copy the DDL scripts to the database server.
- Edit the scripts to customize the location of files, size of the database, schema names, and so forth.
-
Apply the DDL schema to the session database. From a command line on the DB2 server, type the
command for your operating system, as shown in the following table:
Operating system Command Windows db2cmd -c -w -i db2 -tvf wgdata-create.sql Linux su - instance_ID
db2 -tvf wgdata-create.sql
- Optional:
Create the accounting database. From a command line, type the command for your database server
and operating system, as shown in the following table:
Operating system Command Windows db2cmd -c -w -i db2 -tvf wgacct-create.sql Linux su - instance_ID
db2 -tvf wgacct-create.sql
-
Create an operating system user ID that matches the DB2 user that is specified in the
grant.sql file.
For example, wgdb.
-
Grant the wgdb user ID permission to use the HCL SafeLinx database. From a
command line, type the command for your database server and operating system, as shown in the
following table:
Operating system Command Windows db2cmd -c -w -i db2 -tvf wgdata-grant.sql Linux db2 -tvf wgdata-grant.sql -
If you created a wgacct database, run the script to grant the
wgdb user ID permission to use it. From a command line, type the command for your
database server and operating system, as shown in the following table:
Operating system Command Windows db2cmd -c -w -i db2 -tvf wgacct-grant.sql Linux db2 -tvf wgacct-grant.sql -
(Windows only) Run the Database configuration wizard to complete the database setup.
You are now ready to run the SafeLinx Administrator to complete database configuration.
- Run the SafeLinx Administrator to configure the SafeLinx Server and complete the setup.