Persistency with IBM DB2 7.2

  GigaSpaces 5.X

Documentation Home
Quick Start Guide
Release Notes

Previous release

  Search Here
Searching GigaSpaces Platform 5.X Documentation

                                               

This page is specific to:
GigaSpaces 5.x

If you're interested in another version, click it below:
GigaSpaces 6.0
GigaSpaces 6.5

Overview

GigaSpaces platform provides ability to persist objects into any RDBMS. This section specifies steps required to configure IBM DB2 7.2 to be used as the GigaSpaces persistent datastore.

Driver Information

  1. Make sure that GigaSpaces uses the correct DB2 driver. The driver details are: 06/17/2002 07:34a 1,366,866 db2java.zip
  2. Run the following bat file to configure DB2 to the correct driver:
    "D:\Program Files\SQLLIB\java12\usejdbc2.bat"

    The following steps involve creating new a Buffer Pool and two Table Spaces, which are required for a correct operation of DB2 with the GigaSpaces Platform.
    This section describes actions to be taken when using IBM DB2 Control Center.
    This guide assumes you have already created a database to be used by the GigaSpaces Platform. The actions to be taken using a database called GIGADB2 are demonstrated below.
    It is highly recommended to perform all the following steps logged on to the database as the database administrator, and to later configure GigaSpaces DB2 storage adapter jdbc.properties with this user name.

    Running IBM DB2 Control Center

    To run IBM DB2 Control Center:

  3. Click the Start Menu->IBM DB2->ControlCenter

    The IBM DB2 Control Center main window is displayed:

Create New Buffer Pool

  1. Create a new Buffer Pool with page size 32.
  2. Right click the Buffer Pool folder under the database used for persisting GigaSpaces space objects.
  3. Select Create:

    The Buffer Pool Dialog box is displayed:
  4. Type the Buffer Pool Name: GSBP.
  5. In the Page Size list, select 32.
  6. Click OK

Restart the Database

  1. After creating the Buffer Pool, restart the database.
  2. Right-Click the Database and select Restart.

Create Regular Table Space

  1. Click the Table spaces folder under the database used for persisting GigaSpaces space objects.
  2. Select Create->Table Space.

    The Create Table Space dialog is displayed:
  3. Type in GIGATS for the Table Space Name.
  4. Make sure Regular is selected.
  5. Click Advanced.
  6. Select Page size 32.
  7. Select Prefetch Size 32.
  8. Select GSBP from the buffer pool list.
  9. Click OK in the Advanced dialog box.
  10. Click OK in the Create Table Space dialog.

Create System Temporary Table Space

  1. Click the Table spaces folder under the database used for persisting GigaSpaces space objects.
  2. Select Create->Table Space.
    The Create Table Space dialog box is displayed:
  3. Type in GIGASTS for the Table Space Name.
  4. Under Type of table space, select System temporary.
  5. Click Advanced.
  6. Select Page size 32.
  7. Select Prefetch Size 32.
  8. Select GSBP from the buffer pool list.
  9. Click OK in the Advanced dialog box.
  10. Click OK in the Create Table Space dialog box
    The Table Spaces list contains the following table spaces:

Increasing Log file Size

If you have a new database with default configuration values, you have to increase the database Log file Size.

  1. Open ControlCenter->Instances->Databases.
  2. Right-click the database name and choose Configure.
  3. Click the Log File Size option on the Logs tab:
  4. Increase the Log file Size value.
  5. Click OK.

Creating Persistence Space with DB2 as the Backend Database

Configuring Storage Adapter for DB2

The Storage Adapter configuration file for DB2 is located at:
<GigaSpaces Installation Directory>\GenericJDBCProperties\DB2Properties\jdbc.properties.
This file contains the following:

# driverClass - COM.ibm.db2.jdbc.net.DB2Driver for network connection
# COM.ibm.db2.jdbc.app.DB2Driver for local connection
 
driverClass=COM.ibm.db2.jdbc.net.DB2Driver
#driverClass=COM.ibm.db2.jdbc.app.DB2Driver
 
connectionUrl=jdbc:db2://host/dbname
#connectionUrl=jdbc:db2: dbname
userName=CA
password=password
 
#Result Set Type : F - Forward , I - Insensitive
rstype=F

Create Space

Open GigaSpaces Browser by running the following:
<GigaSpaces Root>\bin\SpaceBrowser.bat for windows
Or:
<GigaSpaces root>\bin\SpaceBrowser.sh for Unix/Linux

  1. Select Container->Create Space.
    The Create New Space dialog box is displayed:
  2. Check the Persistent check box.
  3. In the Storage Adapter Class list, select the following:
    com.j_spaces.sadapter.GenericJDBC.JDBCStorageAdapter.
  4. In the Storage Adapter URL list, select the following:
    ${com.gs.home}/GenericJDBCProperties/DB2Properties
  5. Click Create.
    After having created Persistent Spaces with the GigaSpaces Space Browser or the command line utilities, you can see the created space tables.
    Each space is assigned a unique ID. The Space data is stored in several tables. Some tables hold the GigaSpaces metadata information and other tables created on-the-fly for each class type stored in the space.
    All tables associated with a specific space are assigned the same prefix that includes the String JSPACES + <Space Unique ID>.
    Below is an example for created tables:

You can now start using the GigaSpaces Platform!


Wiki Content Tree


Your Feedback Needed!

We need your help to improve this wiki site. If you have any suggestions or corrections, write to us at techw@gigaspaces.com. Please provide a link to the wiki page you are referring to.

Labels

 
(None)