开发者

connection time zone issue with jOra eclipse plugin

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 addin开发者_StackOverflowg 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.


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.


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;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜