Session data is collected and stored in a DB2® table. If you are using DB2 for session persistence, you must create and define a DB2 table that is associated with the application server.
To create a DB2 table for collecting session data, do the following:
The table space in which the database table is created must be defined with row level locking (LOCKSIZE ROW). It should also have a page size that is large enough for the objects that are stored in the table during a session. Following is an example of a table space definition with row level locking specified and a buffer pool page size of 32K:
CREATE DATABASE database_name STOGROUP SYSDEFLT CCSID EBCDIC; CREATE TABLESPACE tablespace_name IN database_name USING STOGROUP group_name PRIQTY 512 SECQTY 1024 LOCKSIZE ROW BUFFERPOOL BP32K;
The Session Manager uses the DB2 table defined within this table space to process the session data. This table must have the following format:
CREATE TABLE database_name.table_name ( ID VARCHAR(95) NOT NULL , PROPID VARCHAR(95) NOT NULL , APPNAME VARCHAR(64) , LISTENERCNT SMALLINT , LASTACCESS DECIMAL(19,0), CREATIONTIME DECIMAL(19,0), MAXINACTIVETIME INTEGER , USERNAME VARCHAR(256) , SMALL VARCHAR(3122) FOR BIT DATA , MEDIUM VARCHAR(28869) FOR BIT DATA , LARGE BLOB(2097152), SESSROW ROWID NOT NULL GENERATED ALWAYS ) IN database_name.tablespace_name;
A unique index must be created on the ID, PROPID, and APPNAME columns of this table. The following is an example of the index definition:
CREATE UNIQUE INDEX database_name.index_name ON database_name.table_name (ID ASC, PROPID ASC, APPNAME ASC);
You must define a large object (LOB) table space and also define an auxiliary table within that table space. The following is an example of the LOB table space definition:
CREATE LOB TABLESPACE LOB_tablespace_name IN database_name BUFFERPOOL BP32K USING STOGROUP group_name PRIQTY 512 SECQTY 1024 LOCKSIZE LOB; CREATE AUX TABLE database_name.aux_table_name IN database_name.LOB_tablespace_name STORES database_name.table_name COLUMN LARGE;
An index must be created for this auxiliary table. The following is an example of the index definition:
CREATE INDEX database_name.aux_index_name ON database_name.aux_table_name;
GRANT ALL ON SESSDB.SESSIONS TO CBASRU1;
In this information ...Related tasks
| IBM Redbooks, demos, education, and more(Index) Use IBM Suggests to retrieve related content from ibm.com and beyond, identified for your convenience. This feature requires Internet access. Most of the following links will take you to information that is not part of the formal product documentation and is provided "as is." Some of these links go to non-IBM Web sites and are provided for your convenience only and do not in any manner serve as an endorsement by IBM of those Web sites, the material thereon, or the owner thereof. |