dbext hangs with sqlplus connection

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

dbext hangs with sqlplus connection

Dan Wierenga-2
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: dbext hangs with sqlplus connection

David Fishburn-2


On Fri, Aug 4, 2017 at 3:50 PM, Dan Wierenga <[hidden email]> wrote:
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.



Hmm, I am seeing this periodically as well.  Will have to debug more on this.  First time with the async jobs.


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

I would leave that at zero, until I get a chance to find the async issue.

 
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. 


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


When you show the display_cmd_line=1 and the error show above, can you paste what the command line was to compare the output.

Thanks,
David


--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: dbext hangs with sqlplus connection

Dan Wierenga-2


On Fri, Aug 4, 2017 at 2:33 PM, David Fishburn <[hidden email]> wrote:


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

I would leave that at zero, until I get a chance to find the async issue.


Ok, will do.

 
When you show the display_cmd_line=1 and the error show above, can you paste what the command line was to compare the output.


Here, $TMPDIR was set to '/Users/dwierenga/vimtemp'  just to make sure there weren't any weird MacOS permission problems with special system folders.   It's purposefully in my home directory and mode 755.

For this error:

Error detected while processing function dbext#DB_execRangeSql[14]..dbext#DB_execSql[33]..dbext#DB_execFuncTypeWCheck[37]..<SNR>55_DB_ORA_execSql[32]..<SNR>55_DB_runCmdJobSupport[7]..<SNR>55_DB_runCmd:
line   24:
E484: Can't open file /Users/dwierenga/vimtemp/vf1hRyr/1

The actual command was (connection info redacted of course):
/Users/dwierenga/oracle/instantclient_12_1/sqlplus -S "username/password@hostname:port/SID" @/Users/dwierenga/vimtemp/vf1hRyr/dbext.sql

It looks like dbext thinks there's a file named "1" in that directory, but that directory only has dbext.sql inside it. 

Thanks for looking into this! 
 

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: dbext hangs with sqlplus connection

Dan Wierenga-2


On Fri, Aug 4, 2017 at 3:33 PM, Dan Wierenga <[hidden email]> wrote:

It looks like dbext thinks there's a file named "1" in that directory, but that directory only has dbext.sql inside it. 

Any update on this?

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: dbext hangs with sqlplus connection

David Fishburn-2



On Fri, Aug 11, 2017 at 1:20 PM, Dan Wierenga <[hidden email]> wrote:

Any update on this?



Hey Dan.

I have been working away at improving the async job support.

I think I have made some good headway.  Would you be willing to try a pre-release and do some testing for me.  I will email you privately with a beta version.

Thanks,
David

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: dbext hangs with sqlplus connection

Dan Wierenga-2


On Fri, Aug 11, 2017 at 11:11 AM, David Fishburn <[hidden email]> wrote:
Hey Dan.

I have been working away at improving the async job support.

I think I have made some good headway.  Would you be willing to try a pre-release and do some testing for me.  I will email you privately with a beta version.

Thanks,
David

Sure thing, it would be my pleasure. 

--
--
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 [hidden email].
For more options, visit https://groups.google.com/d/optout.
Loading...