JDBC - Converting from DB2 to Teradata

Connectivity
Enthusiast

JDBC - Converting from DB2 to Teradata

I'm just converting some Java JDBC code to use Teradata from DB2 - thought I would share a couple of things I found and ask for any other advice.

1) Remove "WITH UR" from your statements: DB2 supports uncommitted read in the syntax "WITH UR" at the end of a SQL statement, I guess Teradata does not recognize that syntax.

2) Upgrade to the latest drivers: prior to upgrading, I was having problems populating date fields using parameters in the SQL - after upgrading driver, these date problems disappeared. 

Do you have any other advice as I proceed with my project?

Luke

Tags (1)
2 REPLIES
Teradata Employee

Re: JDBC - Converting from DB2 to Teradata

Teradata does support the Read Uncommitted transaction isolation.

You can specify Read Uncommitted transaction isolation for the Connection by calling:

Connection.setTransactionIsolation(Connection.TRANSACTION_READ_UNCOMMITTED)

Or you can specify Read Uncommitted transaction isolation for a particular query by prefixing it with a LOCKING clause:

locking row for access select * from MyTable

Enthusiast

Re: JDBC - Converting from DB2 to Teradata

Thanks tomnolan - I'm starting to see that converting my code from db2 will not be quite as easy as I had hoped.