Before you create a Db2 for LUW workspace
Installing the Db2 drivers
Before you can use the data connector, you must make the Db2 drivers available to Tonic Structural:
From https://www.nuget.org/packages/Net.IBM.Data.Db2, download the correct version of the
Net.IBM.Data.Db2
driver for your operating system. The correct version as of August 12, 2024 is 8.0.0.200.Create a directory:
<my-directory>
From the driver zip file:
Extract
lib/net8.0/IBM.Data.Db2.dll
into<my-directory>/IBM.Data.Db2.dll
.Extract
buildTransitive/clidriver/
into<my-directory>/clidriver/
.
Mount the created directory into the Tonic Web Server and Tonic Worker. You must map the directory you created to
/data/db2
on the containers.For Docker, you place the driver files on the host machine, then share it to the containers as a volume. You must map the drivers to
/data/db2
on the containers.To map the drivers, add the following entry into the Docker Compose file:
For Kubernetes, you can use any volume type that is allowed within your environment. It must provide at least
ReadOnlyMany
access. You must map the drivers to/data/db2
on the containers. In your web server and worker deployment YAML files, the entry should be similar to the following:
Required permissions (source database user)
The source database user must have the following permissions:
On the database,
DBADMAUTH
andDATAACCESSAUTH
If user is not authorized with
DBADMAUTH
orDATAACCESSAUTH
, then Structural at minimum requires:SELECT
privilege on all tablesSELECT
privilege on the following system catalog tables:SYSCAT.TABLES
SYSCAT.COLUMNS
SYSCAT.KEYCOLUSE
SYSCAT.INDEXCOLUSE
SYSCAT.INDEXES
SYSCAT.TABCONST
SYSCAT.TABLESPACES
SYSCAT.SCHEMATA
Required permissions (destination database user)
The destination database user must have the following permissions:
On the database,
DBADMAUTH
andDATAACCESSAUTH
If user is not authorized with
DBADMAUTH
orDATAACCESSAUTH
, then Structural at minimum requires:SYSADM
orSYSCTRL
authoritySELECT
,INSERT
,ALTER
,DELETE
,INDEX
,REFERENCES
privilege on all tablesSELECT
privilege on the following system catalog tables:SYSCAT.TABLES
SYSCAT.COLUMNS
SYSCAT.KEYCOLUSE
SYSCAT.INDEXCOLUSE
SYSCAT.INDEXES
SYSCAT.TABCONST
SYSCAT.TABLESPACES
SYSCAT.SCHEMATA
EXECUTE
privilege on the following routines:SYS_PROC.DB2LK_GENERATE_DDL
AUTH_LIST_AUTHORITIES_FOR_AUTHID
Creating the destination databases
For Db2 for LUW, Structural does not create the destination database during data generation.
The destination database with the full schema must already be in place.
When you run the data generation, Structural removes the data from the database and populuates it with the transformed source data.
Last updated