views:

168

answers:

2

I started using the jOra eclipse plugin. The plugin seems pretty robust and I'm hoping to stop using SQLDeveloper for 95% of my database needs.

Many of our tables have columns of type TIMESTAMP with LOCAL TIME ZONE. I can connect to the oracle DB using a jdbc string and the plugin seems to function very well. However, when I try to update one of these TIMESTAMP with LOCAL TIME ZONE values, I get a sql exception: java.sql.SQLException: connection session time zone was not set.

Does anyone know how I can set the time zone through the jdbc connection url? jOra doesn't seem to support adding custom connection properties, so the connection URL is really my only option.

Update: Running version 1.0.1, which I believe is the latest version.
Update2: Apparently I can perform an update statement in the sql worksheet just fine, just can't use their detail browser interface to update.

A: 

What version do you use? According to their release notes this issue was already fixed in 0.9.0. Consider upgrading. If still in vain, I'd report a bug over there, they seem to maintain it well enough.

BalusC
A: 

After you connect to the DB, try running:
ALTER SESSION SET time_zone='+01:00';

Alternatively you could create a system trigger:

CREATE OR REPLACE TRIGGER setSessionTZ
    AFTER LOGON ON DATABASE
BEGIN
    EXECUTE IMMEDIATE 'ALTER SESSION SET time_zone=''+01:00''';
END;
Marius Burz