+

Search Tips   |   Advanced Search

Create DB2 databases

Use the <configureDatabase> Ant task to create the WRKLGHT and WLREPORT databases. Our DB2 user should have SYSADM or SYSCTRL privileges. Account should be accessible through SSH.

Alternatively, the database administrator can manually create the databases.

We can name the databases and user differently, or set a different password. Name limit is 8 characters for for Unix and Linux systems, and 30 characters for Windows.

The WRKLGHT and WLREPORT databases be stored in a single database, as different schemas.


Create WRKLGHT and WLREPORT databases

  1. Create a system user, for example, wluser_project, in a DB2 admin group such as DB2USERS.

    For multiple MobileFirst projects to connect to the same database, use a different user name for each connection. Each database user has a separate default schema.

  2. Open a DB2 command line processor...

    • On Windows systems, click...

        Start | IBM DB2 | Command Line Processor

    • On Linux or UNIX...

        cd ~/sqllib/bin
        ./db2

    • Create the two databases:

        CREATE DATABASE WRKLGHT COLLATE USING SYSTEM PAGESIZE 32768
        CONNECT TO WRKLGHT
        GRANT CONNECT ON DATABASE TO USER wluser_project DISCONNECT WRKLGHT
        CREATE DATABASE WLREPORT COLLATE USING SYSTEM PAGESIZE 32768
        CONNECT TO WLREPORT
        GRANT CONNECT ON DATABASE TO USER wluser_project DISCONNECT WLREPORT
        QUIT

      Where wluser_project is the name of the system created previously. If we defined a different user name, replace wluser_project accordingly.

  3. We can use only one database (with appropriate PAGESIZE settings), with MPF databases in different schemas. In that case, only one database is required. If the IMPLICIT_SCHEMA authority is granted to the user created in step 1 (the default in the database creation script in step 2), no further action is required. If the user does not have the IMPLICIT_SCHEMA authority, create a SCHEMA for the runtime database tables and objects and a SCHEMA for the reports database tables and objects.


Parent topic: Create databases manually