Extracting data from a legacy IBM Optim database
Use the nextgen-upgrade utility to connect directly to a legacy IBM® Optim database and extract all
OPTIMDIR table data to JSON files for use in subsequent upgrade steps.
Before you begin
Before you extract data, ensure that the following prerequisites are met:
- You have access to the legacy IBM Optim database (DB2, Oracle, or SQL Server) that contains the OPTIMDIR schema.
- Your database user account has
SELECTpermission on all 13 OPTIMDIR tables. - The machine running the utility has network connectivity to the database host and port.
- For IBM DB2 source databases only: Java Runtime Environment (JRE) 21 or later is
installed and available on the
PATH. To check the current version, runjava -version. To install Java 21 on Red Hat Linux, runyum install java-21-openjdk.Important: TheJDBCQuery.classfile that is embedded in the binary is compiled with Java 21 (class file version 65.0). The Java runtime on the target machine must be Java 21 or later. Running the DB2 extractor with an older JRE produces an UnsupportedClassVersionError and the extraction fails. - The machine runs Red Hat Enterprise Linux version 9 or later.
- The
nextgen-upgradebinary is downloaded and extracted.
Procedure
Results
The output directory specified by --optimdirpath now contains 14 JSON files
representing all 13 OPTIMDIR tables and a relationships summary. These files are ready for use in
the next phase of the upgrade process.
The following table describes common errors and their resolutions:
| Error message | Likely cause | Resolution |
|---|---|---|
| failed to ping database: <driver error> | Incorrect hostname, port, or database name; network unreachable. | Verify the connection details and confirm network access to the database host and port. |
| authentication failed: incorrect username or password for database '<DBNAME>' | Wrong credentials supplied. | Re-enter the correct credentials. Confirm that the database user exists and has
SELECT access on OPTIMDIR tables. |
| unsupported database type: <value> | An unsupported value was passed to --data-extractor. |
Use only db2, oracle, or
sqlserver. |
| JDBC query failed: <error> | Java 21 is not installed or not available on PATH (DB2 only). |
Install Java 21 and verify with java -version. |
| JDBC query failed: <error> with UnsupportedClassVersionError: JDBCQuery has been compiled by a more recent version of the Java Runtime | The JRE on the target machine is older than Java 21. The embedded
JDBCQuery.class was compiled at class file version 65.0 and cannot run on an
earlier JRE (DB2 only). |
Upgrade the JRE on the target machine to Java 21 or later. |
| Warning: Failed to extract <TABLE>: query failed: <driver error> where the driver error indicates insufficient privileges (for example, DB2 SQLSTATE=42501 or Oracle ORA-01031) | Database user lacks SELECT on one or more OPTIMDIR tables. |
Request GRANT SELECT on the affected OPTIMDIR tables from your database
administrator. |
| Warning: Failed to extract <TABLE>: query failed: <driver error> where the driver error indicates the table is not found (for example, DB2 SQLCODE=-204) | For DB2: the OPTIMDIR tables are not in the schema that matches the connecting username. | Confirm that the OPTIMDIR tables exist under the schema that matches your DB2 username, or
use --db-schema to specify the correct schema owner. Contact your database
administrator if needed. |
| --service-name is required for Oracle data extraction | The --service-name flag was not provided for an Oracle extraction. |
Add --service-name <service_name> to the command. |
| data extraction failed: 0 of <N> tables were successfully extracted | All table queries failed due to connectivity or permission issues. | Resolve the underlying issue that is reported in the preceding warning messages and retry. |
What to do next
Use the extracted JSON files as input to generate upgrade pipelines or an assessment report. For more information, see Generating upgrade pipelines from extracted data.