This documentation is available to agents as Markdown at https://docs.synthesized.io/tdk/latest/user_guide/080_troubleshooting/database_specific.md. For the complete documentation index, see llms.txt.

Database-Specific Troubleshooting

Fixes for problems that come from one database’s behavior or its JDBC driver.

Database Pages and sections

PostgreSQL

Schema search path, Partitioned tables

MySQL

Packet size and ENUM types, Zero dates, TINYINT(1)

Oracle

ORA-00001 and TNS names, Sequences

SQL Server

Identity columns

Any database

SSL certificate issues, Type Handling

PostgreSQL

Schema Search Path

Issue: Tables not found despite correct names.

Solution: Set the search path in the input JDBC URL:

tdk -iu 'jdbc:postgresql://host:5432/db?currentSchema=public,schema1,schema2' ...

MySQL

max_allowed_packet

Issue: "Packet too large" errors.

Solution: Increase packet size:

SET GLOBAL max_allowed_packet=1073741824;  -- 1GB

ENUM Types

Issue: ENUM values not preserved correctly.

Solution: Use the categorical generator:

transformations:
  - columns: ["status"]
    params:
      type: categorical_generator

Oracle

ORA-00001: Unique Constraint Violated

Issue: Sequence values conflict with existing data.

Solution: Reset sequences before generation (Oracle 18c and later). First find the next free value:

SELECT MAX(id)+1 FROM customer;

Then restart the sequence at that value, replacing <next-value> with the result of the query:

ALTER SEQUENCE customer_seq RESTART START WITH <next-value>;

See also Oracle sequences.

TNS Configuration

Issue: "TNS: could not resolve connect identifier".

Solution: Verify tnsnames.ora and set TNS_ADMIN to the directory that contains it:

export TNS_ADMIN=/path/to/directory/with/tnsnames

SQL Server

Identity Columns

Issue: Cannot insert into IDENTITY columns.

Solution: The platform handles identity columns itself. Don’t give an identity column a transformer that sets its values. To find the identity columns:

-- Check IDENTITY columns
SELECT name, is_identity
FROM sys.columns
WHERE object_id = OBJECT_ID('dbo.customers');