Friday, August 4, 2017

dbext hangs with sqlplus connection

Hi,

I'm using the dbext plugin, and trying to get the results from an Oracle query.   However, dbext never returns a result.  The async job just runs forever (hangs?), and without any output.

If I set 
:DBSetOption display_cmd_line=1, 
and then copy the sqlplus command line to a shell prompt and execute it, it returns immediately with the results I expect, so I know I have all of my connection parameters correct, and the SQL file is syntactically valid. sqlplus exits with a return code of 0. 


On dbext version 25,  I get a line like:
dbext job status:run running time(ms):34000 DBJobStop to cancel

but it never completes, and the Result buffer never gets my results, it only has a line like (actual details redacted, but correct from my perspective):
Connection: T(ORA)  S(hostname:port/SID)  U(user)   at 12:17

I have to run DBJobStop every time.

On dbext version 25 if I set:
let g:dbext_default_use_jobs=0

then I get this error:

Error detected while processing function dbext#DB_execRangeSql[14]..dbext#DB_execSql[33]..dbext#DB_execFuncTypeWCheck[37]..<SNR>60_DB_ORA_execSql[33]..<SNR>60_DB_runCmd:
line   24:
E484: Can't open file /var/folders/lr/9cq0d96j3csbn8v66ppx_2fhg15kw1/T/vSz8MBg/2


I get the same error on version 24.

I've tried setting $TMPDIR to just plain 'tmp' and it results in the same error with a path in /tmp.  Copying the command line to a new shell and executing it once again works flawlessly.

Any tips on how to diagnose this?  I'm on MacOS Sierra using MacVim, although I get the same results from the command line vim from homebrew as well.   I'd like to get this solved using sqlplus and not DBI, as my perl installations are a mess - bash thinks it's using perl 5.18, brew vim is compiled with perl 5.26, and MacVim is compiled with perl 5.16.  I'd prefer to not have to sort that out with regards to DBI and DBD::Oracle.

brew vim is version 8.0.666
MacVim is 8.0.771

Thanks,
Dan

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments: