Tables on an independent ASP (IASP)¶
An independent auxiliary storage pool (IASP, or independent disk pool) is a set of disk units that IBM i can vary on and off separately from the rest of its storage. When the tables you replicate are in a library on an IASP, the Capture Agent and the Replicator Service need extra setup to see them.
How it works¶
- An IBM i job sees only the system ASP (
*SYSBAS) unless its ASP group includes the IASP. The jobs that serve the Capture Agent and the Replicator Service take their ASP group from the job description of the user profile they run as, so you give those users a job description whose initial ASP group is the IASP. - The IASP has its own relational database (RDB) name, usually the IASP's name. The agent's
sourceDbUrland the SQDR source's connection string name it. - The agent's control library stays in the system ASP. Only the replicated tables are on the IASP.
- Autojournaling hasn't been verified with IASPs: journal the tables yourself before you subscribe to them (see Journaling).
Before you start¶
- The Capture Agent exists for the IBM i (see Db2 for i as a source): its agent user (for example
SQDR) and its control library (for exampleSQDR, in the system ASP). - The tables on the IASP are journaled with before and after images (see Before and after images).
- You know the IASP's name (
IASP1in the examples) and can sign on as a user with authority to create a job description and change user profiles.
Set up the IBM i¶
-
Check that the IASP is varied on (Status
AVAILABLE), and vary it on if it isn't:WRKCFGSTS CFGTYPE(*DEV) CFGD(*ASP) -
Check that
DSPRDBDIRElists an RDB entry for the IASP (for exampleIASP1, remote locationLOOPBACK, text "Entry added by system"). -
Create a job description whose initial ASP group is the IASP, for example a copy of
QDFTJOBDin the agent's control library:CRTDUPOBJ OBJ(QDFTJOBD) FROMLIB(QGPL) OBJTYPE(*JOBD) TOLIB(SQDR) CHGJOBD JOBD(SQDR/QDFTJOBD) INLASPGRP(IASP1) -
Give the job description to the agent user:
CHGUSRPRF USRPRF(SQDR) JOBD(SQDR/QDFTJOBD) -
If you publish tables, give it also to the IBM i user that creates the publications.
- Give it to the user the Replicator Service connects as (see Create the SQDR source).
-
Jobs that are already running keep their old ASP group. Stop the agent in the SQDR Control Center and the Stelo Capture Jetty service (
sqdr+jetty) on the Stelo VM, and check that no jobs run as the agent user any more:WRKOBJLCK OBJ(SQDR) OBJTYPE(*USRPRF)Start the Jetty service again.
Point the Capture Agent at the IASP¶
On the agent's Configuration tab, add ;database name= and the IASP's name to
the end of sourceDbUrl, for example:
jdbc:as400://myibmi;prompt=false;database name=IASP1
Saving restarts the agent.
Create the SQDR source¶
The SQDR source connects to the IASP's RDB name, as a user whose profile uses the new job description.
StarSQL. Bind the StarSQL packages with StarAdmin, as a user whose profile uses the new job description and that
may bind packages and grant their use (for example the privileged owner), in a collection of their own, for example
SQDRIASP1 (in the system ASP or the IASP). See
Bind the StarSQL packages. Then use a connection string such as:
HostName=myibmi;Port=446;Server=IASP1;IsolationLevel=2;PkgColID=SQDRIASP1
With a StarSQL data source instead, set Database Name to IASP1 and Package Collection to SQDRIASP1.
IBM i Access ODBC driver. Name the IASP as the database, and keep the agent's control library in the library list:
System=MYIBMI;DefaultLibraries={QGPL,SQDR};Database=IASP1
With an ODBC data source instead, on its Server tab, add SQDR to the library list, select Override default
database with the following: and enter IASP1.
For the other connection settings, see Create the SQDR source.
Useful IBM i commands¶
| Command | What it does |
|---|---|
WRKCFGSTS CFGTYPE(*DEV) CFGD(*ASP) |
Shows the IASP's status; vary it on here, for example after an IPL. |
DSPRDBDIRE |
Lists the RDB entries; the IASP's name appears here. |
SETASPGRP ASPGRP(IASP1) |
Uses the IASP in the current job. |
SETASPGRP ASPGRP(*CURUSR) |
Uses the initial ASP group of the user profile's job description. |
CRTLIB LIB(MYLIB) ASPDEV(IASP1) |
Creates a library on the IASP. A job sees it only once its ASP group includes the IASP. |
WRKDSKSTS, CFGDEVASP ASPDEV(IASP1) ACTION(*CREATE) |
Show the disk units, and create an IASP on them. |
See IBM's Redbook IBM i 6.1 Independent ASPs: A Guide to Quick Implementation of Independent ASPs (SG24-7811).