Use this task to set
up the property extension repository
for DB2® for iSeries® or DB2 for z/OS®.
Before you begin
The information in this topic applies
in the following
scenarios:
- The application server and the database both exist
on the IBM® i operating system.
- The application server and the database both exist on the z/OS operating system.
- The
application server exists on a distributed operating system,
but the database exists on either the IBM i
or z/OS operating system.
If you do not have WebSphere
® Application
Server installed in the system on which you are setting up the database,
copy the following files from a system where WebSphere Application Server is installed
to the system on which you are setting up the database:
- DB2 for iSeries
app_server_root/etc/wim/setup/lookaside/db2iseries/dbclean.sql
app_server_root/etc/wim/setup/lookaside/db2iseries/schema.sql
app_server_root/etc/wim/setup/lookaside/db2iseries/primarykeys.sql
app_server_root/etc/wim/setup/lookaside/db2iseries/indexes.sql
app_server_root/etc/wim/setup/lookaside/db2iseries/references.sql
app_server_root/etc/wim/setup/lookaside/keys.sql
app_server_root/etc/wim/setup/lookaside/bootstrap.sql
- DB2 for z/OS
app_server_root/etc/wim/setup/lookaside/db2zos/dbclean.sql
app_server_root/etc/wim/setup/lookaside/db2zos/schema.sql
app_server_root/etc/wim/setup/lookaside/db2zos/primarykeys.sql
app_server_root/etc/wim/setup/lookaside/db2zos/indexes.sql
app_server_root/etc/wim/setup/lookaside/db2zos/references.sql
app_server_root/etc/wim/setup/lookaside/keys.sql
app_server_root/etc/wim/setup/lookaside/bootstrap.sql
About this task
For information about how
to create a database and run
SQL queries in DB2 for iSeries, see the DB2 Universal Database for iSeries in the IBM iSeries Information
Center.
For information about how to create a database and run
SQL queries in DB2 for z/OS, see the Information Management
Software for z/OS Solutions
Information Center.
Procedure
- Open a command
window.
- Change to the app_server_root/bin
directory
- Enter the following commands to replace
the variables in
the SQL files:
- export SCHEMA_LOCATION=app_server_root/etc/wim/setup/lookaside
Set the SCHEMA_LOCATION value to the location
where you copied the SQL files if you do not have WebSphere Application Server installed
on the same system on which you are setting up the database.
- export DBTYPE=<db_type>
where
the value of <db_type> is db2iseries or db2zos
- To specify the database schema where you want to create the federated
repository tables use the DBSCHEMA command. If you want to use the
default schema, which is typically the namespace of the current database
user, do not specify the DBSCHEMA command.
export DBSCHEMA=dbschemaname
- export TSPREFIX=<tsprefix>
where <tsprefix> is
the tablespace prefix. The maximum length allowed for this string
is 3 characters.
- export SCHEMA_DEST_LOCATION=<schema_dest_location>
where <schema_dest_location> is
the location where the updated SQL files with replaced variables should
be copied. If SCHEMA_DEST_LOCATION is not set, the updated SQL files
are copied to a directory with the name as the unsubstituted value
under the current directory. The output indicates where the files
are copied to.
- ./ws_ant.sh
-f app_server_root/etc/wim/setup/filterbuild.xml
- Start the DB2 server.
- Create a database.
- Run the
SQL files, which were previously referenced, to
create the tables for the property extension repository. If
you are setting up the database on the same system on which the application
server is installed, the files are located in the following locations:
- DB2 for iSeries
app_server_root/etc/wim/setup/lookaside/db2iseries/dbclean.sql
app_server_root/etc/wim/setup/lookaside/db2iseries/schema.sql
app_server_root/etc/wim/setup/lookaside/db2iseries/primarykeys.sql
app_server_root/etc/wim/setup/lookaside/db2iseries/indexes.sql
app_server_root/etc/wim/setup/lookaside/db2iseries/references.sql
app_server_root/etc/wim/setup/lookaside/keys.sql
app_server_root/etc/wim/setup/lookaside/bootstrap.sql
- DB2 for z/OS
app_server_root/etc/wim/setup/lookaside/db2zos/dbclean.sql
app_server_root/etc/wim/setup/lookaside/db2zos/schema.sql
app_server_root/etc/wim/setup/lookaside/db2zos/primarykeys.sql
app_server_root/etc/wim/setup/lookaside/db2zos/indexes.sql
app_server_root/etc/wim/setup/lookaside/db2zos/references.sql
app_server_root/etc/wim/setup/lookaside/keys.sql
app_server_root/etc/wim/setup/lookaside/bootstrap.sql
Otherwise, run the SQL files from the location to
which you copied the files. If you executed the commands to substitute
variables according to the steps in the previous section, Specifying
the database schema, the SQL files are copied to the location you
specified for SCHEMA_DEST_LOCATION. If SCHEMA_DEST_LOCATION is not
set, the updated SQL files are copied to a directory with the name
as the unsubstituted value under the current directory. The output
shows where the files are copied.
What to do next
Run
the setupIdMgrPropertyExtensionRepositoryTables command
with the skipDBCreation parameter set to true
to populate the tables that are created. For more information, read
about setting up an entry mapping repository, a property extension
repository, or a custom registry database repository using wsadmin
commands.