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

Ping returns error ORA-01010: invalid OCI operation #224

Closed
ainvaltin opened this Issue Oct 10, 2017 · 4 comments

Comments

Projects
None yet
3 participants
@ainvaltin
Copy link

ainvaltin commented Oct 10, 2017

When calling db.Ping() it returns error

Ses.Ping Env.ociError ORA-01010: invalid OCI operation

go version go1.9.1 linux/amd64
oracle client lib 11.2
Server _O_VERSION Oracle9i Release 9.2.0.8.0 - 64bit Production JServer Release 9.2.0.8.0 - Production

I ques it's the (quite old) server which causes the error but it would be nice if it would be possible to change the driver so that it would work with this old version too. Other basic operations (using DML statements) seem to work...

@tgulacsi

This comment has been minimized.

Copy link
Collaborator

tgulacsi commented Oct 10, 2017

Why do you need the ping?

Do you know which version has appeared the Ping support in first?

@cjbj

This comment has been minimized.

Copy link

cjbj commented Oct 10, 2017

@tgulacsi you can treat ORA-1010 as a successful ping: https://github.com/php/php-src/blob/PHP-7.1.10/ext/oci8/oci8.c#L2091-L2094 (and yes, ODPI-C needs this change too)

@tgulacsi tgulacsi closed this in cd7749d Oct 10, 2017

@tgulacsi

This comment has been minimized.

Copy link
Collaborator

tgulacsi commented Oct 10, 2017

@cjbj that's what I've thought, too: checking Version of server for every Ping is a big unnecessary overhead, storing this info on the Srv object is a big unnecessary complexity overhead.

@ainvaltin

This comment has been minimized.

Copy link
Author

ainvaltin commented Oct 10, 2017

I used ping as it seems to be recommended by the go's DB interface, see quote from the doc of the db.Open:

Open may just validate its arguments without creating a connection to the database. To verify that the data source name is valid, call Ping.

anthony-tuininga added a commit to oracle/odpi that referenced this issue Oct 14, 2017

Attempting to ping a database earlier than 10g results in ORA-1010: i…
…nvalid OCI

operation, but that implies a response from the database and therefore a
successful ping, so treat it that way!
(see rana/ora#224 for additional information)

anthony-tuininga added a commit to oracle/odpi that referenced this issue Oct 14, 2017

Attempting to ping a database earlier than 10g results in ORA-1010: i…
…nvalid OCI

operation, but that implies a response from the database and therefore a
successful ping, so treat it that way!
(see rana/ora#224 for additional information)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment