+

Search Tips   |   Advanced Search


Create remote databases

A remote database resides on a different system than WebSphere Portal. When you use a remote server, manually create the databases that are required by WebSphere Portal. Before creating these databases, note the following information:


Prerequisites

Installing DB2

Create users

  1. Log in to the DB2 server system as a user with sufficient database privileges.

  2. Ensure that the database user has been created, granted appropriate privileges, and has a password assigned to it. If the user has not been created, refer to the Creating users topic for information on how to create users.

  3. Initialize a DB2 command environment by opening a command prompt and typing su - db2inst1, where db2inst1 is the database user.

    The prompt changes to $.

    In this mode, type db2 at the beginning of each command and use double quotation marks ("") around the entire command.

    For example:

    db2 "CREATE REGULAR TABLESPACE SMS PAGESIZE 4 K MANAGED BY SYSTEM USING ('sms') BUFFERPOOL SMSPOOL"
    

    For the Command Line Processor (CLP), refer to your DB2 documentation for details. The command prompt is db2=>.

    In this mode, commands can be entered without the db2 prefix or the double quotation marks. However, the following steps assume you are not using the CLP and are entering commands from the $ prompt.

  4. Run the following commands on the DB2 server system to configure the DB2 database instance:

    Environment Description
    DB2

    db2set DB2_RR_TO_RS=YES
    db2set DB2_EVALUNCOMMITTED=YES
    db2set DB2_INLIST_TO_NLJN=YES
    db2 "UPDATE DBM CFG USING query_heap_sz 32768"
    db2 "UPDATE DBM CFG USING maxagents 500"
    db2 "UPDATE DBM CFG USING sheapthres 0"
    
    

  5. (Important) Failure to complete this step will result in an unsuccessful database transfer. Run the following commands on the DB2 server system to create the necessary databases: Notes:

    • Replace dbname with the actual name of the database. Run the commands and each time replace dbname with the actual values for release, community, customization, Java Content Repository, Feedback, and Likeminds. Run the commands once for each database for a total of six times.

      DB2 database names cannot exceed eight characters. Therefore, consider using these database names: release, commun, custom, jcrdb, fdbkdb, and lmdb.

    db2 "CREATE DB dbname using codeset UTF-8 territory us PAGESIZE 8192"
    db2 "UPDATE DB CFG FOR dbname USING applheapsz 4096"
    db2 "UPDATE DB CFG FOR dbname USING app_ctl_heap_sz 1024"
    db2 "UPDATE DB CFG FOR dbname USING stmtheap 32768"
    db2 "UPDATE DB CFG FOR dbname USING dbheap 2400"
    db2 "UPDATE DB CFG FOR dbname USING locklist 1000"
    db2 "UPDATE DB CFG FOR dbname USING logfilsiz 4000"
    db2 "UPDATE DB CFG FOR dbname USING logprimary 12"
    db2 "UPDATE DB CFG FOR dbname USING logsecond 20"
    db2 "UPDATE DB CFG FOR dbname USING logbufsz 32"
    db2 "UPDATE DB CFG FOR dbname USING avg_appls 5"
    db2 "UPDATE DB CFG FOR dbname USING locktimeout 30"
    db2 "UPDATE DB CFG FOR dbname using AUTO_MAINT off"
    

  6. Complete the following:

    1. On the DB2 server system, run the following commands. This step is only required for the IBM Java Content Repository database (jcrdb).

      • jcrdb is the name of the database used to store user data and objects

      • jcr is the jcr user for jcrdb

        This value can be replaced with any ID that has administrative authority.

      • dbpassword is the password for the jcr user for the jcrdb

      db2 "CONNECT TO jcrdb USER jcr USING dbpassword"
      db2 "CREATE BUFFERPOOL ICMLSFREQBP4 SIZE 1000 PAGESIZE 4 K"
      db2 "CREATE BUFFERPOOL ICMLSVOLATILEBP4 SIZE 8000 PAGESIZE 4 K"
      db2 "CREATE BUFFERPOOL ICMLSMAINBP32 SIZE 8000 PAGESIZE 32 K"
      db2 "CREATE BUFFERPOOL CMBMAIN4 SIZE 1000 PAGESIZE 4 K"
      db2 "CREATE REGULAR TABLESPACE ICMLFQ32 PAGESIZE 32 K MANAGED BY SYSTEM USING ('ICMLFQ32') BUFFERPOOL ICMLSMAINBP32"
      db2 "CREATE REGULAR TABLESPACE ICMLNF32 PAGESIZE 32 K MANAGED BY SYSTEM USING ('ICMLNF32') BUFFERPOOL ICMLSMAINBP32"
      db2 "CREATE REGULAR TABLESPACE ICMVFQ04 PAGESIZE 4 K MANAGED BY SYSTEM USING ('ICMVFQ04') BUFFERPOOL ICMLSVOLATILEBP4"
      db2 "CREATE REGULAR TABLESPACE ICMSFQ04 PAGESIZE 4 K MANAGED BY SYSTEM USING ('ICMSFQ04') BUFFERPOOL ICMLSFREQBP4"
      db2 "CREATE REGULAR TABLESPACE CMBINV04 PAGESIZE 4 K MANAGED BY SYSTEM USING ('CMBINV04') BUFFERPOOL CMBMAIN4"
      db2 "CREATE SYSTEM TEMPORARY TABLESPACE ICMLSSYSTSPACE32 PAGESIZE 32 K MANAGED BY SYSTEM USING ('icmlssystspace32') BUFFERPOOL ICMLSMAINBP32"
      db2 "CREATE SYSTEM TEMPORARY TABLESPACE ICMLSSYSTSPACE4 PAGESIZE 4 K MANAGED BY SYSTEM USING ('icmlssystspace4') BUFFERPOOL ICMLSVOLATILEBP4"
      
      db2 "DISCONNECT jcrdb"
      db2 "TERMINATE"
      

    2. On the DB2 server system, check the services file. If it does not specify DB2 connection and interrupt service ports, specify the ports for your operating system: Edit the file /etc/services and add the following text (where db2inst1 is the name of the DB2 instance ID on the system):

      db2c_db2inst1 port1/tcp # DB2 connection service port
      db2i_db2inst1 port2/tcp # DB2 interrupt service port
      
      Replace port1 with the actual port number that is assigned to the DB2 connection service in your DB2 server installation. Replace port2 with the actual port number that is assigned to the DB2 interrupt service in your DB2 server installation.

    3. For JDBC Type 2 connections only: On DB2 Connect, use a text editor to open the /etc/services file.

      If it does not specify the DB2 connection service port, add the following text to specify the port for the remote DB2 instance:

      db2c_db2inst1 port1/tcp # DB2 connection service port
      
      where db2inst1 is the name of the DB2 instance ID on the system, and port1 with the actual port number that is assigned to the DB2 connection service in your DB2 server installation . The connection service port on the DB2 Client system, WebSphere Portal server, must match the connection service port on the DB2 server. The ports should match by number but not necessarily by name.

    4. On the DB2 server system, set DB2COMM to TCP/IP by using the db2set command: db2set DB2COMM=TCPIP

    5. Set up the correct service name by entering the following command on the DB2 server system: db2 "UPDATE DBM CFG USING svcename svce_name" where svce_name is the connection service port name specified above, .

    6. For JDBC Type 2 connections only: On DB2 Connect, set DB2COMM to TCP/IP by using the db2set command db2set DB2COMM=tcpip.

    7. For JDBC Type 2 connections only: Catalog the TCP/IP node with the IP address of the remote database server on DB2 Connect: db2 "catalog tcpip node remote_db_node_alias remote database_server_node server connection_service_port" where:

      • remote_db_node_alias is the alias name of the database server that you are defining for the WAS node name. The alias name can contain one to eight characters.

      • database_server_node is the fully qualified host name of your database server system.

      • connection_service_port is the name of the DB2 connection service port that is configured in the /etc/services file on the database server system.

    8. For JDBC Type 2 connections only, catalog the WebSphere Portal databases on DB2 Connect, where:

      • remote_db_name_domain, is the cataloged name of the databases on the server system for each domain.

      • domain_alias_name, is the database alias names that you are defining.

      • remote_db_node_alias is the name that was used previously when you cataloged the TCP/IP node in the previous step.

      The alias for each database must be different from the actual database name and can only contain up to eight characters.

      db2 "catalog db remote_db_name_release as release_alias_name at node remote_db_node_alias"
      db2 "catalog db remote_db_name_community as comm_alias_name at node remote_db_node_alias"
      db2 "catalog db remote_db_name_customization as cust_alias_name at node remote_db_node_alias"
      
      db2 "catalog db remote_db_name_fdbkdb as fdbkdb_alias_name at node remote_db_node_alias"
      db2 "catalog db remote_db_name_lmdb as lmdb_alias_name at node remote_db_node_alias"
      db2 "catalog db remote_db_name_jcrdb as jcrdb_alias_name at node remote_db_node_alias"
      
      

    9. For JDBC Type 2 connections only: Log out of DB2 Connect by entering db2 "terminate".

    10. For JDBC Type 2 connections only, on DB2 Connect, test your remote connection by issuing the following command in the DB2 command window: db2 "connect to alias_name user username using password", where alias_name is the alias name that you defined above and username is the database user.


Parent topic:

Configure WebSphere Portal to use DB2


Previous topic:

Create users


Next topic:

Assigning custom table spaces