Closed PrimaMateria closed 4 years ago
Yes, if I give a command with -c "query", I am getting PANIC error Else, there is no output, nothing at all, just empty line
My observations: I have encountered this issue when my instance is not setup proper
With proper oracle setup, I was not getting the panic error. But, If I use some improper query, I am getting PANIC error. May be improper query is to be handled and meaningful error message has to be displayed.
BTW, USQL is a wonderful tool to use :)
I was able to connect, but anytime I execute invalid sql syntax I get the message:
error: %!v(PANIC=Error method: runtime error: slice bounds out of range [17:9])
My Oracle db is inside a docker container if that helps. I'm using version Oracle 12.2c and the latest version of usql. I'm on MacOS Mojave.
An update: Oracle has made it extremely difficult to work with their database. I'm committed to fixing this issue, and getting usql
working with Oracle, but Oracle isn't making it any easier. Previously I had been developing locally against Docker images as well as against production and staging deployments of the Oracle database. Unfortunately, at the moment, I am not currently administering any Oracle databases in a staging or production environment and Oracle has decided to DMCA every Docker image off the net, leaving only their broken, non-working images. I've filed an issue against their GitHub, which has not been responded to. While I have a number of development systems available to test with, sadly I cannot seem to get any working with Oracle 19.3 in any kind of capacity. It's not that I'm unable or unwilling, but that I don't have time to deal with Oracle's broken builds, non-standard environments, and insane (antiquated?) procedures necessary to fix this issue. As something of a mild-perfectionist, the fact that usql
is not working properly with one of the major databases really rankles me, but I may not have enough time to fix this issue in any kind of quick fashion.
I deeply apologize to those who would like to use usql
with Oracle (I would too!), but as it is, I feel that it's really Oracle that's unusable, and not usql
. That said, if anyone wanted to track down this issue and fix it, I'd be happy to accept a PR for it.
I tracked down the issue from within usql
, I still don't know how this strange message is being generated, but the errors should be handled/unwrapped properly now from within usql
:
$ go build -tags 'no_base,oracle' && ./usql or://localhost:1521/blah
error: godror: ORA-12545: Connect failed because target host or object does not exist
$
@nperrier appreciate the pointer. The ORA-12545
error in the above is how usql
formats the error message that's being reported by the godror
driver, which in turn is using Oracle's C library, and is returning that error message. This is the standard error message formatting for all of the databases that usql
supports. As I am not able to actually run an Oracle database (see my previous comment), I can't fix any remaining connectivity issues in either usql
or the godror
driver.
Thanks @kenshaw, appreciate the work.
I agree, Oracle's databases are incredibly backwards (they don't even have a BOOLEAN
type and it's almost the year 2020).
Hi, I am not able to figure out how to connect to oracle db. I am always getting the same error whatever url I specify.
I tried several combinations - username and password, port, sid, service name. All end with the same error.