Skip Headers
Oracle® Fusion Middleware WebCenter Sites: Installing and Configuring Supporting Software
11g Release 1 (11.1.1.8.0)

Part Number E29751-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
PDF · Mobi · ePub

2 Creating and Configuring an IBM DB2 Database

Use this chapter to set up a supported IBM DB2 database for your WebCenter Sites installation.

This chapter contains the following sections:

2.1 Installing DB2

  1. Uncompress the correct installation file for your distribution.

  2. Run ./db2setup

  3. In the "Information Management Software" screen, select Install a Product.

  4. Under "DB2 Enterprise Server Edition," (Figure 2-1) select Install New.

    Figure 2-1 DB2 Setup Launchpad

    Description of Figure 2-1 follows
    Description of "Figure 2-1 DB2 Setup Launchpad"

  5. In the "Welcome to the DB2 Setup Wizard," (Figure 2-2), click Next.

    Figure 2-2 DB2 Setup Wizard - Welcome

    Description of Figure 2-2 follows
    Description of "Figure 2-2 DB2 Setup Wizard - Welcome"

  6. In the "Software License Agreement" screen (Figure 2-3), click Accept, then click Next.

    Figure 2-3 Software License Agreement

    Description of Figure 2-3 follows
    Description of "Figure 2-3 Software License Agreement"

  7. In "Select the Installation Type," (Figure 2-4) select Typical and click Next.

    Figure 2-4 Installation Type

    Description of Figure 2-4 follows
    Description of "Figure 2-4 Installation Type"

  8. In "Select installation, response file creation, or both," (Figure 2-5) select Install DB2 Enterprise Server Edition on this Computer and click Next.

    Figure 2-5 Installation And/Or Response File Creation

    Description of Figure 2-5 follows
    Description of "Figure 2-5 Installation And/Or Response File Creation"

  9. In "Select the installation directory," (Figure 2-6) either enter a directory or use the default and click Next.

    Figure 2-6 Installation Directory

    Description of Figure 2-6 follows
    Description of "Figure 2-6 Installation Directory"

  10. In "Install the IBM Tivoli System Automation for Multiplatforms (SA MP)," (Figure 2-7) select Do not install SA MP, unless "SA MP" is required by your environment.

    Figure 2-7 IBM Tivoli Automation for Multiplatforms (SA MP)

    Description of Figure 2-7 follows
    Description of "Figure 2-7 IBM Tivoli Automation for Multiplatforms (SA MP)"

  11. In "Set user information for the DB2 Administration Server" (Figure 2-8):

    1. Keep the defaults, unless a previous attempt to install DB2 failed.

    2. Enter a password.

    3. Click Next.

      Figure 2-8 User information for the DB2 Administration Server

      Description of Figure 2-8 follows
      Description of "Figure 2-8 User information for the DB2 Administration Server"

  12. In "Set up a DB2 instance," (Figure 2-9) select Create a DB2 instance and click Next.

    Figure 2-9 DB2 Instance Setup

    Description of Figure 2-9 follows
    Description of "Figure 2-9 DB2 Instance Setup"

  13. In "Set up partitioning options for the DB2 instance," (Figure 2-10) select Single partition instance and click Next.

    Figure 2-10 Partitioning Options for the DB2 Instance

    Description of Figure 2-10 follows
    Description of "Figure 2-10 Partitioning Options for the DB2 Instance"

  14. In "Set user information for the DB2 instance owner" (Figure 2-11):

    1. Keep the defaults, unless a previous attempt to install DB2 failed.

    2. Enter a password.

    3. Click Next.

    Figure 2-11 User Information for the DB2 Instance Owner

    Description of Figure 2-11 follows
    Description of "Figure 2-11 User Information for the DB2 Instance Owner"

  15. In "Set user information for the fenced user" (Figure 2-12):

    1. Keep the defaults, unless a previous attempt to install DB2 failed.

    2. Enter a password.

    3. Click Next.

    Figure 2-12 User Information for the DB2 Instance Owner

    Description of Figure 2-12 follows
    Description of "Figure 2-12 User Information for the DB2 Instance Owner"

  16. In "Prepare the DB2 tools catalog," (Figure 2-13) select Do not prepare the DB2 tools catalog and click Next.

    Figure 2-13 DB2 Tools Catalog

    Description of Figure 2-13 follows
    Description of "Figure 2-13 DB2 Tools Catalog"

  17. In "Set up notifications," (Figure 2-14) do one of the following:

    Figure 2-14 Notifications

    Description of Figure 2-14 follows
    Description of "Figure 2-14 Notifications"

    • If your system is a production server, select Set up your DB2 server to send notifications, enter a correct address for the local host, and click Next.

    • If your system is a not a production server, you can select Do not set up your DB2 server to send notifications at this time, and click Next.

  18. In "Start copying files," (Figure 2-15) check that your options are correct and click Finish.

  19. Allow the installation to proceed (Figure 2-16).

    Figure 2-16 DB2 Enterprise Server Edition Installation in Progress

    Description of Figure 2-16 follows
    Description of "Figure 2-16 DB2 Enterprise Server Edition Installation in Progress"

  20. In "Setup has completed successfully," read the notes, check the log tab, and click Finish.

    The installation of DB2 is now complete.

2.2 Creating a New DB2 Database

This section provides instructions for creating a new DB2 database.

2.2.1 Creating a New DB2 Database Using a SQL Script

You can use a SQL script to create aDB2 database (and a user for the new database) for any version of IBM DB2 that is installed on your environment, including IBM DB2 versions 9.7 and 10.1.

Note:

If you installed IBM DB2 version 9.7, you have the option of creating a new DB2 database using the db2cc utility. For instructions, see Section 2.2.2, "Creating a New DB2 Database Using the 'db2cc' Utility."

To create a new DB2 database using a SQL script

  1. Create a user for the new database. For example, to create a user named csuser on Linux:

    useradd -d /home/csuser -m -p welcome1 csuser
    
  2. Log in with DB2 instance owner credentials. For example, db2inst1.

  3. Create a file with the following DB2 commands. (For example, create db.sql and modify the database name, path, and user variables to match your installation):

    CREATE DATABASE <DBNAME> AUTOMATIC STORAGE YES ON '<DB2_HOME>/Databases/<DBNAME>' 
    DBPATH ON '<DB2_HOME>/Databases/<DBNAME>' 
    USING CODESET UTF-8 TERRITORY US COLLATE USING SYSTEM PAGESIZE 32768;
    CONNECT TO <DBNAME>;
    GRANT DBADM,CREATETAB,BINDADD,CONNECT,CREATE_NOT_FENCED_ROUTINE,IMPLICIT_SCHEMA,LOAD,CREATE_EXTERNAL_ROUTINE,QUIESCE_CONNECT,SECADM ON DATABASE TO USER <DBUSER>;
    UPDATE DATABASE CONFIGURATION USING APPLHEAPSZ 1024 DEFERRED;
    UPDATE DATABASE CONFIGURATION USING LOCKTIMEOUT 30 DEFERRED;
    UPDATE DATABASE CONFIGURATION USING APP_CTL_HEAP_SZ 1024 DEFERRED;
    UPDATE DATABASE CONFIGURATION USING LOGFILSIZ 32768 DEFERRED;
    UPDATE DATABASE CONFIGURATION USING LOGSECOND 8 IMMEDIATE ;
    CONNECT RESET;
    
  4. Create the directory for your database.

    mkdir -p <DB2_HOME>/Databases/<DBNAME>
    
  5. Execute the sql script. For example:

    db2 -tvsf createdb.sql
    

2.2.2 Creating a New DB2 Database Using the 'db2cc' Utility

If you installed IBM DB2 version 9.7, follow the steps in this section to create a new DB2 database using the db2cc utility. This section also includes instructions for creating a new database user.

Note:

The db2cc utility is only available for IBM DB2 version 9.7. For instructions on creating a new database for a later version of IBM DB2 (for example, version 10.1), see Section 2.2.1, "Creating a New DB2 Database Using a SQL Script."

  1. Log in as db2inst1 (or your instance user created during the installation, step 14 ).

  2. Navigate to: ./sqllib/bin and run db2cc.

  3. In the "Control Center View" screen (Figure 2-17), select Advanced.

    Figure 2-17 Control Center View

    Description of Figure 2-17 follows
    Description of "Figure 2-17 Control Center View"

  4. In the "Control Center," open the application for creating a database (Figure 2-18):

    1. Click the plus sign next to the tree option All Systems.

      Figure 2-18 Control Center

      Description of Figure 2-18 follows
      Description of "Figure 2-18 Control Center"

    2. Click the expanded branch All Databases. (If you have not created a database previously, this branch is empty.)

    3. Right-click the branch All Databases and select Create Database > Standard.

  5. In "Specify a name for your new database" (Figure 2-19):

    1. Enter a name for this database.

    2. Select the check box Enable database for XML.

    3. In the drop-down "Default bufferpool and table space page size," select 32 and click Next.

      Figure 2-19 Name for Your New Database

      Description of Figure 2-19 follows
      Description of "Figure 2-19 Name for Your New Database"

  6. In "Specify where to store your data," (Figure 2-20) click Next (a value is unnecessary, as we kept the default option of Let DB2 manage my storage (automatic storage), on the previous page).

    Figure 2-20 Location for Your Data

    Description of Figure 2-20 follows
    Description of "Figure 2-20 Location for Your Data"

  7. In "Specify the locale for this database," (Figure 2-21) ensure that the drop-down "Code set" displays UTF-8 and click Next.

    Figure 2-21 Database Locale

    Description of Figure 2-21 follows
    Description of "Figure 2-21 Database Locale"

  8. In "Review the actions that will take place when you click finish," (Figure 2-22) confirm that everything looks correct and click Finish.

    Figure 2-22 Review Actions

    Description of Figure 2-22 follows
    Description of "Figure 2-22 Review Actions"

  9. Allow the "Progress" window (Figure 2-23) to complete creating the database. The window will close automatically when the database has been created.

    Figure 2-23 Progress Dialog Box

    Description of Figure 2-23 follows
    Description of "Figure 2-23 Progress Dialog Box"

  10. The database has now been created and is displayed in the control center.

    Figure 2-24 shows that a single database named vmdb291 is present in the control center.

    Figure 2-24 vmdb291 Database

    Description of Figure 2-24 follows
    Description of "Figure 2-24 vmdb291 Database"

  11. Create a user for the new database

    1. Go to the command line. As the system user, create a new user named csuser that will be used to access the database from your Oracle product.

      For example, to create a user named csuser on Linux:

      useradd -d /home/csuser -m -p demo4132 csuser
      
    2. Go back to the "Control Center" and add the user:

      1. Expand the newly created database in the tree by clicking the plus sign, then expanding the branch User and Group Objects.

      2. Click DB Users to open the right-hand panel.

      3. Right-click the branch DB Users (Figure 2-25) and select the Add option.

    3. In the "Add User" application (Figure 2-26):

      1. Select the user that was created in step a.

      2. Under "Authorities," select all check boxes.

      3. Click OK.

        Figure 2-26 Add User Dialog Box

        Description of Figure 2-26 follows
        Description of "Figure 2-26 Add User Dialog Box"

2.3 Configuring the Database

  1. Right-click the database that you created (listed in the branch that displays the database icon) and select Configure Parameters.

  2. In "Database Configuration":

    1. Scroll through the list of options and replace the values of the following parameters with the values shown in Table 2-1.

      Table 2-1 Database Configuration - Parameters

      Parameter Value

      LOCKTIMEOUT

      30

      APP_CTL_HEAP_SZ

      1024

      APPHEAPSZ

      1024

      LOGFILSIZ

      32768

      Note: 32768 is the recommended value for this parameter. However, for large publishing jobs, this parameter may need further tuning to suit your setup.


    2. Click OK (Figure 2-27).

      Figure 2-27 Database Configuration - VMDB291 Dialog Box

      Description of Figure 2-27 follows
      Description of "Figure 2-27 Database Configuration - VMDB291 Dialog Box"

  3. Right-click the database that you created (listed in the branch that displays the database icon) and select Restart.

    A status window flashes. This does not mean that the operation has been completed. Typically, you will need to wait 2 to 3 minutes for the system to restart.

  4. Stop the instance:

    1. Expand the following "Control Center" tree branch (Figure 2-28): All Systems > LOCALHOST > Instances > <name_of_your_instance>

    2. Right-click the instance.

    3. Select Stop.

      Figure 2-28 Stop an Instance

      Description of Figure 2-28 follows
      Description of "Figure 2-28 Stop an Instance"

    4. In the "Confirm stop" dialog box, click OK.

    5. Wait for the message that the instance has been stopped.

  5. Start the instance:

    1. In the "Control Center" tree (Figure 2-29), expand All Systems, LOCALHOST, Instances, and then expand the <name_of_your_instance>.

    2. Right-click the instance.

    3. Select Start.

      Figure 2-29 Start an Instance

      Description of Figure 2-29 follows
      Description of "Figure 2-29 Start an Instance"

  6. Wait for the message that the instance has been started. This does not mean that the operation has been completed. Typically, you will need to wait 2 to 3 minutes for the system to restart.

    Your database is now ready for use with your Oracle software product.