Pre-installing the metadata repository database in a Db2 database system by using scripts (Windows)

You can use an existing installation of a Db2® database to create a metadata repository for InfoSphere® Information Server on Microsoft Windows.

About this task

Use the scripts in the following situations:
  • You are configuring a Db2 cluster for the databases. See Metadata repository tier clustering for high availability.
  • You cannot run the installation program locally on the target computer.
  • You do not want to use the InfoSphere Information Server installation program to configure the database.
Attention: Do not change the name of the tablespace named XMETA. This name is used internally by InfoSphere Information Server.
Attention: The scripts run the following commands when configuring the Db2 database system. These changes affect all databases in the Db2 instance:
db2set Db2.INLIST_TO_NLJN=YES
db2set Db2.USE_ALTERNATE_PAGE_CLEANING=ON
db2set Db2.REDUCED_OPTIMIZATION=YES

Procedure

  1. Navigate to the install_dir\DatabaseSupport directory of the InfoSphere Information Server installation media, where install_dir is the directory where you extracted the InfoSphere Information Server media.
    Database version Directory
    Db2 11.1 install_dir\DatabaseSupport\Windows\MetadataRepository\DB2_LUW_11_1
  2. Open the create_xmeta_db.sql script file in a text editor and make the following changes to the file:
    1. Replace all occurrences of @DATABASE_NAME@ (including the @ symbols) with the name of the database that you want to create.
      For example, replace @DATABASE_NAME@ with your database name:
      xmeta
    2. Replace all occurrences of @INSTALL_ROOT@ (including the @ symbols) with the path to the root directory where your Db2 database is installed. The default root directory is C:\.
      For example, replace @INSTALL_ROOT@ with the path to the root directory for your Db2 database:
      C:\
      When you run the script, Db2 creates a directory under the root directory where your database is installed. This directory contains the data files for your database. The default directory is C:\db2\NODE0000.
    3. Replace all occurrences of @DATABASE_ALIAS@ (including the @ symbols) with the name of the database that you want to create.
      For example, replace @DATABASE_ALIAS@ with your database name:
      xmeta
    4. Replace all occurrences of @DATABASE_USERNAME@ (including the @ symbols) with the name of the operating system user that you want to have access to the database.
      For example, replace @DATABASE_USERNAME@ with the operating system user name:
      xmeta
  3. Run the operating system script to invoke the SQL script:
    1. Open a Db2 Command Window.
    2. From the Db2 Command Window, change directory to the same location as the edited script and run the following command:
      create_xmeta_db.cmd [logfile]
      logfile is the name of the file where you want to save the results of running the command. This argument is optional.
  4. Open the db2_grant_Permissions.sql file in a text editor and make the following changes:
    1. Replace all occurrences of @DATABASE_NAME@ (including the @ symbols) with the name of the database that you created.
      For example, replace @DATABASE_NAME@ with your database name:
      xmeta
    2. Replace all occurrences of @DATABASE_USERNAME@ (including the @ symbols) with the name of the user that you want to grant access to the staging area schema. This user must be different from the operating system user that you specified in step 2d.
      For example, replace @DATABASE_USERNAME@ with the user name for the staging area schema:
      xmetasr
  5. Run the operating system script to invoke the SQL script:
    1. Open a Db2 Command Window.
    2. From the Db2 Command Window, change directory to the same location as the edited script and run the following command:
      configure_staging_area.cmd [logfile]

      logfile is the name of the file where you want to save the results of running the command. This argument is optional.

  6. Restart Db2.
  7. If you are using IBM® DataStage® Flow Designer, you must create the user preference table to store the user settings. For information on creating the user preference table, see the README document in the directory install_dir\DatabaseSupport\windows\CognitiveDesignerRepository\DB2_LUW_11_1.