Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with Oracle 11g #47

Closed
hoantv opened this issue Dec 9, 2020 · 9 comments
Closed

Problem with Oracle 11g #47

hoantv opened this issue Dec 9, 2020 · 9 comments

Comments

@hoantv
Copy link

hoantv commented Dec 9, 2020

Hi Sijms.
With oracle 12c, the lib worked perfectly. but when I used with oracle 11g. The error ORA-01882: timezone region not found. How to disable this parameter oracle.jdbc.timezoneAsRegion=false ?

@rongfengliang
Copy link

@hoantv i test with oracle 10g is ok ,maybe some sql query with time?

@hoantv
Copy link
Author

hoantv commented Dec 9, 2020

@hoantv i test with oracle 10g is ok ,maybe some sql query with time?

the error occured when i create new connection, i hadn't yet made a query:
conn, err := go_ora.NewConnection("oracle://user:pass@server/service_name")

@sijms
Copy link
Owner

sijms commented Dec 9, 2020

can you see the log file at define which step cause error

@hoantv
Copy link
Author

hoantv commented Dec 9, 2020

can you see the log file at define which step cause error

Tomorrow i will send you the log :).

@hoantv
Copy link
Author

hoantv commented Dec 10, 2020

After update lasted lib. It worked. Thank you.
By the way, could you add url.escapedQuery for password. Users dont have to add to thier code anymore.

@sijms
Copy link
Owner

sijms commented Dec 10, 2020

what do you mean by url.escapedQuery can you give example

@hoantv
Copy link
Author

hoantv commented Dec 10, 2020

I used it in mycode. User dont have to replace thier special characters

url := fmt.Sprintf("oracle://%s:%s@%s:%d/%s", instance.Username, url.QueryEscape(instance.Password), instance.Host, instance.Port, instance.Sid)

@sijms
Copy link
Owner

sijms commented Dec 11, 2020

how can I add QueryEscape for password alone ?
this means I will parse the database url manually and extract password and escape It ?
sql interface need to pass database url like this
sql.Open("oracle", "oracle://user:pass@server:1521/service_name")

I think this is job of the programmer to pass correct url to the driver and actually your code is good solution.

if it is ok please close the issue

@hoantv
Copy link
Author

hoantv commented Dec 12, 2020

Ok :)

@hoantv hoantv closed this as completed Dec 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants