Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Connection to Oracle 10g

When I try to connect to a Oracle 10g database and want to retrieve data from it, I got the following error message:
connecting to socket on port 3981
connected
Exception in component tOracleInput_1
java.sql.SQLException: Session Time Zone not set!
at oracle.jdbc.driver.TimestampltzAccessor.getString(TimestampltzAccessor.java:88)
at oracle.jdbc.driver.T4CTimestampltzAccessor.getString(T4CTimestampltzAccessor.java:254)
at oracle.jdbc.driver.OracleResultSetImpl.getString(OracleResultSetImpl.java:397)
at datawarehouse_bic.sessiontimezone_0_1.sessionTimeZone.tOracleInput_1Process(sessionTimeZone.java:1578)
at datawarehouse_bic.sessiontimezone_0_1.sessionTimeZone.runJobInTOS(sessionTimeZone.java:2408)
at datawarehouse_bic.sessiontimezone_0_1.sessionTimeZone.main(sessionTimeZone.java:2282)
disconnected
If I check the connection towards the database, its succesful.
The table I want to retreive has several date fields where (in Oracle) the type is set to TIMESTAMP_6_WITH LOCAL TIME ZONE
Do I need to do something special to retreive the date and not get the error.
I am using TOS 4.0.2
Thanks
Henk
Labels (4)
2 Replies
Anonymous
Not applicable
Author

Hello
Here is a related problem about IMESTAMP_6_WITH LOCAL TIME ZONE
http://www.orafaq.com/usenet/comp.databases.oracle.misc/2005/12/06/0081.htm
Try to execute this query in tOracleRow component, eg:
tOracleConnection
|
onsubjobok
|
tOracleRow
|
onsubjobok
|
tOracleInput---tLogRow
|
tOracleCommit.
on tOracleRow, using an existing connection, execute the query: "alter session set time_zone='<TZ>'" //TZ is your time zone, you can get it by TimeZone.getDefault()
on tOracleInput: using an existing connection.
Best regards
Shong
Anonymous
Not applicable
Author

In perl, you can do this by using a tPerl at the start of the job where you initialize the oracle env varibles:
$ENV{'TZ'} = 'PST';