Creating tablespaces for a content store on IBM Db2 for z/OS

A database administrator must run scripts to create a set of tablespaces required for the content store database. Modify the scripts to replace the placeholder parameters with ones that are appropriate for your environment. By default, the content store is used for notifications, human tasks, and annotations. You can create separate databases for each.

About this task

Ensure that you use the naming conventions for Db2® on z/OS®. For example, all names of parameters must start with a letter and the length must not exceed eight characters. There are two exceptions to the character length limit:
  • CMSCRIPT_CS_ID is no more than 2 characters.
  • CMSCRIPT_TABLESPACE is no more than 6 characters.
The reason for the exception is that when the two parameters are concatenated the character length can be no more than 8.

For more information, see the IBM® Db2 for z/OS Knowledge Center (http://www.ibm.com/support/knowledgecenter/SSEPEK/db2z_prodhome.html).

Procedure

  1. Connect to the database as a user that has privileges to create and drop tablespaces and to allow execution of SQL statements.
  2. Go to the directory that contains the scripts:

    install_location/configuration/schemas/content/db2zOS

  3. Make a backup copy of the tablespace_db2zOS.sql script file and save the file to another location.
  4. Open the original tablespace_db2zOS.sql script file.
    1. Add a connection statement to the beginning of the script.
      For example,
      connect to databasename;
      
    2. Use the following table to help you to replace the generic parameters with ones appropriate for your environment.

      Not all of the parameters listed are in the script, but some might be added in the future.

      Table 1. Parameter names and description for the content store tablespace script

      Parameter name

      Description

      CMSCRIPT_STOGROUP

      Specifies the name of the storage group.

      CMSCRIPT_DATABASE

      Specifies the name of the content store database.

      CMSCRIPT_CS_ID

      Specifies the subsystem identification for the content store database.

      The ID must not be longer than 2 characters.

      CMSCRIPT_TABLESPACE

      Specifies the name of the tablespace that contains all of the base tables in the content store.

      Auxiliary tables are not included.

      The name cannot be longer than 6 characters.

      CMSCRIPT_LARGE_BP

      Specifies the name of the large buffer pool allocated for especially large objects.

      This bufferpool is the 32 KB buffer pool that was created when the database administrator created the content store database on the z/OS system.

      CMSCRIPT_REGULAR_BP

      Specifies the name of the regular size buffer pool allocated for regular and large objects.

      This bufferpool is the 16 KB buffer pool that was created when the database administrator created the content store database on the z/OS system.

      CMSCRIPT_USERNAME

      Specifies the user account that accesses the content store database.

  5. Save and run the script.
    For example, if you set up your clp.properties file and your Db2 alias in your profile or tcshrc script file, type the following command to run the script:
    db2 -tvf tablespace_db2zOS.sql
  6. Grant the IBM Cognos® user rights to the tablespaces that were created when you ran the tablespace_db2zOS.sql file script:
    1. Make a copy of the rightsGrant_db2zOS.sql script file and store it in another location.
    2. In the remote access tool, open the original rightsGrant_db2zOS.sql script file and replace the placeholder parameters with values that are appropriate for your environment.

      Ensure that you use the same values that you used when you allocated resources to the buffer pools and user account

      .
    3. Add a connection statement to the beginning of the script.
      For example,
      connect to databasename user username using password;
      
    4. Save and then run the script.
      For example,
      db2 -tvf rightsGrant_db2zOS.sql
  7. To create the notification tablespaces, go to the install_location/configuration/schemas/delivery/zosdb2 directory.
    1. Make a backup copy of the NC_TABLESPACES.sql script file and save the file to another location.
    2. Open the original NC_TABLESPACES.sql script file and use the following table to help you to replace the placeholder parameters with ones appropriate for your environment.
      Table 2. Tablespace parameter names and descriptions for the Db2 notification database on z/OS

      Parameter Name

      Description

      NCCOG

      Specifies the name of the notification database.

      DSN8G810

      Specifies the name of the storage group.

      BP32K

      Specifies the name of the buffer pool.

      Not all of the parameters listed are in the script, but might be added in the future.

    3. Save and run the script.
      For example,
      db2 -tvf NC_TABLESPACES.sql
    4. Open the NC_CREATE_DB2.sql script file and replace the NCCOG placeholder parameter with the name of the notification database.
    5. Save the script.

      The Job and Scheduling Monitor services will automatically run the script. However, you may choose to run it yourself.