DDL for creating session persistence table for DB2 on OS390
 Technote (FAQ)
 
Problem
The WebSphere® Application Server V4.0.5 release notes state the following:
-----------------------------------------------------------------------
To use DB2® on OS390® as a session persistence database, use the following
Data Definition Language (DDL). You might want to modify this
based on your environment.

CREATE DATABASE SESSDB
STOGROUP SYSDEFLT
CCSID EBCDIC;

CREATE TABLESPACE SESSTS IN SESSDB
USING STOGROUP SYSDEFLT
PRIQTY 512
SECQTY 1024
BUFFERPOOL BP32K;

CREATE TABLE NULL.SESSIONS (
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 SESSDB.SESSTS;

CREATE UNIQUE INDEX NULL.SESS_INDEX ON NULL.SESSIONS
(ID ASC,
PROPID ASC,
APPNAME ASC)

CREATE LOB TABLESPACE LOBOBJTS IN SESSDB
BUFFERPOOL BP32K
USING STOGROUP SYSDEFLT
PRIQTY 512
SECQTY 1024
LOCKSIZE LOB;

CREATE AUX TABLE NULL.SESSIONSAUX
IN SESSDB.LOBOBJTS
STORES NULL.SESSIONS
COLUMN LARGE;

CREATE INDEX NULL.SESSION_IX ON NULL.SESSIONSAUX;

In DB2/390, set the RRULOCK parameter to YES.
 
Solution
The preceding instructions tell you to specifically create the following table:

CREATE TABLE NULL.SESSIONS

  • Problem
    This configuration prevents you from having more than one instance of the sessions table. In fact, you might need to maintain multiple instances of this table using real creator IDs (instead of NULL) to manage different environments (development, Q/A, and so forth).

  • Resolution
    On the Session manager you can enter the user name in the following format:

    userid::schemaname$version

For example: mkolinsk::root$V7.2

The session manager uses the schemaname to qualify the session tablename for all database operations. If only the userid is specified, without the schemaname, the schemaname defaults to NULL and therefore a tablename with NULL as the schemaname (for example NULL.SESSIONS) would have to be created.

In conclusion, you could create multiple session tables with different schema names (other than "NULL") and access them separately by modifying the user name to contain the appropriate schema name.
 
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > Sessions and Session Management
Operating system(s): HP-UX
Software version: 4.0
Software edition:
Reference #: 1111252
IBM Group: Software Group
Modified date: Feb 25, 2005